diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-04-30 20:07:35 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-04-30 23:38:21 +0200 |
commit | 0b588bfb51ecb262f714994696e77b6a1c7b1cef (patch) | |
tree | 3b54ef2cdd8738d2a73125ed499acfcac4ab015f | |
parent | c681d8e8a8180c74e0f0edd8c50f996862c30708 (diff) | |
download | ffmpeg-0b588bfb51ecb262f714994696e77b6a1c7b1cef.tar.gz |
avcodec/apv_dsp: Fix left-shift of negative value
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/apv_dsp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/apv_dsp.c b/libavcodec/apv_dsp.c index fd814ef900..07bb34ec0b 100644 --- a/libavcodec/apv_dsp.c +++ b/libavcodec/apv_dsp.c @@ -58,7 +58,7 @@ static void apv_decode_transquant_c(void *output, for (int y = 0; y < 8; y++) { for (int x = 0; x < 8; x++) { - int coeff = (((input[y][x] * qmatrix[y][x]) << qp_shift) + + int coeff = (input[y][x] * qmatrix[y][x] * (1 << qp_shift) + (1 << (bd_shift - 1))) >> bd_shift; scaled_coeff[y][x] = |