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

Stefano Sabatini stefasab at gmail.com
Sun Oct 14 13:17:46 CEST 2012


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.

[...]
-- 
FFmpeg = Frightening and Fast Mere Ponderous Exxagerate Geisha


More information about the ffmpeg-devel mailing list