mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 23:09:52 +02:00
Convert predictor_enc.c to fixed point
Also remove the last float in histogram_enc.c Change-Id: I6f647a5fc6dd34a19292820817472b4462c94f49
This commit is contained in:
@ -1247,9 +1247,10 @@ int VP8LGetHistoImageSymbols(int xsize, int ysize,
|
||||
// Don't combine the histograms using stochastic and greedy heuristics for
|
||||
// low-effort compression mode.
|
||||
if (!low_effort || !entropy_combine) {
|
||||
const float x = quality / 100.f;
|
||||
// cubic ramp between 1 and MAX_HISTO_GREEDY:
|
||||
const int threshold_size = (int)(1 + (x * x * x) * (MAX_HISTO_GREEDY - 1));
|
||||
const int threshold_size =
|
||||
(int)(1 + DivRound(quality * quality * quality * (MAX_HISTO_GREEDY - 1),
|
||||
100 * 100 * 100));
|
||||
int do_greedy;
|
||||
if (!HistogramCombineStochastic(image_histo, &num_used, threshold_size,
|
||||
&do_greedy)) {
|
||||
|
Reference in New Issue
Block a user