shithub: aacenc

Download patch

ref: 1368f4dad39f86ee1183d8d6227eb04e9ac1dd2d
parent: c0245f454bd6f40dc5225873b4c8da9656feabac
author: menno <menno>
date: Sat Mar 17 04:22:54 EST 2001

Added MPEG2 AAC support (compile with MPEG2AAC defined)
make sure you don't use LTP when using MPEG2 AAC, because it is not supported in MPEG2 AAC

--- a/libfaac/bitstream.c
+++ b/libfaac/bitstream.c
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * $Id: bitstream.c,v 1.6 2001/03/12 16:58:36 menno Exp $
+ * $Id: bitstream.c,v 1.7 2001/03/17 09:22:54 menno Exp $
  */
 
 #include <stdlib.h>
@@ -186,10 +186,16 @@
 		PutBit(bitStream, hEncoder->config.aacProfile, 2); /* profile */
 		PutBit(bitStream, hEncoder->sampleRateIdx, 4); /* sampling rate */
 		PutBit(bitStream, 0, 1); /* private bit */
+#ifdef MPEG2AAC
+		PutBit(bitStream, 2, 3); /* ch. config (must be > 0) */
+#else
 		PutBit(bitStream, 1, 3); /* ch. config (must be > 0) */
+#endif
 		PutBit(bitStream, 0, 1); /* original/copy */
 		PutBit(bitStream, 0, 1); /* home */
+#ifndef MPEG2AAC
 		PutBit(bitStream, 0, 2); /* emphasis */
+#endif
 
 		/* Variable ADTS header */
 		PutBit(bitStream, 0, 1); /* copyr. id. bit */
@@ -198,7 +204,12 @@
 		PutBit(bitStream, 0x7FF, 11); /* buffer fullness (0x7FF for VBR) */
 		PutBit(bitStream, 0, 2); /* raw data blocks (0+1=1) */
 	}
+
+#ifdef MPEG2AAC
+	return 56;
+#else
 	return 58;
+#endif
 }
 
 static int WriteCPE(CoderInfo *coderInfoL,
--- a/wingui/faac_wingui.clw
+++ b/wingui/faac_wingui.clw
@@ -33,8 +33,8 @@
 Class10=CProcessJobStatusDialog
 Resource12=IDD_ABOUTBOX (English (U.S.))
 Resource13=IDR_TOOLBARMAIN (English (U.S.))
-Resource14=IDD_PROPERTIESDUMMYPARENTDIALOG (German (Germany))
-Resource15=IDD_ENCODERQUALITYPAGEDIALOG (German (Germany))
+Resource14=IDD_ENCODERQUALITYPAGEDIALOG (German (Germany))
+Resource15=IDD_PROPERTIESDUMMYPARENTDIALOG (German (Germany))
 
 [CLS:CFaac_winguiApp]
 Type=0
@@ -142,7 +142,7 @@
 BaseClass=CDialog
 Filter=D
 VirtualFilter=dWC
-LastObject=IDC_CHECKRECURSIVE
+LastObject=CEncoderGeneralPageDialog
 
 [DLG:IDD_FLOATINGPROPERTYDIALOG (English (U.S.))]
 Type=1
@@ -273,6 +273,7 @@
 
 [DLG:IDD_PROPERTIESDUMMYPARENTDIALOG (German (Germany))]
 Type=1
+Class=?
 ControlCount=3
 Control1=IDC_STATIC,static,1073872896
 Control2=IDC_STATIC,static,1073872896
@@ -280,6 +281,7 @@
 
 [DLG:IDD_ENCODERQUALITYPAGEDIALOG (German (Germany))]
 Type=1
+Class=?
 ControlCount=15
 Control1=IDC_STATIC,static,1342373888
 Control2=IDC_EDITBITRATE,edit,1350631552