[FFmpeg-cvslog] avcodec/apv_dsp: Fix left-shift of negative value
Andreas Rheinhardt
git at videolan.org
Thu May 1 00:51:22 EEST 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Apr 30 20:07:35 2025 +0200| [0b588bfb51ecb262f714994696e77b6a1c7b1cef] | committer: Andreas Rheinhardt
avcodec/apv_dsp: Fix left-shift of negative value
Reviewed-by: Mark Thompson <sw at jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b588bfb51ecb262f714994696e77b6a1c7b1cef
---
libavcodec/apv_dsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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] =
More information about the ffmpeg-cvslog
mailing list