[FFmpeg-devel] [PATCH] G.729A (now fixed-point) decoder
Vladimir Voroshilov
voroshil
Wed Mar 19 17:13:05 CET 2008
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.
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.
--
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