mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-19 07:20:02 +02:00
Create LUT for PrefixEncode.
This speeds up lossless compression by 5%. Change-Id: Ifd114b1d9850dc3aac74593809e7d48529d35e3d
This commit is contained in:
@ -90,12 +90,10 @@ void VP8LHistogramAddSinglePixOrCopy(VP8LHistogram* const histo,
|
||||
int literal_ix = 256 + NUM_LENGTH_CODES + PixOrCopyCacheIdx(v);
|
||||
++histo->literal_[literal_ix];
|
||||
} else {
|
||||
int code, extra_bits_count, extra_bits_value;
|
||||
PrefixEncode(PixOrCopyLength(v),
|
||||
&code, &extra_bits_count, &extra_bits_value);
|
||||
int code, extra_bits, extra_bits_val;
|
||||
VP8LPrefixEncode(PixOrCopyLength(v), &code, &extra_bits, &extra_bits_val);
|
||||
++histo->literal_[256 + code];
|
||||
PrefixEncode(PixOrCopyDistance(v),
|
||||
&code, &extra_bits_count, &extra_bits_value);
|
||||
VP8LPrefixEncode(PixOrCopyDistance(v), &code, &extra_bits, &extra_bits_val);
|
||||
++histo->distance_[code];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user