Commit d3487722 authored by Luc Trudeau's avatar Luc Trudeau

[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
parent 6d3befbd
......@@ -604,7 +604,8 @@ typedef struct cfl_ctx {
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;
......
......@@ -259,7 +259,7 @@ static INLINE int cfl_idx_to_alpha(int alpha_idx, int joint_sign,
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 @@ static void cfl_build_prediction_lbd(const int16_t *pred_buf_q3, uint8_t *dst,
#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(
......
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