diff options
author | robot-piglet <[email protected]> | 2025-07-24 10:07:25 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-07-24 10:16:27 +0300 |
commit | 1c295121fa6a70a55c0ed79beb993761eac1fadc (patch) | |
tree | 0a3af4cf839ddc14d3d2829c3b224c1da409d80c /contrib/libs/libwebp/src/dsp/enc.c | |
parent | 026ffc40392187f03308f5ae7445365ad4a1ef7f (diff) |
Intermediate changes
commit_hash:9e9c04347de10235f77fcdaf62119e9b89e8bc59
Diffstat (limited to 'contrib/libs/libwebp/src/dsp/enc.c')
-rw-r--r-- | contrib/libs/libwebp/src/dsp/enc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/contrib/libs/libwebp/src/dsp/enc.c b/contrib/libs/libwebp/src/dsp/enc.c index 4bef1bab217..f1ebb74569b 100644 --- a/contrib/libs/libwebp/src/dsp/enc.c +++ b/contrib/libs/libwebp/src/dsp/enc.c @@ -13,9 +13,13 @@ #include <assert.h> #include <stdlib.h> // for abs() +#include <string.h> +#include "src/dsp/cpu.h" #include "src/dsp/dsp.h" #include "src/enc/vp8i_enc.h" +#include "src/utils/utils.h" +#include "src/webp/types.h" static WEBP_INLINE uint8_t clip_8b(int v) { return (!(v & ~0xff)) ? v : (v < 0) ? 0 : 255; @@ -688,11 +692,11 @@ static int QuantizeBlock_C(int16_t in[16], int16_t out[16], for (n = 0; n < 16; ++n) { const int j = kZigzag[n]; const int sign = (in[j] < 0); - const uint32_t coeff = (sign ? -in[j] : in[j]) + mtx->sharpen_[j]; - if (coeff > mtx->zthresh_[j]) { - const uint32_t Q = mtx->q_[j]; - const uint32_t iQ = mtx->iq_[j]; - const uint32_t B = mtx->bias_[j]; + const uint32_t coeff = (sign ? -in[j] : in[j]) + mtx->sharpen[j]; + if (coeff > mtx->zthresh[j]) { + const uint32_t Q = mtx->q[j]; + const uint32_t iQ = mtx->iq[j]; + const uint32_t B = mtx->bias[j]; int level = QUANTDIV(coeff, iQ, B); if (level > MAX_LEVEL) level = MAX_LEVEL; if (sign) level = -level; |