mirror of
https://github.com/webmproject/libwebp.git
synced 2025-01-30 08:32:55 +01:00
828b4ce062
The histograms count the occurrences of len/dist in entropy images. Those (at most (1<<14) by (1<<14)) are sub-sampled by at least MIN_HUFFMAN_BITS == 2, hence at most 24 bits in a histogram value. At most, we multiply by 19 (because the longest histogram is of size 40 and we do 40>>1, cf code) for the bit cost. So it all fits in 32 bits. Change-Id: Ife24b035f54794851ff31f2fac07901f724c6d7f