Commit 60db3c95 authored by Jingning Han's avatar Jingning Han

Make txk-sel support cfl in key frame coding

Properly store and update the luma component result in the key
frame rate distortion optimization process for chroma component
prediction. The txk-sel provides 0.15% gains for key frame coding
on top of lv-map/multi and all other default experiments.

Change-Id: I694860607b318d0a84333ed928d3de85c7676623
parent 159f72c3
......@@ -878,6 +878,13 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col,
*(args->skip) = 0;
assert(xd->mi[0]->mbmi.txk_type[(blk_row << MAX_MIB_SIZE_LOG2) + blk_col] ==
DCT_DCT);
#if CONFIG_CFL
if (plane == AOM_PLANE_Y && xd->cfl.store_y &&
is_cfl_allowed(&xd->mi[0]->mbmi)) {
cfl_store_tx(xd, blk_row, blk_col, tx_size, plane_bsize);
}
#endif // CONFIG_CFL
return;
}
#endif
......
......@@ -2909,6 +2909,8 @@ static int rd_pick_filter_intra_sby(const AV1_COMP *const cpi, MACROBLOCK *x,
sizeof(*best_txk_type) *
(MAX_SB_SQUARE / (TX_SIZE_W_MIN * TX_SIZE_H_MIN)));
#endif
memcpy(ctx->blk_skip[0], x->blk_skip[0],
sizeof(uint8_t) * ctx->num_4x4_blk);
*rate = this_rate;
*rate_tokenonly = tokenonly_rd_stats.rate;
*distortion = tokenonly_rd_stats.dist;
......@@ -2926,8 +2928,6 @@ static int rd_pick_filter_intra_sby(const AV1_COMP *const cpi, MACROBLOCK *x,
memcpy(mbmi->txk_type, best_txk_type,
sizeof(*best_txk_type) *
(MAX_SB_SQUARE / (TX_SIZE_W_MIN * TX_SIZE_H_MIN)));
memcpy(ctx->blk_skip[0], x->blk_skip[0],
sizeof(uint8_t) * ctx->num_4x4_blk);
#endif
return 1;
} else {
......
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