[CFL] Asserts for chroma_sub8x8
When Chroma from Luma is combined with chroma_sub8x8, the prediction
used for sub8x8 blocks originates from multiple luma blocks. Extra
asserts are added to validate that the prediction buffer contains all
the required information.
Change-Id: I305c46ce9b8292697e1d5b181d123461026da11c
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 4ac0fda..25a0ab9 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -1179,13 +1179,13 @@
#if CONFIG_CB4X4
if (is_chroma_reference(mi_row, mi_col, bsize, xd->plane[1].subsampling_x,
xd->plane[1].subsampling_y)) {
+#if CONFIG_CFL
+ xd->cfl->is_chroma_reference = 1;
+#endif // CONFIG_CFL
+#endif // CONFIG_CB4X4
mbmi->uv_mode = read_intra_mode_uv(ec_ctx, xd, r, mbmi->mode);
-#else
- mbmi->uv_mode = read_intra_mode_uv(ec_ctx, xd, r, mbmi->mode);
-#endif
#if CONFIG_CFL
- // TODO(ltrudeau) support PALETTE
if (mbmi->uv_mode == UV_CFL_PRED) {
mbmi->cfl_alpha_idx = read_cfl_alphas(ec_ctx, r, &mbmi->cfl_alpha_signs);
xd->cfl->store_y = 1;
@@ -1198,6 +1198,10 @@
} else {
// Avoid decoding angle_info if there is is no chroma prediction
mbmi->uv_mode = UV_DC_PRED;
+#if CONFIG_CFL
+ xd->cfl->is_chroma_reference = 0;
+ xd->cfl->store_y = 1;
+#endif
}
#endif