[FFmpeg-devel] [PATCH] Box-Muller gaussian generator

Michael Niedermayer michaelni
Sat Dec 12 16:38:53 CET 2009


On Sat, Dec 12, 2009 at 03:01:44PM +0100, Stefano Sabatini wrote:
> On date Friday 2009-12-11 22:09:20 +0100, Michael Niedermayer encoded:
> > On Fri, Dec 11, 2009 at 08:38:35PM +0100, Stefano Sabatini wrote:
> [...]
> > > Updated patch.
> > [...]
> > 
> > 
> > > +#undef printf
> > > +
> > [...]
> > >      }
> > >      av_log(NULL, AV_LOG_ERROR, "final value:%X\n", x);
> > [...]
> > > +            printf("%f\n%f\n",
> > 
> > please dont do this
> 
> Fixed. 
> 
> > [...]
> > > Index: libavfilter-soc/ffmpeg/libavutil/lfg.h
> > > ===================================================================
> > > --- libavfilter-soc.orig/ffmpeg/libavutil/lfg.h	2009-12-11 20:28:37.000000000 +0100
> > > +++ libavfilter-soc/ffmpeg/libavutil/lfg.h	2009-12-11 20:35:26.000000000 +0100
> > > @@ -51,4 +51,12 @@
> > >      return c->state[c->index++ & 63] = 2*a*b+a+b;
> > >  }
> > >  
> > > +/**
> > > + * Returns the next number generated by a Box-Muller generator using
> > > + * the random number issued by lfg.
> > > + *
> > > + * @param out[2] array where are placed the two generated numbers
> > 
> > I think you should mention something about gaussian distributions
> 
> Done.
> 
> Regards.
> -- 
> FFmpeg = Freak & Faboulous Moronic Philosophical Entertaining Geek

>  lfg.c |   33 +++++++++++++++++++++++++++++++++
>  lfg.h |    8 ++++++++
>  2 files changed, 41 insertions(+)
> a8d8c1cf5bab58fa500804992878c19a4ff82b44  implement-bmg.patch

ok with a minor version bump

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Incandescent light bulbs waste a lot of energy as heat so the EU forbids them.
Their replacement, compact fluorescent lamps, much more expensive, dont fit in
many old lamps, flicker, contain toxic mercury, produce a fraction of the light
that is claimed and in a unnatural spectrum rendering colors different than
in natural light. Ah and we now need to turn the heaters up more in winter to
compensate the lower wasted heat. Who wins? Not the environment, thats for sure
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091212/5ebd8efa/attachment.pgp>



More information about the ffmpeg-devel mailing list