mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
Refactor code for HistogramCombine.
Refactor code for HistogramCombine and optimize the code by calculating the combined entropy and avoid un-necessary Histogram merges. This speeds up lossless encoding by 1-2% and almost no impact on compression density. Change-Id: Iedfcf4c1f3e88077bc77fc7b8c780c4cd5d6362b
This commit is contained in:
@ -436,7 +436,8 @@ static int CostModelBuild(CostModel* const m, int xsize, int ysize,
|
||||
}
|
||||
VP8LHistogramCreate(&histo, &refs, cache_bits);
|
||||
ConvertPopulationCountTableToBitEstimates(
|
||||
VP8LHistogramNumCodes(&histo), histo.literal_, m->literal_);
|
||||
VP8LHistogramNumCodes(histo.palette_code_bits_),
|
||||
histo.literal_, m->literal_);
|
||||
ConvertPopulationCountTableToBitEstimates(
|
||||
VALUES_IN_BYTE, histo.red_, m->red_);
|
||||
ConvertPopulationCountTableToBitEstimates(
|
||||
|
Reference in New Issue
Block a user