shithub: aacenc

Download patch

ref: 67bcd80140c6a119b5955f614c4f3f365500ce7b
parent: 9392cec5109fa2484d188c46fe11259bd6196bbd
author: knik <knik>
date: Mon Sep 8 03:02:35 EDT 2003

fixed noise allocation

--- a/libfaac/aacquant.c
+++ b/libfaac/aacquant.c
@@ -17,7 +17,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * $Id: aacquant.c,v 1.25 2003/09/07 16:46:22 knik Exp $
+ * $Id: aacquant.c,v 1.26 2003/09/08 07:02:35 knik Exp $
  */
 
 #include <math.h>
@@ -353,7 +353,7 @@
                             double *xr, double *xmin, int quality)
 {
   int sfb, start, end, l;
-  const double globalthr = 34.7 / (double)quality;
+  const double globalthr = 37.3 / (double)quality;
   int last = coderInfo->lastx;
   int lastsb = 0;
   int *cb_offset = coderInfo->sfb_offset;
@@ -384,7 +384,7 @@
       enrg += xr[l]*xr[l];
 
     thr = enrg/((double)(end-start)*avgenrg);
-    thr = pow(thr, 0.4*(lastsb-sfb)/lastsb + 0.2);
+    thr = pow(thr, 0.2*(lastsb-sfb)/lastsb + 0.2);
 
     tmp = (double)start / (double)last;
     if (tmp < 0.3)