shithub: aacdec

Download patch

ref: c320c723ba96e15c3f172ed4e21de3102d9f4868
parent: d2f41a3b8c3dc8d6cf89d652cc2b28222df84c72
author: menno <menno>
date: Mon Jan 26 18:51:17 EST 2009

Use public headers internally to prevent duplicate declarations

--- a/frontend/faad.vcproj
+++ b/frontend/faad.vcproj
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
 	ProjectType="Visual C++"
-	Version="8,00"
+	Version="8.00"
 	Name="faad"
 	ProjectGUID="{2BD8CBB3-DFC9-4A6A-9B7A-07ED749BED58}"
 	>
@@ -226,10 +226,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\include\faad.h"
-				>
-			</File>
-			<File
 				RelativePath="..\common\faad\getopt.h"
 				>
 			</File>
@@ -239,6 +235,10 @@
 			</File>
 			<File
 				RelativePath="..\common\mp4v2\mpeg4ip.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\neaacdec.h"
 				>
 			</File>
 			<File
--- a/include/neaacdec.h
+++ b/include/neaacdec.h
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: neaacdec.h,v 1.12 2008/03/23 23:03:27 menno Exp $
+** $Id: neaacdec.h,v 1.13 2009/01/26 23:51:15 menno Exp $
 **/
 
 #ifndef __NEAACDEC_H__
@@ -217,9 +217,11 @@
                               unsigned char *channels);
 
 /* Init the library using a DecoderSpecificInfo */
-char NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, unsigned char *pBuffer,
+char NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder,
+                               unsigned char *pBuffer,
                                unsigned long SizeOfDecoderSpecificInfo,
-                               unsigned long *samplerate, unsigned char *channels);
+                               unsigned long *samplerate,
+                               unsigned char *channels);
 
 /* Init the library for DRM */
 char NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, unsigned long samplerate,
--- a/libfaad/Makefile.am
+++ b/libfaad/Makefile.am
@@ -1,29 +1,30 @@
 lib_LTLIBRARIES = libfaad.la
 
+AM_CFLAGS	= -iquote $(top_srcdir)/include
 include_HEADERS = $(top_srcdir)/include/faad.h \
-                  $(top_srcdir)/include/neaacdec.h
+		  $(top_srcdir)/include/neaacdec.h
 
 libfaad_la_LDFLAGS = -version-info 1:0:0
 libfaad_la_LIBADD = -lm
 
 libfaad_la_SOURCES = bits.c cfft.c decoder.c drc.c \
-drm_dec.c error.c filtbank.c \
-ic_predict.c is.c lt_predict.c mdct.c mp4.c ms.c output.c pns.c \
-ps_dec.c ps_syntax.c \
-pulse.c specrec.c syntax.c tns.c hcr.c huffman.c \
-rvlc.c ssr.c ssr_fb.c ssr_ipqf.c common.c \
-sbr_dct.c sbr_e_nf.c sbr_fbt.c sbr_hfadj.c sbr_hfgen.c \
-sbr_huff.c sbr_qmf.c sbr_syntax.c sbr_tf_grid.c sbr_dec.c \
-analysis.h bits.h cfft.h cfft_tab.h common.h \
-decoder.h drc.h drm_dec.h error.h fixed.h filtbank.h \
-huffman.h ic_predict.h iq_table.h is.h kbd_win.h lt_predict.h \
-mdct.h mdct_tab.h mp4.h ms.h output.h pns.h ps_dec.h ps_tables.h \
-pulse.h rvlc.h \
-sbr_dct.h sbr_dec.h sbr_e_nf.h sbr_fbt.h sbr_hfadj.h sbr_hfgen.h \
-sbr_huff.h sbr_noise.h sbr_qmf.h sbr_syntax.h sbr_tf_grid.h \
-sine_win.h specrec.h ssr.h ssr_fb.h ssr_ipqf.h \
-ssr_win.h syntax.h structs.h tns.h \
-sbr_qmf_c.h codebook/hcb.h \
-codebook/hcb_1.h codebook/hcb_2.h codebook/hcb_3.h codebook/hcb_4.h \
-codebook/hcb_5.h codebook/hcb_6.h codebook/hcb_7.h codebook/hcb_8.h \
-codebook/hcb_9.h codebook/hcb_10.h codebook/hcb_11.h codebook/hcb_sf.h
\ No newline at end of file
+		     drm_dec.c error.c filtbank.c \
+		     ic_predict.c is.c lt_predict.c mdct.c mp4.c ms.c output.c pns.c \
+		     ps_dec.c ps_syntax.c \
+		     pulse.c specrec.c syntax.c tns.c hcr.c huffman.c \
+		     rvlc.c ssr.c ssr_fb.c ssr_ipqf.c common.c \
+		     sbr_dct.c sbr_e_nf.c sbr_fbt.c sbr_hfadj.c sbr_hfgen.c \
+		     sbr_huff.c sbr_qmf.c sbr_syntax.c sbr_tf_grid.c sbr_dec.c \
+		     analysis.h bits.h cfft.h cfft_tab.h common.h \
+		     decoder.h drc.h drm_dec.h error.h fixed.h filtbank.h \
+		     huffman.h ic_predict.h iq_table.h is.h kbd_win.h lt_predict.h \
+		     mdct.h mdct_tab.h mp4.h ms.h output.h pns.h ps_dec.h ps_tables.h \
+		     pulse.h rvlc.h \
+		     sbr_dct.h sbr_dec.h sbr_e_nf.h sbr_fbt.h sbr_hfadj.h sbr_hfgen.h \
+		     sbr_huff.h sbr_noise.h sbr_qmf.h sbr_syntax.h sbr_tf_grid.h \
+		     sine_win.h specrec.h ssr.h ssr_fb.h ssr_ipqf.h \
+		     ssr_win.h syntax.h structs.h tns.h \
+		     sbr_qmf_c.h codebook/hcb.h \
+		     codebook/hcb_1.h codebook/hcb_2.h codebook/hcb_3.h codebook/hcb_4.h \
+		     codebook/hcb_5.h codebook/hcb_6.h codebook/hcb_7.h codebook/hcb_8.h \
+		     codebook/hcb_9.h codebook/hcb_10.h codebook/hcb_11.h codebook/hcb_sf.h
--- a/libfaad/common.h
+++ b/libfaad/common.h
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: common.h,v 1.75 2008/11/24 21:53:21 menno Exp $
+** $Id: common.h,v 1.76 2009/01/26 23:51:15 menno Exp $
 **/
 
 #ifndef __COMMON_H__
@@ -38,6 +38,8 @@
 #ifdef HAVE_CONFIG_H
 #  include "../config.h"
 #endif
+
+#include <neaacdec.h>
 
 #if 1
 #define INLINE __inline
--- a/libfaad/decoder.c
+++ b/libfaad/decoder.c
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: decoder.c,v 1.115 2008/09/22 17:55:09 menno Exp $
+** $Id: decoder.c,v 1.116 2009/01/26 23:51:15 menno Exp $
 **/
 
 #include "common.h"
@@ -35,7 +35,6 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "decoder.h"
 #include "mp4.h"
 #include "syntax.h"
 #include "error.h"
@@ -55,13 +54,17 @@
 #endif
 
 /* static function declarations */
-static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
-                              uint8_t *buffer, uint32_t buffer_size,
-                              void **sample_buffer, uint32_t sample_buffer_size);
-static void create_channel_config(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo);
+static void* aac_frame_decode(NeAACDecStruct *hDecoder,
+                              NeAACDecFrameInfo *hInfo,
+                              unsigned char *buffer,
+                              unsigned long buffer_size,
+                              void **sample_buffer2,
+                              unsigned long sample_buffer_size);
+static void create_channel_config(NeAACDecStruct *hDecoder,
+                                  NeAACDecFrameInfo *hInfo);
 
 
-char* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode)
+char* NEAACDECAPI NeAACDecGetErrorMessage(unsigned char errcode)
 {
     if (errcode >= NUM_ERROR_MESSAGES)
         return NULL;
@@ -68,7 +71,7 @@
     return err_msg[errcode];
 }
 
-uint32_t NEAACDECAPI NeAACDecGetCapabilities(void)
+unsigned long NEAACDECAPI NeAACDecGetCapabilities(void)
 {
     uint32_t cap = 0;
 
@@ -98,9 +101,9 @@
 NeAACDecHandle NEAACDECAPI NeAACDecOpen(void)
 {
     uint8_t i;
-    NeAACDecHandle hDecoder = NULL;
+    NeAACDecStruct *hDecoder = NULL;
 
-    if ((hDecoder = (NeAACDecHandle)faad_malloc(sizeof(NeAACDecStruct))) == NULL)
+    if ((hDecoder = (NeAACDecStruct*)faad_malloc(sizeof(NeAACDecStruct))) == NULL)
         return NULL;
 
     memset(hDecoder, 0, sizeof(NeAACDecStruct));
@@ -156,7 +159,7 @@
     return hDecoder;
 }
 
-NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder)
+NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecStruct *hDecoder)
 {
     if (hDecoder)
     {
@@ -168,8 +171,8 @@
     return NULL;
 }
 
-uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
-                                             NeAACDecConfigurationPtr config)
+unsigned char NEAACDECAPI NeAACDecSetConfiguration(NeAACDecStruct *hDecoder,
+                                                   NeAACDecConfigurationPtr config)
 {
     if (hDecoder && config)
     {
@@ -230,9 +233,11 @@
 }
 
 
-int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, uint8_t *buffer,
-                                 uint32_t buffer_size,
-                                 uint32_t *samplerate, uint8_t *channels)
+long NEAACDECAPI NeAACDecInit(NeAACDecStruct *hDecoder,
+                              unsigned char *buffer,
+                              unsigned long buffer_size,
+                              unsigned long *samplerate,
+                              unsigned char *channels)
 {
     uint32_t bits = 0;
     bitfile ld;
@@ -358,9 +363,11 @@
 }
 
 /* Init the library using a DecoderSpecificInfo */
-int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
-                                 uint32_t SizeOfDecoderSpecificInfo,
-                                 uint32_t *samplerate, uint8_t *channels)
+char NEAACDECAPI NeAACDecInit2(NeAACDecStruct *hDecoder,
+                               unsigned char *pBuffer,
+                               unsigned long SizeOfDecoderSpecificInfo,
+                               unsigned long *samplerate,
+                               unsigned char *channels)
 {
     int8_t rc;
     mp4AudioSpecificConfig mp4ASC;
@@ -449,8 +456,9 @@
 }
 
 #ifdef DRM
-int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate,
-                                   uint8_t channels)
+char NEAACDECAPI NeAACDecInitDRM(NeAACDecStruct **hDecoder,
+                                 unsigned long samplerate,
+                                 unsigned char channels)
 {
     if (hDecoder == NULL)
         return 1; /* error */
@@ -490,7 +498,7 @@
 }
 #endif
 
-void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder)
+void NEAACDECAPI NeAACDecClose(NeAACDecStruct *hDecoder)
 {
     uint8_t i;
 
@@ -543,7 +551,7 @@
     if (hDecoder) faad_free(hDecoder);
 }
 
-void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame)
+void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecStruct *hDecoder, long frame)
 {
     if (hDecoder)
     {
@@ -554,7 +562,7 @@
     }
 }
 
-static void create_channel_config(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo)
+static void create_channel_config(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo)
 {
     hInfo->num_front_channels = 0;
     hInfo->num_side_channels = 0;
@@ -772,17 +780,20 @@
     }
 }
 
-void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
+void* NEAACDECAPI NeAACDecDecode(NeAACDecStruct *hDecoder,
                                  NeAACDecFrameInfo *hInfo,
-                                 uint8_t *buffer, uint32_t buffer_size)
+                                 unsigned char *buffer,
+                                 unsigned long buffer_size)
 {
     return aac_frame_decode(hDecoder, hInfo, buffer, buffer_size, NULL, 0);
 }
 
-void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
+void* NEAACDECAPI NeAACDecDecode2(NeAACDecStruct *hDecoder,
                                   NeAACDecFrameInfo *hInfo,
-                                  uint8_t *buffer, uint32_t buffer_size,
-                                  void **sample_buffer, uint32_t sample_buffer_size)
+                                  unsigned char *buffer,
+                                  unsigned long buffer_size,
+                                  void **sample_buffer,
+                                  unsigned long sample_buffer_size)
 {
     if ((sample_buffer == NULL) || (sample_buffer_size == 0))
     {
@@ -798,7 +809,7 @@
 
 #define ERROR_STATE_INIT 6
 
-static void conceal_output(NeAACDecHandle hDecoder, uint16_t frame_len,
+static void conceal_output(NeAACDecStruct *hDecoder, uint16_t frame_len,
                            uint8_t out_ch, void *sample_buffer)
 {
     return;
@@ -805,9 +816,12 @@
 }
 #endif
 
-static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
-                              uint8_t *buffer, uint32_t buffer_size,
-                              void **sample_buffer2, uint32_t sample_buffer_size)
+static void* aac_frame_decode(NeAACDecStruct *hDecoder,
+                              NeAACDecFrameInfo *hInfo,
+                              unsigned char *buffer,
+                              unsigned long buffer_size,
+                              void **sample_buffer2,
+                              unsigned long sample_buffer_size)
 {
     uint16_t i;
     uint8_t channels = 0;
--- a/libfaad/decoder.h
+++ /dev/null
@@ -1,124 +1,0 @@
-/*
-** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
-** Copyright (C) 2003-2005 M. Bakker, Nero 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 
-** 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
-** forbidden.
-**
-** The "appropriate copyright message" mentioned in section 2c of the GPLv2
-** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-**
-** Commercial non-GPL licensing of this software is possible.
-** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
-**
-** $Id: decoder.h,v 1.48 2007/11/01 12:33:30 menno Exp $
-**/
-
-#ifndef __DECODER_H__
-#define __DECODER_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef _WIN32
-  #pragma pack(push, 8)
-  #ifndef NEAACDECAPI
-    #define NEAACDECAPI __cdecl
-  #endif
-#else
-  #ifndef NEAACDECAPI
-    #define NEAACDECAPI
-  #endif
-#endif
-
-
-/* library output formats */
-#define FAAD_FMT_16BIT  1
-#define FAAD_FMT_24BIT  2
-#define FAAD_FMT_32BIT  3
-#define FAAD_FMT_FLOAT  4
-#define FAAD_FMT_FIXED  FAAD_FMT_FLOAT
-#define FAAD_FMT_DOUBLE 5
-
-#define LC_DEC_CAP            (1<<0)
-#define MAIN_DEC_CAP          (1<<1)
-#define LTP_DEC_CAP           (1<<2)
-#define LD_DEC_CAP            (1<<3)
-#define ERROR_RESILIENCE_CAP  (1<<4)
-#define FIXED_POINT_CAP       (1<<5)
-
-#define FRONT_CHANNEL_CENTER (1)
-#define FRONT_CHANNEL_LEFT   (2)
-#define FRONT_CHANNEL_RIGHT  (3)
-#define SIDE_CHANNEL_LEFT    (4)
-#define SIDE_CHANNEL_RIGHT   (5)
-#define BACK_CHANNEL_LEFT    (6)
-#define BACK_CHANNEL_RIGHT   (7)
-#define BACK_CHANNEL_CENTER  (8)
-#define LFE_CHANNEL          (9)
-#define UNKNOWN_CHANNEL      (0)
-
-char* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode);
-
-uint32_t NEAACDECAPI NeAACDecGetCapabilities(void);
-
-NeAACDecHandle NEAACDECAPI NeAACDecOpen(void);
-
-NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder);
-
-uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
-                                             NeAACDecConfigurationPtr config);
-
-/* Init the library based on info from the AAC file (ADTS/ADIF) */
-int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder,
-                                 uint8_t *buffer,
-                                 uint32_t buffer_size,
-                                 uint32_t *samplerate,
-                                 uint8_t *channels);
-
-/* Init the library using a DecoderSpecificInfo */
-int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
-                                 uint32_t SizeOfDecoderSpecificInfo,
-                                 uint32_t *samplerate, uint8_t *channels);
-
-/* Init the library for DRM */
-int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate,
-                                   uint8_t channels);
-
-void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder);
-
-void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame);
-
-void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
-                                 NeAACDecFrameInfo *hInfo,
-                                 uint8_t *buffer,
-                                 uint32_t buffer_size);
-
-void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
-                                  NeAACDecFrameInfo *hInfo,
-                                  uint8_t *buffer, uint32_t buffer_size,
-                                  void **sample_buffer, uint32_t sample_buffer_size);
-
-#ifdef _WIN32
-  #pragma pack(pop)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
--- a/libfaad/filtbank.c
+++ b/libfaad/filtbank.c
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: filtbank.c,v 1.45 2007/11/01 12:33:30 menno Exp $
+** $Id: filtbank.c,v 1.46 2009/01/26 23:51:15 menno Exp $
 **/
 
 #include "common.h"
@@ -40,7 +40,6 @@
 #endif
 
 #include "filtbank.h"
-#include "decoder.h"
 #include "syntax.h"
 #include "kbd_win.h"
 #include "sine_win.h"
--- a/libfaad/hcr.c
+++ b/libfaad/hcr.c
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: hcr.c,v 1.25 2008/03/23 23:03:28 menno Exp $
+** $Id: hcr.c,v 1.26 2009/01/26 23:51:15 menno Exp $
 **/
 
 #include "common.h"
@@ -214,7 +214,7 @@
     codeword[index].bits.len = 0;
 }
 
-uint8_t reordered_spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, 
+uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics, 
                                 bitfile *ld, int16_t *spectral_data)
 {   
     uint16_t PCWs_done;
--- a/libfaad/libfaad.vcproj
+++ b/libfaad/libfaad.vcproj
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
 	ProjectType="Visual C++"
-	Version="8,00"
+	Version="8.00"
 	Name="libfaad"
 	ProjectGUID="{BC3EFE27-9015-4C9C-AD3C-72B3B7ED2114}"
 	>
@@ -43,6 +43,7 @@
 				AdditionalOptions=""
 				Optimization="2"
 				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include"
 				PreprocessorDefinitions="NDEBUG;WIN32;_LIB"
 				StringPooling="true"
 				RuntimeLibrary="2"
@@ -118,6 +119,7 @@
 				Name="VCCLCompilerTool"
 				AdditionalOptions=""
 				Optimization="0"
+				AdditionalIncludeDirectories="../include"
 				PreprocessorDefinitions="_DEBUG;WIN32;_LIB"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
--- a/libfaad/mp4.h
+++ b/libfaad/mp4.h
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: mp4.h,v 1.26 2008/03/23 23:03:29 menno Exp $
+** $Id: mp4.h,v 1.27 2009/01/26 23:51:15 menno Exp $
 **/
 
 #ifndef __MP4_H__
@@ -35,11 +35,7 @@
 extern "C" {
 #endif
 
-#include "decoder.h"
-
-int8_t NEAACDECAPI NeAACDecAudioSpecificConfig(uint8_t *pBuffer,
-                                               uint32_t buffer_size,
-                                               mp4AudioSpecificConfig *mp4ASC);
+#include <neaacdec.h>
 
 int8_t AudioSpecificConfig2(uint8_t *pBuffer,
                             uint32_t buffer_size,
--- a/libfaad/output.c
+++ b/libfaad/output.c
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: output.c,v 1.46 2007/11/01 12:33:32 menno Exp $
+** $Id: output.c,v 1.47 2009/01/26 23:51:15 menno Exp $
 **/
 
 #include "common.h"
@@ -32,7 +32,6 @@
 #include "structs.h"
 
 #include "output.h"
-#include "decoder.h"
 
 #ifndef FIXED_POINT
 
@@ -87,7 +86,7 @@
 
 #define CONV(a,b) ((a<<1)|(b&0x1))
 
-static void to_PCM_16bit(NeAACDecHandle hDecoder, real_t **input,
+static void to_PCM_16bit(NeAACDecStruct *hDecoder, real_t **input,
                          uint8_t channels, uint16_t frame_len,
                          int16_t **sample_buffer)
 {
@@ -152,7 +151,7 @@
     }
 }
 
-static void to_PCM_24bit(NeAACDecHandle hDecoder, real_t **input,
+static void to_PCM_24bit(NeAACDecStruct *hDecoder, real_t **input,
                          uint8_t channels, uint16_t frame_len,
                          int32_t **sample_buffer)
 {
@@ -222,7 +221,7 @@
     }
 }
 
-static void to_PCM_32bit(NeAACDecHandle hDecoder, real_t **input,
+static void to_PCM_32bit(NeAACDecStruct *hDecoder, real_t **input,
                          uint8_t channels, uint16_t frame_len,
                          int32_t **sample_buffer)
 {
@@ -292,7 +291,7 @@
     }
 }
 
-static void to_PCM_float(NeAACDecHandle hDecoder, real_t **input,
+static void to_PCM_float(NeAACDecStruct *hDecoder, real_t **input,
                          uint8_t channels, uint16_t frame_len,
                          float32_t **sample_buffer)
 {
@@ -344,7 +343,7 @@
     }
 }
 
-static void to_PCM_double(NeAACDecHandle hDecoder, real_t **input,
+static void to_PCM_double(NeAACDecStruct *hDecoder, real_t **input,
                           uint8_t channels, uint16_t frame_len,
                           double **sample_buffer)
 {
@@ -396,7 +395,7 @@
     }
 }
 
-void *output_to_PCM(NeAACDecHandle hDecoder,
+void *output_to_PCM(NeAACDecStruct *hDecoder,
                     real_t **input, void *sample_buffer, uint8_t channels,
                     uint16_t frame_len, uint8_t format)
 {
@@ -466,7 +465,7 @@
     }
 }
 
-void* output_to_PCM(NeAACDecHandle hDecoder,
+void* output_to_PCM(NeAACDecStruct *hDecoder,
                     real_t **input, void *sample_buffer, uint8_t channels,
                     uint16_t frame_len, uint8_t format)
 {
--- a/libfaad/output.h
+++ b/libfaad/output.h
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: output.h,v 1.25 2007/11/01 12:33:32 menno Exp $
+** $Id: output.h,v 1.26 2009/01/26 23:51:15 menno Exp $
 **/
 
 #ifndef __OUTPUT_H__
@@ -35,7 +35,7 @@
 extern "C" {
 #endif
 
-void* output_to_PCM(NeAACDecHandle hDecoder,
+void* output_to_PCM(NeAACDecStruct *hDecoder,
                     real_t **input,
                     void *samplebuffer,
                     uint8_t channels,
--- a/libfaad/specrec.c
+++ b/libfaad/specrec.c
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: specrec.c,v 1.61 2008/09/19 23:31:40 menno Exp $
+** $Id: specrec.c,v 1.62 2009/01/26 23:51:15 menno Exp $
 **/
 
 /*
@@ -58,7 +58,7 @@
 
 
 /* static function declarations */
-static uint8_t quant_to_spec(NeAACDecHandle hDecoder,
+static uint8_t quant_to_spec(NeAACDecStruct *hDecoder,
                              ic_stream *ics, int16_t *quant_data,
                              real_t *spec_data, uint16_t frame_len);
 
@@ -300,7 +300,7 @@
     in section named section. This offset depends on window_sequence and
     scale_factor_grouping and is needed to decode the spectral_data().
 */
-uint8_t window_grouping_info(NeAACDecHandle hDecoder, ic_stream *ics)
+uint8_t window_grouping_info(NeAACDecStruct *hDecoder, ic_stream *ics)
 {
     uint8_t i, g;
 
@@ -546,7 +546,7 @@
   - Within a scalefactor window band, the coefficients are in ascending
     spectral order.
 */
-static uint8_t quant_to_spec(NeAACDecHandle hDecoder,
+static uint8_t quant_to_spec(NeAACDecStruct *hDecoder,
                              ic_stream *ics, int16_t *quant_data,
                              real_t *spec_data, uint16_t frame_len)
 {
@@ -680,7 +680,7 @@
     return error;
 }
 
-static uint8_t allocate_single_channel(NeAACDecHandle hDecoder, uint8_t channel,
+static uint8_t allocate_single_channel(NeAACDecStruct *hDecoder, uint8_t channel,
                                        uint8_t output_channels)
 {
     int mul = 1;
@@ -781,7 +781,7 @@
     return 0;
 }
 
-static uint8_t allocate_channel_pair(NeAACDecHandle hDecoder,
+static uint8_t allocate_channel_pair(NeAACDecStruct *hDecoder,
                                      uint8_t channel, uint8_t paired_channel)
 {
     int mul = 1;
@@ -886,7 +886,7 @@
     return 0;
 }
 
-uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics,
+uint8_t reconstruct_single_channel(NeAACDecStruct *hDecoder, ic_stream *ics,
                                    element *sce, int16_t *spec_data)
 {
     uint8_t retval;
@@ -1099,7 +1099,7 @@
     return 0;
 }
 
-uint8_t reconstruct_channel_pair(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
+uint8_t reconstruct_channel_pair(NeAACDecStruct *hDecoder, ic_stream *ics1, ic_stream *ics2,
                                  element *cpe, int16_t *spec_data1, int16_t *spec_data2)
 {
     uint8_t retval;
--- a/libfaad/specrec.h
+++ b/libfaad/specrec.h
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: specrec.h,v 1.32 2007/11/01 12:33:36 menno Exp $
+** $Id: specrec.h,v 1.33 2009/01/26 23:51:15 menno Exp $
 **/
 
 #ifndef __SPECREC_H__
@@ -37,10 +37,10 @@
 
 #include "syntax.h"
 
-uint8_t window_grouping_info(NeAACDecHandle hDecoder, ic_stream *ics);
-uint8_t reconstruct_channel_pair(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
+uint8_t window_grouping_info(NeAACDecStruct *hDecoder, ic_stream *ics);
+uint8_t reconstruct_channel_pair(NeAACDecStruct *hDecoder, ic_stream *ics1, ic_stream *ics2,
                                  element *cpe, int16_t *spec_data1, int16_t *spec_data2);
-uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics, element *sce,
+uint8_t reconstruct_single_channel(NeAACDecStruct *hDecoder, ic_stream *ics, element *sce,
                                 int16_t *spec_data);
 
 #ifdef __cplusplus
--- a/libfaad/structs.h
+++ b/libfaad/structs.h
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: structs.h,v 1.48 2008/09/22 17:55:09 menno Exp $
+** $Id: structs.h,v 1.49 2009/01/26 23:51:15 menno Exp $
 **/
 
 #ifndef __STRUCTS_H__
@@ -312,29 +312,6 @@
     ic_stream ics2;
 } element; /* syntax element (SCE, CPE, LFE) */
 
-typedef struct mp4AudioSpecificConfig
-{
-    /* Audio Specific Info */
-    /*uint8_t*/ unsigned char objectTypeIndex;
-    /*uint8_t*/ unsigned char samplingFrequencyIndex;
-    /*uint32_t*/ unsigned long samplingFrequency;
-    /*uint8_t*/ unsigned char channelsConfiguration;
-
-    /* GA Specific Info */
-    /*uint8_t*/ unsigned char frameLengthFlag;
-    /*uint8_t*/ unsigned char dependsOnCoreCoder;
-    /*uint16_t*/ unsigned short coreCoderDelay;
-    /*uint8_t*/ unsigned char extensionFlag;
-    /*uint8_t*/ unsigned char aacSectionDataResilienceFlag;
-    /*uint8_t*/ unsigned char aacScalefactorDataResilienceFlag;
-    /*uint8_t*/ unsigned char aacSpectralDataResilienceFlag;
-    /*uint8_t*/ unsigned char epConfig;
-
-    /*uint8_t*/ signed char sbr_present_flag;
-    /*uint8_t*/ signed char forceUpSampling;
-    /*uint8_t*/ signed char downSampledSBR;
-} mp4AudioSpecificConfig;
-
 #define MAX_ASC_BYTES 64
 typedef struct {
     int inited;
@@ -352,44 +329,6 @@
     uint32_t ASCbits;
 } latm_header;
 
-typedef struct NeAACDecConfiguration
-{
-    /*uint8_t*/ unsigned char defObjectType;
-    /*uint32_t*/ unsigned long defSampleRate;
-    /*uint8_t*/ unsigned char outputFormat;
-    /*uint8_t*/ unsigned char downMatrix;
-    /*uint8_t*/ unsigned char useOldADTSFormat;
-    /*uint8_t*/ unsigned char dontUpSampleImplicitSBR;
-} NeAACDecConfiguration, *NeAACDecConfigurationPtr;
-
-typedef struct NeAACDecFrameInfo
-{
-    /*uint32_t*/ unsigned long bytesconsumed;
-    /*uint32_t*/ unsigned long samples;
-    /*uint8_t*/ unsigned char channels;
-    /*uint8_t*/ unsigned char error;
-    /*uint32_t*/ unsigned long samplerate;
-
-    /* SBR: 0: off, 1: on; normal, 2: on; downsampled */
-    /*uint8_t*/ unsigned char sbr;
-
-    /* MPEG-4 ObjectType */
-    /*uint8_t*/ unsigned char object_type;
-
-    /* AAC header type; MP4 will be signalled as RAW also */
-    /*uint8_t*/ unsigned char header_type;
-
-    /* multichannel configuration */
-    /*uint8_t*/ unsigned char num_front_channels;
-    /*uint8_t*/ unsigned char num_side_channels;
-    /*uint8_t*/ unsigned char num_back_channels;
-    /*uint8_t*/ unsigned char num_lfe_channels;
-    /*uint8_t*/ unsigned char channel_position[MAX_CHANNELS];
-
-    /* PS: 0: off, 1: on */
-    /*uint8_t*/ unsigned char ps;
-} NeAACDecFrameInfo;
-
 typedef struct
 {
     uint8_t adts_header_present;
@@ -496,7 +435,7 @@
 #endif
 	latm_header latm_config;
 	const unsigned char *cmes;
-} NeAACDecStruct, *NeAACDecHandle;
+} NeAACDecStruct;
 
 
 
--- a/libfaad/syntax.c
+++ b/libfaad/syntax.c
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: syntax.c,v 1.92 2008/04/06 00:34:30 menno Exp $
+** $Id: syntax.c,v 1.93 2009/01/26 23:51:15 menno Exp $
 **/
 
 /*
@@ -39,7 +39,6 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "decoder.h"
 #include "syntax.h"
 #include "specrec.h"
 #include "huffman.h"
@@ -57,41 +56,41 @@
 
 
 /* static function declarations */
-static void decode_sce_lfe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
+static void decode_sce_lfe(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
                            uint8_t id_syn_ele);
-static void decode_cpe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
+static void decode_cpe(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
                        uint8_t id_syn_ele);
-static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
+static uint8_t single_lfe_channel_element(NeAACDecStruct *hDecoder, bitfile *ld,
                                           uint8_t channel, uint8_t *tag);
-static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld,
+static uint8_t channel_pair_element(NeAACDecStruct *hDecoder, bitfile *ld,
                                     uint8_t channel, uint8_t *tag);
 #ifdef COUPLING_DEC
-static uint8_t coupling_channel_element(NeAACDecHandle hDecoder, bitfile *ld);
+static uint8_t coupling_channel_element(NeAACDecStruct *hDecoder, bitfile *ld);
 #endif
-static uint16_t data_stream_element(NeAACDecHandle hDecoder, bitfile *ld);
+static uint16_t data_stream_element(NeAACDecStruct *hDecoder, bitfile *ld);
 static uint8_t program_config_element(program_config *pce, bitfile *ld);
-static uint8_t fill_element(NeAACDecHandle hDecoder, bitfile *ld, drc_info *drc
+static uint8_t fill_element(NeAACDecStruct *hDecoder, bitfile *ld, drc_info *drc
 #ifdef SBR_DEC
                             ,uint8_t sbr_ele
 #endif
                             );
-static uint8_t individual_channel_stream(NeAACDecHandle hDecoder, element *ele,
+static uint8_t individual_channel_stream(NeAACDecStruct *hDecoder, element *ele,
                                          bitfile *ld, ic_stream *ics, uint8_t scal_flag,
                                          int16_t *spec_data);
-static uint8_t ics_info(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+static uint8_t ics_info(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld,
                         uint8_t common_window);
-static uint8_t section_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld);
-static uint8_t scale_factor_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld);
+static uint8_t section_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld);
+static uint8_t scale_factor_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld);
 #ifdef SSR_DEC
 static void gain_control_data(bitfile *ld, ic_stream *ics);
 #endif
-static uint8_t spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+static uint8_t spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld,
                              int16_t *spectral_data);
 static uint16_t extension_payload(bitfile *ld, drc_info *drc, uint16_t count);
 static uint8_t pulse_data(ic_stream *ics, pulse_info *pul, bitfile *ld);
 static void tns_data(ic_stream *ics, tns_info *tns, bitfile *ld);
 #ifdef LTP_DEC
-static uint8_t ltp_data(NeAACDecHandle hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld);
+static uint8_t ltp_data(NeAACDecStruct *hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld);
 #endif
 static uint8_t adts_fixed_header(adts_header *adts, bitfile *ld);
 static void adts_variable_header(adts_header *adts, bitfile *ld);
@@ -98,10 +97,10 @@
 static void adts_error_check(adts_header *adts, bitfile *ld);
 static uint8_t dynamic_range_info(bitfile *ld, drc_info *drc);
 static uint8_t excluded_channels(bitfile *ld, drc_info *drc);
-static uint8_t side_info(NeAACDecHandle hDecoder, element *ele,
+static uint8_t side_info(NeAACDecStruct *hDecoder, element *ele,
                          bitfile *ld, ic_stream *ics, uint8_t scal_flag);
 #ifdef DRM
-static int8_t DRM_aac_scalable_main_header(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
+static int8_t DRM_aac_scalable_main_header(NeAACDecStruct *hDecoder, ic_stream *ics1, ic_stream *ics2,
                                            bitfile *ld, uint8_t this_layer_stereo);
 #endif
 
@@ -323,7 +322,7 @@
     return 0;
 }
 
-static void decode_sce_lfe(NeAACDecHandle hDecoder,
+static void decode_sce_lfe(NeAACDecStruct *hDecoder,
                            NeAACDecFrameInfo *hInfo, bitfile *ld,
                            uint8_t id_syn_ele)
 {
@@ -368,7 +367,7 @@
     hDecoder->fr_ch_ele++;
 }
 
-static void decode_cpe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
+static void decode_cpe(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
                        uint8_t id_syn_ele)
 {
     uint8_t channels = hDecoder->fr_channels;
@@ -416,7 +415,7 @@
     hDecoder->fr_ch_ele++;
 }
 
-void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
+void raw_data_block(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo,
                     bitfile *ld, program_config *pce, drc_info *drc)
 {
     uint8_t id_syn_ele;
@@ -590,7 +589,7 @@
 
 /* Table 4.4.4 and */
 /* Table 4.4.9 */
-static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
+static uint8_t single_lfe_channel_element(NeAACDecStruct *hDecoder, bitfile *ld,
                                           uint8_t channel, uint8_t *tag)
 {
     uint8_t retval = 0;
@@ -637,7 +636,7 @@
 }
 
 /* Table 4.4.5 */
-static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld,
+static uint8_t channel_pair_element(NeAACDecStruct *hDecoder, bitfile *ld,
                                     uint8_t channels, uint8_t *tag)
 {
     ALIGN int16_t spec_data1[1024] = {0};
@@ -767,7 +766,7 @@
 }
 
 /* Table 4.4.6 */
-static uint8_t ics_info(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+static uint8_t ics_info(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld,
                         uint8_t common_window)
 {
     uint8_t retval = 0;
@@ -918,7 +917,7 @@
 
 #ifdef COUPLING_DEC
 /* Table 4.4.8: Currently just for skipping the bits... */
-static uint8_t coupling_channel_element(NeAACDecHandle hDecoder, bitfile *ld)
+static uint8_t coupling_channel_element(NeAACDecStruct *hDecoder, bitfile *ld)
 {
     uint8_t c, result = 0;
     uint8_t ind_sw_cce_flag = 0;
@@ -1011,7 +1010,7 @@
 #endif
 
 /* Table 4.4.10 */
-static uint16_t data_stream_element(NeAACDecHandle hDecoder, bitfile *ld)
+static uint16_t data_stream_element(NeAACDecStruct *hDecoder, bitfile *ld)
 {
     uint8_t byte_aligned;
     uint16_t i, count;
@@ -1040,7 +1039,7 @@
 }
 
 /* Table 4.4.11 */
-static uint8_t fill_element(NeAACDecHandle hDecoder, bitfile *ld, drc_info *drc
+static uint8_t fill_element(NeAACDecStruct *hDecoder, bitfile *ld, drc_info *drc
 #ifdef SBR_DEC
                             ,uint8_t sbr_ele
 #endif
@@ -1219,7 +1218,7 @@
 
 #ifdef DRM
 /* Table 4.4.13 ASME */
-void DRM_aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
+void DRM_aac_scalable_main_element(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo,
                                    bitfile *ld, program_config *pce, drc_info *drc)
 {
     uint8_t retval = 0;
@@ -1429,7 +1428,7 @@
 }
 
 /* Table 4.4.15 */
-static int8_t DRM_aac_scalable_main_header(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
+static int8_t DRM_aac_scalable_main_header(NeAACDecStruct *hDecoder, ic_stream *ics1, ic_stream *ics2,
                                            bitfile *ld, uint8_t this_layer_stereo)
 {
     uint8_t retval = 0;
@@ -1497,7 +1496,7 @@
 }
 #endif
 
-static uint8_t side_info(NeAACDecHandle hDecoder, element *ele,
+static uint8_t side_info(NeAACDecStruct *hDecoder, element *ele,
                          bitfile *ld, ic_stream *ics, uint8_t scal_flag)
 {
     uint8_t result;
@@ -1590,7 +1589,7 @@
 }
 
 /* Table 4.4.24 */
-static uint8_t individual_channel_stream(NeAACDecHandle hDecoder, element *ele,
+static uint8_t individual_channel_stream(NeAACDecStruct *hDecoder, element *ele,
                                          bitfile *ld, ic_stream *ics, uint8_t scal_flag,
                                          int16_t *spec_data)
 {
@@ -1650,7 +1649,7 @@
 }
 
 /* Table 4.4.25 */
-static uint8_t section_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld)
+static uint8_t section_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld)
 {
     uint8_t g;
     uint8_t sect_esc_val, sect_bits;
@@ -1897,7 +1896,7 @@
 }
 
 /* Table 4.4.26 */
-static uint8_t scale_factor_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld)
+static uint8_t scale_factor_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld)
 {
     uint8_t ret = 0;
 #ifdef PROFILE
@@ -2005,7 +2004,7 @@
 
 #ifdef LTP_DEC
 /* Table 4.4.28 */
-static uint8_t ltp_data(NeAACDecHandle hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld)
+static uint8_t ltp_data(NeAACDecStruct *hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld)
 {
     uint8_t sfb, w;
 
@@ -2068,7 +2067,7 @@
 #endif
 
 /* Table 4.4.29 */
-static uint8_t spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+static uint8_t spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld,
                              int16_t *spectral_data)
 {
     int8_t i;
--- a/libfaad/syntax.h
+++ b/libfaad/syntax.h
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: syntax.h,v 1.59 2008/03/23 23:03:30 menno Exp $
+** $Id: syntax.h,v 1.60 2009/01/26 23:51:17 menno Exp $
 **/
 
 #ifndef __SYNTAX_H__
@@ -35,7 +35,6 @@
 extern "C" {
 #endif
 
-#include "decoder.h"
 #include "bits.h"
 
 #define MAIN       1
@@ -114,12 +113,12 @@
 
 uint8_t adts_frame(adts_header *adts, bitfile *ld);
 void get_adif_header(adif_header *adif, bitfile *ld);
-void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
+void raw_data_block(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo,
                     bitfile *ld, program_config *pce, drc_info *drc);
-uint8_t reordered_spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld,
                                 int16_t *spectral_data);
 #ifdef DRM
-void DRM_aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
+void DRM_aac_scalable_main_element(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo,
                                    bitfile *ld, program_config *pce, drc_info *drc);
 #endif
 uint32_t faad_latm_frame(latm_header *latm, bitfile *ld);