diff options
author | André Klitzing <aklitzing@gmail.com> | 2019-07-19 11:48:50 +0200 |
---|---|---|
committer | André Klitzing <aklitzing@gmail.com> | 2019-07-22 13:37:27 +0200 |
commit | d4861c2a836f323e1c4694bf7830e69ef845b8ce (patch) | |
tree | 703fbdb0483211688efc93895fcfe1e9be32fc1f /src/3rdparty/libwebp/src/dsp/quant.h | |
parent | 7bdf0823b64e53a90f7a54151afada3aaceb7ba1 (diff) |
Update bundled libwebp to version 1.0.3
[ChangeLog][Third-Party Code] Update bundled libwebp to version 1.0.3
Change-Id: I7aef89e209923af0e516024c26ebce4a8158d4d1
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/3rdparty/libwebp/src/dsp/quant.h')
-rw-r--r-- | src/3rdparty/libwebp/src/dsp/quant.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/3rdparty/libwebp/src/dsp/quant.h b/src/3rdparty/libwebp/src/dsp/quant.h index 5ba6f9c..5e8dba8 100644 --- a/src/3rdparty/libwebp/src/dsp/quant.h +++ b/src/3rdparty/libwebp/src/dsp/quant.h @@ -10,6 +10,8 @@ #ifndef WEBP_DSP_QUANT_H_ #define WEBP_DSP_QUANT_H_ +#include <string.h> + #include "src/dsp/dsp.h" #include "src/webp/types.h" @@ -67,4 +69,17 @@ static WEBP_INLINE int IsFlat(const int16_t* levels, int num_blocks, #endif // defined(WEBP_USE_NEON) && !defined(WEBP_ANDROID_NEON) && // !defined(WEBP_HAVE_NEON_RTCD) +static WEBP_INLINE int IsFlatSource16(const uint8_t* src) { + const uint32_t v = src[0] * 0x01010101u; + int i; + for (i = 0; i < 16; ++i) { + if (memcmp(src + 0, &v, 4) || memcmp(src + 4, &v, 4) || + memcmp(src + 8, &v, 4) || memcmp(src + 12, &v, 4)) { + return 0; + } + src += BPS; + } + return 1; +} + #endif // WEBP_DSP_QUANT_H_ |