mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
remove some variable shadowing
Change-Id: I4348253ec6b50639095b22c4745dc26da0904466
This commit is contained in:
@ -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) {
|
||||
|
@ -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]);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user