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

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) {
return value < low ? low : (value > high ? high : value);
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);
#ifdef __cplusplus
} // extern "C"
......@@ -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 HIGHBD_WRAPLOW(x, bd) ((int32_t)check_range((x), bd))
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);
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);
static INLINE uint8_t clip_pixel_add(uint8_t dest, tran_high_t trans) {
trans = WRAPLOW(trans);
Supports Markdown
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