Merge "vp9_rdopt: declare 'c' closer to use"

This commit is contained in:
Johann Koenig
2017-02-01 20:55:11 +00:00
committed by Gerrit Code Review

View File

@@ -358,7 +358,7 @@ static int cost_coeffs(MACROBLOCK *x, int plane, int block, TX_SIZE tx_size,
unsigned int(*token_costs)[2][COEFF_CONTEXTS][ENTROPY_TOKENS] = unsigned int(*token_costs)[2][COEFF_CONTEXTS][ENTROPY_TOKENS] =
x->token_costs[tx_size][type][is_inter_block(mi)]; x->token_costs[tx_size][type][is_inter_block(mi)];
uint8_t token_cache[32 * 32]; uint8_t token_cache[32 * 32];
int c, cost; int cost;
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VP9_HIGHBITDEPTH
const int *cat6_high_cost = vp9_get_high_cost_table(xd->bd); const int *cat6_high_cost = vp9_get_high_cost_table(xd->bd);
#else #else
@@ -373,10 +373,10 @@ static int cost_coeffs(MACROBLOCK *x, int plane, int block, TX_SIZE tx_size,
if (eob == 0) { if (eob == 0) {
// single eob token // single eob token
cost = token_costs[0][0][pt][EOB_TOKEN]; cost = token_costs[0][0][pt][EOB_TOKEN];
c = 0;
} else { } else {
if (use_fast_coef_costing) { if (use_fast_coef_costing) {
int band_left = *band_count++; int band_left = *band_count++;
int c;
// dc token // dc token
int v = qcoeff[0]; int v = qcoeff[0];
@@ -407,6 +407,7 @@ static int cost_coeffs(MACROBLOCK *x, int plane, int block, TX_SIZE tx_size,
} else { // !use_fast_coef_costing } else { // !use_fast_coef_costing
int band_left = *band_count++; int band_left = *band_count++;
int c;
// dc token // dc token
int v = qcoeff[0]; int v = qcoeff[0];