mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
Disable costly TraceBackwards for method=0.
Disable costly TraceBackwards heuristic for computing the backward references for low_effort (method=0) compression. The TraceBackwards heuristic is already disabled for lower (q < 25) quality range. Following is the compression data for 1000 image corpus for q >= 25. This speeds up compression (q >= 25) by a factor of 2.5-3X with slight loss of compression density (0.7% for lower quality range and 1.2% for higher qualities). Change-Id: I256c9e2137c7de4083f423ea32ee12d3b0f46253
This commit is contained in:
parent
a7e7caa486
commit
b9e356b998
@ -1017,8 +1017,9 @@ VP8LBackwardRefs* VP8LGetBackwardReferences(
|
||||
|
||||
// Choose appropriate backward reference.
|
||||
if (lz77_is_useful) {
|
||||
// TraceBackwards is costly. Don't execute it at lower quality.
|
||||
const int try_lz77_trace_backwards = (quality >= 25);
|
||||
// TraceBackwards is costly. Don't execute it at lower quality or low effort
|
||||
// compression setting.
|
||||
const int try_lz77_trace_backwards = (quality >= 25) && !low_effort;
|
||||
best = refs_lz77; // default guess: lz77 is better
|
||||
if (try_lz77_trace_backwards) {
|
||||
VP8LBackwardRefs* const refs_trace = refs_rle;
|
||||
|
Loading…
Reference in New Issue
Block a user