mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
fix VP8LHistogramNumCodes to handle the case palette_code_bits == 0
-> lot of simplifications ensue and we should be able to get rid of ClearHuffmanTreeIfOnlyOneSymbol() too, in a subsequent patch. Change-Id: Ic4c51d05e4b1970e37f94ffd85fae6a02e4a6422
This commit is contained in:
@ -118,7 +118,8 @@ static WEBP_INLINE void VP8LHistogramRemove(VP8LHistogram* const p,
|
||||
}
|
||||
|
||||
static WEBP_INLINE int VP8LHistogramNumCodes(const VP8LHistogram* const p) {
|
||||
return 256 + kLengthCodes + (1 << p->palette_code_bits_);
|
||||
return 256 + kLengthCodes +
|
||||
((p->palette_code_bits_ > 0) ? (1 << p->palette_code_bits_) : 0);
|
||||
}
|
||||
|
||||
void VP8LConvertPopulationCountTableToBitEstimates(
|
||||
|
Reference in New Issue
Block a user