Merge "Resolve conflict between var-tx and super-tx" into nextgenv2

This commit is contained in:
Jingning Han 2016-02-10 18:54:21 +00:00 коммит произвёл Gerrit Code Review
Родитель ba1bed68ec 4c6c82a2e8
Коммит 3c8bd0d3de
3 изменённых файлов: 36 добавлений и 13 удалений

Просмотреть файл

@ -3186,7 +3186,7 @@ static void rd_pick_partition(VP10_COMP *cpi, ThreadData *td,
#if CONFIG_VAR_TX
xd->above_txfm_context = cm->above_txfm_context + mi_col;
xd->left_txfm_context =
xd->left_txfm_context_buffer + (mi_row & 0x07);
xd->left_txfm_context_buffer + (mi_row & MI_MASK);
restore_context(x, mi_row, mi_col, a, l, sa, sl, ta, tl, bsize);
#else
restore_context(x, mi_row, mi_col, a, l, sa, sl, bsize);
@ -5210,6 +5210,11 @@ static void rd_supertx_sb(VP10_COMP *cpi, ThreadData *td,
ext_tx_set = get_ext_tx_set(tx_size, bsize, 1);
#endif // CONFIG_EXT_TX
for (tx_type = DCT_DCT; tx_type < TX_TYPES; ++tx_type) {
#if CONFIG_VAR_TX
ENTROPY_CONTEXT ctxa[16], ctxl[16];
const struct macroblockd_plane *const pd = &xd->plane[0];
int coeff_ctx = 1;
#endif // CONFIG_VAR_TX
#if CONFIG_EXT_TX
if (!ext_tx_used_inter[ext_tx_set][tx_type])
continue;
@ -5223,12 +5228,23 @@ static void rd_supertx_sb(VP10_COMP *cpi, ThreadData *td,
continue;
#endif // CONFIG_EXT_TX
mbmi->tx_type = tx_type;
vp10_txfm_rd_in_plane_supertx(x,
#if CONFIG_VAR_TX
cpi,
#endif
&this_rate, &this_dist, &pnskip,
this_rate = 0;
this_dist = 0;
pnsse = 0;
pnskip = 1;
vp10_get_entropy_contexts(bsize, tx_size, pd, ctxa, ctxl);
coeff_ctx = combine_entropy_contexts(ctxa[0], ctxl[0]);
vp10_tx_block_rd_b(cpi, x, tx_size,
0, 0, 0, 0,
bsize, coeff_ctx,
&this_rate, &this_dist, &pnsse, &pnskip);
#else
vp10_txfm_rd_in_plane_supertx(x, &this_rate, &this_dist, &pnskip,
&pnsse, INT64_MAX, 0, bsize, tx_size, 0);
#endif // CONFIG_VAR_TX
#if CONFIG_EXT_TX
if (get_ext_tx_types(tx_size, bsize, 1) > 1 &&

Просмотреть файл

@ -2317,10 +2317,10 @@ static int64_t rd_pick_intra_sby_mode(VP10_COMP *cpi, MACROBLOCK *x,
}
#if CONFIG_VAR_TX
static void tx_block_rd_b(const VP10_COMP *cpi, MACROBLOCK *x, TX_SIZE tx_size,
int blk_row, int blk_col, int plane, int block,
int plane_bsize, int coeff_ctx,
int *rate, int64_t *dist, int64_t *bsse, int *skip) {
void vp10_tx_block_rd_b(const VP10_COMP *cpi, MACROBLOCK *x, TX_SIZE tx_size,
int blk_row, int blk_col, int plane, int block,
int plane_bsize, int coeff_ctx,
int *rate, int64_t *dist, int64_t *bsse, int *skip) {
MACROBLOCKD *xd = &x->e_mbd;
const struct macroblock_plane *const p = &x->plane[plane];
struct macroblockd_plane *const pd = &xd->plane[plane];
@ -2531,8 +2531,8 @@ static void select_tx_block(const VP10_COMP *cpi, MACROBLOCK *x,
if (cpi->common.tx_mode == TX_MODE_SELECT || tx_size == TX_4X4) {
mbmi->inter_tx_size[tx_idx] = tx_size;
tx_block_rd_b(cpi, x, tx_size, blk_row, blk_col, plane, block,
plane_bsize, coeff_ctx, rate, dist, bsse, skip);
vp10_tx_block_rd_b(cpi, x, tx_size, blk_row, blk_col, plane, block,
plane_bsize, coeff_ctx, rate, dist, bsse, skip);
if ((RDCOST(x->rdmult, x->rddiv, *rate, *dist) >=
RDCOST(x->rdmult, x->rddiv, zero_blk_rate, *bsse) || *skip == 1) &&
@ -2863,8 +2863,8 @@ static void tx_block_rd(const VP10_COMP *cpi, MACROBLOCK *x,
break;
}
coeff_ctx = combine_entropy_contexts(ta[0], tl[0]);
tx_block_rd_b(cpi, x, tx_size, blk_row, blk_col, plane, block,
plane_bsize, coeff_ctx, rate, dist, bsse, skip);
vp10_tx_block_rd_b(cpi, x, tx_size, blk_row, blk_col, plane, block,
plane_bsize, coeff_ctx, rate, dist, bsse, skip);
for (i = 0; i < (1 << tx_size); ++i) {
ta[i] = !(p->eobs[block] == 0);
tl[i] = !(p->eobs[block] == 0);

Просмотреть файл

@ -74,6 +74,13 @@ void vp10_rd_pick_inter_mode_sub8x8(struct VP10_COMP *cpi,
int64_t best_rd_so_far);
#if CONFIG_SUPERTX
#if CONFIG_VAR_TX
void vp10_tx_block_rd_b(const VP10_COMP *cpi, MACROBLOCK *x, TX_SIZE tx_size,
int blk_row, int blk_col, int plane, int block,
int plane_bsize, int coeff_ctx,
int *rate, int64_t *dist, int64_t *bsse, int *skip);
#endif
void vp10_txfm_rd_in_plane_supertx(MACROBLOCK *x,
#if CONFIG_VAR_TX
const VP10_COMP *cpi,