A quick pass of cleanup in backward reference code

const correctness, renaming, cosmetics etc.

Change-Id: I432befbb22f0eafd9a613f5f632398b6ef03c0f6
This commit is contained in:
Urvang Joshi
2012-04-25 07:33:57 +00:00
committed by James Zern
parent 83332b3c16
commit e491729905
4 changed files with 207 additions and 247 deletions

View File

@ -702,8 +702,8 @@ static void StoreImageToBitMask(
const int histogram_ix = histogram_symbols[histo_bits ?
(y >> histo_bits) * histo_xsize +
(x >> histo_bits) : 0];
if (PixOrCopyIsPaletteIx(&v)) {
const int code = PixOrCopyPaletteIx(&v);
if (PixOrCopyIsCacheIdx(&v)) {
const int code = PixOrCopyCacheIdx(&v);
int literal_ix = 256 + kLengthCodes + code;
VP8LWriteBits(bw, bitdepths[5 * histogram_ix][literal_ix],
bit_symbols[5 * histogram_ix][literal_ix]);
@ -719,7 +719,7 @@ static void StoreImageToBitMask(
int bits, n_bits;
int code, distance;
int len_ix;
PixOrCopyLengthCodeAndBits(&v, &code, &n_bits, &bits);
PrefixEncode(v.len, &code, &n_bits, &bits);
len_ix = 256 + code;
VP8LWriteBits(bw, bitdepths[5 * histogram_ix][len_ix],
bit_symbols[5 * histogram_ix][len_ix]);
@ -1202,8 +1202,8 @@ int VP8LEncodeImage(const WebPConfig* const config,
if (cache_bits > 0) {
if (quality > 25) {
if (!VP8LCalculateEstimateForPaletteSize(enc->argb_, enc->current_width_,
height, &cache_bits)) {
if (!VP8LCalculateEstimateForCacheSize(enc->argb_, enc->current_width_,
height, &cache_bits)) {
err = VP8_ENC_ERROR_INVALID_CONFIGURATION;
goto Error;
}