[FFmpeg-devel] [PATCH] lavfi: remove some video w/h settings after avfilter_copy_buffer_ref_props.

Clément Bœsch ubitux at gmail.com
Tue Dec 4 01:39:31 CET 2012


On Tue, Dec 04, 2012 at 12:28:06AM +0100, Stefano Sabatini wrote:
> On date Monday 2012-12-03 21:50:59 +0100, Clément Bœsch encoded:
> > video->[wh] will be set with the same values as the input after
> > avfilter_copy_buffer_ref_props. These filters don't change the size of
> > the input so there is no need for this code.
> > ---
> >  libavfilter/vf_delogo.c  | 4 ----
> >  libavfilter/vf_gradfun.c | 3 ---
> >  libavfilter/vf_hqdn3d.c  | 3 ---
> >  3 files changed, 10 deletions(-)
> > 
> > diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c
> > index 3c9843f..d6b88d9 100644
> > --- a/libavfilter/vf_delogo.c
> > +++ b/libavfilter/vf_delogo.c
> > @@ -229,11 +229,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
> >              avfilter_unref_bufferp(&in);
> >              return AVERROR(ENOMEM);
> >          }
> > -
> >          avfilter_copy_buffer_ref_props(out, in);
> > -
> > -        out->video->w = outlink->w;
> > -        out->video->h = outlink->h;
> >      }
> >  
> >      for (plane = 0; plane < 4 && in->data[plane]; plane++) {
> > diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c
> > index 32d8796..a9eeca5 100644
> > --- a/libavfilter/vf_gradfun.c
> > +++ b/libavfilter/vf_gradfun.c
> > @@ -198,10 +198,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
> >              avfilter_unref_bufferp(&in);
> >              return AVERROR(ENOMEM);
> >          }
> > -
> >          avfilter_copy_buffer_ref_props(out, in);
> > -        out->video->w = outlink->w;
> > -        out->video->h = outlink->h;
> >      }
> >  
> >      for (p = 0; p < 4 && in->data[p]; p++) {
> > diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c
> > index 939a31d..4ea4ac9 100644
> > --- a/libavfilter/vf_hqdn3d.c
> > +++ b/libavfilter/vf_hqdn3d.c
> > @@ -338,10 +338,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
> >              avfilter_unref_bufferp(&in);
> >              return AVERROR(ENOMEM);
> >          }
> > -
> >          avfilter_copy_buffer_ref_props(out, in);
> > -        out->video->w = outlink->w;
> > -        out->video->h = outlink->h;
> >      }
> >  
> >      for (c = 0; c < 3; c++) {
> 
> LGTM, thanks.

Applied.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121204/e4abc6b2/attachment.asc>


More information about the ffmpeg-devel mailing list