Commit 9e0976a4 authored by Jingning Han's avatar Jingning Han

Support sub8x8 chroma component prediction

This commit allows the sub8x8 blocks to compose and filter their
chroma components for supertx in cb4x4 mode. The coding gains of
supertx and cb4x4 are largely additive:

          supertx      cb4x4       cb4x4 + supertx
lowres     -1.0%       -2.7%        -3.64%
midres     -0.8%       -1.3%        -2.10%

Change-Id: Ie7d09f6fceb36ce375e56773728f05dd628786fe
parent 24f24a54
......@@ -1007,8 +1007,8 @@ void av1_setup_pre_planes(MACROBLOCKD *xd, int idx,
#if CONFIG_SUPERTX
#if CONFIG_CB4X4
static const uint8_t mask_4[4] = { 64, 62, 12, 0 };
static const uint8_t mask_4_uv[4] = { 64, 62, 12, 0 };
static const uint8_t mask_4[4] = { 64, 52, 12, 0 };
static const uint8_t mask_4_uv[4] = { 64, 52, 12, 0 };
#endif // CONFIG_CB4X4
static const uint8_t mask_8[8] = { 64, 64, 62, 52, 12, 2, 0, 0 };
......
......@@ -1044,8 +1044,6 @@ static void dec_predict_sb_complex(AV1Decoder *const pbi, MACROBLOCKD *const xd,
// weighted average to smooth the boundary
for (i = 0; i < MAX_MB_PLANE; i++) {
if (bsize == BLOCK_8X8 && i != 0)
continue; // Skip <4x4 chroma smoothing
xd->plane[i].dst.buf = dst_buf[i];
xd->plane[i].dst.stride = dst_stride[i];
av1_build_masked_inter_predictor_complex(
......@@ -1109,8 +1107,6 @@ static void dec_predict_sb_complex(AV1Decoder *const pbi, MACROBLOCKD *const xd,
// Smooth
for (i = 0; i < MAX_MB_PLANE; i++) {
if (bsize == BLOCK_8X8 && i != 0)
continue; // Skip <4x4 chroma smoothing
xd->plane[i].dst.buf = dst_buf[i];
xd->plane[i].dst.stride = dst_stride[i];
av1_build_masked_inter_predictor_complex(
......@@ -1163,8 +1159,10 @@ static void dec_predict_sb_complex(AV1Decoder *const pbi, MACROBLOCKD *const xd,
dst_buf3, dst_stride3);
}
for (i = 0; i < MAX_MB_PLANE; i++) {
#if !CONFIG_CB4X4
if (bsize == BLOCK_8X8 && i != 0)
continue; // Skip <4x4 chroma smoothing
#endif
if (mi_row < cm->mi_rows && mi_col + hbs < cm->mi_cols) {
av1_build_masked_inter_predictor_complex(
xd, dst_buf[i], dst_stride[i], dst_buf1[i], dst_stride1[i],
......
......@@ -6074,9 +6074,6 @@ static void predict_sb_complex(const AV1_COMP *const cpi, ThreadData *td,
// Smooth
for (i = 0; i < MAX_MB_PLANE; i++) {
if (bsize == BLOCK_8X8 && i != 0)
continue; // Skip <4x4 chroma smoothing
xd->plane[i].dst.buf = dst_buf[i];
xd->plane[i].dst.stride = dst_stride[i];
av1_build_masked_inter_predictor_complex(
......@@ -6138,9 +6135,6 @@ static void predict_sb_complex(const AV1_COMP *const cpi, ThreadData *td,
dst_stride1, 2);
for (i = 0; i < MAX_MB_PLANE; i++) {
if (bsize == BLOCK_8X8 && i != 0)
continue; // Skip <4x4 chroma smoothing
xd->plane[i].dst.buf = dst_buf[i];
xd->plane[i].dst.stride = dst_stride[i];
av1_build_masked_inter_predictor_complex(
......@@ -6195,8 +6189,10 @@ static void predict_sb_complex(const AV1_COMP *const cpi, ThreadData *td,
pc_tree->split[3]);
}
for (i = 0; i < MAX_MB_PLANE; i++) {
#if !CONFIG_CB4X4
if (bsize == BLOCK_8X8 && i != 0)
continue; // Skip <4x4 chroma smoothing
#endif
if (mi_row < cm->mi_rows && mi_col + hbs < cm->mi_cols) {
av1_build_masked_inter_predictor_complex(
xd, dst_buf[i], dst_stride[i], dst_buf1[i], dst_stride1[i],
......
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