[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec snow.c,1.52,1.53

Michael Niedermayer CVS michael
Thu Apr 14 22:30:11 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv24823

Modified Files:
	snow.c 
Log Message:
minor optimization


Index: snow.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/snow.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- snow.c	14 Apr 2005 18:33:26 -0000	1.52
+++ snow.c	14 Apr 2005 20:30:08 -0000	1.53
@@ -1833,17 +1833,16 @@
                         b->x_coeff[index].x=x;
                         b->x_coeff[index++].coeff= v;
                     }else{
+                        int max_run;
                         run--;
                         v=0;
 
-                        if(y && parent){
-                            int max_run;
-
-                            max_run= FFMIN(run, b->x_coeff[prev_index].x - x - 2);
+                        if(y) max_run= FFMIN(run, b->x_coeff[prev_index].x - x - 2);
+                        else  max_run= FFMIN(run, w-x-1);
+                        if(parent)
                             max_run= FFMIN(max_run, 2*parent->x_coeff[parent_index].x - x - 1);
-                            x+= max_run;
-                            run-= max_run;
-                        }
+                        x+= max_run;
+                        run-= max_run;
                     }
                 }
             }





More information about the ffmpeg-cvslog mailing list