[FFmpeg-cvslog] avcodec/motion_est: Only clip MVs which are used
Michael Niedermayer
git at videolan.org
Wed Jun 11 22:28:08 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jun 11 22:08:15 2014 +0200| [ef8725122d23b7dfc23cb87b84267b78d90586ab] | committer: Michael Niedermayer
avcodec/motion_est: Only clip MVs which are used
Fixes valgrind mpeg4 failures
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef8725122d23b7dfc23cb87b84267b78d90586ab
---
libavcodec/motion_est.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 0500002..b093580 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -620,7 +620,11 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift)
P_MV1[0]= mx;
P_MV1[1]= my;
if(saftey_cliping)
- for(i=0; i<10; i++){
+ for(i=1; i<10; i++){
+ if (s->first_slice_line && block<2 && i>1 && i<9)
+ continue;
+ if (i>4 && i<9)
+ continue;
if(P[i][0] > (c->xmax<<shift)) P[i][0]= (c->xmax<<shift);
if(P[i][1] > (c->ymax<<shift)) P[i][1]= (c->ymax<<shift);
}
More information about the ffmpeg-cvslog
mailing list