Commit ab4fd72a authored by Debargha Mukherjee's avatar Debargha Mukherjee

Fix bug in quant parameter assignment for v comp

Previously the v component assignment was being skipped.
This will make a difference with the EXT_QM experiment.

Change-Id: I079d86e98f14f933756b300092246dc800ce4c96
parent 729d0f5d
......@@ -741,9 +741,18 @@ static INLINE void cfl_clear_sub8x8_val(CFL_CTX *cfl) {
void cfl_init(CFL_CTX *cfl, AV1_COMMON *cm);
#endif // CONFIG_CFL
static INLINE int av1_num_planes(const AV1_COMMON *cm) {
#if CONFIG_MONO_VIDEO
return cm->seq_params.monochrome ? 1 : MAX_MB_PLANE;
#else
(void)cm;
return MAX_MB_PLANE;
#endif // CONFIG_MONO_VIDEO
}
static INLINE void av1_init_macroblockd(AV1_COMMON *cm, MACROBLOCKD *xd,
tran_low_t *dqcoeff) {
for (int i = 0; i < MAX_MB_PLANE; ++i) {
for (int i = 0; i < av1_num_planes(cm); ++i) {
xd->plane[i].dqcoeff = dqcoeff;
xd->above_context[i] = cm->above_context[i];
if (xd->plane[i].plane_type == PLANE_TYPE_Y) {
......@@ -757,26 +766,30 @@ static INLINE void av1_init_macroblockd(AV1_COMMON *cm, MACROBLOCKD *xd,
memcpy(xd->plane[i].seg_dequant_nuq_QTX, cm->y_dequant_nuq_QTX,
sizeof(cm->y_dequant_nuq_QTX));
#endif
} else if (xd->plane[i].plane_type == 1) {
memcpy(xd->plane[i].seg_dequant_QTX, cm->u_dequant_QTX,
sizeof(cm->u_dequant_QTX));
} else {
if (i == AOM_PLANE_U) {
memcpy(xd->plane[i].seg_dequant_QTX, cm->u_dequant_QTX,
sizeof(cm->u_dequant_QTX));
#if CONFIG_AOM_QM
memcpy(xd->plane[i].seg_iqmatrix, cm->u_iqmatrix, sizeof(cm->u_iqmatrix));
memcpy(xd->plane[i].seg_iqmatrix, cm->u_iqmatrix,
sizeof(cm->u_iqmatrix));
#endif
#if CONFIG_NEW_QUANT
memcpy(xd->plane[i].seg_dequant_nuq_QTX, cm->u_dequant_nuq_QTX,
sizeof(cm->u_dequant_nuq_QTX));
memcpy(xd->plane[i].seg_dequant_nuq_QTX, cm->u_dequant_nuq_QTX,
sizeof(cm->u_dequant_nuq_QTX));
#endif
} else {
memcpy(xd->plane[i].seg_dequant_QTX, cm->v_dequant_QTX,
sizeof(cm->v_dequant_QTX));
} else {
memcpy(xd->plane[i].seg_dequant_QTX, cm->v_dequant_QTX,
sizeof(cm->v_dequant_QTX));
#if CONFIG_AOM_QM
memcpy(xd->plane[i].seg_iqmatrix, cm->v_iqmatrix, sizeof(cm->v_iqmatrix));
memcpy(xd->plane[i].seg_iqmatrix, cm->v_iqmatrix,
sizeof(cm->v_iqmatrix));
#endif
#if CONFIG_NEW_QUANT
memcpy(xd->plane[i].seg_dequant_nuq_QTX, cm->v_dequant_nuq_QTX,
sizeof(cm->v_dequant_nuq_QTX));
memcpy(xd->plane[i].seg_dequant_nuq_QTX, cm->v_dequant_nuq_QTX,
sizeof(cm->v_dequant_nuq_QTX));
#endif
}
}
}
xd->fc = cm->fc;
......@@ -1140,15 +1153,6 @@ static INLINE int max_intra_block_height(const MACROBLOCKD *xd,
}
#endif // CONFIG_CFL
static INLINE int av1_num_planes(const AV1_COMMON *cm) {
#if CONFIG_MONO_VIDEO
return cm->seq_params.monochrome ? 1 : MAX_MB_PLANE;
#else
(void)cm;
return MAX_MB_PLANE;
#endif // CONFIG_MONO_VIDEO
}
static INLINE void av1_zero_above_context(AV1_COMMON *const cm,
int mi_col_start, int mi_col_end) {
const int width = mi_col_end - mi_col_start;
......
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