mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
don't consolidate proba stats too often
adds a minimum count before FinalizeToken() is called for update. Change-Id: I445be6a3e347620583d87c33067cefa656a25039
This commit is contained in:
parent
69e2590642
commit
eef73d07a3
@ -901,15 +901,21 @@ int VP8EncLoop(VP8Encoder* const enc) {
|
||||
// Single pass using Token Buffer.
|
||||
|
||||
#if !defined(DISABLE_TOKEN_BUFFER)
|
||||
|
||||
#define MIN_COUNT 96 // minimum number of macroblocks before updating stats
|
||||
|
||||
int VP8EncTokenLoop(VP8Encoder* const enc) {
|
||||
int ok;
|
||||
// refresh the proba 8 times per pass
|
||||
const int max_count = (enc->mb_w_ * enc->mb_h_) >> 3;
|
||||
int cnt = max_count;
|
||||
// Roughly refresh the proba height times per pass
|
||||
int max_count = (enc->mb_w_ * enc->mb_h_) >> 3;
|
||||
int cnt;
|
||||
VP8EncIterator it;
|
||||
VP8Proba* const proba = &enc->proba_;
|
||||
const VP8RDLevel rd_opt = enc->rd_opt_level_;
|
||||
|
||||
if (max_count < MIN_COUNT) max_count = MIN_COUNT;
|
||||
cnt = max_count;
|
||||
|
||||
assert(enc->num_parts_ == 1);
|
||||
assert(enc->use_tokens_);
|
||||
assert(proba->use_skip_proba_ == 0);
|
||||
|
Loading…
Reference in New Issue
Block a user