Commit 8efdbc8b authored by Jingning Han's avatar Jingning Han

Skip 2x2 uv block in the rd search loop

Skip the 2x2 uv block rate-distortion optimization process in the
non-reference positions in key frame encoding.

Change-Id: I51112492fd79f9a1c205fba151f8658cea9ee85f
parent c20dc8eb
...@@ -166,6 +166,10 @@ struct macroblock { ...@@ -166,6 +166,10 @@ struct macroblock {
int skip; int skip;
#if CONFIG_CB4X4
int skip_chroma_rd;
#endif
// note that token_costs is the cost when eob node is skipped // note that token_costs is the cost when eob node is skipped
av1_coeff_cost token_costs[TX_SIZES]; av1_coeff_cost token_costs[TX_SIZES];
......
...@@ -1852,6 +1852,11 @@ static void rd_pick_sb_modes(const AV1_COMP *const cpi, TileDataEnc *tile_data, ...@@ -1852,6 +1852,11 @@ static void rd_pick_sb_modes(const AV1_COMP *const cpi, TileDataEnc *tile_data,
// Set to zero to make sure we do not use the previous encoded frame stats // Set to zero to make sure we do not use the previous encoded frame stats
mbmi->skip = 0; mbmi->skip = 0;
#if CONFIG_CB4X4
x->skip_chroma_rd =
(bsize < BLOCK_8X8) && !is_chroma_reference(mi_row, mi_col);
#endif
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
x->source_variance = av1_high_get_sby_perpixel_variance( x->source_variance = av1_high_get_sby_perpixel_variance(
......
...@@ -9035,8 +9035,10 @@ void av1_rd_pick_intra_mode_sb(const AV1_COMP *cpi, MACROBLOCK *x, ...@@ -9035,8 +9035,10 @@ void av1_rd_pick_intra_mode_sb(const AV1_COMP *cpi, MACROBLOCK *x,
[pd[1].subsampling_x][pd[1].subsampling_y]; [pd[1].subsampling_x][pd[1].subsampling_y];
#if CONFIG_CB4X4 #if CONFIG_CB4X4
rd_pick_intra_sbuv_mode(cpi, x, &rate_uv, &rate_uv_tokenonly, &dist_uv, max_uv_tx_size = AOMMAX(max_uv_tx_size, TX_4X4);
&uv_skip, bsize, max_uv_tx_size); if (!x->skip_chroma_rd)
rd_pick_intra_sbuv_mode(cpi, x, &rate_uv, &rate_uv_tokenonly, &dist_uv,
&uv_skip, bsize, max_uv_tx_size);
#else #else
rd_pick_intra_sbuv_mode(cpi, x, &rate_uv, &rate_uv_tokenonly, &dist_uv, rd_pick_intra_sbuv_mode(cpi, x, &rate_uv, &rate_uv_tokenonly, &dist_uv,
&uv_skip, AOMMAX(BLOCK_8X8, bsize), max_uv_tx_size); &uv_skip, AOMMAX(BLOCK_8X8, bsize), max_uv_tx_size);
......
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