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

Stefano Sabatini stefano.sabatini-lala at poste.it
Thu May 5 19:20:14 CEST 2011


On date Wednesday 2011-05-04 14:29:42 +0200, Michael Niedermayer encoded:
> On Wed, May 04, 2011 at 11:54:26AM +0200, Stefano Sabatini wrote:
> > 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.
> 
> you are probably correct that it helps users so add sqrt()

Pushed.
-- 
FFmpeg = Friendly and Fast Mastodontic Powerful Eccentric Gargoyle


More information about the ffmpeg-devel mailing list