diff --git a/test/avg_test.cc b/test/avg_test.cc index 867a77aa0..272b99695 100644 --- a/test/avg_test.cc +++ b/test/avg_test.cc @@ -53,7 +53,7 @@ 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 * pitch + w]; @@ -61,7 +61,7 @@ class AverageTestBase : public ::testing::Test { 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 * pitch + w]; @@ -98,11 +98,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 e867dacaf..3415284ab 100644 --- a/test/codec_factory.h +++ b/test/codec_factory.h @@ -115,6 +115,8 @@ class VP8CodecFactory : public CodecFactory { #if CONFIG_VP8_DECODER return new VP8Decoder(cfg, flags); #else + (void)cfg; + (void)flags; return NULL; #endif } @@ -126,6 +128,10 @@ class VP8CodecFactory : public CodecFactory { #if CONFIG_VP8_ENCODER return new VP8Encoder(cfg, deadline, init_flags, stats); #else + (void)cfg; + (void)deadline; + (void)init_flags; + (void)stats; return NULL; #endif } @@ -135,6 +141,8 @@ class VP8CodecFactory : public CodecFactory { #if CONFIG_VP8_ENCODER return vpx_codec_enc_config_default(&vpx_codec_vp8_cx_algo, cfg, usage); #else + (void)cfg; + (void)usage; return VPX_CODEC_INCAPABLE; #endif } @@ -203,6 +211,8 @@ class VP9CodecFactory : public CodecFactory { #if CONFIG_VP9_DECODER return new VP9Decoder(cfg, flags); #else + (void)cfg; + (void)flags; return NULL; #endif } @@ -214,6 +224,10 @@ class VP9CodecFactory : public CodecFactory { #if CONFIG_VP9_ENCODER return new VP9Encoder(cfg, deadline, init_flags, stats); #else + (void)cfg; + (void)deadline; + (void)init_flags; + (void)stats; return NULL; #endif } @@ -223,6 +237,8 @@ class VP9CodecFactory : public CodecFactory { #if CONFIG_VP9_ENCODER return vpx_codec_enc_config_default(&vpx_codec_vp9_cx_algo, cfg, usage); #else + (void)cfg; + (void)usage; return VPX_CODEC_INCAPABLE; #endif } diff --git a/test/error_resilience_test.cc b/test/error_resilience_test.cc index 4c7ede8ca..030b67c57 100644 --- a/test/error_resilience_test.cc +++ b/test/error_resilience_test.cc @@ -90,8 +90,7 @@ class ErrorResilienceTestLarge return frame_flags; } - virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video, - ::libvpx_test::Encoder * /*encoder*/) { + virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video) { frame_flags_ &= ~(VP8_EFLAG_NO_UPD_LAST | VP8_EFLAG_NO_UPD_GF | VP8_EFLAG_NO_UPD_ARF); // For temporal layer case. diff --git a/vpx_dsp/arm/vpx_convolve8_avg_neon.c b/vpx_dsp/arm/vpx_convolve8_avg_neon.c index 69cb28400..8e5373be0 100644 --- a/vpx_dsp/arm/vpx_convolve8_avg_neon.c +++ b/vpx_dsp/arm/vpx_convolve8_avg_neon.c @@ -64,6 +64,10 @@ void vpx_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 @@ -240,6 +244,10 @@ void vpx_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/vpx_dsp/arm/vpx_convolve8_neon.c b/vpx_dsp/arm/vpx_convolve8_neon.c index 514525696..951c425e2 100644 --- a/vpx_dsp/arm/vpx_convolve8_neon.c +++ b/vpx_dsp/arm/vpx_convolve8_neon.c @@ -64,6 +64,10 @@ void vpx_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 @@ -224,6 +228,10 @@ void vpx_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/vpx_dsp/fastssim.c b/vpx_dsp/fastssim.c index 4d5eb5a6f..0469071a1 100644 --- a/vpx_dsp/fastssim.c +++ b/vpx_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/vpx_dsp/x86/convolve.h b/vpx_dsp/x86/convolve.h index 2a0516cdc..d7468ad7c 100644 --- a/vpx_dsp/x86/convolve.h +++ b/vpx_dsp/x86/convolve.h @@ -25,6 +25,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]) { \