diff --git a/aom_dsp/arm/aom_convolve8_avg_neon.c b/aom_dsp/arm/aom_convolve8_avg_neon.c index 7dc936d6e..09429d6d2 100644 --- a/aom_dsp/arm/aom_convolve8_avg_neon.c +++ b/aom_dsp/arm/aom_convolve8_avg_neon.c @@ -65,6 +65,10 @@ void aom_convolve8_avg_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, assert(x_step_q4 == 16); + (void)x_step_q4; + (void)y_step_q4; + (void)filter_y; + q0s16 = vld1q_s16(filter_x); src -= 3; // adjust for taps @@ -241,6 +245,10 @@ void aom_convolve8_avg_vert_neon(const uint8_t *src, ptrdiff_t src_stride, assert(y_step_q4 == 16); + (void)x_step_q4; + (void)y_step_q4; + (void)filter_x; + src -= src_stride * 3; q0s16 = vld1q_s16(filter_y); for (; w > 0; w -= 4, src += 4, dst += 4) { // loop_vert_h diff --git a/aom_dsp/arm/aom_convolve8_neon.c b/aom_dsp/arm/aom_convolve8_neon.c index ed0df6dd2..8ebffb5f9 100644 --- a/aom_dsp/arm/aom_convolve8_neon.c +++ b/aom_dsp/arm/aom_convolve8_neon.c @@ -65,6 +65,10 @@ void aom_convolve8_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, assert(x_step_q4 == 16); + (void)x_step_q4; + (void)y_step_q4; + (void)filter_y; + q0s16 = vld1q_s16(filter_x); src -= 3; // adjust for taps @@ -225,6 +229,10 @@ void aom_convolve8_vert_neon(const uint8_t *src, ptrdiff_t src_stride, assert(y_step_q4 == 16); + (void)x_step_q4; + (void)y_step_q4; + (void)filter_x; + src -= src_stride * 3; q0s16 = vld1q_s16(filter_y); for (; w > 0; w -= 4, src += 4, dst += 4) { // loop_vert_h diff --git a/aom_dsp/blend_a64_hmask.c b/aom_dsp/blend_a64_hmask.c index 5ebbe0b20..dc11e8075 100644 --- a/aom_dsp/blend_a64_hmask.c +++ b/aom_dsp/blend_a64_hmask.c @@ -49,6 +49,7 @@ void aom_highbd_blend_a64_hmask_c(uint8_t *dst_8, uint32_t dst_stride, uint16_t *dst = CONVERT_TO_SHORTPTR(dst_8); const uint16_t *src0 = CONVERT_TO_SHORTPTR(src0_8); const uint16_t *src1 = CONVERT_TO_SHORTPTR(src1_8); + (void)bd; assert(IMPLIES(src0 == dst, src0_stride == dst_stride)); assert(IMPLIES(src1 == dst, src1_stride == dst_stride)); diff --git a/aom_dsp/blend_a64_mask.c b/aom_dsp/blend_a64_mask.c index 64c9dbb93..d6d7b73a8 100644 --- a/aom_dsp/blend_a64_mask.c +++ b/aom_dsp/blend_a64_mask.c @@ -89,6 +89,7 @@ void aom_highbd_blend_a64_mask_c(uint8_t *dst_8, uint32_t dst_stride, uint16_t *dst = CONVERT_TO_SHORTPTR(dst_8); const uint16_t *src0 = CONVERT_TO_SHORTPTR(src0_8); const uint16_t *src1 = CONVERT_TO_SHORTPTR(src1_8); + (void)bd; assert(IMPLIES(src0 == dst, src0_stride == dst_stride)); assert(IMPLIES(src1 == dst, src1_stride == dst_stride)); diff --git a/aom_dsp/blend_a64_vmask.c b/aom_dsp/blend_a64_vmask.c index 547665719..2ced9eee6 100644 --- a/aom_dsp/blend_a64_vmask.c +++ b/aom_dsp/blend_a64_vmask.c @@ -50,6 +50,7 @@ void aom_highbd_blend_a64_vmask_c(uint8_t *dst_8, uint32_t dst_stride, uint16_t *dst = CONVERT_TO_SHORTPTR(dst_8); const uint16_t *src0 = CONVERT_TO_SHORTPTR(src0_8); const uint16_t *src1 = CONVERT_TO_SHORTPTR(src1_8); + (void)bd; assert(IMPLIES(src0 == dst, src0_stride == dst_stride)); assert(IMPLIES(src1 == dst, src1_stride == dst_stride)); diff --git a/aom_dsp/fastssim.c b/aom_dsp/fastssim.c index 444440dde..8d5d2377c 100644 --- a/aom_dsp/fastssim.c +++ b/aom_dsp/fastssim.c @@ -202,6 +202,7 @@ static void fs_apply_luminance(fs_ctx *_ctx, int _l, int bit_depth) { if (bit_depth == 12) ssim_c1 = SSIM_C1_12; #else assert(bit_depth == 8); + (void)bit_depth; #endif w = _ctx->level[_l].w; h = _ctx->level[_l].h; @@ -326,6 +327,7 @@ static void fs_calc_structure(fs_ctx *_ctx, int _l, int bit_depth) { if (bit_depth == 12) ssim_c2 = SSIM_C2_12; #else assert(bit_depth == 8); + (void)bit_depth; #endif w = _ctx->level[_l].w; diff --git a/aom_dsp/intrapred.c b/aom_dsp/intrapred.c index de4de32e2..3789d6f01 100644 --- a/aom_dsp/intrapred.c +++ b/aom_dsp/intrapred.c @@ -302,6 +302,7 @@ void aom_ve_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride, const int I = above[0]; const int J = above[1]; const int K = above[2]; + (void)left; dst[0] = AVG3(H, I, J); dst[1] = AVG3(I, J, K); @@ -435,6 +436,7 @@ void aom_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, const int K = above[2]; const int L = above[3]; const int M = above[4]; + (void)left; dst[0] = AVG3(H, I, J); dst[1] = AVG3(I, J, K); diff --git a/aom_dsp/x86/convolve.h b/aom_dsp/x86/convolve.h index 63ff04ce5..8eafab5ab 100644 --- a/aom_dsp/x86/convolve.h +++ b/aom_dsp/x86/convolve.h @@ -26,6 +26,10 @@ typedef void filter8_1dfunction(const uint8_t *src_ptr, ptrdiff_t src_pitch, const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \ ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, \ const int16_t *filter_y, int y_step_q4, int w, int h) { \ + (void) filter_x; \ + (void) x_step_q4; \ + (void) filter_y; \ + (void) y_step_q4; \ assert(filter[3] != 128); \ assert(step_q4 == 16); \ if (filter[0] || filter[1] || filter[2]) { \ diff --git a/aomenc.c b/aomenc.c index 1d803d36a..cd1de276c 100644 --- a/aomenc.c +++ b/aomenc.c @@ -1387,10 +1387,11 @@ static void open_output_file(struct stream_state *stream, #if CONFIG_WEBM_IO if (stream->config.write_webm) { stream->ebml.stream = stream->file; - write_webm_file_header(&stream->ebml, cfg, &global->framerate, - stream->config.stereo_fmt, global->codec->fourcc, - pixel_aspect_ratio); + write_webm_file_header(&stream->ebml, cfg, stream->config.stereo_fmt, + global->codec->fourcc, pixel_aspect_ratio); } +#else + (void)pixel_aspect_ratio; #endif if (!stream->config.write_webm) { @@ -1710,8 +1711,7 @@ static float usec_to_fps(uint64_t usec, unsigned int frames) { } static void test_decode(struct stream_state *stream, - enum TestDecodeFatality fatal, - const AvxInterface *codec) { + enum TestDecodeFatality fatal) { aom_image_t enc_img, dec_img; struct av1_ref_frame ref_enc, ref_dec; @@ -2128,7 +2128,7 @@ int main(int argc, const char **argv_) { } if (got_data && global.test_decode != TEST_DECODE_OFF) - FOREACH_STREAM(test_decode(stream, global.test_decode, global.codec)); + FOREACH_STREAM(test_decode(stream, global.test_decode)); } fflush(stdout); diff --git a/configure b/configure index b6e94e6b0..bac50f4b6 100755 --- a/configure +++ b/configure @@ -577,6 +577,10 @@ process_toolchain() { check_add_cflags -Wuninitialized check_add_cflags -Wunused check_add_cflags -Wsign-compare + # Enabling the following warning (in combination with -Wunused above) + # for C++ generates errors in third_party code including googletest and + # libyuv. So enable it only for C code. + check_cflags "-Wextra" && add_cflags_only "-Wextra" # Enabling the following warning for C++ generates some useless warnings # about some function parameters shadowing class member function names. # So, only enable this warning for C code. diff --git a/examples/aom_cx_set_ref.c b/examples/aom_cx_set_ref.c index 2964e6b63..d2398ae2e 100644 --- a/examples/aom_cx_set_ref.c +++ b/examples/aom_cx_set_ref.c @@ -191,8 +191,7 @@ static void find_mismatch(const aom_image_t *const img1, } static void testing_decode(aom_codec_ctx_t *encoder, aom_codec_ctx_t *decoder, - aom_codec_enc_cfg_t *cfg, unsigned int frame_out, - int *mismatch_seen) { + unsigned int frame_out, int *mismatch_seen) { aom_image_t enc_img, dec_img; struct av1_ref_frame ref_enc, ref_dec; @@ -226,11 +225,10 @@ static void testing_decode(aom_codec_ctx_t *encoder, aom_codec_ctx_t *decoder, aom_img_free(&dec_img); } -static int encode_frame(aom_codec_ctx_t *ecodec, aom_codec_enc_cfg_t *cfg, - aom_image_t *img, unsigned int frame_in, - AvxVideoWriter *writer, int test_decode, - aom_codec_ctx_t *dcodec, unsigned int *frame_out, - int *mismatch_seen) { +static int encode_frame(aom_codec_ctx_t *ecodec, aom_image_t *img, + unsigned int frame_in, AvxVideoWriter *writer, + int test_decode, aom_codec_ctx_t *dcodec, + unsigned int *frame_out, int *mismatch_seen) { int got_pkts = 0; aom_codec_iter_t iter = NULL; const aom_codec_cx_pkt_t *pkt = NULL; @@ -271,7 +269,7 @@ static int encode_frame(aom_codec_ctx_t *ecodec, aom_codec_enc_cfg_t *cfg, // Mismatch checking if (got_data && test_decode) { - testing_decode(ecodec, dcodec, cfg, *frame_out, mismatch_seen); + testing_decode(ecodec, dcodec, *frame_out, mismatch_seen); } return got_pkts; @@ -404,7 +402,7 @@ int main(int argc, char **argv) { } } - encode_frame(&ecodec, &cfg, &raw, frame_in, writer, test_decode, &dcodec, + encode_frame(&ecodec, &raw, frame_in, writer, test_decode, &dcodec, &frame_out, &mismatch_seen); frame_in++; if (mismatch_seen) break; @@ -412,8 +410,8 @@ int main(int argc, char **argv) { // Flush encoder. if (!mismatch_seen) - while (encode_frame(&ecodec, &cfg, NULL, frame_in, writer, test_decode, - &dcodec, &frame_out, &mismatch_seen)) { + while (encode_frame(&ecodec, NULL, frame_in, writer, test_decode, &dcodec, + &frame_out, &mismatch_seen)) { } printf("\n"); diff --git a/test/av1_convolve_optimz_test.cc b/test/av1_convolve_optimz_test.cc index 465c7621b..0db15424b 100644 --- a/test/av1_convolve_optimz_test.cc +++ b/test/av1_convolve_optimz_test.cc @@ -53,7 +53,6 @@ const size_t maxHeight = 256; const size_t maxBlockSize = maxWidth * maxHeight; const int horizOffset = 32; const int vertiOffset = 32; -const size_t testMaxBlk = 128; const int stride = 128; const int x_step_q4 = 16; @@ -89,7 +88,7 @@ class VP10ConvolveOptimzTest : public ::testing::TestWithParam { void RunVertFilterBitExactCheck(); private: - void PrepFilterBuffer(int w, int h); + void PrepFilterBuffer(); void DiffFilterBuffer(); conv_filter_t conv_horiz_; conv_filter_t conv_vert_; @@ -105,7 +104,7 @@ class VP10ConvolveOptimzTest : public ::testing::TestWithParam { int avg_; }; -void VP10ConvolveOptimzTest::PrepFilterBuffer(int w, int h) { +void VP10ConvolveOptimzTest::PrepFilterBuffer() { int r, c; ACMRandom rnd(ACMRandom::DeterministicSeed()); @@ -149,7 +148,7 @@ void VP10ConvolveOptimzTest::DiffFilterBuffer() { } void VP10ConvolveOptimzTest::RunHorizFilterBitExactCheck() { - PrepFilterBuffer(testMaxBlk, testMaxBlk); + PrepFilterBuffer(); InterpFilterParams filter_params = get_interp_filter_params(filter_); @@ -166,7 +165,7 @@ void VP10ConvolveOptimzTest::RunHorizFilterBitExactCheck() { // and test again. int intermediate_height = (((height_ - 1) * 16 + subpel_) >> SUBPEL_BITS) + filter_params.taps; - PrepFilterBuffer(testMaxBlk, testMaxBlk); + PrepFilterBuffer(); av1_convolve_horiz_c(src_ref_, stride, dst_ref_, stride, width_, intermediate_height, filter_params, subpel_, x_step_q4, @@ -179,7 +178,7 @@ void VP10ConvolveOptimzTest::RunHorizFilterBitExactCheck() { } void VP10ConvolveOptimzTest::RunVertFilterBitExactCheck() { - PrepFilterBuffer(testMaxBlk, testMaxBlk); + PrepFilterBuffer(); InterpFilterParams filter_params = get_interp_filter_params(filter_); @@ -265,7 +264,7 @@ class VP10HbdConvolveOptimzTest : public TestWithHbdConvParams { void RunVertFilterBitExactCheck(); private: - void PrepFilterBuffer(int w, int h); + void PrepFilterBuffer(); void DiffFilterBuffer(); hbd_conv_filter_t conv_horiz_; hbd_conv_filter_t conv_vert_; @@ -282,7 +281,7 @@ class VP10HbdConvolveOptimzTest : public TestWithHbdConvParams { int bit_depth_; }; -void VP10HbdConvolveOptimzTest::PrepFilterBuffer(int w, int h) { +void VP10HbdConvolveOptimzTest::PrepFilterBuffer() { int r, c; ACMRandom rnd(ACMRandom::DeterministicSeed()); @@ -325,7 +324,7 @@ void VP10HbdConvolveOptimzTest::DiffFilterBuffer() { } void VP10HbdConvolveOptimzTest::RunHorizFilterBitExactCheck() { - PrepFilterBuffer(testMaxBlk, testMaxBlk); + PrepFilterBuffer(); InterpFilterParams filter_params = get_interp_filter_params(filter_); @@ -343,7 +342,7 @@ void VP10HbdConvolveOptimzTest::RunHorizFilterBitExactCheck() { // and test again. int intermediate_height = (((height_ - 1) * 16 + subpel_) >> SUBPEL_BITS) + filter_params.taps; - PrepFilterBuffer(testMaxBlk, testMaxBlk); + PrepFilterBuffer(); av1_highbd_convolve_horiz_c(src_, stride, dst_ref_, stride, width_, intermediate_height, filter_params, subpel_, @@ -356,7 +355,7 @@ void VP10HbdConvolveOptimzTest::RunHorizFilterBitExactCheck() { } void VP10HbdConvolveOptimzTest::RunVertFilterBitExactCheck() { - PrepFilterBuffer(testMaxBlk, testMaxBlk); + PrepFilterBuffer(); InterpFilterParams filter_params = get_interp_filter_params(filter_); diff --git a/test/avg_test.cc b/test/avg_test.cc index 40dd0864a..b7a707d4e 100644 --- a/test/avg_test.cc +++ b/test/avg_test.cc @@ -54,17 +54,17 @@ class AverageTestBase : public ::testing::Test { } // Sum Pixels - unsigned int ReferenceAverage8x8(const uint8_t *source, int pitch) { + static unsigned int ReferenceAverage8x8(const uint8_t *source, int pitch) { unsigned int average = 0; for (int h = 0; h < 8; ++h) - for (int w = 0; w < 8; ++w) average += source[h * source_stride_ + w]; + for (int w = 0; w < 8; ++w) average += source[h * pitch + w]; return ((average + 32) >> 6); } - unsigned int ReferenceAverage4x4(const uint8_t *source, int pitch) { + static unsigned int ReferenceAverage4x4(const uint8_t *source, int pitch) { unsigned int average = 0; for (int h = 0; h < 4; ++h) - for (int w = 0; w < 4; ++w) average += source[h * source_stride_ + w]; + for (int w = 0; w < 4; ++w) average += source[h * pitch + w]; return ((average + 8) >> 4); } @@ -97,11 +97,12 @@ class AverageTest : public AverageTestBase, protected: void CheckAverages() { + const int block_size = GET_PARAM(3); unsigned int expected = 0; - if (GET_PARAM(3) == 8) { + if (block_size == 8) { expected = ReferenceAverage8x8(source_data_ + GET_PARAM(2), source_stride_); - } else if (GET_PARAM(3) == 4) { + } else if (block_size == 4) { expected = ReferenceAverage4x4(source_data_ + GET_PARAM(2), source_stride_); } diff --git a/test/codec_factory.h b/test/codec_factory.h index c92d5c1cf..b645102de 100644 --- a/test/codec_factory.h +++ b/test/codec_factory.h @@ -123,6 +123,9 @@ class AV1CodecFactory : public CodecFactory { #if CONFIG_AV1_DECODER return new AV1Decoder(cfg, flags, deadline); #else + (void)cfg; + (void)flags; + (void)deadline; return NULL; #endif } @@ -134,6 +137,10 @@ class AV1CodecFactory : public CodecFactory { #if CONFIG_AV1_ENCODER return new AV1Encoder(cfg, deadline, init_flags, stats); #else + (void)cfg; + (void)deadline; + (void)init_flags; + (void)stats; return NULL; #endif } @@ -143,6 +150,8 @@ class AV1CodecFactory : public CodecFactory { #if CONFIG_AV1_ENCODER return aom_codec_enc_config_default(&aom_codec_av1_cx_algo, cfg, usage); #else + (void)cfg; + (void)usage; return AOM_CODEC_INCAPABLE; #endif } diff --git a/test/convolve_test.cc b/test/convolve_test.cc index aad8d4280..d944f3e14 100644 --- a/test/convolve_test.cc +++ b/test/convolve_test.cc @@ -246,7 +246,7 @@ void highbd_filter_block2d_8_c(const uint16_t *src_ptr, void highbd_block2d_average_c(uint16_t *src, unsigned int src_stride, uint16_t *output_ptr, unsigned int output_stride, unsigned int output_width, - unsigned int output_height, int bd) { + unsigned int output_height) { unsigned int i, j; for (i = 0; i < output_height; ++i) { for (j = 0; j < output_width; ++j) { @@ -268,7 +268,7 @@ void highbd_filter_average_block2d_8_c( highbd_filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, tmp, 64, output_width, output_height, bd); highbd_block2d_average_c(tmp, 64, dst_ptr, dst_stride, output_width, - output_height, bd); + output_height); } #endif // CONFIG_AOM_HIGHBITDEPTH diff --git a/test/datarate_test.cc b/test/datarate_test.cc index 977b08a5b..947c424f7 100644 --- a/test/datarate_test.cc +++ b/test/datarate_test.cc @@ -287,11 +287,6 @@ class DatarateTestAV1Large denoiser_offon_period_ = -1; } - int SetFrameFlags(int frame_num, int num_temp_layers) { - int frame_flags = 0; - return frame_flags; - } - virtual void PreEncodeFrameHook(::libaom_test::VideoSource *video, ::libaom_test::Encoder *encoder) { if (video->frame() == 0) encoder->Control(AOME_SET_CPUUSED, set_cpu_used_); diff --git a/test/dct16x16_test.cc b/test/dct16x16_test.cc index 10e29a686..b3df12944 100644 --- a/test/dct16x16_test.cc +++ b/test/dct16x16_test.cc @@ -272,12 +272,12 @@ void idct16x16_12(const tran_low_t *in, uint8_t *out, int stride) { } void idct16x16_10_ref(const tran_low_t *in, uint8_t *out, int stride, - int tx_type) { + int /*tx_type*/) { idct16x16_10(in, out, stride); } void idct16x16_12_ref(const tran_low_t *in, uint8_t *out, int stride, - int tx_type) { + int /*tx_type*/) { idct16x16_12(in, out, stride); } @@ -736,7 +736,7 @@ class InvTrans16x16DCT : public Trans16x16TestBase, virtual void TearDown() { libaom_test::ClearSystemState(); } protected: - void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) {} + void RunFwdTxfm(int16_t * /*in*/, tran_low_t * /*out*/, int /*stride*/) {} void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) { inv_txfm_(out, dst, stride); } diff --git a/test/decode_test_driver.cc b/test/decode_test_driver.cc index 529f75f6a..bd553c8c5 100644 --- a/test/decode_test_driver.cc +++ b/test/decode_test_driver.cc @@ -86,7 +86,7 @@ void DecoderTest::RunLoop(CompressedVideoSource *video, aom_codec_err_t res_dec = decoder->DecodeFrame(video->cxdata(), video->frame_size()); - if (!HandleDecodeResult(res_dec, *video, decoder)) break; + if (!HandleDecodeResult(res_dec, decoder)) break; } else { // Signal end of the file to the decoder. const aom_codec_err_t res_dec = decoder->DecodeFrame(NULL, 0); diff --git a/test/decode_test_driver.h b/test/decode_test_driver.h index a5983c862..57c6e7c26 100644 --- a/test/decode_test_driver.h +++ b/test/decode_test_driver.h @@ -139,7 +139,6 @@ class DecoderTest { // Hook to be called to handle decode result. Return true to continue. virtual bool HandleDecodeResult(const aom_codec_err_t res_dec, - const CompressedVideoSource & /*video*/, Decoder *decoder) { EXPECT_EQ(AOM_CODEC_OK, res_dec) << decoder->DecodeError(); return AOM_CODEC_OK == res_dec; diff --git a/test/encode_test_driver.cc b/test/encode_test_driver.cc index d9fd88fa9..deb12833d 100644 --- a/test/encode_test_driver.cc +++ b/test/encode_test_driver.cc @@ -202,7 +202,7 @@ void EncoderTest::RunLoop(VideoSource *video) { aom_codec_err_t res_dec = decoder->DecodeFrame( (const uint8_t *)pkt->data.frame.buf, pkt->data.frame.sz); - if (!HandleDecodeResult(res_dec, *video, decoder)) break; + if (!HandleDecodeResult(res_dec, decoder)) break; has_dxdata = true; } @@ -220,7 +220,7 @@ void EncoderTest::RunLoop(VideoSource *video) { // Flush the decoder when there are no more fragments. if ((init_flags_ & AOM_CODEC_USE_OUTPUT_PARTITION) && has_dxdata) { const aom_codec_err_t res_dec = decoder->DecodeFrame(NULL, 0); - if (!HandleDecodeResult(res_dec, *video, decoder)) break; + if (!HandleDecodeResult(res_dec, decoder)) break; } if (has_dxdata && has_cxdata) { diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h index e2b5986e3..c7dfd00af 100644 --- a/test/encode_test_driver.h +++ b/test/encode_test_driver.h @@ -233,7 +233,6 @@ class EncoderTest { // Hook to be called to handle decode result. Return true to continue. virtual bool HandleDecodeResult(const aom_codec_err_t res_dec, - const VideoSource & /*video*/, Decoder *decoder) { EXPECT_EQ(AOM_CODEC_OK, res_dec) << decoder->DecodeError(); return AOM_CODEC_OK == res_dec; diff --git a/test/encoder_parms_get_to_decoder.cc b/test/encoder_parms_get_to_decoder.cc index 74fb3f35f..52d68b1f4 100644 --- a/test/encoder_parms_get_to_decoder.cc +++ b/test/encoder_parms_get_to_decoder.cc @@ -46,9 +46,9 @@ struct EncodeParameters { }; const EncodeParameters kAV1EncodeParameterSet[] = { - { 0, 0, 0, 1, 0, AOM_CR_STUDIO_RANGE, AOM_CS_BT_601 }, - { 0, 0, 0, 0, 0, AOM_CR_FULL_RANGE, AOM_CS_BT_709 }, - { 0, 0, 1, 0, 0, AOM_CR_FULL_RANGE, AOM_CS_BT_2020 }, + { 0, 0, 0, 1, 0, AOM_CR_STUDIO_RANGE, AOM_CS_BT_601, { 0, 0 } }, + { 0, 0, 0, 0, 0, AOM_CR_FULL_RANGE, AOM_CS_BT_709, { 0, 0 } }, + { 0, 0, 1, 0, 0, AOM_CR_FULL_RANGE, AOM_CS_BT_2020, { 0, 0 } }, { 0, 2, 0, 0, 1, AOM_CR_STUDIO_RANGE, AOM_CS_UNKNOWN, { 640, 480 } }, // TODO(JBB): Test profiles (requires more work). }; @@ -94,7 +94,6 @@ class AvxEncoderParmsGetToDecoder } virtual bool HandleDecodeResult(const aom_codec_err_t res_dec, - const libaom_test::VideoSource &video, libaom_test::Decoder *decoder) { aom_codec_ctx_t *const av1_decoder = decoder->GetDecoder(); aom_codec_alg_priv_t *const priv = diff --git a/test/error_resilience_test.cc b/test/error_resilience_test.cc index 23dc81ac8..a487c52d8 100644 --- a/test/error_resilience_test.cc +++ b/test/error_resilience_test.cc @@ -55,8 +55,7 @@ class ErrorResilienceTestLarge nframes_++; } - virtual void PreEncodeFrameHook(libaom_test::VideoSource *video, - ::libaom_test::Encoder *encoder) { + virtual void PreEncodeFrameHook(libaom_test::VideoSource *video) { frame_flags_ &= ~(AOM_EFLAG_NO_UPD_LAST | AOM_EFLAG_NO_UPD_GF | AOM_EFLAG_NO_UPD_ARF); // For temporal layer case. @@ -255,48 +254,6 @@ class ErrorResilienceTestLargeCodecControls SetMode(encoding_mode_); } - // - // Frame flags and layer id for temporal layers. - // - - // For two layers, test pattern is: - // 1 3 - // 0 2 ..... - // For three layers, test pattern is: - // 1 3 5 7 - // 2 6 - // 0 4 .... - // LAST is always update on base/layer 0, GOLDEN is updated on layer 1, - // and ALTREF is updated on top layer for 3 layer pattern. - int SetFrameFlags(int frame_num, int num_temp_layers) { - int frame_flags = 0; - if (num_temp_layers == 2) { - if (frame_num % 2 == 0) { - // Layer 0: predict from L and ARF, update L. - frame_flags = - AOM_EFLAG_NO_REF_GF | AOM_EFLAG_NO_UPD_GF | AOM_EFLAG_NO_UPD_ARF; - } else { - // Layer 1: predict from L, G and ARF, and update G. - frame_flags = AOM_EFLAG_NO_UPD_ARF | AOM_EFLAG_NO_UPD_LAST | - AOM_EFLAG_NO_UPD_ENTROPY; - } - } else if (num_temp_layers == 3) { - if (frame_num % 4 == 0) { - // Layer 0: predict from L, update L. - frame_flags = AOM_EFLAG_NO_UPD_GF | AOM_EFLAG_NO_UPD_ARF | - AOM_EFLAG_NO_REF_GF | AOM_EFLAG_NO_REF_ARF; - } else if ((frame_num - 2) % 4 == 0) { - // Layer 1: predict from L, G, update G. - frame_flags = - AOM_EFLAG_NO_UPD_ARF | AOM_EFLAG_NO_UPD_LAST | AOM_EFLAG_NO_REF_ARF; - } else if ((frame_num - 1) % 2 == 0) { - // Layer 2: predict from L, G, ARF; update ARG. - frame_flags = AOM_EFLAG_NO_UPD_GF | AOM_EFLAG_NO_UPD_LAST; - } - } - return frame_flags; - } - virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) { // Time since last timestamp = duration. aom_codec_pts_t duration = pkt->data.frame.pts - last_pts_; diff --git a/test/ethread_test.cc b/test/ethread_test.cc index a5e005c2a..c256f1f5b 100644 --- a/test/ethread_test.cc +++ b/test/ethread_test.cc @@ -54,7 +54,7 @@ class AVxEncoderThreadTest encoder_initialized_ = false; } - virtual void PreEncodeFrameHook(::libaom_test::VideoSource *video, + virtual void PreEncodeFrameHook(::libaom_test::VideoSource * /*video*/, ::libaom_test::Encoder *encoder) { if (!encoder_initialized_) { // Encode 4 column tiles. @@ -81,7 +81,6 @@ class AVxEncoderThreadTest } virtual bool HandleDecodeResult(const aom_codec_err_t res, - const libaom_test::VideoSource & /*video*/, libaom_test::Decoder * /*decoder*/) { if (res != AOM_CODEC_OK) { EXPECT_EQ(AOM_CODEC_OK, res); diff --git a/test/fdct4x4_test.cc b/test/fdct4x4_test.cc index 7c7aa8ad6..caa8f6cd0 100644 --- a/test/fdct4x4_test.cc +++ b/test/fdct4x4_test.cc @@ -40,7 +40,8 @@ typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride, typedef std::tr1::tuple Dct4x4Param; typedef std::tr1::tuple Ht4x4Param; -void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { +void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride, + int /*tx_type*/) { aom_fdct4x4_c(in, out, stride); } @@ -48,7 +49,8 @@ void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { av1_fht4x4_c(in, out, stride, tx_type); } -void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { +void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride, + int /*tx_type*/) { av1_fwht4x4_c(in, out, stride); } diff --git a/test/fdct8x8_test.cc b/test/fdct8x8_test.cc index 077ae8d1f..33dd50905 100644 --- a/test/fdct8x8_test.cc +++ b/test/fdct8x8_test.cc @@ -48,7 +48,7 @@ typedef std::tr1::tuple Dct8x8Param; typedef std::tr1::tuple Ht8x8Param; typedef std::tr1::tuple Idct8x8Param; -void reference_8x8_dct_1d(const double in[8], double out[8], int stride) { +void reference_8x8_dct_1d(const double in[8], double out[8]) { const double kInvSqrt2 = 0.707106781186547524400844362104; for (int k = 0; k < 8; k++) { out[k] = 0.0; @@ -64,20 +64,21 @@ void reference_8x8_dct_2d(const int16_t input[kNumCoeffs], for (int i = 0; i < 8; ++i) { double temp_in[8], temp_out[8]; for (int j = 0; j < 8; ++j) temp_in[j] = input[j * 8 + i]; - reference_8x8_dct_1d(temp_in, temp_out, 1); + reference_8x8_dct_1d(temp_in, temp_out); for (int j = 0; j < 8; ++j) output[j * 8 + i] = temp_out[j]; } // Then transform rows for (int i = 0; i < 8; ++i) { double temp_in[8], temp_out[8]; for (int j = 0; j < 8; ++j) temp_in[j] = output[j + i * 8]; - reference_8x8_dct_1d(temp_in, temp_out, 1); + reference_8x8_dct_1d(temp_in, temp_out); // Scale by some magic number for (int j = 0; j < 8; ++j) output[j + i * 8] = temp_out[j] * 2; } } -void fdct8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { +void fdct8x8_ref(const int16_t *in, tran_low_t *out, int stride, + int /*tx_type*/) { aom_fdct8x8_c(in, out, stride); } @@ -608,7 +609,7 @@ class InvTrans8x8DCT : public FwdTrans8x8TestBase, void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) { inv_txfm_(out, dst, stride); } - void RunFwdTxfm(int16_t *out, tran_low_t *dst, int stride) {} + void RunFwdTxfm(int16_t * /*out*/, tran_low_t * /*dst*/, int /*stride*/) {} IdctFunc ref_txfm_; IdctFunc inv_txfm_; diff --git a/test/frame_size_tests.cc b/test/frame_size_tests.cc index f1fad7076..25b87180b 100644 --- a/test/frame_size_tests.cc +++ b/test/frame_size_tests.cc @@ -28,7 +28,6 @@ class AV1FrameSizeTestsLarge : public ::libaom_test::EncoderTest, } virtual bool HandleDecodeResult(const aom_codec_err_t res_dec, - const libaom_test::VideoSource & /*video*/, libaom_test::Decoder *decoder) { EXPECT_EQ(expected_res_, res_dec) << decoder->DecodeError(); return !::testing::Test::HasFailure(); diff --git a/test/intrapred_test.cc b/test/intrapred_test.cc index ad65beec6..358d49654 100644 --- a/test/intrapred_test.cc +++ b/test/intrapred_test.cc @@ -35,7 +35,7 @@ class AV1IntraPredBase { virtual ~AV1IntraPredBase() { libaom_test::ClearSystemState(); } protected: - virtual void Predict(PREDICTION_MODE mode) = 0; + virtual void Predict() = 0; void CheckPrediction(int test_case_number, int *error_count) const { // For each pixel ensure that the calculated value is the same as reference. @@ -74,7 +74,7 @@ class AV1IntraPredBase { left_col_[y] = rnd.Rand16() & mask_; } } - Predict(DC_PRED); + Predict(); CheckPrediction(i, &error_count); } ASSERT_EQ(0, error_count); @@ -105,7 +105,7 @@ class AV1IntraPredTest : public AV1IntraPredBase, mask_ = (1 << bit_depth_) - 1; } - virtual void Predict(PREDICTION_MODE mode) { + virtual void Predict() { const uint16_t *const_above_row = above_row_; const uint16_t *const_left_col = left_col_; ref_fn_(ref_dst_, stride_, const_above_row, const_left_col, bit_depth_); diff --git a/test/lpf_8_test.cc b/test/lpf_8_test.cc index 7f19a953f..34ed20b53 100644 --- a/test/lpf_8_test.cc +++ b/test/lpf_8_test.cc @@ -60,49 +60,49 @@ typedef std::tr1::tuple dualloop8_param_t; #if CONFIG_AOM_HIGHBITDEPTH void wrapper_vertical_16_sse2(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count, int bd) { + int /*count*/, int bd) { aom_highbd_lpf_vertical_16_sse2(s, p, blimit, limit, thresh, bd); } void wrapper_vertical_16_c(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count, int bd) { + int /*count*/, int bd) { aom_highbd_lpf_vertical_16_c(s, p, blimit, limit, thresh, bd); } void wrapper_vertical_16_dual_sse2(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count, int bd) { + int /*count*/, int bd) { aom_highbd_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh, bd); } void wrapper_vertical_16_dual_c(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count, int bd) { + int /*count*/, int bd) { aom_highbd_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh, bd); } #else void wrapper_vertical_16_sse2(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count) { + int /*count*/) { aom_lpf_vertical_16_sse2(s, p, blimit, limit, thresh); } void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count) { + int /*count*/) { aom_lpf_vertical_16_c(s, p, blimit, limit, thresh); } void wrapper_vertical_16_dual_sse2(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count) { + int /*count*/) { aom_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh); } void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count) { + int /*count*/) { aom_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh); } #endif // CONFIG_AOM_HIGHBITDEPTH @@ -114,25 +114,25 @@ void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit, #else void wrapper_vertical_16_neon(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count) { + int /*count*/) { aom_lpf_vertical_16_neon(s, p, blimit, limit, thresh); } void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count) { + int /*count*/) { aom_lpf_vertical_16_c(s, p, blimit, limit, thresh); } void wrapper_vertical_16_dual_neon(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count) { + int /*count*/) { aom_lpf_vertical_16_dual_neon(s, p, blimit, limit, thresh); } void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count) { + int /*count*/) { aom_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh); } #endif // CONFIG_AOM_HIGHBITDEPTH @@ -141,13 +141,13 @@ void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit, #if HAVE_MSA && (!CONFIG_AOM_HIGHBITDEPTH) void wrapper_vertical_16_msa(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count) { + int /*count*/) { aom_lpf_vertical_16_msa(s, p, blimit, limit, thresh); } void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, - int count) { + int /*count*/) { aom_lpf_vertical_16_c(s, p, blimit, limit, thresh); } #endif // HAVE_MSA && (!CONFIG_AOM_HIGHBITDEPTH) diff --git a/webmenc.cc b/webmenc.cc index a987bf3ec..5fda7e604 100644 --- a/webmenc.cc +++ b/webmenc.cc @@ -24,7 +24,6 @@ const int kVideoTrackNumber = 1; void write_webm_file_header(struct EbmlGlobal *glob, const aom_codec_enc_cfg_t *cfg, - const struct aom_rational *fps, stereo_format_t stereo_fmt, unsigned int fourcc, const struct AvxRational *par) { mkvmuxer::MkvWriter *const writer = new mkvmuxer::MkvWriter(glob->stream); diff --git a/webmenc.h b/webmenc.h index 7470ba996..c86e2af5c 100644 --- a/webmenc.h +++ b/webmenc.h @@ -41,7 +41,6 @@ typedef enum stereo_format { void write_webm_file_header(struct EbmlGlobal *glob, const aom_codec_enc_cfg_t *cfg, - const struct aom_rational *fps, stereo_format_t stereo_fmt, unsigned int fourcc, const struct AvxRational *par);