Commit 105eecf4 authored by Jingning Han's avatar Jingning Han

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
parent ab141115
...@@ -91,7 +91,6 @@ static INLINE double fclamp(double value, double low, double high) { ...@@ -91,7 +91,6 @@ static INLINE double fclamp(double value, double low, double high) {
return value < low ? low : (value > high ? high : value); return value < low ? low : (value > high ? high : value);
} }
#if CONFIG_HIGHBITDEPTH
static INLINE uint16_t clip_pixel_highbd(int val, int bd) { static INLINE uint16_t clip_pixel_highbd(int val, int bd) {
switch (bd) { switch (bd) {
case 8: case 8:
...@@ -100,7 +99,6 @@ static INLINE uint16_t clip_pixel_highbd(int val, int bd) { ...@@ -100,7 +99,6 @@ static INLINE uint16_t clip_pixel_highbd(int val, int bd) {
case 12: return (uint16_t)clamp(val, 0, 4095); case 12: return (uint16_t)clamp(val, 0, 4095);
} }
} }
#endif // CONFIG_HIGHBITDEPTH
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
......
...@@ -51,9 +51,7 @@ static INLINE tran_high_t check_range(tran_high_t input, int bd) { ...@@ -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)) #define WRAPLOW(x) ((int32_t)check_range(x, 8))
#if CONFIG_HIGHBITDEPTH
#define HIGHBD_WRAPLOW(x, bd) ((int32_t)check_range((x), bd)) #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_idct4_c(const tran_low_t *input, tran_low_t *output);
void aom_idct8_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); ...@@ -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_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_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); 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, static INLINE uint16_t highbd_clip_pixel_add(uint16_t dest, tran_high_t trans,
int bd) { int bd) {
trans = HIGHBD_WRAPLOW(trans, bd); trans = HIGHBD_WRAPLOW(trans, bd);
return clip_pixel_highbd(dest + (int)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) { static INLINE uint8_t clip_pixel_add(uint8_t dest, tran_high_t trans) {
trans = WRAPLOW(trans); trans = WRAPLOW(trans);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment