[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec motion_est.c,1.114,1.115
Michael Niedermayer CVS
michael
Fri Dec 23 20:05:50 CET 2005
- Previous message: [Ffmpeg-cvslog] CVS: ffmpeg/libavcodec motion_est.c, 1.113, 1.114 avcodec.h, 1.434, 1.435 utils.c, 1.165, 1.166
- Next message: [Ffmpeg-cvslog] CVS: ffmpeg/tests ffmpeg.regression.ref, 1.147, 1.148 rotozoom.regression.ref, 1.102, 1.103
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv4502
Modified Files:
motion_est.c
Log Message:
10l (segfault fix)
Index: motion_est.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/motion_est.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- motion_est.c 23 Dec 2005 16:25:00 -0000 1.114
+++ motion_est.c 23 Dec 2005 19:05:48 -0000 1.115
@@ -1646,14 +1646,17 @@
if(s->avctx->bidir_refine){
int score, end;
#define CHECK_BIDIR(fx,fy,bx,by)\
- score= check_bidir_mv(s, motion_fx+fx, motion_fy+fy, motion_bx+bx, motion_by+by, pred_fx, pred_fy, pred_bx, pred_by, 0, 16);\
- if(score < fbmin){\
- fbmin= score;\
- motion_fx+=fx;\
- motion_fy+=fy;\
- motion_bx+=bx;\
- motion_by+=by;\
- end=0;\
+ if( (fx<=0 || motion_fx+fx<=xmax) && (fy<=0 || motion_fy+fy<=ymax) && (bx<=0 || motion_bx+bx<=xmax) && (by<=0 || motion_by+by<=ymax)\
+ &&(fx>=0 || motion_fx+fx>=xmin) && (fy>=0 || motion_fy+fy>=ymin) && (bx>=0 || motion_bx+bx>=xmin) && (by>=0 || motion_by+by>=ymin)){\
+ score= check_bidir_mv(s, motion_fx+fx, motion_fy+fy, motion_bx+bx, motion_by+by, pred_fx, pred_fy, pred_bx, pred_by, 0, 16);\
+ if(score < fbmin){\
+ fbmin= score;\
+ motion_fx+=fx;\
+ motion_fy+=fy;\
+ motion_bx+=bx;\
+ motion_by+=by;\
+ end=0;\
+ }\
}
#define CHECK_BIDIR2(a,b,c,d)\
CHECK_BIDIR(a,b,c,d)\
@@ -1668,10 +1671,6 @@
do{
end=1;
- if( motion_fx >= xmax || motion_bx >= xmax || motion_fx <= xmin || motion_bx <= xmin
- || motion_fy >= ymax || motion_by >= ymax || motion_fy <= ymin || motion_by <= ymin)
- break;
-
CHECK_BIDIRR( 0, 0, 0, 1)
if(s->avctx->bidir_refine > 1){
CHECK_BIDIRR( 0, 0, 1, 1)
- Previous message: [Ffmpeg-cvslog] CVS: ffmpeg/libavcodec motion_est.c, 1.113, 1.114 avcodec.h, 1.434, 1.435 utils.c, 1.165, 1.166
- Next message: [Ffmpeg-cvslog] CVS: ffmpeg/tests ffmpeg.regression.ref, 1.147, 1.148 rotozoom.regression.ref, 1.102, 1.103
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the ffmpeg-cvslog
mailing list