mirror of
https://github.com/webmproject/libwebp.git
synced 2025-01-28 23:52:56 +01:00
Tuned cross_color parameter (step) for lower qual
Tuned the cross_color transform parameter (step) for lower quality levels. This change gives speedup of 20% at lower qualities (25) and 10% at moderate quality level (50) with a loss of 0.25% in compression density. Also removed TODO for cross_color transform. Observed good correlation of this with the predict transform. Change-Id: I8a1044e9f24e6a5f84295c030fd444d0eec7d154
This commit is contained in:
parent
90e2ec5a1b
commit
bf867bf296
@ -168,9 +168,6 @@ static int VP8LEncAnalyze(VP8LEncoder* const enc, WebPImageHint image_hint) {
|
||||
}
|
||||
if (pred_entropy < 0.95 * non_pred_entropy) {
|
||||
enc->use_predict_ = 1;
|
||||
// TODO(vikasa): Observed some correlation of cross_color transform with
|
||||
// predict. Need to investigate this further and add separate heuristic
|
||||
// for setting use_cross_color flag.
|
||||
enc->use_cross_color_ = 1;
|
||||
}
|
||||
}
|
||||
@ -702,7 +699,7 @@ static int ApplyCrossColorFilter(const VP8LEncoder* const enc,
|
||||
const int ccolor_transform_bits = enc->transform_bits_;
|
||||
const int transform_width = VP8LSubSampleSize(width, ccolor_transform_bits);
|
||||
const int transform_height = VP8LSubSampleSize(height, ccolor_transform_bits);
|
||||
const int step = (quality == 0) ? 32 : 8;
|
||||
const int step = (quality < 25) ? 32 : (quality > 50) ? 8 : 16;
|
||||
|
||||
VP8LColorSpaceTransform(width, height, ccolor_transform_bits, step,
|
||||
enc->argb_, enc->transform_data_);
|
||||
|
Loading…
x
Reference in New Issue
Block a user