Merge "Unify set_contexts() function for encoder and decoder" into nextgenv2

This commit is contained in:
Yaowu Xu
2016-10-21 18:00:32 +00:00
committed by Gerrit Code Review
7 changed files with 35 additions and 79 deletions

View File

@@ -369,8 +369,8 @@ static void cost_coeffs_b(int plane, int block, int blk_row, int blk_col,
int rate = av1_cost_coeffs(cm, x, plane, block, pt, tx_size, scan_order->scan,
scan_order->neighbors, 0);
args->this_rate += rate;
av1_set_contexts(xd, pd, plane_bsize, tx_size, p->eobs[block] > 0, blk_col,
blk_row);
(void)plane_bsize;
av1_set_contexts(xd, pd, tx_size, p->eobs[block] > 0, blk_col, blk_row);
}
static void set_entropy_context_b(int plane, int block, int blk_row,
@@ -382,8 +382,8 @@ static void set_entropy_context_b(int plane, int block, int blk_row,
MACROBLOCKD *const xd = &x->e_mbd;
struct macroblock_plane *p = &x->plane[plane];
struct macroblockd_plane *pd = &xd->plane[plane];
av1_set_contexts(xd, pd, plane_bsize, tx_size, p->eobs[block] > 0, blk_col,
blk_row);
(void)plane_bsize;
av1_set_contexts(xd, pd, tx_size, p->eobs[block] > 0, blk_col, blk_row);
}
static INLINE void add_token(TOKENEXTRA **t, const aom_prob *context_tree,
@@ -498,6 +498,7 @@ static void tokenize_b(int plane, int block, int blk_row, int blk_col,
int skip_eob = 0;
int16_t token;
EXTRABIT extra;
(void)plane_bsize;
pt = get_entropy_context(tx_size, pd->above_context + blk_col,
pd->left_context + blk_row);
scan = scan_order->scan;
@@ -532,7 +533,7 @@ static void tokenize_b(int plane, int block, int blk_row, int blk_col,
*tp = t;
av1_set_contexts(xd, pd, plane_bsize, tx_size, c > 0, blk_col, blk_row);
av1_set_contexts(xd, pd, tx_size, c > 0, blk_col, blk_row);
}
struct is_skippable_args {