[FFmpeg-devel] [PATCH] Another function shared between AMR and SIPR

Vitor Sessak vitor1001
Wed Oct 28 00:58:24 CET 2009


Michael Niedermayer wrote:
> On Mon, Oct 26, 2009 at 12:12:46AM +0100, Vitor Sessak wrote:
>> $subj
> [...]
>> Index: libavcodec/acelp_pitch_delay.h
>> ===================================================================
>> --- libavcodec/acelp_pitch_delay.h	(revision 20368)
>> +++ libavcodec/acelp_pitch_delay.h	(working copy)
>> @@ -220,4 +220,18 @@
>>      int subframe_size,
>>      int max_pred_order);
>>  
>> +/**
>> + * Calculate fixed gain (part of section 6.1.3 of AMR spec)
>> + *
>> + * @param fixed_gain_factor gain correction factor
>> + * @param fixed_energy decoded algebraic codebook vector energy
>> + * @param prediction_error vector of the quantified predictor errors of previous
>> + *        subframes
>> + * @param energy_mean desired mean innovation energy
>> + * @param pred_table moving average coefficients
> 
> 
>> + */
>> +float ff_set_fixed_gain(float fixed_gain_factor, float fixed_mean_energy,
> 
> "amr" should be in the name or something else that makes it clear what
> this global function does
> 
> also nothing in this text hints on how many entries the arrays should have
> its surely written in the amr spec but i think its better if its also
> documented here
> 
> and then prediction_error is updated by this function and nothing hints
> at that in the doxy

I agree, both problems fixed.

-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amr_and_sipr_other2.diff
Type: text/x-diff
Size: 2094 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091028/4422ce74/attachment.diff>



More information about the ffmpeg-devel mailing list