[CFL] Change CFL DC_PRED from int to int16_t This changes serves to illustrate that DC_PRED does not need 32 bits. It only needs the specified pixel bit depth. Which fits inside a signed 16 bit integer. Change-Id: Ice062c8c4a794cb4f32a3963278f4a99ef326dda
diff --git a/av1/common/blockd.h b/av1/common/blockd.h index c998d3d..94487ed 100644 --- a/av1/common/blockd.h +++ b/av1/common/blockd.h
@@ -604,7 +604,8 @@ int subsampling_x, subsampling_y; // Block level DC_PRED for each chromatic plane - int dc_pred[CFL_PRED_PLANES]; + // 16 bits are used, but only the pixel bit depth is required + int16_t dc_pred[CFL_PRED_PLANES]; int mi_row, mi_col;
diff --git a/av1/common/cfl.c b/av1/common/cfl.c index 06283f3..cb0e227 100644 --- a/av1/common/cfl.c +++ b/av1/common/cfl.c
@@ -259,7 +259,7 @@ static void cfl_build_prediction_lbd(const int16_t *pred_buf_q3, uint8_t *dst, int dst_stride, int width, int height, - int alpha_q3, int dc_pred) { + int alpha_q3, int16_t dc_pred) { for (int j = 0; j < height; j++) { for (int i = 0; i < width; i++) { dst[i] = @@ -273,7 +273,8 @@ #if CONFIG_HIGHBITDEPTH static void cfl_build_prediction_hbd(const int16_t *pred_buf_q3, uint16_t *dst, int dst_stride, int width, int height, - int alpha_q3, int dc_pred, int bit_depth) { + int alpha_q3, int16_t dc_pred, + int bit_depth) { for (int j = 0; j < height; j++) { for (int i = 0; i < width; i++) { dst[i] = clip_pixel_highbd(