shithub: aacenc

Download patch

ref: 233c00f829c35e4b3f815002c8f334facf09bce7
parent: 155f9b2ea4cafc90abb8c561aaeadfe05e08266a
author: lenox <lenox>
date: Sun Mar 12 04:49:07 EST 2000

removed gain control & changed win32 defines

--- a/aac_qc.c
+++ b/aac_qc.c
@@ -30,12 +30,12 @@
 	ath=(3.640 * pow(f,-0.8)
 		-  6.500 * exp(-0.6*pow(f-3.3,2.0))
 		+  0.001 * pow(f,4.0));
-	
+
 	/* convert to energy */
 	ath = pow( 10.0, ath/10.0 );
 	return ath;
 }
- 
+
 
 void compute_ath(AACQuantInfo *quantInfo, double ATH[SFB_NUM_MAX])
 {
--- a/aac_se_enc.c
+++ b/aac_se_enc.c
@@ -263,10 +263,6 @@
 	/* Write TNS data */
 	bit_count += WriteTNSData(quantInfo,fixed_stream,writeFlag);
 	
-	/* Write gain control data */
-//	bit_count += WriteGainControlData(quantInfo,fixed_stream,writeFlag);
-        bit_count += WriteGainControlData(fixed_stream,writeFlag);
-
 	/* Write out spectral_data() */
 	bit_count += WriteSpectralData(quantInfo,fixed_stream,writeFlag);
 
@@ -465,26 +461,6 @@
 
   return bit_count;
 }
-
-
-/*****************************************************************************/
-/* WriteGainControlData(...), write gain control data.                       */
-/*****************************************************************************/
-int WriteGainControlData(
-//                         AACQuantInfo* quantInfo,    /* AACQuantInfo structure */
-			 BsBitStream* fixed_stream,  /* Pointer to bitstream */
-			 int writeFlag)              /* 1 means write, 0 means count only */  
-{
-	int bit_count = 0;
-	bit_count += LEN_GAIN_PRES;
-
-	if (writeFlag) {
-		BsPutBit(fixed_stream,0,LEN_GAIN_PRES);
-	}
-	return bit_count;
-}
-
-
 /*****************************************************************************/
 /* WriteSpectralData(...), write spectral data.                              */
 /*****************************************************************************/
--- a/enc_tf.c
+++ b/enc_tf.c
@@ -418,19 +418,6 @@
 		}
 	}
 
-	{
-		int chanNum;
-		for (chanNum=0;chanNum<max_ch;chanNum++) {
-
-			/* Count number of bits used for gain_control_data */
-//			used_bits += WriteGainControlData(&quantInfo[chanNum],     /* quantInfo contains packed gain control data */
-			used_bits += WriteGainControlData(NULL,           /* NULL BsBitStream.  Only counting bits, no need to write yet */
-				0);             /* Zero write flag means don't write */
-		}
-	}
-
-
-
 	/******************************************************************************************************************************
 	*
 	* T/F mapping
--- a/encoder.c
+++ b/encoder.c
@@ -1,4 +1,4 @@
-#ifdef WIN32
+#ifdef _WIN32
 #include <windows.h>
 #endif
 
--- a/faac.c
+++ b/faac.c
@@ -1,4 +1,4 @@
-#ifdef WIN32
+#ifdef _WIN32
 #include <windows.h>
 #else
 #include <time.h>
@@ -99,7 +99,7 @@
 	FileCount++;
       }
       else {
-#ifdef WIN32
+#ifdef _WIN32
 	HANDLE hFindFile;
 	WIN32_FIND_DATA fd;
 
@@ -263,7 +263,7 @@
   faacAACStream *as;
 
 	/* System dependant types */
-#ifdef WIN32
+#ifdef _WIN32
   long	begin, end;
   int nTotSecs, nSecs;
   int nMins;
@@ -287,7 +287,7 @@
   /* Process input files */
   for (i = 0; i < FileCount; i++) {
     printf("0%\tBusy encoding %s.\r", InFileNames[i]);
-#ifdef WIN32
+#ifdef _WIN32
     begin = GetTickCount();
 #endif
 
@@ -312,7 +312,7 @@
     /* finishing last frames and destroying internal data */
     faac_EncodeFinish(as);
     faac_EncodeFree(as);
-#ifdef WIN32
+#ifdef _WIN32
     end = GetTickCount();
     nTotSecs = (end-begin)/1000;
     nMins = nTotSecs / 60;