[CFL] CfL Initialization Simplification
The CfL context is now stored inside MACROBLOCKD instead of
MACROBLOCKD only storing a pointer to the CfL context.
The intent is to avoid race conditions as MACROBLOCKD is stored
inside ThreadData. This change also simplifies CfL Initialization.
Change-Id: I991503716b21fc9aca60caddb2008b8bff397e6d
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index f0c87c5..4aebe8f 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -1120,16 +1120,16 @@
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;
+ xd->cfl.is_chroma_reference = 1;
#endif // CONFIG_CFL
mbmi->uv_mode = read_intra_mode_uv(ec_ctx, r, mbmi->mode);
#if CONFIG_CFL
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;
+ xd->cfl.store_y = 1;
} else {
- xd->cfl->store_y = 0;
+ xd->cfl.store_y = 0;
}
#endif // CONFIG_CFL
@@ -1137,8 +1137,8 @@
// 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;
+ xd->cfl.is_chroma_reference = 0;
+ xd->cfl.store_y = 1;
#endif
}
@@ -1489,9 +1489,9 @@
if (mbmi->uv_mode == UV_CFL_PRED) {
mbmi->cfl_alpha_idx =
read_cfl_alphas(xd->tile_ctx, r, &mbmi->cfl_alpha_signs);
- xd->cfl->store_y = 1;
+ xd->cfl.store_y = 1;
} else {
- xd->cfl->store_y = 0;
+ xd->cfl.store_y = 0;
}
#endif // CONFIG_CFL
@@ -1499,8 +1499,8 @@
// 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;
+ xd->cfl.is_chroma_reference = 0;
+ xd->cfl.store_y = 1;
#endif
}