[FFmpeg-devel] [PATCH] Common ACELP code & G.729 [4/7] - G.729 core
Tue Sep 2 22:41:50 CEST 2008
On Wed, Sep 03, 2008 at 12:51:30AM +0700, Vladimir Voroshilov wrote:
> >> +
> >> + /* Decode the fixed-codebook gain. */
> >> + ctx->gain_code = ff_acelp_decode_gain_code(
> >> + gain_corr_factor,
> >> + fc,
> >> + formats[ctx->format].mr_energy,
> >> + ctx->quant_energy,
> >> + ma_prediction_coeff,
> >> + ctx->subframe_size,
> >> + 4);
> >> + ff_acelp_update_past_gain(ctx->quant_energy, gain_corr_factor, 2, ctx->frame_erasure);
> >> + }
> > ff_acelp_update_past_gain can be factored out of the if/else
> Splitting was done especially for moving gain_corr_factor variable
> inside "if" statement.
> Otherwise one of the following is required to avoid compiler warning:
> 1. "=0" before loop.
> 2. "=0" inside loop in frame erasure case
i think it fits best inside the if() to complement the other in else
> In both cases those fact that this variable is not used between loop
> iterations is unclear
> So i preferred to split the call to routine and explicitly pass zero
> in frame erasure case cases.
> P.S. How should i apply ok'ed chunks (since they are not standalone
> parts of code)?
> As in your reply, without any routine headers, if/else statements/parenthesis ?
yes, the file isnt compiled yet
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Thouse who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel