[FFmpeg-devel] [PATCH 4/4] lavfi/select: store scene score in buf ref metadata.

Clément Bœsch ubitux at gmail.com
Sun Oct 21 18:01:12 CEST 2012


On Sun, Oct 14, 2012 at 01:17:46PM +0200, Stefano Sabatini wrote:
> On date Thursday 2012-10-11 22:20:27 +0200, Clément Bœsch encoded:
> > On Thu, Oct 11, 2012 at 11:56:43AM +0200, Stefano Sabatini wrote:
> > > On date Wednesday 2012-10-10 00:55:13 +0200, Clément Bœsch encoded:
> > > > ---
> > > >  libavfilter/vf_select.c | 6 +++++-
> > > >  1 file changed, 5 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c
> > > > index c68618f..bb10273 100644
> > > > --- a/libavfilter/vf_select.c
> > > > +++ b/libavfilter/vf_select.c
> > > > @@ -238,8 +238,12 @@ static int select_frame(AVFilterContext *ctx, AVFilterBufferRef *picref)
> > > >      AVFilterLink *inlink = ctx->inputs[0];
> > > >      double res;
> > > >  
> > > > -    if (CONFIG_AVCODEC && select->do_scene_detect)
> > > 
> > > > +    if (CONFIG_AVCODEC && select->do_scene_detect) {
> > > > +        char buf[32];
> > > >          select->var_values[VAR_SCENE] = get_scene_score(ctx, picref);
> > > > +        snprintf(buf, sizeof(buf), "%f", select->var_values[VAR_SCENE]);
> > > > +        av_dict_set(&picref->metadata, "lavfi.scene_score", buf, 0);
> > > > +    }
> > > 
> > > Missing docs, LGTM otherwise. And now you have no excuses to split
> > > this into a separate filter ;-).
> > 
> > Same as previous patch for the doc.
> 
> OK, feel free to add a TODO in the code.
> 

Added the TODO, bumped lavfi micro, added FATE test (thanks to Carl for
pointing out a nice sample), and pushed.

-- 
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/20121021/b3d717df/attachment.asc>


More information about the ffmpeg-devel mailing list