From bf867bf296c51089a8e2e6210343172d35650f48 Mon Sep 17 00:00:00 2001 From: Vikas Arora Date: Tue, 11 Jun 2013 12:12:47 -0700 Subject: [PATCH] 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 --- src/enc/vp8l.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/enc/vp8l.c b/src/enc/vp8l.c index c82d26cc..1efd1d11 100644 --- a/src/enc/vp8l.c +++ b/src/enc/vp8l.c @@ -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_);