[FFmpeg-devel] [PATCH] WMA Voice decoder

Ronald S. Bultje rsbultje
Tue Feb 9 20:30:06 CET 2010


Hi,

On Tue, Feb 9, 2010 at 2:13 PM, Vitor Sessak <vitor1001 at gmail.com> wrote:
> Ronald S. Bultje wrote:
>> The (repeated) pulse set in set1() is somewhere in the range pulse_off
>> -/+ 10 (approximately). We're forbidding pulses in the range pulse_off
>> +/- 16/24 in the exclusion code of set2(). So regardless of the
>> bitstream value for the exact position of the pulse set in set1(), the
>> "extra" pulses in set2() never interfere with any possible pulse in
>> set1().
>>
>> (Does that make sense?)
>
> Yes, but to what correspond those excluded pulses?

They aren't single bits (excluded pulses), they're ranges of bits (as
documented: 16 or 24 bits at once), which is (I gather) the range
within set1() could theoretically have placed its pulse.

> Also
>
>> ? ?for (n = 0; n < 11; n++) {
>> ? ? ? ?if (off_table[n] >= 0) {
>> ? ? ? ? ? ?int idx = off_table[n] >= MAX_FRAMESIZE / 2;
>>
>> ? ? ? ? ? ?if (s->aw_n_pulses[idx]++ == 0) {
>> ? ? ? ? ? ? ? ?s->aw_first_pulse_off[idx] = off_table[n] -
>> ? ? ? ? ? ? ? ? ? ?(idx * MAX_FRAMESIZE + s->aw_pitch_range) / 2;
>> ? ? ? ? ? ? ? ?first_idx[idx] ? ? ? ? ? ? = n;
>> ? ? ? ? ? ?}
>> ? ? ? ?}
>> ? ?}
>
> ? ? for (n = 0; n < 11 && off_table[n] < 0; n++) ;
>
> ? ? for (; n < 11; n++) {
> ? ? ? ? ? ?int idx = off_table[n] >= MAX_FRAMESIZE / 2;
>
> ? ? ? ? ? ?if (s->aw_n_pulses[idx]++ == 0) {
> ? ? ? ? ? ? ? ?s->aw_first_pulse_off[idx] = off_table[n] -
> ? ? ? ? ? ? ? ? ? ?(idx * MAX_FRAMESIZE + s->aw_pitch_range) / 2;
> ? ? ? ? ? ? ? ?first_idx[idx] ? ? ? ? ? ? = n;
> ? ? ? ? ? ?}
> ? ?}

I was intending to set nmin (similar to your suggested nmax) as a
start instead of 0.

Ronald



More information about the ffmpeg-devel mailing list