[Vorbis-dev] Lost residue modifications

xiphmont at xiph.org xiphmont at xiph.org
Thu Mar 4 04:37:32 PST 2010


>> for(count=0; count<psy_look->n; count++) {
>>   vb->pcm[i][count] += 1;
>> }

Hi,

You're updating the wrong vector, or rather, the wrong part of it.
The residue vector at that point is in two halves; elements [0-n/2)
are pre-quant/norm and elements [n/2-n) are post-quant/norm. (my 'n'
is the blocksize, psy_look->n is blocksize/2).  The lossless coupling
exclusively uses the second half.

If you stick to lossless coupling only (-q 6+ like you said), you can
change vb->pcm[i][count] += 1; to vb->pcm[i][count+psy_look->n] += 1;
and your changes will stick.

Cheers,
Monty


More information about the Vorbis-dev mailing list