diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-03-04 13:49:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-04 13:49:50 +0100 |
commit | d2c57e8431a6dd3a279eec9abdd6acd4ba288ca8 (patch) | |
tree | 7c516cd7752f1c8a23e5752d489003239099c1bc /thirdparty/libwebp/src/enc/quant_enc.c | |
parent | 6e13002034152981efdceed864b4e48d70018a49 (diff) | |
parent | 93f6a065f8e0e083582890a245b7dcc3cd8c7ef6 (diff) |
Merge pull request #26577 from akien-mga/webp-1.0.2
libwebp: Sync with upstream 1.0.2
Diffstat (limited to 'thirdparty/libwebp/src/enc/quant_enc.c')
-rw-r--r-- | thirdparty/libwebp/src/enc/quant_enc.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/thirdparty/libwebp/src/enc/quant_enc.c b/thirdparty/libwebp/src/enc/quant_enc.c index 35bfaf21ef..03c682e3ae 100644 --- a/thirdparty/libwebp/src/enc/quant_enc.c +++ b/thirdparty/libwebp/src/enc/quant_enc.c @@ -15,6 +15,7 @@ #include <math.h> #include <stdlib.h> // for abs() +#include "src/dsp/quant.h" #include "src/enc/vp8i_enc.h" #include "src/enc/cost_enc.h" @@ -977,19 +978,6 @@ static void SwapOut(VP8EncIterator* const it) { SwapPtr(&it->yuv_out_, &it->yuv_out2_); } -static score_t IsFlat(const int16_t* levels, int num_blocks, score_t thresh) { - score_t score = 0; - while (num_blocks-- > 0) { // TODO(skal): refine positional scoring? - int i; - for (i = 1; i < 16; ++i) { // omit DC, we're only interested in AC - score += (levels[i] != 0); - if (score > thresh) return 0; - } - levels += 16; - } - return 1; -} - static void PickBestIntra16(VP8EncIterator* const it, VP8ModeScore* rd) { const int kNumBlocks = 16; VP8SegmentInfo* const dqm = &it->enc_->dqm_[it->mb_->segment_]; |