[FFmpeg-devel] [PATCH] WMA Voice decoder

Ronald S. Bultje rsbultje
Tue Feb 9 22:27:09 CET 2010


Hi,

On Sat, Feb 6, 2010 at 11:19 AM, Vitor Sessak <vitor1001 at gmail.com> wrote:
>> + ? ?} else /* FCB_TYPE_EXC_PULSES */ {
>> + ? ? ? ?int offset_nbits = 5 - frame_desc->log_n_blocks;
>> +
>> + ? ? ? ?fcb.no_repeat_mask = -1;
>> + ? ? ? ?for (n = 0; n < 5; n++) {
>> + ? ? ? ? ? ?float pulse = get_bits1(gb) ? 1.0 : -1.0;
>> + ? ? ? ? ? ?int idx1, idx2;
>> +
>> + ? ? ? ? ? ?idx1 ? ? ? ? ? = get_bits(gb, offset_nbits);
>> + ? ? ? ? ? ?fcb.x[fcb.n] ? = n + 5 * idx1;
>> + ? ? ? ? ? ?fcb.y[fcb.n++] = pulse;
>> + ? ? ? ? ? ?if (n < frame_desc->dbl_pulses) {
>> + ? ? ? ? ? ? ? ?idx2 ? ? ? ? ? = get_bits(gb, offset_nbits);
>> + ? ? ? ? ? ? ? ?fcb.x[fcb.n] ? = n + 5 * idx2;
>> + ? ? ? ? ? ? ? ?fcb.y[fcb.n++] = (idx1 >= idx2) ? pulse : -pulse;
>> + ? ? ? ? ? ?}
>> + ? ? ? ?}
>> + ? ?}
>>
>
> The else{} case is very close to ff_decode_10_pulses_35bits().

I noticed that also, except that I can have "single" and "double"
pulses, whereas ff_decode_..() only does double pulses. Do you want
just a comment saying they're similar, or should I patch
ff_decode_10pulses_35bits()? (It'll become slower.)

Ronald



More information about the ffmpeg-devel mailing list