Commit b09b55db authored by Luc Trudeau's avatar Luc Trudeau Committed by Luc Trudeau

[CFL] Add support for intra in inter

Change-Id: I4d8485d2bbe5348338eb909d969a0ca4b598a6b8
parent e46382a4
......@@ -1543,7 +1543,7 @@ static void read_intra_block_mode_info(AV1_COMMON *const cm, const int mi_row,
#if CONFIG_CB4X4
if (is_chroma_reference(mi_row, mi_col, bsize, xd->plane[1].subsampling_x,
xd->plane[1].subsampling_y))
xd->plane[1].subsampling_y)) {
mbmi->uv_mode = read_intra_mode_uv(cm, xd, r, mbmi->mode);
#else
mbmi->uv_mode = read_intra_mode_uv(cm, xd, r, mbmi->mode);
......@@ -1551,6 +1551,23 @@ static void read_intra_block_mode_info(AV1_COMMON *const cm, const int mi_row,
(void)mi_col;
#endif
#if CONFIG_CFL
// TODO(ltrudeau) support PALETTE
if (mbmi->uv_mode == DC_PRED) {
mbmi->cfl_alpha_idx = read_cfl_alphas(
#if CONFIG_EC_ADAPT
xd->tile_ctx,
#else
cm->fc,
#endif // CONFIG_EC_ADAPT
r, mbmi->skip, mbmi->cfl_alpha_signs);
}
#endif // CONFIG_CFL
#if CONFIG_CB4X4
}
#endif
#if CONFIG_EXT_INTRA
read_intra_angle_info(cm, xd, r);
#endif // CONFIG_EXT_INTRA
......
......@@ -1907,12 +1907,23 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const int mi_row,
}
#if CONFIG_CB4X4
if (is_chroma_reference(mi_row, mi_col, bsize, xd->plane[1].subsampling_x,
xd->plane[1].subsampling_y))
xd->plane[1].subsampling_y)) {
write_intra_uv_mode(ec_ctx, mbmi->uv_mode, mode, w);
#else // !CONFIG_CB4X4
write_intra_uv_mode(ec_ctx, mbmi->uv_mode, mode, w);
#endif // CONFIG_CB4X4
#if CONFIG_CFL
if (mbmi->uv_mode == DC_PRED) {
write_cfl_alphas(ec_ctx, mbmi->skip, mbmi->cfl_alpha_idx,
mbmi->cfl_alpha_signs, w);
}
#endif
#if CONFIG_CB4X4
}
#endif
#if CONFIG_EXT_INTRA
write_intra_angle_info(xd, ec_ctx, w);
#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