aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWan-Teh Chang <wtc@google.com>2023-11-29 20:04:24 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-11-29 20:04:24 +0000
commit73e38df5d54f4eb5feeeb058ff5e919078869453 (patch)
tree3de6188d612c48c77d0b47f25acfbbd3ad3fd835
parent2faf9c3e0e8c4ae9b723d3f9c8a95916d6fe8f79 (diff)
parent635eba3319cb6e20c2a72902b6fb3dd2fc8e93ef (diff)
downloadlibvpx-73e38df5d54f4eb5feeeb058ff5e919078869453.tar.gz
Merge "Adding "const" to vpx_codec_iface_t is redundant" into main
-rw-r--r--test/decode_api_test.cc6
-rw-r--r--test/encode_api_test.cc8
-rw-r--r--test/level_test.cc2
3 files changed, 8 insertions, 8 deletions
diff --git a/test/decode_api_test.cc b/test/decode_api_test.cc
index 9e82ace1b..44e439772 100644
--- a/test/decode_api_test.cc
+++ b/test/decode_api_test.cc
@@ -20,7 +20,7 @@ namespace {
#define NELEMENTS(x) static_cast<int>(sizeof(x) / sizeof(x[0]))
TEST(DecodeAPI, InvalidParams) {
- static const vpx_codec_iface_t *kCodecs[] = {
+ static vpx_codec_iface_t *kCodecs[] = {
#if CONFIG_VP8_DECODER
&vpx_codec_vp8_dx_algo,
#endif
@@ -120,7 +120,7 @@ void TestVp9Controls(vpx_codec_ctx_t *dec) {
}
TEST(DecodeAPI, Vp9InvalidDecode) {
- const vpx_codec_iface_t *const codec = &vpx_codec_vp9_dx_algo;
+ vpx_codec_iface_t *const codec = &vpx_codec_vp9_dx_algo;
const char filename[] =
"invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.v2.ivf";
libvpx_test::IVFVideoSource video(filename);
@@ -147,7 +147,7 @@ TEST(DecodeAPI, Vp9InvalidDecode) {
void TestPeekInfo(const uint8_t *const data, uint32_t data_sz,
uint32_t peek_size) {
- const vpx_codec_iface_t *const codec = &vpx_codec_vp9_dx_algo;
+ vpx_codec_iface_t *const codec = &vpx_codec_vp9_dx_algo;
// Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get
// to decoder_peek_si_internal on frames of size < 8.
if (data_sz >= 8) {
diff --git a/test/encode_api_test.cc b/test/encode_api_test.cc
index f48c9a106..739e61a6e 100644
--- a/test/encode_api_test.cc
+++ b/test/encode_api_test.cc
@@ -28,7 +28,7 @@
namespace {
-const vpx_codec_iface_t *kCodecIfaces[] = {
+vpx_codec_iface_t *kCodecIfaces[] = {
#if CONFIG_VP8_ENCODER
&vpx_codec_vp8_cx_algo,
#endif
@@ -37,7 +37,7 @@ const vpx_codec_iface_t *kCodecIfaces[] = {
#endif
};
-bool IsVP9(const vpx_codec_iface_t *iface) {
+bool IsVP9(vpx_codec_iface_t *iface) {
static const char kVP9Name[] = "WebM Project VP9";
return strncmp(kVP9Name, vpx_codec_iface_name(iface), sizeof(kVP9Name) - 1) ==
0;
@@ -259,7 +259,7 @@ TEST(EncodeAPI, MultiResEncode) {
TEST(EncodeAPI, SetRoi) {
static struct {
- const vpx_codec_iface_t *iface;
+ vpx_codec_iface_t *iface;
int ctrl_id;
} kCodecs[] = {
#if CONFIG_VP8_ENCODER
@@ -365,7 +365,7 @@ TEST(EncodeAPI, SetRoi) {
}
}
-void InitCodec(const vpx_codec_iface_t &iface, int width, int height,
+void InitCodec(vpx_codec_iface_t &iface, int width, int height,
vpx_codec_ctx_t *enc, vpx_codec_enc_cfg_t *cfg) {
cfg->g_w = width;
cfg->g_h = height;
diff --git a/test/level_test.cc b/test/level_test.cc
index 3f1cf9f1c..36cfd645c 100644
--- a/test/level_test.cc
+++ b/test/level_test.cc
@@ -120,7 +120,7 @@ TEST_P(LevelTest, TestTargetLevel255) {
TEST_P(LevelTest, TestTargetLevelApi) {
::libvpx_test::I420VideoSource video("hantro_odd.yuv", 208, 144, 30, 1, 0, 1);
- static const vpx_codec_iface_t *codec = &vpx_codec_vp9_cx_algo;
+ static vpx_codec_iface_t *codec = &vpx_codec_vp9_cx_algo;
vpx_codec_ctx_t enc;
vpx_codec_enc_cfg_t cfg;
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_enc_config_default(codec, &cfg, 0));