diff options
Diffstat (limited to 'Src/aacdec/incs/mp4dec_asc')
-rw-r--r-- | Src/aacdec/incs/mp4dec_asc/audioobjecttypes.h | 89 | ||||
-rw-r--r-- | Src/aacdec/incs/mp4dec_asc/audiospecificconfig_c.h | 127 | ||||
-rw-r--r-- | Src/aacdec/incs/mp4dec_asc/celpspecificconfig_c.h | 64 | ||||
-rw-r--r-- | Src/aacdec/incs/mp4dec_asc/eldspecificconfig_c.h | 75 | ||||
-rw-r--r-- | Src/aacdec/incs/mp4dec_asc/epspecificconfig_c.h | 89 | ||||
-rw-r--r-- | Src/aacdec/incs/mp4dec_asc/gaspecificconfig_c.h | 61 | ||||
-rw-r--r-- | Src/aacdec/incs/mp4dec_asc/hvxcspecificconfig_c.h | 43 | ||||
-rw-r--r-- | Src/aacdec/incs/mp4dec_asc/mpeg12specificconfig_c.h | 43 | ||||
-rw-r--r-- | Src/aacdec/incs/mp4dec_asc/programcfg_c.h | 140 | ||||
-rw-r--r-- | Src/aacdec/incs/mp4dec_asc/slsspecificconfig_c.h | 51 | ||||
-rw-r--r-- | Src/aacdec/incs/mp4dec_asc/spatialspecificconfig_c.h | 49 |
11 files changed, 831 insertions, 0 deletions
diff --git a/Src/aacdec/incs/mp4dec_asc/audioobjecttypes.h b/Src/aacdec/incs/mp4dec_asc/audioobjecttypes.h new file mode 100644 index 00000000..b064a209 --- /dev/null +++ b/Src/aacdec/incs/mp4dec_asc/audioobjecttypes.h @@ -0,0 +1,89 @@ +/***************************************************************************\ + * + * (C) copyright Fraunhofer - IIS (1998) + * All Rights Reserved + * + * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_asc/audioobjecttypes.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $ + * contents/description: the MPEG-4 Audio object types + * + * This software and/or program is protected by copyright law and + * international treaties. Any reproduction or distribution of this + * software and/or program, or any portion of it, may result in severe + * civil and criminal penalties, and will be prosecuted to the maximum + * extent possible under law. + * +\***************************************************************************/ + +#ifndef __AUDIOOBJECTTYPES_H__ +#define __AUDIOOBJECTTYPES_H__ + +typedef enum _AUDIO_OBJECT_TYPE +{ + AOT_NULL_OBJECT = 0, /* Null Object (PCM or invalid) */ + AOT_AAC_MAIN = 1, /* AAC Main Object */ + AOT_AAC_LC = 2, /* AAC LC Object */ + AOT_AAC_SSR = 3, /* AAC SSR Object */ + AOT_AAC_LTP = 4, /* AAC LTP Object */ + AOT_SBR = 5, /* Meta: SBR, Spectral Band Replication */ + AOT_AAC_SCAL = 6, /* AAC Scalable Object */ + AOT_TWIN_VQ = 7, /* TwinVQ Object */ + AOT_CELP = 8, /* CELP Object */ + AOT_HVXC = 9, /* HVXC Object */ + AOT_RSVD_10 = 10, /* (reserved) */ + AOT_RSVD_11 = 11, /* (reserved) */ + AOT_TTSI = 12, /* TTSI Object */ + AOT_MAIN_SYNTH = 13, /* Main Synthetic Object */ + AOT_WAV_TAB_SYNTH = 14, /* Wavetable Synthesis Object */ + AOT_GEN_MIDI = 15, /* General MIDI Object */ + AOT_ALG_SYNTH_AUD_FX = 16, /* Algorithmic Synthesis and Audio FX Object */ + AOT_ER_AAC_LC = 17, /* Error Resilient(ER) AAC LC Object */ + AOT_RSVD_18 = 18, /* (reserved) */ + AOT_ER_AAC_LTP = 19, /* Error Resilient(ER) AAC LTP Object */ + AOT_ER_AAC_SCAL = 20, /* Error Resilient(ER) AAC Scalable Object */ + AOT_ER_TWIN_VQ = 21, /* Error Resilient(ER) TwinVQ Object */ + AOT_ER_BSAC = 22, /* Error Resilient(ER) BSAC Object */ + AOT_ER_AAC_LD = 23, /* Error Resilient(ER) AAC LD Object */ + AOT_ER_CELP = 24, /* Error Resilient(ER) CELP Object */ + AOT_ER_HVXC = 25, /* Error Resilient(ER) HVXC Object */ + AOT_ER_HILN = 26, /* Error Resilient(ER) HILN Object */ + AOT_ER_PARA = 27, /* Error Resilient(ER) Parametric Object */ + AOT_RSVD_28 = 28, /* might become SSC */ + AOT_PS = 29, /* Meta: PS, Parametric Stereo */ + AOT_MPEGS = 30, /* MPEG surround */ + + AOT_ESCAPE = 31, /* escape AOT for AOTs > 31 */ + + AOT_MP3ONMP4_L1 = 32, /* MPEG-Layer-1 in MPEG-4 */ + AOT_MP3ONMP4_L2 = 33, /* MPEG-Layer-2 in MPEG-4 */ + AOT_MP3ONMP4_L3 = 34, /* MPEG-Layer-3 in MPEG-4 */ + AOT_RSVD_35 = 35, /* DST */ + AOT_RSVD_36 = 36, /* ALS */ + AOT_SLS = 37, /* SLS w/ core */ + AOT_SLS_NC = 38, /* SLS non-core */ + AOT_ER_AAC_ELD = 39, /* ER AAC LD with LD filterbank */ + + AOT_RSVD_40 = 40, /* reserved */ + AOT_RSVD_41 = 41, /* reserved */ + AOT_RSVD_42 = 42, /* reserved */ + + AOT_SAOC = 43, /* SAOC */ + AOT_LD_MPEGS = 44, /* Low Delay MPEG surround */ + + AOT_LZM30 = 94, /* (reserved) */ + AOT_LZM31 = 95, /* (reserved) */ + + AOT_MP2_AAC_MAIN = 128, /* virtual AOT MP2 Main Profile */ + AOT_MP2_AAC_LC = 129, /* virtual AOT MP2 Low Complexity Profile */ + AOT_MP2_AAC_SSR = 130, /* virtual AOT MP2 Scalable Sampling Rate Profile */ + + AOT_PLAIN_MP1 = 131, /* virtual AOT for plain mp1 decoding */ + AOT_PLAIN_MP2 = 132, /* virtual AOT for plain mp2 decoding */ + AOT_PLAIN_MP3 = 133, /* virtual AOT for plain mp3 decoding */ + AOT_DAB = 134, /* virtual AOT for DAB (Layer2 w/ scalefactor CRC) */ + + AOT_INVALID = 555, /* dummy AOT for empty switch/case statements */ + AOT_DUMMY = 556 /* dummy AOT for empty switch/case statements */ + +} AUDIO_OBJECT_TYPE; + +#endif diff --git a/Src/aacdec/incs/mp4dec_asc/audiospecificconfig_c.h b/Src/aacdec/incs/mp4dec_asc/audiospecificconfig_c.h new file mode 100644 index 00000000..cea33cdb --- /dev/null +++ b/Src/aacdec/incs/mp4dec_asc/audiospecificconfig_c.h @@ -0,0 +1,127 @@ +/***************************************************************************\ + * + * (C) copyright Fraunhofer - IIS (1998) + * All Rights Reserved + * + * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_asc/audiospecificconfig_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $ + * project : MPEG-4 Audio Decoder + * contents/description: interface to audioSpecificConfig + * + * This software and/or program is protected by copyright law and + * international treaties. Any reproduction or distribution of this + * software and/or program, or any portion of it, may result in severe + * civil and criminal penalties, and will be prosecuted to the maximum + * extent possible under law. + * +\***************************************************************************/ + +#ifndef __AUDIOSPECIFICCONFIG_C_H__ +#define __AUDIOSPECIFICCONFIG_C_H__ + +#include "mp4dec_asc/audioobjecttypes.h" +#include "mp4dec_asc/gaspecificconfig_c.h" +#include "mp4dec_asc/celpspecificconfig_c.h" +#include "mp4dec_asc/hvxcspecificconfig_c.h" +#include "mp4dec_asc/spatialspecificconfig_c.h" +#include "mp4dec_asc/slsspecificconfig_c.h" +#include "mp4dec_asc/mpeg12specificconfig_c.h" +#include "mp4dec_asc/epspecificconfig_c.h" +#include "mp4dec_asc/eldspecificconfig_c.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct CSBitStream; + +typedef struct CSAudioSpecificConfig { + + AUDIO_OBJECT_TYPE m_aot; + AUDIO_OBJECT_TYPE m_origAot; + unsigned int m_samplingFrequencyIndex; + unsigned int m_samplingFrequency; + int m_channelConfiguration; + int m_epConfig; + unsigned int m_directMapping; + + /* SBR/PS extension */ + int m_sbrPresentFlag; + int m_psPresentFlag; + int m_mpsPresentFlag; + int m_saocPresentFlag; + int m_ldmpsPresentFlag; + AUDIO_OBJECT_TYPE m_extensionAudioObjectType; + unsigned int m_extensionSamplingFrequencyIndex; + unsigned int m_extensionSamplingFrequency; + + /* */ + unsigned int m_nrOfStreams; + unsigned int m_avgBitRate; + unsigned int m_layer; + + /* derived values */ + int m_channels; + unsigned int m_samplesPerFrame; + + /* aot-specific asc's */ + CSGaSpecificConfig m_gaSpecificConfig; + CSCelpSpecificConfig m_celpSpecificConfig; + HvxcSpecificConfig m_hvxcSpecificConfig; + CSSpatialSpecificConfig m_mpegsSpecificConfig; + CSSpatialSpecificConfig m_saocSpecificConfig; + CSSpatialSpecificConfig m_ldmpegsSpecificConfig; + CSMpeg12SpecificConfig m_mpeg12SpecificConfig; + CSSlsSpecificConfig m_slsSpecificConfig; + CSEldSpecificConfig m_eldSpecificConfig; + CEpSpecificConfig m_epSpecificConfig; + +} CSAudioSpecificConfig, *CSAudioSpecificConfigPtr; + +int AudioSpecificConfig_ParseLatm_amv0( + CSAudioSpecificConfigPtr self, + struct CSBitStream *bs + ); + +int AudioSpecificConfig_ParseLatm_amv1( + CSAudioSpecificConfigPtr self, + struct CSBitStream *bs + ); + +int AudioSpecificConfig_ParseExt( + CSAudioSpecificConfigPtr self, + CSAudioSpecificConfigPtr baselayer, + struct CSBitStream *bs, + unsigned int streamsPerLayer, + unsigned int avgBitrate, + unsigned int latm_flag + ); + +void AudioSpecificConfig_Copy( + CSAudioSpecificConfigPtr self, + const CSAudioSpecificConfigPtr asc + ); + +int AudioSpecificConfig_Compare( + const CSAudioSpecificConfigPtr self, + const CSAudioSpecificConfigPtr asc + ); + +#ifdef ASC_PRINT +int AudioSpecificConfig_Print( + const CSAudioSpecificConfigPtr asc, + char string[] + ); +#endif + +AUDIO_OBJECT_TYPE __GetAotFromAsc(CSAudioSpecificConfigPtr asc); +int __GetLayerFromAsc( + CSAudioSpecificConfigPtr asc, + CSAudioSpecificConfigPtr asc_base + ); +char* __GetAotString(AUDIO_OBJECT_TYPE aot); + +#ifdef __cplusplus +} +#endif + +#endif /* __AUDIOSPECIFICCONFIG_H__ */ diff --git a/Src/aacdec/incs/mp4dec_asc/celpspecificconfig_c.h b/Src/aacdec/incs/mp4dec_asc/celpspecificconfig_c.h new file mode 100644 index 00000000..0c157fb9 --- /dev/null +++ b/Src/aacdec/incs/mp4dec_asc/celpspecificconfig_c.h @@ -0,0 +1,64 @@ +/***************************************************************************\ + * + * (C) copyright Fraunhofer - IIS (2002) + * All Rights Reserved + * + * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_asc/celpspecificconfig_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $ + * project : MPEG-4 Audio Decoder + * contents/description: celp specific config interface + * + * This software and/or program is protected by copyright law and + * international treaties. Any reproduction or distribution of this + * software and/or program, or any portion of it, may result in severe + * civil and criminal penalties, and will be prosecuted to the maximum + * extent possible under law. + * +\***************************************************************************/ + +#ifndef __CELPSPECIFICCONFIG_C_H__ +#define __CELPSPECIFICCONFIG_C_H__ + +#include "mp4dec_asc/audioobjecttypes.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct CSBitStream; + +enum { + MPE = 0, + RPE = 1, + fs8KHz = 0, + fs16KHz = 1 +}; + +typedef struct CSCelpSpecificConfig +{ + int m_IsBaseLayer; + int m_ExcitationMode; + int m_SampleRateMode; + int m_FineRateControl; + int m_RPE_Configuration; + int m_MPE_Configuration; + int m_NumEnhLayers; + int m_BandwidthScalabilityMode; + int m_SilenceCompression; + int m_BWS_configuration; + int m_CelpBrsId; + + unsigned int m_isBWSLayer; + +} CSCelpSpecificConfig, *CSCelpSpecificConfigPtr; + +void CelpSpecificConfig_Parse(CSCelpSpecificConfigPtr self, CSCelpSpecificConfigPtr baselayer, const AUDIO_OBJECT_TYPE aot, struct CSBitStream *bs); +int CelpSpecificConfig_GetSamplesPerFrame(CSCelpSpecificConfigPtr self); +int CelpSpecificConfig_GetLayer(CSCelpSpecificConfigPtr csc, CSCelpSpecificConfigPtr csc_base); +void CelpSpecificConfig_Copy(CSCelpSpecificConfigPtr dst, const CSCelpSpecificConfigPtr src); +int CelpSpecificConfig_Print(CSCelpSpecificConfigPtr self, char string[], const AUDIO_OBJECT_TYPE aot); + +#ifdef __cplusplus +} +#endif + +#endif /* __CELPSPECIFICCONFIG_H__ */ diff --git a/Src/aacdec/incs/mp4dec_asc/eldspecificconfig_c.h b/Src/aacdec/incs/mp4dec_asc/eldspecificconfig_c.h new file mode 100644 index 00000000..5f6f4a3b --- /dev/null +++ b/Src/aacdec/incs/mp4dec_asc/eldspecificconfig_c.h @@ -0,0 +1,75 @@ +/***************************************************************************\ + * + * (C) copyright Fraunhofer - IIS (2007) + * All Rights Reserved + * + * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_asc/eldspecificconfig_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $ + * project : MPEG-4 Audio Decoder + * contents/description: eld specific specific config parser - interface + * + * This software and/or program is protected by copyright law and + * international treaties. Any reproduction or distribution of this + * software and/or program, or any portion of it, may result in severe + * civil and criminal penalties, and will be prosecuted to the maximum + * extent possible under law. + * +\***************************************************************************/ + +#ifndef __ELDPECIFICCONFIG_C_H__ +#define __ELDPECIFICCONFIG_C_H__ + +#include "mp4dec_asc/audioobjecttypes.h" + +#define MAX_SBR_HEADER_SIZE 4 +#define MAX_ELD_SBR_ELEMENTS 8 +#define MAX_ELD_EXTENSIONS 6 +#define MAX_ELD_EXTENSIONS_LENGTH 32 + +#define ASC_ELD_ELDEXT_TERM 0x0000 +#define ASC_ELD_ELDEXT_SAOC 0x0001 +#define ASC_ELD_ELDEXT_LDSAC 0x0002 +#define ASC_ELD_ELDEXT_PSEUDOMC 0x0003 + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct CSBitStream; + +typedef struct { + int tag; + int length; + unsigned char config_payload[MAX_ELD_EXTENSIONS_LENGTH]; +} ELD_EXTENSION; + +typedef struct CSEldSpecificConfig { + unsigned int m_frameLengthFlag; + + unsigned int m_vcb11Flag; + unsigned int m_rvlcFlag; + unsigned int m_hcrFlag; + + unsigned int m_ldSbrPresentFlag; + unsigned int m_ldSbrSamplingRateFlag; + unsigned int m_ldSbrCrcFlag; + + unsigned int m_useLDQMFTimeAlignment; + + unsigned char m_ldSbrHeaderData[MAX_ELD_SBR_ELEMENTS][MAX_SBR_HEADER_SIZE]; + ELD_EXTENSION m_eldExtension[MAX_ELD_EXTENSIONS]; + +} CSEldSpecificConfig, *CSEldSpecificConfigPtr; + +void EldSpecificConfig_Parse(CSEldSpecificConfigPtr self, struct CSBitStream *bs, const int channelConfiguration, const AUDIO_OBJECT_TYPE aot, int* ldmpspresent, int* saocpresent); +void EldSpecificConfig_Copy(CSEldSpecificConfigPtr self, const CSEldSpecificConfigPtr gasc); +int EldSpecificConfig_Compare(const CSEldSpecificConfigPtr self, const CSEldSpecificConfigPtr eldsc, const AUDIO_OBJECT_TYPE aot); +#ifdef ASC_PRINT +int EldSpecificConfig_Print(const CSEldSpecificConfigPtr eldsc, char string[], const int channelConfiguration, const AUDIO_OBJECT_TYPE aot); +#endif +ELD_EXTENSION* getEldExtension( int tag, const CSEldSpecificConfigPtr eldsc); + +#ifdef __cplusplus +} +#endif + +#endif /* __ELDPECIFICCONFIG_H__ */ diff --git a/Src/aacdec/incs/mp4dec_asc/epspecificconfig_c.h b/Src/aacdec/incs/mp4dec_asc/epspecificconfig_c.h new file mode 100644 index 00000000..e9cc1a5d --- /dev/null +++ b/Src/aacdec/incs/mp4dec_asc/epspecificconfig_c.h @@ -0,0 +1,89 @@ +/***************************************************************************\ + * + * (C) copyright Fraunhofer - IIS (2002) + * All Rights Reserved + * + * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_asc/epspecificconfig_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $ + * project : MPEG-4 Audio Decoder + * contents/description: EP specific config interface + * + * This software and/or program is protected by copyright law and + * international treaties. Any reproduction or distribution of this + * software and/or program, or any portion of it, may result in severe + * civil and criminal penalties, and will be prosecuted to the maximum + * extent possible under law. + * +\***************************************************************************/ + + +#ifndef __EPSPECIFICCONFIG_C_H__ +#define __EPSPECIFICCONFIG_C_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct CSBitStream; + +typedef struct CEpClassConfig { + unsigned int m_LengthEsc; + unsigned int m_RateEsc; + unsigned int m_CrcLengthEsc; + + unsigned int m_ConcatenateFlag; + unsigned int m_FecType; + unsigned int m_TerminationSwitch; + + unsigned int m_InterleaveSwitch; + unsigned int m_ClassOptional; + + unsigned int m_NoBitsForLength; + unsigned int m_ClassLength; + + unsigned int m_ClassRate; + unsigned int m_ClassCrcLength; +} CEpClassConfig, *CEpClassConfigPtr; + +typedef struct CPredSetConfig { + + unsigned int m_NoOfClasses; + unsigned int m_ClassReorderedOutput; + unsigned int *m_ClassOutputOrder; + CEpClassConfig *m_EpClassConfig; +} CPredSetConfig, *CPredSetConfigPtr; + + +typedef struct CEPBuffer { + unsigned char* m_pData; + unsigned int m_noBytes; + unsigned int m_noBits; +} CEPBuffer, *CEPBufferPtr; + +typedef struct CEPSpecificConfig { + + unsigned int m_NoOfPredSets; + unsigned int m_InterleaveType; + unsigned int m_BitStuffing; + unsigned int m_NoOfConcatenatedFrames; + + unsigned int m_HeaderProtection; + unsigned int m_HeaderRate; + unsigned int m_HeaderCrcLength; + + unsigned int m_RSFecCapability; + + CPredSetConfig *m_psc; + CEPBuffer m_epTmpBuffer; + +} CEpSpecificConfig, *CEpSpecificConfigPtr; + +int EpSpecificConfig_Parse(CEpSpecificConfigPtr self, struct CSBitStream *bs); +int EpSpecificConfig_Copy(CEpSpecificConfigPtr self, CEpSpecificConfigPtr epsc); +int EpSpecificConfig_Compare(CEpSpecificConfigPtr self, CEpSpecificConfigPtr epsc); +void EpSpecificConfig_Free(CEpSpecificConfigPtr self); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Src/aacdec/incs/mp4dec_asc/gaspecificconfig_c.h b/Src/aacdec/incs/mp4dec_asc/gaspecificconfig_c.h new file mode 100644 index 00000000..fe96e626 --- /dev/null +++ b/Src/aacdec/incs/mp4dec_asc/gaspecificconfig_c.h @@ -0,0 +1,61 @@ +/***************************************************************************\ + * + * (C) copyright Fraunhofer - IIS (1998) + * All Rights Reserved + * + * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_asc/gaspecificconfig_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $ + * project : MPEG-4 Audio Decoder + * contents/description: global audio specific config interface + * + * This software and/or program is protected by copyright law and + * international treaties. Any reproduction or distribution of this + * software and/or program, or any portion of it, may result in severe + * civil and criminal penalties, and will be prosecuted to the maximum + * extent possible under law. + * +\***************************************************************************/ + +#ifndef __GASPECIFICCONFIG_C_H__ +#define __GASPECIFICCONFIG_C_H__ + +#include "mp4dec_asc/audioobjecttypes.h" +#include "mp4dec_asc/programcfg_c.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct CSBitStream; + +typedef struct CSGaSpecificConfig { + unsigned int m_frameLengthFlag; + unsigned int m_dependsOnCoreCoder; + unsigned int m_coreCoderDelay; + + unsigned int m_extensionFlag; + unsigned int m_extensionFlag3; + + unsigned int m_layer; + unsigned int m_numOfSubFrame; + unsigned int m_layerLength; + + unsigned int m_vcb11Flag; + unsigned int m_rvlcFlag; + unsigned int m_hcrFlag; + + CSProgramConfig m_progrConfigElement; + +} CSGaSpecificConfig, *CSGaSpecificConfigPtr; + +void GaSpecificConfig_Parse(CSGaSpecificConfigPtr self, struct CSBitStream *bs, const int channelConfiguration, const AUDIO_OBJECT_TYPE aot); +void GaSpecificConfig_Copy(CSGaSpecificConfigPtr self, const CSGaSpecificConfigPtr gasc); +int GaSpecificConfig_Compare(const CSGaSpecificConfigPtr self, const CSGaSpecificConfigPtr gasc, const AUDIO_OBJECT_TYPE aot); +#ifdef ASC_PRINT +int GaSpecificConfig_Print(const CSGaSpecificConfigPtr gasc, char string[], const int channelConfiguration, const AUDIO_OBJECT_TYPE aot); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __GASPECIFICCONFIG_H__ */ diff --git a/Src/aacdec/incs/mp4dec_asc/hvxcspecificconfig_c.h b/Src/aacdec/incs/mp4dec_asc/hvxcspecificconfig_c.h new file mode 100644 index 00000000..06a0b070 --- /dev/null +++ b/Src/aacdec/incs/mp4dec_asc/hvxcspecificconfig_c.h @@ -0,0 +1,43 @@ +/***************************************************************************\ + * + * (C) copyright Fraunhofer - IIS (2002) + * All Rights Reserved + * + * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_asc/hvxcspecificconfig_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $ + * project : MPEG-4 Audio Decoder + * contents/description: HVXC specific config interface + * + * This software and/or program is protected by copyright law and + * international treaties. Any reproduction or distribution of this + * software and/or program, or any portion of it, may result in severe + * civil and criminal penalties, and will be prosecuted to the maximum + * extent possible under law. + * +\***************************************************************************/ + +#ifndef __HVXCSPECIFICCONFIG_C_H__ +#define __HVXCSPECIFICCONFIG_C_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct CSBitStream; + +typedef struct HvxcSpecificConfig { + int m_isBaseLayer; + int m_DPvarMode; + int m_DPrateMode; + int m_DPextensionFlag; + int m_vrScalFlag; +} HvxcSpecificConfig, *HvxcSpecificConfigPtr; + +void HvxcSpecificConfig_Parse( HvxcSpecificConfigPtr self, HvxcSpecificConfigPtr baselayer, struct CSBitStream *bs); +void HvxcSpecificConfig_Copy(HvxcSpecificConfigPtr dst, const HvxcSpecificConfigPtr src); +int HvxcSpecificConfig_Print( HvxcSpecificConfigPtr self, char string[]); + +#ifdef __cplusplus +} +#endif + +#endif /* __HVXCSPECIFICCONFIG_H__ */ diff --git a/Src/aacdec/incs/mp4dec_asc/mpeg12specificconfig_c.h b/Src/aacdec/incs/mp4dec_asc/mpeg12specificconfig_c.h new file mode 100644 index 00000000..686028d5 --- /dev/null +++ b/Src/aacdec/incs/mp4dec_asc/mpeg12specificconfig_c.h @@ -0,0 +1,43 @@ +/***************************************************************************\ + * + * (C) copyright Fraunhofer - IIS (2003) + * All Rights Reserved + * + * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_asc/mpeg12specificconfig_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $ + * project : MPEG-4 Audio Decoder + * contents/description: MP3OnMP4 specific config interface + * + * This software and/or program is protected by copyright law and + * international treaties. Any reproduction or distribution of this + * software and/or program, or any portion of it, may result in severe + * civil and criminal penalties, and will be prosecuted to the maximum + * extent possible under law. + * +\***************************************************************************/ + +#ifndef __MPEG12SPECIFICCONFIG_C_H__ +#define __MPEG12SPECIFICCONFIG_C_H__ + +#include "mp4dec_asc/audioobjecttypes.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct CSBitStream; + +typedef struct CSMpeg12SpecificConfig { + /* unsigned int m_ID; */ + /* unsigned int m_layer; */ + unsigned int m_reserved; +} CSMpeg12SpecificConfig, *CSMpeg12SpecificConfigPtr; + +int Mpeg12SpecificConfig_Parse(CSMpeg12SpecificConfigPtr self, struct CSBitStream *bs); +/* void Mpeg12SpecificConfig_Set(CSMpeg12SpecificConfigPtr self, const CSMpeg12SpecificConfigPtr mp12sc, const AUDIO_OBJECT_TYPE aot); */ +/* int Mpeg12SpecificConfig_Compare(const CSMpeg12SpecificConfigPtr self, const CSMpeg12SpecificConfigPtr mp12sc, const AUDIO_OBJECT_TYPE aot); */ + +#ifdef __cplusplus +} +#endif + +#endif /* __MPEG12SPECIFICCONFIG_H__ */ diff --git a/Src/aacdec/incs/mp4dec_asc/programcfg_c.h b/Src/aacdec/incs/mp4dec_asc/programcfg_c.h new file mode 100644 index 00000000..45c1c6cf --- /dev/null +++ b/Src/aacdec/incs/mp4dec_asc/programcfg_c.h @@ -0,0 +1,140 @@ +/***************************************************************************\ + * + * (C) copyright Fraunhofer - IIS (2002) + * All Rights Reserved + * + * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_asc/programcfg_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $ + * project : MPEG-4 Audio Decoder + * contents/description: program config specific description + * + * This software and/or program is protected by copyright law and + * international treaties. Any reproduction or distribution of this + * software and/or program, or any portion of it, may result in severe + * civil and criminal penalties, and will be prosecuted to the maximum + * extent possible under law. + * +\***************************************************************************/ + + +#ifndef __PROGRAMCFGC_H__ +#define __PROGRAMCFGC_H__ + +#include "mp4dec_helpers/cubuffer_c.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct CSBitStream; + +enum +{ + /* PCE settings */ + CSProgramConfig_FrontRow = 0, + CSProgramConfig_SideRow = 1, + CSProgramConfig_BackRow = 2, + CSProgramConfig_SpeakerRows = 3, + + CSProgramConfig_MaximumChannels = 16, + CSProgramConfig_MaximumCommentLength = 256, + + /* aac profile definitions */ + CAAC_ProfileMain = 0, + CAAC_ProfileLowComplexity, + CAAC_ProfileSSR, + CAAC_ProfileLTP, + CAAC_ProfileScalable, + CAAC_ProfileReserved +}; + + +typedef struct CSProgramConfig +{ + /* non-multichannel configuration */ + + int m_NonMC_ConfigSet; + int m_NonMC_IsCPE; + + int m_NonMC_Tag; + + /* */ + + int m_ExplicitMapping; + + int m_Profile; + int m_SamplingFrequencyIndex; + + int m_NumLfeChannelElements; + int m_NumAssocDataElements; + int m_NumValidCcElements; + + int m_MonoMixdownPresent; + int m_MonoMixdownElementNumber; + + int m_StereoMixdownPresent; + int m_StereoMixdownElementNumber; + + int m_MatrixMixdownIndexPresent; + int m_MatrixMixdownIndex; + int m_PseudoSurroundEnable; + + unsigned int m_NumberOfChannels[CSProgramConfig_SpeakerRows]; + int m_NumberOfChannelElements[CSProgramConfig_SpeakerRows]; + + int m_ChannelElementIsCpe[CSProgramConfig_SpeakerRows][CSProgramConfig_MaximumChannels]; + unsigned int m_ChannelElementTagSelect[CSProgramConfig_SpeakerRows][CSProgramConfig_MaximumChannels]; + + unsigned int m_LfeElementTagSelect[CSProgramConfig_MaximumChannels]; + unsigned int m_AssocDataElementTagSelect[CSProgramConfig_MaximumChannels]; + + int m_CcElementIsIndSw[CSProgramConfig_MaximumChannels]; + unsigned int m_ValidCcElementTagSelect[CSProgramConfig_MaximumChannels]; + + int m_CommentFieldBytes; + unsigned char m_Comment[CSProgramConfig_MaximumCommentLength]; + +} CSProgramConfig, *CSProgramConfigPtr; + +/* methods */ + +void CSProgramConfig_Initialize(CSProgramConfigPtr self); +void CSProgramConfig_Read (CSProgramConfigPtr self, struct CSBitStream *bs); +void CSProgramConfig_ReadExt (CSProgramConfigPtr self, struct CSBitStream *bs, CCompositionUnitPtr cubuffer, const unsigned int tag); +void CSProgramConfig_Copy (CSProgramConfigPtr dst, const CSProgramConfigPtr src); + +int CSProgramConfig_AddChannel(CSProgramConfigPtr self, const unsigned int tag, const unsigned int isCPE); + + +int CSProgramConfig_AddSingleChannel (CSProgramConfigPtr self, const unsigned int tag); +int CSProgramConfig_AddChannelPair (CSProgramConfigPtr self, const unsigned int tag); +int CSProgramConfig_AddCouplingChannel (CSProgramConfigPtr self, const unsigned int tag); +int CSProgramConfig_AddLowFrequencyChannel(CSProgramConfigPtr self, const unsigned int tag); + +int CSProgramConfig_IsChannelLocatedAt (CSProgramConfigPtr self, const unsigned int row, const unsigned int tag); +int CSProgramConfig_IsChannelPairLocatedAt(CSProgramConfigPtr self, const unsigned int row, const unsigned int tag); + +/* explicit query */ + + +/* query by index */ + +int CSProgramConfig_GetNumberOfElements(CSProgramConfigPtr self, const unsigned int row); +int CSProgramConfig_GetNumberOfChannels(CSProgramConfigPtr self); +int CSProgramConfig_GetNumberOfChannelsPerRow(CSProgramConfigPtr self, const unsigned int row); + +int CSProgramConfig_GetElementTag(CSProgramConfigPtr self, const unsigned int row, const unsigned int index); +int CSProgramConfig_IsChannelPair(CSProgramConfigPtr self, const unsigned int row, const unsigned int index); + +int CSProgramConfig_GetNumberOfLowFrequencyChannels(CSProgramConfigPtr self); +int CSProgramConfig_GetLowFrequencyChannelTag (CSProgramConfigPtr self, const unsigned int index); + +/* */ + +int CSProgramConfig_GetSamplingRateIndex(CSProgramConfigPtr self); +int CSProgramConfig_GetProfile (CSProgramConfigPtr self); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Src/aacdec/incs/mp4dec_asc/slsspecificconfig_c.h b/Src/aacdec/incs/mp4dec_asc/slsspecificconfig_c.h new file mode 100644 index 00000000..499d493b --- /dev/null +++ b/Src/aacdec/incs/mp4dec_asc/slsspecificconfig_c.h @@ -0,0 +1,51 @@ +/***************************************************************************\ + * + * (C) copyright Fraunhofer - IIS (2007) + * All Rights Reserved + * + * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_asc/slsspecificconfig_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $ + * project : MPEG-4 Audio Decoder + * contents/description: sls specific config interface + * + * This software and/or program is protected by copyright law and + * international treaties. Any reproduction or distribution of this + * software and/or program, or any portion of it, may result in severe + * civil and criminal penalties, and will be prosecuted to the maximum + * extent possible under law. + * +\***************************************************************************/ + +#ifndef __SLSSPECIFICCONFIG_C_H__ +#define __SLSSPECIFICCONFIG_C_H__ + +#include "mp4dec_asc/audioobjecttypes.h" +#include "mp4dec_asc/programcfg_c.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct CSBitStream; + +typedef struct CSSlsSpecificConfig { + unsigned int m_pcmWordLength; + unsigned int m_aacCorePresent; + unsigned int m_lleMainStream; + unsigned int m_reservedBit; + unsigned int m_frameLength; + + CSProgramConfig m_progrConfigElement; +} CSSlsSpecificConfig, *CSSlsSpecificConfigPtr; + +int getSlsFrameLen(int idx); + +int SlsSpecificConfig_Parse(CSSlsSpecificConfigPtr self, struct CSBitStream *bs, const int channelConfiguration); +/* void SlsSpecificConfig_Set(CSSlsSpecificConfigPtr self, const CSSlsSpecificConfigPtr slssc, const AUDIO_OBJECT_TYPE aot); */ +/* int SlsSpecificConfig_Compare(const CSSlsSpecificConfigPtr self, const CSSlsSpecificConfigPtr slssc, const AUDIO_OBJECT_TYPE aot); */ +int SlsSpecificConfig_Print(CSSlsSpecificConfigPtr self, char string[]); + +#ifdef __cplusplus +} +#endif + +#endif /* __SLSSPECIFICCONFIG_H__ */ diff --git a/Src/aacdec/incs/mp4dec_asc/spatialspecificconfig_c.h b/Src/aacdec/incs/mp4dec_asc/spatialspecificconfig_c.h new file mode 100644 index 00000000..842140a5 --- /dev/null +++ b/Src/aacdec/incs/mp4dec_asc/spatialspecificconfig_c.h @@ -0,0 +1,49 @@ +/***************************************************************************\ + * + * (C) copyright Fraunhofer - IIS (2007) + * All Rights Reserved + * + * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_asc/spatialspecificconfig_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $ + * project : MPEG-4 Audio Decoder + * contents/description: spatial specific config interface + * + * This software and/or program is protected by copyright law and + * international treaties. Any reproduction or distribution of this + * software and/or program, or any portion of it, may result in severe + * civil and criminal penalties, and will be prosecuted to the maximum + * extent possible under law. + * +\***************************************************************************/ + +#ifndef __SPATIALSPECIFICCONFIG_C_H__ +#define __SPATIALSPECIFICCONFIG_C_H__ + +#include "mp4dec_asc/audioobjecttypes.h" +#include "sac_dec_ssc_struct.h" + +#define MAX_SSC_SIZE (256) + +#ifdef __cplusplus +extern "C" { +#endif + +struct CSBitStream; + +typedef struct CSSpatialSpecificConfig { + unsigned int m_sacPayloadEmbedding; + unsigned char m_sscbinarybuffer[MAX_SSC_SIZE]; + unsigned int m_ssclen; + SPATIAL_SPECIFIC_CONFIG m_sscstruct; + unsigned int m_isLdmps; +} CSSpatialSpecificConfig, *CSSpatialSpecificConfigPtr; + + int SpatialSpecificConfig_Parse(CSSpatialSpecificConfigPtr self, struct CSBitStream *bs, unsigned int isLdmps); +/* void SpatialSpecificConfig_Set(CSSpatialSpecificConfigPtr self, const CSSpatialSpecificConfigPtr mpegssc, const AUDIO_OBJECT_TYPE aot); */ +/* int SpatialSpecificConfig_Compare(const CSSpatialSpecificConfigPtr self, const CSSpatialSpecificConfigPtr mpegssc, const AUDIO_OBJECT_TYPE aot); */ +int SpatialSpecificConfig_Print(CSSpatialSpecificConfigPtr self, char string[]); + +#ifdef __cplusplus +} +#endif + +#endif /* __SPATIALSPECIFICCONFIG_H__ */ |