[FFmpeg-soc] [soc]: r1899 - libavfilter/avfilter.c

vitor subversion at mplayerhq.hu
Mon Feb 11 19:19:37 CET 2008


Author: vitor
Date: Mon Feb 11 19:19:37 2008
New Revision: 1899

Log:
Simplify

Modified:
   libavfilter/avfilter.c

Modified: libavfilter/avfilter.c
==============================================================================
--- libavfilter/avfilter.c	(original)
+++ libavfilter/avfilter.c	Mon Feb 11 19:19:37 2008
@@ -251,12 +251,12 @@ void avfilter_draw_slice(AVFilterLink *l
     if(link->srcpic) {
         avcodec_get_chroma_sub_sample(link->format, &hsub, &vsub);
 
-        src[0] = link->srcpic-> data[0] + y * link->srcpic-> linesize[0];
-        dst[0] = link->cur_pic->data[0] + y * link->cur_pic->linesize[0];
-        for(i = 1; i < 4; i ++) {
+        for(i = 0; i < 4; i ++) {
             if(link->srcpic->data[i]) {
-                src[i] = link->srcpic-> data[i] + (y >> vsub) * link->srcpic-> linesize[i];
-                dst[i] = link->cur_pic->data[i] + (y >> vsub) * link->cur_pic->linesize[i];
+                src[i] = link->srcpic-> data[i] +
+                    (y >> (i==0 ? 0 : vsub)) * link->srcpic-> linesize[i];
+                dst[i] = link->cur_pic->data[i] +
+                    (y >> (i==0 ? 0 : vsub)) * link->cur_pic->linesize[i];
             } else
                 src[i] = dst[i] = NULL;
         }



More information about the FFmpeg-soc mailing list