From 1f467220cfd1664782b1fe210bbc9342ad460fd2 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Fri, 7 Dec 2012 18:36:58 +0100 Subject: [PATCH] lavfi/alphaextract: drop cur_linesize = out_linesize branch in draw_slice() The code causes uninitialized data copy, and may be actually slower than a loop over each line in case the padding is big. --- libavfilter/vf_alphaextract.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libavfilter/vf_alphaextract.c b/libavfilter/vf_alphaextract.c index 35402f656d..e779c9832d 100644 --- a/libavfilter/vf_alphaextract.c +++ b/libavfilter/vf_alphaextract.c @@ -77,11 +77,6 @@ static int draw_slice(AVFilterLink *inlink, int y0, int h, int slice_dir) pin += 4; } } - } else if (cur_buf->linesize[A] == out_buf->linesize[Y]) { - const int linesize = cur_buf->linesize[A]; - memcpy(out_buf->data[Y] + y0 * linesize, - cur_buf->data[A] + y0 * linesize, - linesize * h); } else { const int linesize = FFMIN(out_buf->linesize[Y], cur_buf->linesize[A]); int y;