[FFmpeg-devel] [PATCH] QCELP decoder

Vitor Sessak vitor1001
Sun Nov 9 13:02:14 CET 2008


Michael Niedermayer wrote:
> On Fri, Nov 07, 2008 at 09:24:25AM -0800, Kenan Gillet wrote:
>> Hi everybody,
>>
>> sorry for the delay,
>>
>> And here is another updated set of patches which makes it round 8.
>> and a small summary:
> 
>> - optimizes qcelp_lspf2lpc which is now 60% faster.
>> 	should it still be in it own file or merging qcelp_lsp.c and qcelpdec.c is 
>> ok?
> 
> i need to look at this a little more but i think the final code should be
> in some file seperate from th qcelpp decoder
> 
> 
>> - simplifies interpolate_lpc and determine_framerate after Michael comment.
>> - removes useless wrapper function.
>> - added minor version bump in libavcodec/avcodec.h
>> - it fixes the FIR filter to behave like in the reference code
>> - some cosmetics
>>
> 
> [...]
>> +typedef struct {
>> +    GetBitContext     gb;
>> +    qcelp_packet_rate framerate;
>> +
> 
>> +// beginning of unpacked data
>> +    uint8_t           cbsign[16];
>> +    uint8_t           cbgain[16];
>> +    uint8_t           cindex[16];
>> +    uint8_t           plag[4];
>> +    uint8_t           pfrac[4];
>> +    uint8_t           pgain[4];
>> +    uint8_t           lspv[10];               /*!< LSP for RATE_OCTAVE, LSPV for other rates */
>> +    uint8_t           reserved;               /*!< on all but rate 1/2 packets */
>> +// end of unpacked data
> 
> doxygen has some tags to mark groups of things
> something like ///@{ or so
> 
> 
>> +
>> +    uint8_t           erasure_count;
>> +    uint8_t           octave_count;           /*!< count the consecutive RATE_OCTAVE frames */
>> +    float             prev_lspf[10];
>> +    float             predictor_lspf[10];     /*!< LSP predictor,
>> +                                                  only use for RATE_OCTAVE and I_F_Q */
>> +    float             pitch_synthesis_filter_mem[303];
>> +    float             pitch_pre_filter_mem[303];
>> +    float             formant_mem[170];
>> +    float             fir_filter_mem[180];
>> +    float             last_codebook_gain;
>> +    int               prev_g1[2];
>> +    int               prev_framerate;
>> +    float             prev_pitch_gain[4];
>> +    uint8_t           prev_pitch_lag[4];
>> +    uint16_t          first16bits;
>> +    float             bandwith_expansion_coeff[10];
>> +#define QCELP_BANDWITH_EXPANSION_COEFF 0.9883
>> +
> 
>> +    float             g12ga[61];              /*!< unpacked qcelp_g12ga table */
> 
> hmm, constant tables must not be in the context as that wastes memory.
> depending on how often it is accessed, qcelp_g12ga should either be
> changed back to float or the int16->float be done as it is accessed.
> (int16->float is prefered due to smaller memory if there is no speed
> differeence otherwise the faster one should be used)
> 
> 
> [...]
>> +/**
>> + * circular codebook for rate 1 frames in x*100 form
>> + *
>> + * TIA/EIA/IS-733 2.4.6.1-2
>> + */

[... review omitted ...]

OKed parts committed.

-Vitor




More information about the ffmpeg-devel mailing list