Merge loops
authorVitor Sessak <vitor1001@gmail.com>
Fri, 15 Feb 2008 21:40:55 +0000 (21:40 +0000)
committerVitor Sessak <vitor1001@gmail.com>
Fri, 15 Feb 2008 21:40:55 +0000 (21:40 +0000)
Commited in SoC by Vitor Sessak on 2008-02-10 09:01:31

Originally committed as revision 12046 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavfilter/avfilter.c

index c2852d0..9b976ee 100644 (file)
@@ -261,15 +261,11 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h)
             } else
                 src[i] = dst[i] = NULL;
         }
-        for(j = 0; j < h; j ++) {
-            memcpy(dst[0], src[0], link->cur_pic->linesize[0]);
-            src[0] += link->srcpic ->linesize[0];
-            dst[0] += link->cur_pic->linesize[0];
-        }
-        for(i = 1; i < 4; i ++) {
+
+        for(i = 0; i < 4; i ++) {
             if(!src[i]) continue;
 
-            for(j = 0; j < h >> vsub; j ++) {
+            for(j = 0; j < h >> (i==0 ? 0 : vsub); j ++) {
                 memcpy(dst[i], src[i], link->cur_pic->linesize[i]);
                 src[i] += link->srcpic ->linesize[i];
                 dst[i] += link->cur_pic->linesize[i];