summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-12-07 18:36:58 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-12-07 19:09:47 +0100
commit1f467220cfd1664782b1fe210bbc9342ad460fd2 (patch)
tree42e7ecb7045d537951fa159995cac4ca22a407a2
parentfe63d4130235390603df3e91e8a7ac9b3bf05308 (diff)
downloadffmpeg-1f467220cfd1664782b1fe210bbc9342ad460fd2.tar.gz
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.
-rw-r--r--libavfilter/vf_alphaextract.c5
1 files changed, 0 insertions, 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;