[FFmpeg-devel] [PATCH] Common ACELP code & G.729 [2/7] - pitch lag decoding
Vladimir Voroshilov
voroshil
Fri Jun 27 01:30:00 CEST 2008
2008/6/27 Michael Niedermayer <michaelni at gmx.at>:
> On Fri, Jun 27, 2008 at 12:00:01AM +0700, Vladimir Voroshilov wrote:
[...]
>> +
>> + for(i=0; i<ma_pred_order; i++)
>> + energy += quant_energy[i] * ma_prediction_coeff[i];
>> +
>> + innov_energy = sum_of_squares(fc_v, subframe_size, 0, 0);
>> +#ifdef G729_BITEXACT
>
>> + energy += MULL(ff_log2(innov_energy), -24660) << 10;
>
> s/24660/6165/
> and i wonder if a normal * would do with the correctly simplified constant?
Breaks bitexactness.
>> +
>> + energy = (5439 * (energy >> 15)) >> 8; // (0.15) = (0.15) * (7.23)
>> +
>
>> + return bidir_sal(((ff_exp2(energy & 0x7fff) + 16) >> 5) * (gain_corr_factor >> 1), (energy >> 15) - 25);
>
> I think what i suggested was quite a bit more readable
Fixed, if you meant new line breaks only.
--
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_lag71.diff
Type: text/x-diff
Size: 11702 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080627/960463a7/attachment.diff>
More information about the ffmpeg-devel
mailing list