[xiph-commits] r15110 - trunk/vorbis/lib

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Fri Jul 11 16:29:16 PDT 2008


Author: xiphmont
Date: 2008-07-11 16:29:15 -0700 (Fri, 11 Jul 2008)
New Revision: 15110

Modified:
   trunk/vorbis/lib/mapping0.c
Log:
Fix attempt for 1399; if it doesn't completely correct the
multichannel corruption problem (encoder only), then it is a necessary
part of the fix.

(The encoder was accidentally collapsing the redidue bundle to remove
silent residues twice, potentiall causing corruption the second time
if a preceeding channel was silent)



Modified: trunk/vorbis/lib/mapping0.c
===================================================================
--- trunk/vorbis/lib/mapping0.c	2008-07-11 03:07:43 UTC (rev 15109)
+++ trunk/vorbis/lib/mapping0.c	2008-07-11 23:29:15 UTC (rev 15110)
@@ -722,7 +722,15 @@
 	
 	classifications=_residue_P[ci->residue_type[resnum]]->
 	  class(vb,b->residue[resnum],couple_bundle,zerobundle,ch_in_bundle);
-	
+
+	/* 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 */
+	ch_in_bundle=0;	
+	for(j=0;j<vi->channels;j++)
+	  if(info->chmuxlist[j]==i)
+	    couple_bundle[ch_in_bundle++]=vb->pcm[j]+n/2;
+
 	_residue_P[ci->residue_type[resnum]]->
 	  forward(opb,vb,b->residue[resnum],
 		  couple_bundle,NULL,zerobundle,ch_in_bundle,classifications);



More information about the commits mailing list