[FFmpeg-devel] [PATCH] avfilter/vf_vignette: force per frame evaluation if per frame variables are used

Michael Niedermayer michaelni at gmx.at
Sat Apr 4 13:51:15 CEST 2015


On Sat, Apr 04, 2015 at 11:42:34AM +0200, Clément Bœsch wrote:
> On Mon, Mar 30, 2015 at 09:57:35PM +0200, Michael Niedermayer wrote:
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavfilter/vf_vignette.c |    9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavfilter/vf_vignette.c b/libavfilter/vf_vignette.c
> > index 806bd72..9a05651 100644
> > --- a/libavfilter/vf_vignette.c
> > +++ b/libavfilter/vf_vignette.c
> > @@ -161,15 +161,20 @@ static void update_context(VignetteContext *s, AVFilterLink *inlink, AVFrame *fr
> >          s->var_values[VAR_T]   = TS2T(frame->pts, inlink->time_base);
> >          s->var_values[VAR_PTS] = TS2D(frame->pts);
> >      } else {
> > -        s->var_values[VAR_N]   = 0;
> > +        s->var_values[VAR_N]   = NAN;
> 
> Why?

if some code uses VAR_N, the value depends on the current frame number
so its not constant and per frame evaluation is needed

or am i missing something ?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150404/3e26553e/attachment.asc>


More information about the ffmpeg-devel mailing list