[FFmpeg-devel] [PATCH] G.729A (now fixed-point) decoder
Vladimir Voroshilov
voroshil
Wed Mar 19 18:37:08 CET 2008
On Wed, Mar 19, 2008 at 10:46 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> 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
L_shr(-1,1) IS equal to zero and
L_shr(-3,1) IS equal to -2
in reference code.
And i'm sure there are other similar things in reference code.
Thus bitexact result is not so easy (at least for me).
> > 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 ...
What is the criteria of "works as well" ?
--
Regards,
Vladimir Voroshilov mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719
More information about the ffmpeg-devel
mailing list