Lost residue modifications

Jesús Díaz Vico <[email protected]>
Newsgroups gmane.comp.multimedia.ogg.vorbis.devel
Message-ID <[email protected]>
Hello,

I'm trying to modify the residue vectors in Vorbis audio files at
encoding time. For testing, I'm just adding +1 to each residue vector's
element, so e.g., if I have an original residue vector of [0,1,2,3] I
modify it during the encoding to be [1,2,3,4], and at the decoder's side
I should receive the [1,2,3,4] vector. The problem is that, after adding
the +1, I still receive the vector [0,1,2,3].

I'm making this +1 to each element in a simple for loop for each
channel, immediatly before the line number 700 of mapping0.c (just
before calling _vp_couple):

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

Obviously, there is some place after in the code where my changes are
being overwritten or somehow discarded, but I am being unable to find it
(I thought it would be where a comment line says "couple_bundle is
destructively overwritten by the class function if some but not all of
the channels are marked as silence; build a fresh copy", but there is no
silence in any channel).

Could someone give me a hint on what may be happening, where my changes
are being lost or where should I modify the residual vectors... anything.

Thank you.

PS: If it is important, I'm using quality level 6+ to force lossless
coupling (AFAIK, 6+ quality levels are the ones with lossless coupling,
right?).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.