[FFmpeg-devel] [PATCH] eval: add sqrt function for computing the squared root

Stefano Sabatini stefano.sabatini-lala at poste.it
Wed May 4 11:54:26 CEST 2011


On date Tuesday 2011-05-03 18:47:28 -0700, Baptiste Coudurier encoded:
> On 05/03/2011 05:56 PM, Michael Niedermayer wrote:
> > On Tue, May 03, 2011 at 11:32:08PM +0200, Stefano Sabatini wrote:
> >> ---
> >>  doc/eval.texi    |    3 +++
> >>  libavutil/eval.c |    4 ++++
> >>  2 files changed, 7 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/doc/eval.texi b/doc/eval.texi
> >> index d0e04c0..fe3eea6 100644
> >> --- a/doc/eval.texi
> >> +++ b/doc/eval.texi
> >> @@ -72,6 +72,9 @@ integer. For example, "floor(-1.5)" is "-2.0".
> >>  @item trunc(expr)
> >>  Round the value of expression @var{expr} towards zero to the nearest
> >>  integer. For example, "trunc(-1.5)" is "-1.0".
> >> +
> >> + at item sqrt(expr)
> >> +Compute the squared root of @var{expr}.
> >>  @end table
> > 
> > why do we need sqrt ?
> > x^.5
> > is shorter
> 
> It's better for users IMHO

+1, and possibly faster as well, but this is bikeshed so let me know
how do you prefer it.
-- 
FFmpeg = Fanciful and Frenzy Mega Pitiless Evil Game


More information about the ffmpeg-devel mailing list