From 0424b1ef3bd9545e8e34b5f0a3ffab97ef378eeb Mon Sep 17 00:00:00 2001 From: Vikas Arora Date: Fri, 8 Jun 2012 09:16:54 +0530 Subject: [PATCH] Rebase default encoding settings. Updated histo_bits to 3 from 4 and changed the quality threshold for inner loop for HashChainFindCopy. Impact: 0.5%-0.8% better bpp with 15%-20% hit on encoding throughput at default encoding settings. Change-Id: I316ef88403148b1e19036fa0817d944eb0301255 --- src/enc/backward_references.c | 2 +- src/enc/vp8l.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/enc/backward_references.c b/src/enc/backward_references.c index 1b080db1..7bf10214 100644 --- a/src/enc/backward_references.c +++ b/src/enc/backward_references.c @@ -148,7 +148,7 @@ static int HashChainFindCopy(const HashChain* const p, const uint64_t hash_code = GetPixPairHash64(&argb[index]); int prev_length = 0; int64_t best_val = 0; - const int iter_min_mult = (quality < 50) ? 2 : (quality <= 75) ? 4 : 8; + const int iter_min_mult = (quality < 50) ? 2 : (quality < 75) ? 4 : 8; const int iter_min = -quality * iter_min_mult; int iter_cnt = 10 + (quality >> 1); const int min_pos = (index > WINDOW_SIZE) ? index - WINDOW_SIZE : 0; diff --git a/src/enc/vp8l.c b/src/enc/vp8l.c index ec0b8278..d380b363 100644 --- a/src/enc/vp8l.c +++ b/src/enc/vp8l.c @@ -826,7 +826,7 @@ static int GetHistoBits(const WebPConfig* const config, const int height = pic->height; const size_t hist_size = sizeof(VP8LHistogram); // Make tile size a function of encoding method (Range: 0 to 6). - int histo_bits = 8 - config->method; + int histo_bits = 7 - config->method; while (1) { const size_t huff_image_size = VP8LSubSampleSize(width, histo_bits) * VP8LSubSampleSize(height, histo_bits) *