shithub: aacenc

Download patch

ref: 954a70d4a3ea3f919621d281195772f66e8feeec
parent: f873ac18129527d3a143b2b853cc363f5b8c2a2f
author: menno <menno>
date: Wed Nov 17 09:26:06 EST 2004

Infinite loop fix
dunno if this is good, encoder might be tuned to use energies from before MS encoding. But since the MS encoded samples are used in quantisation this might actually be better. Please test.

--- a/libfaac/frame.c
+++ b/libfaac/frame.c
@@ -16,7 +16,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: frame.c,v 1.66 2004/11/04 12:51:09 aforanna Exp $
+ * $Id: frame.c,v 1.67 2004/11/17 14:26:06 menno Exp $
  */
 
 /*
@@ -749,6 +749,11 @@
 
     MSEncode(coderInfo, channelInfo, hEncoder->freqBuff, numChannels, allowMidside);
 
+    for (channel = 0; channel < numChannels; channel++)
+    {
+        CalcAvgEnrg(&coderInfo[channel], hEncoder->freqBuff[channel]);
+    }
+
 #ifdef DRM
     /* loop the quantization until the desired bit-rate is reached */
     diff = 1; /* to enter while loop */
@@ -1111,6 +1116,10 @@
 
 /*
 $Log: frame.c,v $
+Revision 1.67  2004/11/17 14:26:06  menno
+Infinite loop fix
+dunno if this is good, encoder might be tuned to use energies from before MS encoding. But since the MS encoded samples are used in quantisation this might actually be better. Please test.
+
 Revision 1.66  2004/11/04 12:51:09  aforanna
 version number updated to 1.24.1 due to changes in Winamp and CoolEdit plugins