[FFmpeg-cvslog] r26060 - trunk/libavfilter/avfilter.c
stefano
subversion
Sun Dec 19 20:08:30 CET 2010
Author: stefano
Date: Sun Dec 19 20:08:30 2010
New Revision: 26060
Log:
Fix avfilter_draw_slice() copy code with alpha planes.
Modified:
trunk/libavfilter/avfilter.c
Modified: trunk/libavfilter/avfilter.c
==============================================================================
--- trunk/libavfilter/avfilter.c Sun Dec 19 19:17:11 2010 (r26059)
+++ trunk/libavfilter/avfilter.c Sun Dec 19 20:08:30 2010 (r26060)
@@ -416,9 +416,9 @@ void avfilter_draw_slice(AVFilterLink *l
for (i = 0; i < 4; i++) {
if (link->src_buf->data[i]) {
src[i] = link->src_buf-> data[i] +
- (y >> (i==0 ? 0 : vsub)) * link->src_buf-> linesize[i];
+ (y >> (i==1 || i==2 ? vsub : 0)) * link->src_buf-> linesize[i];
dst[i] = link->cur_buf->data[i] +
- (y >> (i==0 ? 0 : vsub)) * link->cur_buf->linesize[i];
+ (y >> (i==1 || i==2 ? vsub : 0)) * link->cur_buf->linesize[i];
} else
src[i] = dst[i] = NULL;
}
@@ -429,7 +429,7 @@ void avfilter_draw_slice(AVFilterLink *l
if (!src[i]) continue;
- for (j = 0; j < h >> (i==0 ? 0 : vsub); j++) {
+ for (j = 0; j < h >> (i==1 || i==2 ? vsub : 0); j++) {
memcpy(dst[i], src[i], planew);
src[i] += link->src_buf->linesize[i];
dst[i] += link->cur_buf->linesize[i];
More information about the ffmpeg-cvslog
mailing list