[Mplayer-cvslog] CVS: main/libfame fame_motion_pmvfast.c,1.1,1.2

David Holm mswitch at mplayer.dev.hu
Sat Mar 23 16:57:27 CET 2002


Update of /cvsroot/mplayer/main/libfame
In directory mplayer:/var/tmp.root/cvs-serv17309/libfame

Modified Files:
	fame_motion_pmvfast.c 
Log Message:
Updated from fame cvs, fixes a bug where video would go unwatchable
after a few minutes


Index: fame_motion_pmvfast.c
===================================================================
RCS file: /cvsroot/mplayer/main/libfame/fame_motion_pmvfast.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- fame_motion_pmvfast.c	13 Mar 2002 01:14:34 -0000	1.1
+++ fame_motion_pmvfast.c	23 Mar 2002 15:57:25 -0000	1.2
@@ -788,7 +788,7 @@
     threshold1 = fame_min(threshold1, pvector_left[0].error+pvector_left[1].error+pvector_left[2].error+pvector_left[3].error);
   if(mb_y>0)
     threshold1 = fame_min(threshold1, pvector_top[0].error+pvector_top[1].error+pvector_top[2].error+pvector_top[3].error);
-  if(mb_y>0 && mb_x<motion->mb_width)
+  if(mb_y>0 && mb_x<motion->mb_width-1)
     threshold1 = fame_min(threshold1, pvector_topright[0].error+pvector_topright[1].error+pvector_topright[2].error+pvector_topright[3].error);
 
   threshold0 = pvector[0].count + pvector[1].count + pvector[2].count + pvector[3].count;
@@ -810,6 +810,7 @@
 
   /* Step3 : Process a set of vectors whose matching probability is very high*/
   /*         i.e. median, left, top, topright vector                         */
+
   /* Check the median vector */
   vectors[3].dx = vectors[2].dx = vectors[1].dx = vectors[0].dx;
   vectors[3].dy = vectors[2].dy = vectors[1].dy = vectors[0].dy;
@@ -843,18 +844,21 @@
 #endif
 
   /* Check the left vector */
-  use_median &= check_vector(ref, current, shape,
-			     x, y, width, height,
-			     pvector_left, vectors,
-			     offset, pitch, eval_error);
+  if(mb_x>0)
+    use_median &= check_vector(ref, current, shape,
+			       x, y, width, height,
+			       pvector_left, vectors,
+			       offset, pitch, eval_error);
 
   /* Check the top vector */
-  use_median &= check_vector(ref, current, shape,
-			     x, y, width, height,
-			     pvector_top, vectors,
-			     offset, pitch, eval_error);
+  if(mb_y>0)
+    use_median &= check_vector(ref, current, shape,
+			       x, y, width, height,
+			       pvector_top, vectors,
+			       offset, pitch, eval_error);
 
   /* Check the topright vector */
+  if(mb_y>0 && mb_x<motion->mb_width-1)
   use_median &= check_vector(ref, current, shape,
 			     x, y, width, height,
 			     pvector_topright, vectors,




More information about the MPlayer-cvslog mailing list