Commit 75cf92f4 authored by Luc Trudeau's avatar Luc Trudeau

[CFL] Added CFL specific constants for U and V planes

Change-Id: I8caa3e0ca51b733b3af87d24ee511f6bb52222d1
parent c1e4cbe3
......@@ -532,7 +532,7 @@ typedef int16_t EobThresholdMD[TX_SIZES_ALL][TX_TYPES];
#if CONFIG_CFL
typedef struct {
// CfL Performs its own block level DC_PRED for each chromatic plane
int dc_pred[2];
int dc_pred[CFL_PRED_PLANES];
} CFL_CTX;
#endif
......
......@@ -16,8 +16,8 @@
// alpha_cb and alpha_cr before the prediction are computed.
void cfl_dc_pred(MACROBLOCKD *const xd, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size) {
const struct macroblockd_plane *const pd_cb = &xd->plane[1];
const struct macroblockd_plane *const pd_cr = &xd->plane[2];
const struct macroblockd_plane *const pd_cb = &xd->plane[AOM_PLANE_U];
const struct macroblockd_plane *const pd_cr = &xd->plane[AOM_PLANE_V];
const uint8_t *const dst_cb = pd_cb->dst.buf;
const uint8_t *const dst_cr = pd_cr->dst.buf;
......@@ -67,8 +67,8 @@ void cfl_dc_pred(MACROBLOCKD *const xd, BLOCK_SIZE plane_bsize,
sum_cr += block_height * 129;
}
xd->cfl->dc_pred[0] = (sum_cb + (num_pel >> 1)) / num_pel;
xd->cfl->dc_pred[1] = (sum_cr + (num_pel >> 1)) / num_pel;
xd->cfl->dc_pred[CFL_PRED_U] = (sum_cb + (num_pel >> 1)) / num_pel;
xd->cfl->dc_pred[CFL_PRED_V] = (sum_cr + (num_pel >> 1)) / num_pel;
}
// Predict the current transform block using CfL.
......
......@@ -273,6 +273,10 @@ typedef enum {
typedef enum { PLANE_TYPE_Y = 0, PLANE_TYPE_UV = 1, PLANE_TYPES } PLANE_TYPE;
#if CONFIG_CFL
typedef enum { CFL_PRED_U = 0, CFL_PRED_V = 1, CFL_PRED_PLANES } CFL_PRED_TYPE;
#endif
#if CONFIG_PALETTE
typedef enum {
TWO_COLORS,
......
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