shithub: aacdec

Download patch

ref: 2cff3a9f96eabd25287392db3454bdb40d14f4b2
parent: b4d17ba5333a35523a25a37d46638789a964bba9
author: menno <menno>
date: Sun Oct 5 11:22:10 EDT 2003

Linux compilation

--- a/bootstrap
+++ b/bootstrap
@@ -1,8 +1,8 @@
 #! /bin/sh
 
-aclocal -I .
-autoheader
-libtoolize --automake --copy
-automake --add-missing --copy
-autoconf
+aclocal -I .                   && \
+autoheader                     && \
+libtoolize --automake --copy   && \
+automake --add-missing --copy  && \
+autoconf                       && \
 echo "Ready to run ./configure"
--- a/common/mp4v2/Makefile.am
+++ b/common/mp4v2/Makefile.am
@@ -124,3 +124,6 @@
     libmp4v260.dsp \
     libmp4v2_st60.dsp \
     TODO
+
+LIBTOOL_DEPS =
+LIBS =
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
-AC_INIT()
-AM_INIT_AUTOMAKE(faad2,2.0)
+AC_INIT(faad2, 2.0)
+AM_INIT_AUTOMAKE()
 
 AC_PROG_LIBTOOL
 AC_SUBST(LIBTOOL_DEPS)
@@ -14,11 +14,11 @@
 
 AM_CONFIG_HEADER(config.h)
 
-AC_ARG_WITH( xmms,[    --with-xmms     compile XMMS plugin],WITHXMMS=$withval, WITHXMMS=no)
+AC_ARG_WITH( xmms,   [  --with-xmms             compile XMMS plugin],WITHXMMS=$withval, WITHXMMS=no)
 
-AC_ARG_WITH( xmmsmp4,[    --with-xmmsmp4       compile XMMS MP4 plugin],WITHXMMSMP4=$withval, WITHXMMSMP4=no)
+AC_ARG_WITH( xmmsmp4,[  --with-xmmsmp4          compile XMMS MP4 plugin],WITHXMMSMP4=$withval, WITHXMMSMP4=no)
 
-AC_ARG_WITH( drm,[    --with-drm       compile libfaad with DRM support],WITHDRM=$withval, WITHDRM=no)
+AC_ARG_WITH( drm,    [  --with-drm              compile libfaad with DRM support],WITHDRM=$withval, WITHDRM=no)
 
 dnl Checks for header files required for mp4.h
 AC_HEADER_STDC
@@ -73,10 +73,11 @@
   AM_CONDITIONAL(HAVE_MPEG4IP, true)
   MPEG4IP_PLAYER_PLUGIN_DIR=`mpeg4ip-config --player-plugin-dir`  
   AC_SUBST(MPEG4IP_PLAYER_PLUGIN_DIR)
-  AC_OUTPUT(plugins/mpeg4ip/Makefile)
+  AC_CONFIG_FILES(plugins/mpeg4ip/Makefile)
+  AC_MSG_NOTICE([*** Building with external mp4v2 ***])
 else
   AM_CONDITIONAL(HAVE_MPEG4IP, false)
-  AC_OUTPUT(common/Makefile common/mp4v2/Makefile)
+  AC_CONFIG_FILES(common/mp4v2/Makefile)
 fi
 
 if test x$WITHXMMS = xyes; then
@@ -89,7 +90,6 @@
   else
    AM_CONDITIONAL(HAVE_XMMS, true)
    AC_CONFIG_SUBDIRS(plugins/xmms)
-   AC_OUTPUT(plugins/xmms/Makefile plugins/xmms/src/Makefile)
   fi
 else
  AM_CONDITIONAL(HAVE_XMMS, false)
@@ -100,4 +100,8 @@
   AC_DEFINE(DRM, 1, [Define if you want to use libfaad together with Digital Radio Mondiale (DRM)])
 fi
 
-AC_OUTPUT(libfaad/Makefile frontend/Makefile common/Makefile Makefile plugins/Makefile)
+AC_CONFIG_FILES(libfaad/Makefile frontend/Makefile common/Makefile Makefile plugins/Makefile)
+AC_OUTPUT
+
+dnl AC_CONFIG_SUBDIRS(plugins/xmmsmp4/src)
+dnl AC_OUTPUT(plugins/xmmsmp4/Makefile plugins/xmmsmp4/src/Makefile)
--- a/frontend/faad.dsp
+++ b/frontend/faad.dsp
@@ -42,7 +42,8 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../include" /I "../common/mp4v2" /I "../common/faad" /I "../common/libsndfile/src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /I "../include" /I "../common/mp4v2" /I "../common/faad" /I "../common/libsndfile/src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# SUBTRACT CPP /O<none>
 # ADD BASE RSC /l 0x413 /d "NDEBUG"
 # ADD RSC /l 0x413 /d "NDEBUG"
 BSC32=bscmake.exe
--- a/libfaad/decoder.c
+++ b/libfaad/decoder.c
@@ -1,19 +1,19 @@
 /*
 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
 ** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
-**  
+**
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
 ** the Free Software Foundation; either version 2 of the License, or
 ** (at your option) any later version.
-** 
+**
 ** This program is distributed in the hope that it will be useful,
 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ** GNU General Public License for more details.
-** 
+**
 ** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software 
+** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
 ** Any non-GPL usage of this software or parts of this software is strictly
@@ -22,7 +22,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
-** $Id: decoder.c,v 1.72 2003/09/24 19:55:34 menno Exp $
+** $Id: decoder.c,v 1.73 2003/10/05 15:22:10 menno Exp $
 **/
 
 #include "common.h"
@@ -377,6 +377,7 @@
     return 0;
 }
 
+#ifdef DRM
 int8_t FAADAPI faacDecInitDRM(faacDecHandle hDecoder, uint32_t samplerate,
                               uint8_t channels)
 {
@@ -384,11 +385,9 @@
     hDecoder->config.defObjectType = DRM_ER_LC;
 
     hDecoder->config.defSampleRate = samplerate;
-#ifdef ERROR_RESILIENCE // This shoudl always be defined for DRM
     hDecoder->aacSectionDataResilienceFlag = 1; /* VCB11 */
     hDecoder->aacScalefactorDataResilienceFlag = 0; /* no RVLC */
     hDecoder->aacSpectralDataResilienceFlag = 1; /* HCR */
-#endif
     hDecoder->frameLength = 960;
     hDecoder->sf_index = get_sr_index(hDecoder->config.defSampleRate);
     hDecoder->object_type = hDecoder->config.defObjectType;
@@ -399,7 +398,6 @@
         hDecoder->channelConfiguration = 1;
 
 #ifdef SBR_DEC
-#ifdef DRM
     if (channels == DRMCH_SBR_LC_STEREO)
         hDecoder->lcstereo_flag = 1;
     else
@@ -414,7 +412,6 @@
     sbrDecodeEnd(hDecoder->sbr[0]);
     hDecoder->sbr[0] = NULL;
 #endif
-#endif
 
     /* must be done before frameLength is divided by 2 for LD */
     hDecoder->fb = filter_bank_init(hDecoder->frameLength);
@@ -426,6 +423,7 @@
 
     return 0;
 }
+#endif
 
 void FAADAPI faacDecClose(faacDecHandle hDecoder)
 {
@@ -709,8 +707,8 @@
     uint32_t bitsconsumed;
 #ifdef DRM
     uint8_t *revbuffer;
-    uint8_t *prevbufstart;   
-    uint8_t *pbufend;   
+    uint8_t *prevbufstart;
+    uint8_t *pbufend;
 #endif
 
     /* local copy of globals */