[FFmpeg-devel] [PATCH] G.729A (now fixed-point) decoder

Michael Niedermayer michaelni
Wed Mar 19 17:46:32 CET 2008


On Wed, Mar 19, 2008 at 10:13:05PM +0600, Vladimir Voroshilov wrote:
> On Wed, Mar 19, 2008 at 8:53 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Wed, Mar 19, 2008 at 08:34:56PM +0600, Vladimir Voroshilov wrote:
> >  > On Wed, Mar 19, 2008 at 8:23 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >  > > On Wed, Mar 19, 2008 at 07:27:51PM +0600, Vladimir Voroshilov wrote:
> >  > >  [...]
> >  > >
> >  > > > >  And yes there are issues except spelling, for example why is it not
> >  > >  > >  binary identical? Is it either * bugs or * it would be slow/messy/complex?
> >  > >  >
> >  > >  > Small quick example:
> >  > >  > reference code uses L_shr() routine everywhere instead of ">>"
> >  > >  > L_shr(-1)==0, L_shr(-3)==2
> >  > >
> >  > >  L_shr takes 2 parameters
> >  > >
> >  >
> >  > Yes, my fault :)
> >  > I meant L_shr(-1,1) and L_shr(-3,1) there
> >
> >  L_shr(a,b) == a / (1<<b)
> >
> >  gcc will simplify it IIRC :)
> >
> 
> -3/(1<<1) == -1 for me, not -2 :P
> 
> Reference code uses ~((~a)>>b) for negative numbers.

argh, right, L_shr(a,b) == a>>b
iam silly but you are as well because L_shr(-1,1)!=0


> Moreover bitexact results can be archived, imho, only if (along with
> other things) math operations will be done with the same precision as
> in reference code at every stage.

No, we will have to check them all one by one and see if sane code
works as well, only as last resort should we use the braindamaged nonsense
the reference is useing ...

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

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- 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/20080319/53e80bd6/attachment.pgp>



More information about the ffmpeg-devel mailing list