[FFmpeg-devel] [PATCH] Common ACELP code & G.729 [2/7] - pitch lag decoding

Vladimir Voroshilov voroshil
Wed Jun 11 19:20:14 CEST 2008

2008/5/29 Michael Niedermayer <michaelni at gmx.at>:
> On Wed, May 28, 2008 at 02:25:19PM +0700, Vladimir Voroshilov wrote:


> I meant just the last line ...
> energy= mr_energy;
> for(i=0; i<ma_pred_order; i++)
>    energy += quant_energy[i] * ma_prediction_coeff[i];
> above can be in integers, while below
> return   exp(energy * some_const) * gain_corr_factor
>       / sqrt(sum_of_squares(fc_v, subframe_size, 0, 0));
> would use floats, this would avoid all the mess with exp/log in fixed point
> anyway iam happy with integers as well but the code we seem to need for
> the exp/log there is very ugly.

Here is semi-float version.
Hopefully better...

> Also the interleaved comments make the code unreadable. The comments should
> be seperated either outside the function or to the right ignoring the 80 col
> limit. Maybe that would already help enough, but as is its a 6 line function
> bloated to 27 lines.

I've merged several lines.
I've kept two comments interleaved since they are
belongs to multiple lines of code.

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_lag61.diff
Type: text/x-diff
Size: 13938 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080612/9a6745c5/attachment.diff>

More information about the ffmpeg-devel mailing list