From 105eecf4c6c87a8bad21b87a341cf47cd13d84bd Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Sat, 10 Jun 2017 10:53:53 -0700 Subject: [PATCH] Resolve compiler warning when highbd is off The highbd_clip_pixel_add() function is generalized to be used in the regular 8 bit path. Move its defintions outside the highbd experimental flag. This resolves the comiler warning in unit tests when high bit-depth is turned off. Change-Id: I90a744adb2381c9bf8476aa2a2bd0c87d9afdf57 --- aom_dsp/aom_dsp_common.h | 2 -- aom_dsp/inv_txfm.h | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/aom_dsp/aom_dsp_common.h b/aom_dsp/aom_dsp_common.h index d879ec0d8..fb363fdcc 100644 --- a/aom_dsp/aom_dsp_common.h +++ b/aom_dsp/aom_dsp_common.h @@ -91,7 +91,6 @@ static INLINE double fclamp(double value, double low, double high) { return value < low ? low : (value > high ? high : value); } -#if CONFIG_HIGHBITDEPTH static INLINE uint16_t clip_pixel_highbd(int val, int bd) { switch (bd) { case 8: @@ -100,7 +99,6 @@ static INLINE uint16_t clip_pixel_highbd(int val, int bd) { case 12: return (uint16_t)clamp(val, 0, 4095); } } -#endif // CONFIG_HIGHBITDEPTH #ifdef __cplusplus } // extern "C" diff --git a/aom_dsp/inv_txfm.h b/aom_dsp/inv_txfm.h index e64d463ea..3ec59fe06 100644 --- a/aom_dsp/inv_txfm.h +++ b/aom_dsp/inv_txfm.h @@ -51,9 +51,7 @@ static INLINE tran_high_t check_range(tran_high_t input, int bd) { } #define WRAPLOW(x) ((int32_t)check_range(x, 8)) -#if CONFIG_HIGHBITDEPTH #define HIGHBD_WRAPLOW(x, bd) ((int32_t)check_range((x), bd)) -#endif // CONFIG_HIGHBITDEPTH void aom_idct4_c(const tran_low_t *input, tran_low_t *output); void aom_idct8_c(const tran_low_t *input, tran_low_t *output); @@ -72,13 +70,13 @@ void aom_highbd_idct32_c(const tran_low_t *input, tran_low_t *output, int bd); void aom_highbd_iadst4_c(const tran_low_t *input, tran_low_t *output, int bd); void aom_highbd_iadst8_c(const tran_low_t *input, tran_low_t *output, int bd); void aom_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd); +#endif // CONFIG_HIGHBITDEPTH static INLINE uint16_t highbd_clip_pixel_add(uint16_t dest, tran_high_t trans, int bd) { trans = HIGHBD_WRAPLOW(trans, bd); return clip_pixel_highbd(dest + (int)trans, bd); } -#endif static INLINE uint8_t clip_pixel_add(uint8_t dest, tran_high_t trans) { trans = WRAPLOW(trans); -- GitLab