diff mbox series

[FFmpeg-devel] avocdec/snowenc: Fix left shift of negative number

Message ID GV1P250MB0737775BFB61BA57541E22F08F559@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 2664b39d54aa44ba185ea39c3933b80d9dfcb542
Headers show
Series [FFmpeg-devel] avocdec/snowenc: Fix left shift of negative number | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 27, 2022, 1:47 a.m. UTC
Fixes the vsynth(1|2|_lena)-snow-ll FATE-tests.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/snowenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Sept. 27, 2022, 7:19 p.m. UTC | #1
On Tue, Sep 27, 2022 at 03:47:15AM +0200, Andreas Rheinhardt wrote:
> Fixes the vsynth(1|2|_lena)-snow-ll FATE-tests.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/snowenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

LGTM

thx

[...]
diff mbox series

Patch

diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index b647fc9016..c5ff50639e 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1814,7 +1814,7 @@  redo_frame:
             if(s->qlog == LOSSLESS_QLOG){
                 for(y=0; y<h; y++){
                     for(x=0; x<w; x++){
-                        s->spatial_idwt_buffer[y*w + x]<<=FRAC_BITS;
+                        s->spatial_idwt_buffer[y*w + x] *= 1 << FRAC_BITS;
                     }
                 }
             }