[FFmpeg-devel] [PATCH 2/2] eval: Allow specifying the variable id.
Michael Niedermayer
michaelni at gmx.at
Sun Feb 26 22:14:31 CET 2012
On Wed, Feb 22, 2012 at 10:27:19PM +0100, Nicolas George wrote:
> Le quartidi 4 ventôse, an CCXX, Michael Niedermayer a écrit :
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> > doc/eval.texi | 5 +++--
> > libavutil/eval.c | 12 ++++++++----
> > 2 files changed, 11 insertions(+), 6 deletions(-)
> >
> > diff --git a/doc/eval.texi b/doc/eval.texi
> > index b481bfe..c4a8ac5 100644
> > --- a/doc/eval.texi
> > +++ b/doc/eval.texi
> > @@ -107,9 +107,10 @@ the evaluation of @var{y}, return 0 otherwise.
> > Evaluate @var{x}, and if the result is zero return the result of the
> > evaluation of @var{y}, return 0 otherwise.
> >
> > - at item taylor(expr, x)
> > + at item taylor(expr, x) taylor(expr, x, id)
> > Evaluate a taylor series at x.
> > -expr represents the LD(0)-th derivates of f(x) at 0.
> > +expr represents the LD(id)-th derivates of f(x) at 0. If id is not specified
> > +then 0 is assumed.
> > note, when you have the derivatives at y instead of 0
> > taylor(expr, x-y) can be used
> > When the series does not converge the results are undefined.
> > diff --git a/libavutil/eval.c b/libavutil/eval.c
> > index d1d2cec..0061e22 100644
> > --- a/libavutil/eval.c
> > +++ b/libavutil/eval.c
> > @@ -184,18 +184,19 @@ static double eval_expr(Parser *p, AVExpr *e)
> > case e_taylor: {
> > double t = 1, d = 0, v;
> > double x = eval_expr(p, e->param[1]);
> > + int id = e->param[2] ? eval_expr(p, e->param[2]) : 0;
>
> av_clip(eval..., 0, VARS - 1)?
added, applied
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120226/3bf37355/attachment.asc>
More information about the ffmpeg-devel
mailing list