Make var-tx work with the re-designed cb4x4
Resolve tokenization and bit-stream packing issues in var-tx when the re-designed cb4x4 is enabled. Change-Id: I651f776104679eb7d4d0681f428490f668dc806a
This commit is contained in:
Родитель
8bb2c4a2bf
Коммит
29a4120691
|
@ -2333,7 +2333,12 @@ static void write_tokens_b(AV1_COMP *cpi, const TileInfo *const tile,
|
|||
const struct macroblockd_plane *const pd = &xd->plane[plane];
|
||||
BLOCK_SIZE bsize = mbmi->sb_type;
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#endif
|
||||
#else
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
get_plane_block_size(AOMMAX(bsize, BLOCK_8X8), pd);
|
||||
|
@ -2374,6 +2379,9 @@ static void write_tokens_b(AV1_COMP *cpi, const TileInfo *const tile,
|
|||
#endif // CONFIG_RD_DEBUG
|
||||
} else {
|
||||
TX_SIZE tx = get_tx_size(plane, xd);
|
||||
#if CONFIG_CB4X4 && !CONFIG_CHROMA_2X2
|
||||
tx = AOMMAX(TX_4X4, tx);
|
||||
#endif
|
||||
const int bkw = tx_size_wide_unit[tx];
|
||||
const int bkh = tx_size_high_unit[tx];
|
||||
for (row = 0; row < num_4x4_h; row += bkh) {
|
||||
|
|
|
@ -710,8 +710,24 @@ void av1_tokenize_sb_vartx(const AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
|
|||
*t = t_backup;
|
||||
|
||||
for (plane = 0; plane < MAX_MB_PLANE; ++plane) {
|
||||
#if CONFIG_CB4X4
|
||||
if (bsize < BLOCK_8X8 && plane && !is_chroma_reference(mi_row, mi_col)) {
|
||||
#if !CONFIG_PVQ
|
||||
if (!dry_run) {
|
||||
(*t)->token = EOSB_TOKEN;
|
||||
(*t)++;
|
||||
}
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
const struct macroblockd_plane *const pd = &xd->plane[plane];
|
||||
#if CONFIG_CB4X4 && !CONFIG_CHROMA_2X2
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#else
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#endif
|
||||
const int mi_width = block_size_wide[plane_bsize] >> tx_size_wide_log2[0];
|
||||
const int mi_height = block_size_high[plane_bsize] >> tx_size_wide_log2[0];
|
||||
const TX_SIZE max_tx_size = max_txsize_rect_lookup[plane_bsize];
|
||||
|
|
Загрузка…
Ссылка в новой задаче