Commit 0b7cbe66 authored by Jingning Han's avatar Jingning Han
Browse files

Fix enc/dec mismatch in cb4x4 and ec-multisymbol

Change-Id: I75945cd00c71757d06822dd4c11ea800f9218452
parent 531d6afd
...@@ -1623,17 +1623,24 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const MODE_INFO *mi, ...@@ -1623,17 +1623,24 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const MODE_INFO *mi,
} }
} }
} }
#if CONFIG_CB4X4
if (bsize >= BLOCK_8X8 || is_chroma_reference(mi_row, mi_col)) {
#if CONFIG_EC_MULTISYMBOL #if CONFIG_EC_MULTISYMBOL
aom_write_symbol(w, av1_intra_mode_ind[mbmi->uv_mode], aom_write_symbol(w, av1_intra_mode_ind[mbmi->uv_mode],
ec_ctx->uv_mode_cdf[mode], INTRA_MODES); ec_ctx->uv_mode_cdf[mode], INTRA_MODES);
#else #else
#if CONFIG_CB4X4
if (bsize >= BLOCK_8X8 || is_chroma_reference(mi_row, mi_col))
write_intra_mode(w, mbmi->uv_mode, cm->fc->uv_mode_prob[mode]); write_intra_mode(w, mbmi->uv_mode, cm->fc->uv_mode_prob[mode]);
#endif // CONFIG_EC_MULTISYMBOL
}
#else // !CONFIG_CB4X4
#if CONFIG_EC_MULTISYMBOL
aom_write_symbol(w, av1_intra_mode_ind[mbmi->uv_mode],
ec_ctx->uv_mode_cdf[mode], INTRA_MODES);
#else #else
write_intra_mode(w, mbmi->uv_mode, cm->fc->uv_mode_prob[mode]); write_intra_mode(w, mbmi->uv_mode, cm->fc->uv_mode_prob[mode]);
#endif // CONFIG_EC_MULTISYMBOL
#endif // CONFIG_CB4X4 #endif // CONFIG_CB4X4
#endif
#if CONFIG_EXT_INTRA #if CONFIG_EXT_INTRA
write_intra_angle_info(cm, xd, w); write_intra_angle_info(cm, xd, w);
#endif // CONFIG_EXT_INTRA #endif // CONFIG_EXT_INTRA
...@@ -1980,17 +1987,25 @@ static void write_mb_modes_kf(AV1_COMMON *cm, const MACROBLOCKD *xd, ...@@ -1980,17 +1987,25 @@ static void write_mb_modes_kf(AV1_COMMON *cm, const MACROBLOCKD *xd,
} }
} }
} }
#if CONFIG_CB4X4
if (bsize >= BLOCK_8X8 || is_chroma_reference(mi_row, mi_col)) {
#if CONFIG_EC_MULTISYMBOL #if CONFIG_EC_MULTISYMBOL
aom_write_symbol(w, av1_intra_mode_ind[mbmi->uv_mode], aom_write_symbol(w, av1_intra_mode_ind[mbmi->uv_mode],
ec_ctx->uv_mode_cdf[mbmi->mode], INTRA_MODES); ec_ctx->uv_mode_cdf[mbmi->mode], INTRA_MODES);
#else #else
#if CONFIG_CB4X4
if (bsize >= BLOCK_8X8 || is_chroma_reference(mi_row, mi_col))
write_intra_mode(w, mbmi->uv_mode, cm->fc->uv_mode_prob[mbmi->mode]); write_intra_mode(w, mbmi->uv_mode, cm->fc->uv_mode_prob[mbmi->mode]);
#endif // CONFIG_EC_MULTISYMBOL
}
#else // !CONFIG_CB4X4
#if CONFIG_EC_MULTISYMBOL
aom_write_symbol(w, av1_intra_mode_ind[mbmi->uv_mode],
ec_ctx->uv_mode_cdf[mbmi->mode], INTRA_MODES);
#else #else
write_intra_mode(w, mbmi->uv_mode, cm->fc->uv_mode_prob[mbmi->mode]); write_intra_mode(w, mbmi->uv_mode, cm->fc->uv_mode_prob[mbmi->mode]);
#endif // CONFIG_EC_MULTISYMBOL
#endif // CONFIG_CB4X4 #endif // CONFIG_CB4X4
#endif
#if CONFIG_EXT_INTRA #if CONFIG_EXT_INTRA
write_intra_angle_info(cm, xd, w); write_intra_angle_info(cm, xd, w);
#endif // CONFIG_EXT_INTRA #endif // CONFIG_EXT_INTRA
......
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