diff mbox series

[FFmpeg-devel,1/3] avfilter/vf_ssim360: Fix left-shift of negative value

Message ID GV1P250MB0737E41DDAA7F4F68046F6D78FCD9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 54659e329e88083eeb5ce3caa328dbc9319a8372
Headers show
Series [FFmpeg-devel,1/3] avfilter/vf_ssim360: Fix left-shift of negative value | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 28, 2023, 5:07 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vf_ssim360.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Anton Khirnov Jan. 28, 2023, 5:15 p.m. UTC | #1
set LGTM

thanks,
diff mbox series

Patch

diff --git a/libavfilter/vf_ssim360.c b/libavfilter/vf_ssim360.c
index a0bf73da1e..89f5100740 100644
--- a/libavfilter/vf_ssim360.c
+++ b/libavfilter/vf_ssim360.c
@@ -547,7 +547,7 @@  static double ssim360_db(double ssim360, double weight)
 static int get_bilinear_sample(const uint8_t *data, BilinearMap *m, int max_value)
 {
     static const int fixed_point_half = 1 << (FIXED_POINT_PRECISION - 1);
-    static const int inv_byte_mask = (-1) << 8;
+    static const int inv_byte_mask = UINT_MAX << 8;
 
     int tl, tr, bl, br, v;