This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 6e65d1c945 avcodec/motion_est: Fix left shifts of negative numbers
6e65d1c945 is described below
commit 6e65d1c94533feefc7237bd75fc26d4b89a72f46
Author: Andreas Rheinhardt <[email protected]>
AuthorDate: Wed Jan 21 00:28:35 2026 +0100
Commit: Andreas Rheinhardt <[email protected]>
CommitDate: Sun Jan 25 22:46:39 2026 +0100
avcodec/motion_est: Fix left shifts of negative numbers
Fixes ticket #21486.
Reviewed-by: James Almer <[email protected]>
Signed-off-by: Andreas Rheinhardt <[email protected]>
---
libavcodec/motion_est.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 33166f2a90..8ca6f16a7c 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -1082,11 +1082,9 @@ int ff_pre_estimate_p_frame_motion(MPVEncContext *const
s,
get_limits(s, 16*mb_x, 16*mb_y, 0);
c->skip=0;
- P_LEFT[0] = s->p_mv_table[xy + 1][0];
+ P_LEFT[0] = FFMAX(s->p_mv_table[xy + 1][0], c->xmin * (1 << shift));
P_LEFT[1] = s->p_mv_table[xy + 1][1];
- if(P_LEFT[0] < (c->xmin<<shift)) P_LEFT[0] = (c->xmin<<shift);
-
/* special case for first line */
if (s->c.first_slice_line) {
c->pred_x= P_LEFT[0];
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]