remove some variable shadowing

Change-Id: I4348253ec6b50639095b22c4745dc26da0904466
This commit is contained in:
James Zern
2012-05-15 13:17:34 -07:00
parent c6882c49e3
commit 37a77a6bf4
6 changed files with 68 additions and 68 deletions

View File

@ -206,9 +206,9 @@ static void AssignSegments(VP8Encoder* const enc, const int alphas[256]) {
// Map each original value to the closest centroid
for (n = 0; n < enc->mb_w_ * enc->mb_h_; ++n) {
VP8MBInfo* const mb = &enc->mb_info_[n];
const int a = mb->alpha_;
mb->segment_ = map[a];
mb->alpha_ = centers[map[a]]; // just for the record.
const int alpha = mb->alpha_;
mb->segment_ = map[alpha];
mb->alpha_ = centers[map[alpha]]; // just for the record.
}
if (nb > 1) {

View File

@ -564,8 +564,8 @@ static int BackwardReferencesHashChainFollowChosenPath(
} else {
if (use_color_cache && VP8LColorCacheContains(&hashers, argb[i])) {
// push pixel as a color cache index
int ix = VP8LColorCacheGetIndex(&hashers, argb[i]);
refs->refs[size] = PixOrCopyCreateCacheIdx(ix);
const int idx = VP8LColorCacheGetIndex(&hashers, argb[i]);
refs->refs[size] = PixOrCopyCreateCacheIdx(idx);
} else {
refs->refs[size] = PixOrCopyCreateLiteral(argb[i]);
}

View File

@ -307,9 +307,9 @@ static int HistogramCombine(const VP8LHistogramSet* const in,
- out->histograms[idx2]->bit_cost_;
if (best_cost_diff > curr_cost_diff) { // found a better pair?
{ // swap cur/best combo histograms
VP8LHistogram* const tmp = cur_combo;
VP8LHistogram* const tmp_histo = cur_combo;
cur_combo = best_combo;
best_combo = tmp;
best_combo = tmp_histo;
}
best_cost_diff = curr_cost_diff;
best_idx1 = idx1;