Merge "Replacing VP9_COMBINEENTROPYCONTEXTS macro with function." into experimental

This commit is contained in:
Dmitry Kovalev 2013-04-18 14:26:34 -07:00 committed by Gerrit Code Review
commit a8d903e539
5 changed files with 9 additions and 7 deletions

View File

@ -51,8 +51,10 @@ typedef struct {
ENTROPY_CONTEXT v[2];
} ENTROPY_CONTEXT_PLANES;
#define VP9_COMBINEENTROPYCONTEXTS(Dest, A, B) \
Dest = ((A)!=0) + ((B)!=0);
static INLINE int combine_entropy_contexts(ENTROPY_CONTEXT a,
ENTROPY_CONTEXT b) {
return (a != 0) + (b != 0);
}
typedef enum {
KEY_FRAME = 0,

View File

@ -251,7 +251,7 @@ static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd,
break;
}
VP9_COMBINEENTROPYCONTEXTS(pt, above_ec, left_ec);
pt = combine_entropy_contexts(above_ec, left_ec);
nb = vp9_get_coef_neighbors_handle(scan, &pad);
while (1) {

View File

@ -582,7 +582,7 @@ static void optimize_b(VP9_COMMON *const cm,
/* Now pick the best path through the whole trellis. */
band = get_coef_band(scan, tx_size, i + 1);
VP9_COMBINEENTROPYCONTEXTS(pt, *a, *l);
pt = combine_entropy_contexts(*a, *l);
rate0 = tokens[next][0].rate;
rate1 = tokens[next][1].rate;
error0 = tokens[next][0].error;

View File

@ -496,7 +496,7 @@ static INLINE int cost_coeffs(VP9_COMMON *const cm, MACROBLOCK *mb,
}
assert(eob <= seg_eob);
VP9_COMBINEENTROPYCONTEXTS(pt, a_ec, l_ec);
pt = combine_entropy_contexts(a_ec, l_ec);
nb = vp9_get_coef_neighbors_handle(scan, &pad);
default_eob = seg_eob;

View File

@ -287,7 +287,7 @@ static void tokenize_b(VP9_COMP *cpi,
break;
}
VP9_COMBINEENTROPYCONTEXTS(pt, a_ec, l_ec);
pt = combine_entropy_contexts(a_ec, l_ec);
nb = vp9_get_coef_neighbors_handle(scan, &pad);
default_eob = seg_eob;
@ -807,7 +807,7 @@ static void stuff_b(VP9_COMP *cpi,
#if CONFIG_CODE_NONZEROCOUNT
if (!nzc_used) {
#endif
VP9_COMBINEENTROPYCONTEXTS(pt, a_ec, l_ec);
pt = combine_entropy_contexts(a_ec, l_ec);
band = 0;
t->Token = DCT_EOB_TOKEN;
t->context_tree = probs[type][ref][band][pt];