[FFmpeg-devel] [PATCH] lavfi/alphaextract: drop cur_linesize = out_linesize branch in draw_slice()
Stefano Sabatini
stefasab at gmail.com
Fri Dec 7 19:21:24 CET 2012
On date Friday 2012-12-07 18:44:29 +0100, Clément Bœsch encoded:
> On Fri, Dec 07, 2012 at 06:39:15PM +0100, Stefano Sabatini wrote:
> > 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 35402f6..e779c98 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;
>
> LGTM, thanks
Thanks, applied.
--
FFmpeg = Friendly and Forgiving Mournful Pitiful Enchanting Guru
More information about the ffmpeg-devel
mailing list