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

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon Mar 1 03:33:57 PST 2010


Author: xiphmont
Date: 2010-03-01 03:33:57 -0800 (Mon, 01 Mar 2010)
New Revision: 16941

Modified:
   trunk/vorbis/lib/mapping0.c
Log:
Correct an error in the integer work buffer allocation



Modified: trunk/vorbis/lib/mapping0.c
===================================================================
--- trunk/vorbis/lib/mapping0.c	2010-03-01 11:24:39 UTC (rev 16940)
+++ trunk/vorbis/lib/mapping0.c	2010-03-01 11:33:57 UTC (rev 16941)
@@ -255,8 +255,7 @@
 
   int modenumber=vb->W;
   vorbis_info_mapping0 *info=ci->map_param[modenumber];
-  vorbis_look_psy *psy_look=
-    b->psy+blocktype+(vb->W?2:0);
+  vorbis_look_psy *psy_look=b->psy+blocktype+(vb->W?2:0);
 
   vb->mode=modenumber;
 
@@ -267,6 +266,7 @@
     float *pcm     =vb->pcm[i];
     float *logfft  =pcm;
 
+    iwork[i]=_vorbis_block_alloc(vb,n/2*sizeof(**iwork));
     gmdct[i]=_vorbis_block_alloc(vb,n/2*sizeof(**gmdct));
 
     scale_dB=todB(&scale) + .345; /* + .345 is a hack; the original
@@ -627,7 +627,6 @@
       for(i=0;i<vi->channels;i++){
         float *mdct    =gmdct[i];
         sortindex[i]=alloca(sizeof(**sortindex)*n/2);
-        iwork[i]=_vorbis_block_alloc(vb,n/2*sizeof(**iwork));
         _vp_noise_normalize_sort(psy_look,mdct,sortindex[i]);
       }
     }



More information about the commits mailing list