[FFmpeg-cvslog] avcodec/motion_est: Fix score squaring overflow
Michael Niedermayer
git at videolan.org
Sun Jan 5 01:28:37 EET 2025
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Fri Jul 5 02:21:55 2024 +0200| [58acc6bda494cedb697a2616769e032c90baa6ae] | committer: Michael Niedermayer
avcodec/motion_est: Fix score squaring overflow
Fixes: CID1604552 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit f18b442370d714b930e3e983c2e5d789229f3356)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58acc6bda494cedb697a2616769e032c90baa6ae
---
libavcodec/motion_est.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 9db1e13ea5..765e8666b2 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -1461,7 +1461,7 @@ static inline int direct_search(MpegEncContext * s, int mb_x, int mb_y)
s->b_direct_mv_table[mot_xy][0]= 0;
s->b_direct_mv_table[mot_xy][1]= 0;
- return 256*256*256*64;
+ return 256*256*256*64-1;
}
c->xmin= xmin;
More information about the ffmpeg-cvslog
mailing list