1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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.
This commit is contained in:
Stefano Sabatini 2012-12-07 18:36:58 +01:00
parent fe63d41302
commit 1f467220cf

View File

@ -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;