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

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Fri Feb 12 22:47:54 PST 2010


Author: xiphmont
Date: 2010-02-12 22:47:54 -0800 (Fri, 12 Feb 2010)
New Revision: 16895

Modified:
   trunk/vorbis/lib/res0.c
Log:
Correct some amount of minor bitrot in the codebook training code



Modified: trunk/vorbis/lib/res0.c
===================================================================
--- trunk/vorbis/lib/res0.c	2010-02-12 20:32:12 UTC (rev 16894)
+++ trunk/vorbis/lib/res0.c	2010-02-13 06:47:54 UTC (rev 16895)
@@ -389,7 +389,7 @@
     int entry=local_book_besterror(book,vec+i*dim);
 
 #ifdef TRAIN_RES
-    if(entry>0)
+    if(entry>=0)
       acc[entry]++;
 #endif
 
@@ -544,7 +544,7 @@
 
 #ifdef TRAIN_RES
   for(i=0;i<ch;i++)
-    for(j=info->begin;j<end;j++){
+    for(j=info->begin;j<info->end;j++){
       if(in[i][j]>look->tmax)look->tmax=in[i][j];
       if(in[i][j]<look->tmin)look->tmin=in[i][j];
     }



More information about the commits mailing list