[FFmpeg-devel] [PATCH] G.729 parameters decoding

Vladimir Voroshilov voroshil
Thu Jun 18 01:55:09 CEST 2009


2009/6/18 Michael Niedermayer <michaelni at gmx.at>:
> On Sat, Jun 13, 2009 at 01:21:24AM +0700, Vladimir Voroshilov wrote:
>
> [...]
>> + ? ?for (i = 0; i < 2; i++) {
>> + ? ? ? ?uint8_t ac_index; ? ? ?///< adaptive codebook index
>> + ? ? ? ?uint8_t pulses_signs; ?///< fixed-codebook vector pulse signs
>> + ? ? ? ?int fc_indexes; ? ? ? ?///< fixed-codebook indexes
>> + ? ? ? ?uint8_t gc_1st_index; ?///< gain codebook (first stage) index
>> + ? ? ? ?uint8_t gc_2nd_index; ?///< gain codebook (second stage) index
>> +
>> + ? ? ? ?ac_index ? ? ?= get_bits(&gb, format.ac_index_bits[i]);
>
>> + ? ? ? ?if(!i && format.parity_bits) {
>> + ? ? ? ? ? ?int parity = get_bits(&gb, format.parity_bits);
>> + ? ? ? ? ? ?bad_pitch = get_parity(ac_index) == parity;
>> + ? ? ? ?}
>
> uhm ugh
>
> bad_pitch = get_parity(show_bits(format.ac_index_bits[0] + format.parity_bits);
> prior to the loop

If format.parity_bits==0 this code will become to:
 bad_pitch = get_parity(show_bits(format.ac_index_bits[0]);

This is NOT what i want to do!

I dont want ANY bits shift if format.parity_bits==0
And suggested  code does not work (or it misses something).




-- 
Regards,
Vladimir Voroshilov     mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719



More information about the ffmpeg-devel mailing list