[FFmpeg-devel] [PATCH] WMA Voice decoder

Ronald S. Bultje rsbultje
Tue Feb 9 19:37:36 CET 2010


Hi,

On Tue, Feb 9, 2010 at 1:14 PM, Vitor Sessak <vitor1001 at gmail.com> wrote:
> Ronald S. Bultje wrote:
>> On Thu, Feb 4, 2010 at 12:06 AM, Vitor Sessak <vitor1001 at gmail.com> wrote:
>>> Ronald S. Bultje wrote:
>>>> + ? ?/* exclude ranges from pulses */
>>>> + ? ?memset(use_mask, -1, 10);
>>>> + ? ?if (pulse_off != NO_OFFSET)
>>>> + ? ? ? ?for (idx = pulse_off; idx < MAX_FRAMESIZE / 2; idx +=
>>>> fcb->pitch_lag) {
>>>> + ? ? ? ? ? ?int range ? ? ? ? ? ? = s->aw_pitch_range; // always 16 or
>>>> 24
>>>> + ? ? ? ? ? ?int idx_sh ? ? ? ? ? ?= idx >> 4;
>>>> + ? ? ? ? ? ?int idx_mask ? ? ? ? ?= idx & 15;
>>>> + ? ? ? ? ? ?use_mask[idx_sh++] ? &= ~(0xFFFF >> idx_mask);
>>>> + ? ? ? ? ? ?range ? ? ? ? ? ? ? ?-= 16 - idx_mask;
>>>> + ? ? ? ? ? ?use_mask[idx_sh++] ? &= ? 0xFFFF >> range;
>>>> + ? ? ? ? ? ?range ? ? ? ? ? ? ? ?-= 16;
>>>> + ? ? ? ? ? ?if (range > 0)
>>>> + ? ? ? ? ? ? ? ?use_mask[idx_sh] &= ? 0xFFFF >> range;
>>>> + ? ? ? ?}
>>>
>>> Does those excluded indexes correspond to some other pulses set (i.e.
>>> those
>>> set in aw_pulse_set1() or those set by aw_pulse_set2() in the last
>>> frame)?
>>
>> Approximately, yes. _set1() pulses somewhere around pulse_off, in the
>> range pulse_off +/- 10 (approximately) depending on bitstream values
>> read in _set1().
>
> Its funny, what is the point of forbidding pulses almost, but not exactly,
> where you are already adding some in other function? Are you sure it is not
> exactly the same after addition of pitch delay or something like that?

Sorry, I meant something different.

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?)

Ronald



More information about the ffmpeg-devel mailing list