[FFmpeg-devel] [PATCH] Document av_gcd()
Sat Feb 28 19:51:22 CET 2009
On Sat, Feb 28, 2009 at 06:49:27PM +0100, Reimar D?ffinger wrote:
> On Sat, Feb 28, 2009 at 06:23:37PM +0100, Michael Niedermayer wrote:
> > On Sat, Feb 28, 2009 at 04:53:08PM +0100, Stefano Sabatini wrote:
> > > Hi,
> > > as in subject, regards.
> > > --
> > > FFmpeg = Funny and Forgiving Multimedia Pitiful Elected Ghost
> > > Index: libavutil/mathematics.h
> > > ===================================================================
> > > --- libavutil/mathematics.h (revision 17629)
> > > +++ libavutil/mathematics.h (working copy)
> > > @@ -50,6 +50,9 @@
> > > AV_ROUND_NEAR_INF = 5, ///< Round to nearest and halfway cases away from zero.
> > > };
> > >
> > > +/**
> > > + * Returns the greatest common divisor of a and b.
> > > + */
> > > int64_t av_const av_gcd(int64_t a, int64_t b);
> > >
> > > /**
> > ok,also please add
> > "if either or both are <=0 then the behavior is undefined"
> My r_frame_rate code in utils.c uses the = 0 case already, since I
> considered that the common mathematical definition...
you can from libav* but i dont want to gurantee this to all applications
maybe the 0 case could be relaxed ... dunno if theres a implementation
for which it would be annoying
and mathematically one can define it as
ae + bf = g
with e,f in Z and g being the smallest number >0
with that you have a gcd that works with numbers out of R as long as
a/b or b/a is in Q
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I wish the Xiph folks would stop pretending they've got something they
do not. Somehow I fear this will remain a wish. -- M?ns Rullg?rd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel