[FFmpeg-cvslog] avfilter/vf_ssim360: Fix left-shift of negative value

Andreas Rheinhardt git at videolan.org
Sat Jan 28 19:20:11 EET 2023


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Jan 28 18:01:25 2023 +0100| [54659e329e88083eeb5ce3caa328dbc9319a8372] | committer: Andreas Rheinhardt

avfilter/vf_ssim360: Fix left-shift of negative value

Reviewed-by: Anton Khirnov <anton at khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=54659e329e88083eeb5ce3caa328dbc9319a8372
---

 libavfilter/vf_ssim360.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 



More information about the ffmpeg-cvslog mailing list