[FFmpeg-devel] [PATCH] WMA Voice decoder

Vitor Sessak vitor1001
Tue Feb 9 20:35:44 CET 2010


Ronald S. Bultje wrote:
> 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.

Ok, now I get it. I think this deserve a comment in the code if you 
hadn't put already...

>> 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.

10l, forgot I've already mention it ;)

-Vitor



More information about the ffmpeg-devel mailing list