Rate-distortion optimization for recursive transform block coding

This commit enables the rate-distortion optimization for recursive
transform block coding scheme.

Change-Id: Id6a8336ca847bb3af1e94cbfb51db1f4da12d38f
This commit is contained in:
Jingning Han
2015-10-09 09:57:42 -07:00
parent a8dad55c82
commit 2cdc12742d
7 changed files with 395 additions and 62 deletions

View File

@@ -1530,12 +1530,13 @@ static void encode_block_inter(int plane, int block, int blk_row, int blk_col,
MACROBLOCK *const x = args->x;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
const BLOCK_SIZE bsize = txsize_to_bsize[tx_size];
const struct macroblockd_plane *const pd = &xd->plane[plane];
const int blk_idx = ((blk_row >> 1) << 3) + (blk_col >> 1);
int blk_idx = (blk_row >> (1 - pd->subsampling_y)) * 8 +
(blk_col >> (1 - pd->subsampling_x));
TX_SIZE plane_tx_size = plane ?
get_uv_tx_size_impl(mbmi->inter_tx_size[blk_idx], mbmi->sb_type,
pd->subsampling_x, pd->subsampling_y) :
get_uv_tx_size_impl(mbmi->inter_tx_size[blk_idx], bsize,
0, 0) :
mbmi->inter_tx_size[blk_idx];
int max_blocks_high = num_4x4_blocks_high_lookup[plane_bsize];
@@ -1553,7 +1554,6 @@ static void encode_block_inter(int plane, int block, int blk_row, int blk_col,
encode_block(plane, block, blk_row, blk_col, plane_bsize,
tx_size, arg);
} else {
const BLOCK_SIZE bsize = txsize_to_bsize[tx_size];
int bsl = b_width_log2_lookup[bsize];
int i;