[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec dv.c,1.76,1.77

Michael Niedermayer CVS michael
Sun Feb 26 16:24:44 CET 2006


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

Modified Files:
	dv.c 
Log Message:
replace for loop with 2 asserts()


Index: dv.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/dv.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- dv.c	25 Feb 2006 22:58:25 -0000	1.76
+++ dv.c	26 Feb 2006 15:24:42 -0000	1.77
@@ -746,6 +746,7 @@
                     b->bit_size[a] = 1; // 4 areas 4 bits for EOB :)
                     b->area_q[a]++;
                     prev= b->prev[a];
+                    assert(b->next[prev] >= mb_area_start[a+1] || b->mb[prev]);
                     for (k= b->next[prev] ; k<mb_area_start[a+1]; k= b->next[k]) {
                        b->mb[k] >>= 1;
                        if (b->mb[k]) {
@@ -759,8 +760,8 @@
                                 assert(b->mb[b->next[k]]);
                                 b->bit_size[a2] += dv_rl2vlc_size(b->next[k] - prev - 1, b->mb[b->next[k]])
                                                   -dv_rl2vlc_size(b->next[k] -    k - 1, b->mb[b->next[k]]);
-                                for(; (b->prev[a2]==k) && (a2<4); a2++)
-                                        b->prev[a2] = prev;
+                                assert(b->prev[a2]==k && (a2+1 >= 4 || b->prev[a2+1]!=k));
+                                b->prev[a2] = prev;
                            }
                            b->next[prev] = b->next[k];
                        }





More information about the ffmpeg-cvslog mailing list