diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-02-15 21:41:38 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-02-15 21:41:38 +0000 |
commit | 74b46655d44e2426dc1ec4d1e468ae052fd615a5 (patch) | |
tree | 8dc55499580dd7c505ae491af7eac6a7cdb19117 | |
parent | ce657d80ccc596ce1c3f4783b4bc7d7c07934c61 (diff) | |
download | ffmpeg-74b46655d44e2426dc1ec4d1e468ae052fd615a5.tar.gz |
Simplify
Commited in SoC by Vitor Sessak on 2008-02-11 18:19:37
Originally committed as revision 12057 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavfilter/avfilter.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 7b949421a0..30a19c7400 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -251,12 +251,12 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h) 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; } |