[FFmpeg-devel] [PATCH] Common ACELP code & G.729 [2/7] - pitch lag decoding
Vladimir Voroshilov
voroshil
Tue May 13 19:12:26 CEST 2008
2008/5/12 Michael Niedermayer <michaelni at gmx.at>:
>
> On Sun, May 11, 2008 at 09:42:26PM +0700, Vladimir Voroshilov wrote:
> > 2008/5/10 Michael Niedermayer <michaelni at gmx.at>:
[...]
> >
> > >> + energy = MULL(ff_log2(energy), -24660);
> > >
> > >> + energy += MULL(ff_log2(subframe_size), 24660);
> > >> + energy += 0x9c888; // 24660 * 26
> > >> + energy += mean_energy;
> > >> +
> > >> +#ifdef G729_BITEXACT
> > >> + /*
> > >> + Reference code uses a constant instead of the two previous lines.
> > >> + That value (due to 2^6 rounding) differs by 2 from code above.
> > >> + Subtracting 2 from energy makes the result be bit-equal with
> > >> + the reference code.
> > >> + */
> > >> + energy -= 2;
> > >> +#endif
> > >
> > > wouldnt it be easier to just pass the sum of these as argument?
> >
> > ok. moved to g729dec.c with comment.
>
> its still there:
>
>
> > + energy += MULL(ff_log2(subframe_size), 24660);
> > + energy += 0x9c888; // 24660 * 26
> > + energy += mean_energy;
>
I misunderstood you.
I thought you speak about correction only.
Moved as constant into formats structure.
But now i'm not sure about parameter's name.
> > + // shift prediction energy vector
> > + for(i=ma_pred_order-1; i>0; i--)
> > + quant_energy[i] = quant_energy[i-1];
>
> the comment is redundant, its more than obvious from the code
Removed.
> > +
> > + /* 3.9.1, Equation 72 */
>
> of what? g729?
Fixed.
--
Regards,
Vladimir Voroshilov mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02_acelp_lag50.diff
Type: text/x-diff
Size: 13895 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080514/7a5ad36c/attachment.diff>
More information about the ffmpeg-devel
mailing list