mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 20:45:46 -04:00
Initial community commit
This commit is contained in:
96
Src/aacdec/incs/bitbuffer_c.h
Normal file
96
Src/aacdec/incs/bitbuffer_c.h
Normal file
@ -0,0 +1,96 @@
|
||||
/***************************************************************************\
|
||||
*
|
||||
* (C) copyright Fraunhofer - IIS (1998)
|
||||
* All Rights Reserved
|
||||
*
|
||||
* filename: bitbuffer_c.h
|
||||
* project : MPEG-4 Audio Decoder
|
||||
* author : Stefan Gewinner gew@iis.fhg.de
|
||||
* contents/description: memory input class with transport format
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Header: /cvs/root/winamp/aacdec/incs/bitbuffer_c.h,v 1.3 2012/05/08 20:16:49 audiodsp Exp $
|
||||
*
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef __BITBUFFER_C_H__
|
||||
#define __BITBUFFER_C_H__
|
||||
|
||||
#include "mp4dec_helpers/machine.h"
|
||||
#include "mp4dec_helpers/bitstream_c.h"
|
||||
|
||||
struct CSStreamInfo;
|
||||
|
||||
enum
|
||||
{
|
||||
CSBitBuffer_BufferSize = 8192,
|
||||
CSBitBuffer_BufferBits = CSBitBuffer_BufferSize*8,
|
||||
|
||||
/* CBitBuffer_InvalidCrcValue = 0xFFFFFFFF, */
|
||||
CBitBuffer_MaximumMarkers = 25*4
|
||||
|
||||
/* , CAverageNumber_MaximumSize = 16 */
|
||||
};
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CSBitStream_MarkerPosition what ;
|
||||
|
||||
UINT32 m_elementBits ;
|
||||
|
||||
UINT32 m_ValidBits;
|
||||
UINT32 m_BitCnt;
|
||||
UINT32 m_BitNdx;
|
||||
|
||||
} CMarker, *CMarkerPtr ;
|
||||
|
||||
typedef struct CSBitBuffer
|
||||
{
|
||||
CSBitStream base ;
|
||||
|
||||
UINT32 m_ValidBits;
|
||||
UINT32 m_ReadOffset;
|
||||
UINT32 m_BitCnt;
|
||||
UINT32 m_BitNdx;
|
||||
|
||||
UINT32 m_FramesLeftInPacket ;
|
||||
UINT32 m_FrameCrcValue ;
|
||||
|
||||
INT32 m_isEOF ;
|
||||
|
||||
UINT8 m_Buffer [CSBitBuffer_BufferSize] ;
|
||||
|
||||
/* CAverageNumber m_ActualBitrate ; */
|
||||
|
||||
UINT32 m_LastBufferFullness ;
|
||||
UINT32 m_LastFrameLength ;
|
||||
|
||||
CMarker m_MarkerList [CBitBuffer_MaximumMarkers] ;
|
||||
UINT32 m_Markers ;
|
||||
|
||||
} CSBitBuffer, *CSBitBufferPtr ;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void CSBitBuffer_Initialize(CSBitBufferPtr self);
|
||||
|
||||
void CSBitBuffer_Feed(CSBitBufferPtr self, const UINT8 pBuf[], const UINT32 cbSize, UINT32 *cbValid);
|
||||
|
||||
INT32 CSBitBuffer_IsDecodableFrame(CSBitBufferPtr self, struct CSStreamInfo *info);
|
||||
INT32 CSBitBuffer_IsCrcConsistent(CSBitBufferPtr self) ;
|
||||
|
||||
void CSBitBuffer_SetEOF(CSBitBufferPtr self) ;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
160
Src/aacdec/incs/mp4AudioDecIfc.h
Normal file
160
Src/aacdec/incs/mp4AudioDecIfc.h
Normal file
@ -0,0 +1,160 @@
|
||||
/***************************************************************************\
|
||||
*
|
||||
* (C) copyright Fraunhofer - IIS (2001)
|
||||
* All Rights Reserved
|
||||
*
|
||||
* $Header: /cvs/root/winamp/aacdec/incs/mp4AudioDecIfc.h,v 1.3 2012/05/08 20:16:49 audiodsp Exp $
|
||||
* project : MPEG-4 Audio Decoder
|
||||
* contents/description: interface to mpeg-4 audio decoder
|
||||
*
|
||||
* 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 __MP4AUDIODECIFC_H__
|
||||
#define __MP4AUDIODECIFC_H__
|
||||
|
||||
|
||||
#include "mp4dec_helpers/err_code.h"
|
||||
|
||||
#include "mp4dec_asc/audiospecificconfig_c.h"
|
||||
#include "mp4dec_helpers/usrparam.h"
|
||||
|
||||
#include "mp4dec_helpers/aubuffer_c.h"
|
||||
#include "mp4dec_helpers/cubuffer_c.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#if defined(WIN32) || defined(WIN64)
|
||||
#pragma pack(push, 8)
|
||||
#endif
|
||||
|
||||
|
||||
/* data types */
|
||||
|
||||
typedef struct mp4AudioDecoder_VersionInfo {
|
||||
char dateTime[80];
|
||||
char versionNo[40];
|
||||
char options[1024];
|
||||
char options_ext[4096];
|
||||
} mp4AudioDecoder_VersionInfo;
|
||||
|
||||
|
||||
/* Opaque declaration of decoder handle */
|
||||
struct mp4AudioDecoder;
|
||||
typedef struct mp4AudioDecoder* mp4AudioDecoderHandle;
|
||||
|
||||
|
||||
/* mandatory decoder functions */
|
||||
|
||||
mp4AudioDecoderHandle MP4AUDIODECAPI mp4AudioDecoder_Create(
|
||||
const struct CSAudioSpecificConfig * const asc[],
|
||||
const unsigned int noOfLayers
|
||||
);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_SetParam(
|
||||
const mp4AudioDecoderHandle self,
|
||||
const unsigned int param,
|
||||
const float value
|
||||
);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_DecodeFrame(
|
||||
mp4AudioDecoderHandle self,
|
||||
struct CAccessUnit* auBuffer[],
|
||||
struct CCompositionUnit* cuBuffer
|
||||
);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_Destroy(mp4AudioDecoderHandle* self);
|
||||
|
||||
|
||||
/* utility functions */
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_Reset(
|
||||
mp4AudioDecoderHandle self,
|
||||
const unsigned int param,
|
||||
int value
|
||||
);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_Flush(
|
||||
mp4AudioDecoderHandle self,
|
||||
struct CCompositionUnit* cuBuffer
|
||||
);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_GetBufferFullness(
|
||||
const mp4AudioDecoderHandle self,
|
||||
const unsigned int layer,
|
||||
unsigned int* bufferfullness
|
||||
);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_GetSamplesPerFrame(
|
||||
const mp4AudioDecoderHandle self,
|
||||
unsigned int* spf
|
||||
);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_SetOutputLayer(
|
||||
const mp4AudioDecoderHandle self,
|
||||
const unsigned int outputLayer
|
||||
);
|
||||
|
||||
/* MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_SetSpeedPitch( */
|
||||
/* const mp4AudioDecoderHandle self, */
|
||||
/* const float speedChangeFactor, */
|
||||
/* const float pitchChangeFactor */
|
||||
/* ); */
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_GetLastError(const mp4AudioDecoderHandle self);
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_GetLibraryVersion(mp4AudioDecoder_VersionInfo* versionInfo);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_ascParse(
|
||||
const unsigned char* decSpecificInfoBuf,
|
||||
const unsigned int decSpecificInfoBuf_len,
|
||||
struct CSAudioSpecificConfig* asc
|
||||
);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_ascParseStream(
|
||||
const unsigned char* decSpecificInfoBuf,
|
||||
struct CSAudioSpecificConfig* asc,
|
||||
int* bitsRead
|
||||
);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_ascParseExt(
|
||||
const unsigned char* const decSpecificInfoBuf[],
|
||||
const unsigned int decSpecificInfoBuf_len[],
|
||||
const unsigned int avgBitrate[],
|
||||
const unsigned int streams,
|
||||
unsigned int* layers, /* out */
|
||||
struct CSAudioSpecificConfig* asc[], /* out */
|
||||
unsigned int streamsPerLayer[] /* out */
|
||||
);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_ascPrint(
|
||||
unsigned int layers, /* in */
|
||||
struct CSAudioSpecificConfig* asc[], /* in */
|
||||
unsigned int stringLen, /* in */
|
||||
unsigned char string[] /* ptr in, content out */
|
||||
);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI mp4AudioDecoder_GetPcmWidth(
|
||||
const unsigned char* const decSpecificInfoBuf[],
|
||||
const unsigned int decSpecificInfoBuf_len[],
|
||||
const unsigned int streams,
|
||||
unsigned int* pcmwidth /* out */
|
||||
);
|
||||
|
||||
|
||||
#if defined(WIN32) || defined(WIN64)
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MP4AUDIODECIFC_H__ */
|
89
Src/aacdec/incs/mp4dec_asc/audioobjecttypes.h
Normal file
89
Src/aacdec/incs/mp4dec_asc/audioobjecttypes.h
Normal file
@ -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
|
127
Src/aacdec/incs/mp4dec_asc/audiospecificconfig_c.h
Normal file
127
Src/aacdec/incs/mp4dec_asc/audiospecificconfig_c.h
Normal file
@ -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__ */
|
64
Src/aacdec/incs/mp4dec_asc/celpspecificconfig_c.h
Normal file
64
Src/aacdec/incs/mp4dec_asc/celpspecificconfig_c.h
Normal file
@ -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__ */
|
75
Src/aacdec/incs/mp4dec_asc/eldspecificconfig_c.h
Normal file
75
Src/aacdec/incs/mp4dec_asc/eldspecificconfig_c.h
Normal file
@ -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__ */
|
89
Src/aacdec/incs/mp4dec_asc/epspecificconfig_c.h
Normal file
89
Src/aacdec/incs/mp4dec_asc/epspecificconfig_c.h
Normal file
@ -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
|
61
Src/aacdec/incs/mp4dec_asc/gaspecificconfig_c.h
Normal file
61
Src/aacdec/incs/mp4dec_asc/gaspecificconfig_c.h
Normal file
@ -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__ */
|
43
Src/aacdec/incs/mp4dec_asc/hvxcspecificconfig_c.h
Normal file
43
Src/aacdec/incs/mp4dec_asc/hvxcspecificconfig_c.h
Normal file
@ -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__ */
|
43
Src/aacdec/incs/mp4dec_asc/mpeg12specificconfig_c.h
Normal file
43
Src/aacdec/incs/mp4dec_asc/mpeg12specificconfig_c.h
Normal file
@ -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__ */
|
140
Src/aacdec/incs/mp4dec_asc/programcfg_c.h
Normal file
140
Src/aacdec/incs/mp4dec_asc/programcfg_c.h
Normal file
@ -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
|
51
Src/aacdec/incs/mp4dec_asc/slsspecificconfig_c.h
Normal file
51
Src/aacdec/incs/mp4dec_asc/slsspecificconfig_c.h
Normal file
@ -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__ */
|
49
Src/aacdec/incs/mp4dec_asc/spatialspecificconfig_c.h
Normal file
49
Src/aacdec/incs/mp4dec_asc/spatialspecificconfig_c.h
Normal file
@ -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__ */
|
62
Src/aacdec/incs/mp4dec_helpers/aubuffer_c.h
Normal file
62
Src/aacdec/incs/mp4dec_helpers/aubuffer_c.h
Normal file
@ -0,0 +1,62 @@
|
||||
/***************************************************************************\
|
||||
*
|
||||
* (C) copyright Fraunhofer - IIS (1998)
|
||||
* All Rights Reserved
|
||||
*
|
||||
* $Header: /cvs/root/winamp/aacdec/incs/mp4dec_helpers/aubuffer_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $
|
||||
* project : MPEG-4 Audio Decoder
|
||||
* contents/description: access unit module public 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 __AUBUFFERC_H__
|
||||
#define __AUBUFFERC_H__
|
||||
|
||||
#include "mp4dec_helpers/err_code.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) || defined(WIN64)
|
||||
#pragma pack(push, 8)
|
||||
#endif
|
||||
|
||||
|
||||
/* Opaque declaration of access unit handle */
|
||||
struct CAccessUnit;
|
||||
typedef struct CAccessUnit* CAccessUnitPtr;
|
||||
|
||||
CAccessUnitPtr MP4AUDIODECAPI CAccessUnit_Create(const unsigned char *pBuffer, const unsigned int size);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI CAccessUnit_Reset (const CAccessUnitPtr self);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI CAccessUnit_Assign(const CAccessUnitPtr self,
|
||||
const unsigned char *pBuffer,
|
||||
const unsigned int size);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI CAccessUnit_GetBitCount(const CAccessUnitPtr self, unsigned int* nBits);
|
||||
MP4_RESULT MP4AUDIODECAPI CAccessUnit_GetValidBits(const CAccessUnitPtr self, unsigned int* nBits);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI CAccessUnit_MarkAsInvalid(const CAccessUnitPtr self);
|
||||
|
||||
int MP4AUDIODECAPI CAccessUnit_IsValid(const CAccessUnitPtr self);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI CAccessUnit_Destroy(CAccessUnitPtr *self);
|
||||
|
||||
#if defined(WIN32) || defined(WIN64)
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
83
Src/aacdec/incs/mp4dec_helpers/bitstream_c.h
Normal file
83
Src/aacdec/incs/mp4dec_helpers/bitstream_c.h
Normal file
@ -0,0 +1,83 @@
|
||||
/***************************************************************************\
|
||||
*
|
||||
* (C) copyright Fraunhofer - IIS (2000)
|
||||
* All Rights Reserved
|
||||
*
|
||||
* $Header: /cvs/root/winamp/aacdec/incs/mp4dec_helpers/bitstream_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $
|
||||
* project : MPEG-4 Audio Decoder
|
||||
* contents/description: bitstream module 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 __BITSTREAMC_H__
|
||||
#define __BITSTREAMC_H__
|
||||
|
||||
#include "mp4dec_helpers/machine.h"
|
||||
|
||||
/* CRC Markers for SetPositionMarker(). */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum CSBitStream_MarkerPosition
|
||||
{
|
||||
CSBitStream_ChannelElementStart,
|
||||
CSBitStream_ChannelElementStop,
|
||||
CSBitStream_AncillaryElementStart,
|
||||
CSBitStream_AncillaryElementStop,
|
||||
CSBitStream_SecondIndividualChannelStart,
|
||||
CSBitStream_CurrentPosition
|
||||
|
||||
} CSBitStream_MarkerPosition;
|
||||
|
||||
typedef enum {
|
||||
NO_EPCONF = -1,
|
||||
EPCONF0 = 0,
|
||||
EPCONF1 = 1,
|
||||
EPCONF2 = 2,
|
||||
EPCONF3 = 3
|
||||
} __epconf_types;
|
||||
|
||||
typedef struct CSBitStream
|
||||
{
|
||||
void (*ByteAlign) (struct CSBitStream *self);
|
||||
void (*PushBack) (struct CSBitStream *self, INT32 n);
|
||||
INT32 (*Get) (struct CSBitStream *self, INT32 elemID, INT32 n);
|
||||
|
||||
void (*SetPositionMarker) (struct CSBitStream *self, INT32 id);
|
||||
void (*SetCRCPositionMarker) (struct CSBitStream *self, CSBitStream_MarkerPosition position) ;
|
||||
|
||||
INT32 (*GetBitCount) (struct CSBitStream *self);
|
||||
INT32 (*GetValidBits) (struct CSBitStream *self);
|
||||
INT32 (*GetValidBitsEp1) (struct CSBitStream *self, INT32 err_sens_class);
|
||||
|
||||
UINT8* (*GetDataPointer) (struct CSBitStream *self);
|
||||
|
||||
UINT32 m_BitsInCache;
|
||||
UINT32 m_CacheWord;
|
||||
INT32 m_erFlag;
|
||||
|
||||
} CSBitStream, *CSBitStreamPtr;
|
||||
|
||||
INT32 __getBits (CSBitStreamPtr self, INT32 elemID, INT32 nBits);
|
||||
void __pushBack (CSBitStreamPtr self, INT32 nBits);
|
||||
void __byteAlign (CSBitStreamPtr self);
|
||||
void __setPositionMarker (CSBitStreamPtr self, INT32 id);
|
||||
void __setCRCPositionMarker (CSBitStreamPtr self, CSBitStream_MarkerPosition position) ;
|
||||
INT32 __getBitCount (CSBitStreamPtr self);
|
||||
INT32 __getValidBits (CSBitStreamPtr self);
|
||||
INT32 __getValidBits_ep1 (CSBitStreamPtr self, INT32 err_sens_class);
|
||||
UINT8* __getDataPointer (CSBitStreamPtr self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
340
Src/aacdec/incs/mp4dec_helpers/cubuffer_c.h
Normal file
340
Src/aacdec/incs/mp4dec_helpers/cubuffer_c.h
Normal file
@ -0,0 +1,340 @@
|
||||
/***************************************************************************\
|
||||
*
|
||||
* (C) copyright Fraunhofer - IIS (2001)
|
||||
* All Rights Reserved
|
||||
*
|
||||
* $Header: /cvs/root/winamp/aacdec/incs/mp4dec_helpers/cubuffer_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $
|
||||
* project : MPEG-4 Audio Decoder
|
||||
* contents/description: composition unit module public 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 __CUBUFFER_C_H__
|
||||
#define __CUBUFFER_C_H__
|
||||
|
||||
#include "mp4dec_helpers/err_code.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
CUBUFFER_MAXCHANNELS = 100,
|
||||
CUBUFFER_MAXSAMPLESPERCHANNEL = 8192,
|
||||
CUBUFFER_MAXANCBYTES = 65536
|
||||
} __cubuffer_constants;
|
||||
|
||||
|
||||
typedef enum {
|
||||
CUBUFFER_PCMTYPE_FLOAT = 0x55,
|
||||
CUBUFFER_PCMTYPE_INT32,
|
||||
CUBUFFER_PCMTYPE_INT24,
|
||||
/* CUBUFFER_PCMTYPE_INT20, */
|
||||
CUBUFFER_PCMTYPE_INT16
|
||||
/* ,CUBUFFER_PCMTYPE_INT8 */
|
||||
} CUBUFFER_PCMTYPE;
|
||||
|
||||
typedef enum {
|
||||
ANCDATA_IS_INVALID = 0x00, /* default after calloc */
|
||||
|
||||
ANCDATA_IS_COMPLETE_MP2FRAME,
|
||||
ANCDATA_IS_MP2ANCILLARYDATA,
|
||||
ANCDATA_IS_MP3ANCILLARYDATA,
|
||||
ANCDATA_IS_MP3SCF,
|
||||
ANCDATA_IS_MPEGS_AU,
|
||||
|
||||
ANCDATA_IS_AAC_EXT_DRC,
|
||||
ANCDATA_IS_AAC_EXT_SAC,
|
||||
ANCDATA_IS_AAC_EXT_LDSAC,
|
||||
ANCDATA_IS_AAC_EXT_SAOC,
|
||||
ANCDATA_IS_AAC_EXT_SCESBR,
|
||||
ANCDATA_IS_AAC_EXT_CPESBR,
|
||||
ANCDATA_IS_AAC_EXT_SCESBRCRC,
|
||||
ANCDATA_IS_AAC_EXT_CPESBRCRC,
|
||||
ANCDATA_IS_AAC_ELD_SCESBR,
|
||||
ANCDATA_IS_AAC_ELD_CPESBR,
|
||||
ANCDATA_IS_AAC_ELD_SCESBRCRC,
|
||||
ANCDATA_IS_AAC_ELD_CPESBRCRC,
|
||||
ANCDATA_IS_AAC_EXT_FILLDATA, /* is always 10100101 */
|
||||
ANCDATA_IS_AAC_EXT_DATAELEMENT_ANCDATA,
|
||||
ANCDATA_IS_AAC_EXT_DATAELEMENT_DEFAULT,
|
||||
ANCDATA_IS_AAC_EXT_FIL,
|
||||
ANCDATA_IS_AAC_EXT_DEFAULT,
|
||||
|
||||
ANCDATA_IS_AAC_DSE_TAG0 = 0x80,
|
||||
ANCDATA_IS_AAC_DSE_TAG1,
|
||||
ANCDATA_IS_AAC_DSE_TAG2,
|
||||
ANCDATA_IS_AAC_DSE_TAG3,
|
||||
ANCDATA_IS_AAC_DSE_TAG4,
|
||||
ANCDATA_IS_AAC_DSE_TAG5,
|
||||
ANCDATA_IS_AAC_DSE_TAG6,
|
||||
ANCDATA_IS_AAC_DSE_TAG7,
|
||||
ANCDATA_IS_AAC_DSE_TAG8,
|
||||
ANCDATA_IS_AAC_DSE_TAG9,
|
||||
ANCDATA_IS_AAC_DSE_TAG10,
|
||||
ANCDATA_IS_AAC_DSE_TAG11,
|
||||
ANCDATA_IS_AAC_DSE_TAG12,
|
||||
ANCDATA_IS_AAC_DSE_TAG13,
|
||||
ANCDATA_IS_AAC_DSE_TAG14,
|
||||
ANCDATA_IS_AAC_DSE_TAG15,
|
||||
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG0 = 0x90,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG1,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG2,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG3,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG4,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG5,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG6,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG7,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG8,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG9,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG10,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG11,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG12,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG13,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG14,
|
||||
ANCDATA_IS_AAC_PCE_COMMENTFIELD_TAG15,
|
||||
|
||||
ANCDATA_IS_INCOMPLETE = 0x0fd,
|
||||
BUFFER_IS_TOOSMALL_WITH_CLIPPED_DATA = 0xfe,
|
||||
BUFFER_IS_TOOSMALL_NOMORE_DATA = 0x0ff
|
||||
} __cubuffer_ancDataBufTags;
|
||||
|
||||
|
||||
typedef enum {
|
||||
CUBUFFER_CHANNEL_IS_INVALID = 0x0000, /* default after init/calloc */ /* todo: we shouldn't name this INVALID, but DEFAULT or NOT_MAPPED or so ... */
|
||||
|
||||
CUBUFFER_CHANNEL_IS_NOTMAPPED = 0x0001, /* a valid pcm channel is here, but could not be mapped to a valid position */
|
||||
CUBUFFER_CHANNEL_IS_ELSEWHERE, /* position is out of z-plane */
|
||||
|
||||
CUBUFFER_CHANNEL_IS_CENTER = 0x0008,
|
||||
CUBUFFER_CHANNEL_IS_REARCENTER,
|
||||
|
||||
CUBUFFER_CHANNEL_IS_LEFT0 = 0x0010,
|
||||
CUBUFFER_CHANNEL_IS_LEFT1,
|
||||
CUBUFFER_CHANNEL_IS_LEFT2,
|
||||
CUBUFFER_CHANNEL_IS_LEFT3,
|
||||
CUBUFFER_CHANNEL_IS_LEFT4,
|
||||
CUBUFFER_CHANNEL_IS_LEFT5,
|
||||
CUBUFFER_CHANNEL_IS_LEFT6,
|
||||
CUBUFFER_CHANNEL_IS_LEFT7,
|
||||
CUBUFFER_CHANNEL_IS_LEFT8,
|
||||
CUBUFFER_CHANNEL_IS_LEFT9,
|
||||
CUBUFFER_CHANNEL_IS_LEFT10,
|
||||
CUBUFFER_CHANNEL_IS_LEFT11,
|
||||
CUBUFFER_CHANNEL_IS_LEFT12,
|
||||
CUBUFFER_CHANNEL_IS_LEFT13,
|
||||
CUBUFFER_CHANNEL_IS_LEFT14,
|
||||
CUBUFFER_CHANNEL_IS_LEFT15,
|
||||
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE0 = 0x0020,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE1,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE2,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE3,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE4,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE5,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE6,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE7,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE8,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE9,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE10,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE11,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE12,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE13,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE14,
|
||||
CUBUFFER_CHANNEL_IS_LEFTSIDE15,
|
||||
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK0 = 0x0030,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK1,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK2,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK3,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK4,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK5,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK6,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK7,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK8,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK9,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK10,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK11,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK12,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK13,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK14,
|
||||
CUBUFFER_CHANNEL_IS_LEFTBACK15,
|
||||
|
||||
CUBUFFER_CHANNEL_IS_RIGHT0 = 0x0050,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT1,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT2,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT3,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT4,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT5,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT6,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT7,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT8,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT9,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT10,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT11,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT12,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT13,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT14,
|
||||
CUBUFFER_CHANNEL_IS_RIGHT15,
|
||||
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE0 = 0x0060,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE1,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE2,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE3,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE4,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE5,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE6,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE7,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE8,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE9,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE10,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE11,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE12,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE13,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE14,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTSIDE15,
|
||||
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK0 = 0x0070,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK1,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK2,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK3,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK4,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK5,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK6,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK7,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK8,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK9,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK10,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK11,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK12,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK13,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK14,
|
||||
CUBUFFER_CHANNEL_IS_RIGHTBACK15,
|
||||
|
||||
CUBUFFER_CHANNEL_IS_SUB0 = 0x0090,
|
||||
CUBUFFER_CHANNEL_IS_SUB1,
|
||||
CUBUFFER_CHANNEL_IS_SUB2,
|
||||
CUBUFFER_CHANNEL_IS_SUB3,
|
||||
CUBUFFER_CHANNEL_IS_SUB4,
|
||||
CUBUFFER_CHANNEL_IS_SUB5,
|
||||
CUBUFFER_CHANNEL_IS_SUB6,
|
||||
CUBUFFER_CHANNEL_IS_SUB7,
|
||||
CUBUFFER_CHANNEL_IS_SUB8,
|
||||
CUBUFFER_CHANNEL_IS_SUB9,
|
||||
CUBUFFER_CHANNEL_IS_SUB10,
|
||||
CUBUFFER_CHANNEL_IS_SUB11,
|
||||
CUBUFFER_CHANNEL_IS_SUB12,
|
||||
CUBUFFER_CHANNEL_IS_SUB13,
|
||||
CUBUFFER_CHANNEL_IS_SUB14,
|
||||
CUBUFFER_CHANNEL_IS_SUB15,
|
||||
|
||||
CUBUFFER_CHANNELMAPPING_LAST_ELEMENT
|
||||
} __cubuffer_channelMappingTagTypes;
|
||||
|
||||
|
||||
typedef enum {
|
||||
CUBUFFER_INVALID_VALUE = -1,
|
||||
|
||||
__cubuffer_flags_start = 10000,
|
||||
CUBUFFER_VALIDCHANNELS,
|
||||
CUBUFFER_CHANNELSMAPPED,
|
||||
CUBUFFER_VALIDSAMPLES,
|
||||
CUBUFFER_SAMPLERATE,
|
||||
CUBUFFER_NROFLAYERS,
|
||||
CUBUFFER_CURRENTBITRATE,
|
||||
CUBUFFER_AVGBITRATE,
|
||||
CUBUFFER_DECODERDELAY,
|
||||
/* CUBUFFER_TIMESTAMP, */
|
||||
CUBUFFER_PCMTYPE_PROP,
|
||||
|
||||
CUBUFFER_HAS_SBR,
|
||||
CUBUFFER_HAS_PS,
|
||||
CUBUFFER_HAS_EBCC,
|
||||
CUBUFFER_HAS_MPEG_SURROUND,
|
||||
CUBUFFER_HAS_BLINDUPMIX,
|
||||
/* CUBUFFER_HAS_IMPLICIT, */
|
||||
|
||||
/* CUBUFFER_CONFIGCHANGED, */
|
||||
CUBUFFER_WAS_CONCEALED,
|
||||
CUBUFFER_TDL_GAINREDUCTION,
|
||||
CUBUFFER_IS_LOSSLESS,
|
||||
CUBUFFER_HAS_BEEP,
|
||||
CUBUFFER_HAS_SBRSYNCPOINT,
|
||||
|
||||
|
||||
/* special property: warning/message. All warnings and messages are or'd with CUBUFFER_MESSAGE */
|
||||
CUBUFFER_MESSAGE = 0x8000000,
|
||||
|
||||
__cubuffer_flags_end
|
||||
} __cubuffer_properties;
|
||||
|
||||
|
||||
|
||||
#if defined(WIN32) || defined(WIN64)
|
||||
#pragma pack(push, 8)
|
||||
#endif
|
||||
|
||||
|
||||
/* Opaque declaration of cubuffer handle */
|
||||
struct CCompositionUnit;
|
||||
typedef struct CCompositionUnit* CCompositionUnitPtr;
|
||||
|
||||
|
||||
/* mandatory interface */
|
||||
CCompositionUnitPtr MP4AUDIODECAPI CCompositionUnit_Create(
|
||||
const unsigned int channels,
|
||||
const unsigned int samplesPerChannel,
|
||||
const unsigned int samplingRate,
|
||||
const unsigned int sizeAncData,
|
||||
const CUBUFFER_PCMTYPE cutype
|
||||
);
|
||||
|
||||
CCompositionUnitPtr MP4AUDIODECAPI CCompositionUnit_CreateExt(
|
||||
const unsigned int channels,
|
||||
const unsigned int samplesPerChannel,
|
||||
const unsigned int samplingRate,
|
||||
const unsigned int sizeAncData,
|
||||
const CUBUFFER_PCMTYPE pcmtype,
|
||||
void* pcmBuf,
|
||||
const unsigned int pcmBufSize
|
||||
);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI CCompositionUnit_Destroy(CCompositionUnitPtr *self);
|
||||
MP4_RESULT MP4AUDIODECAPI CCompositionUnit_Reset(CCompositionUnitPtr self);
|
||||
|
||||
/* for signalling channel mapping of the (interleaved) pcm output channels */
|
||||
MP4_RESULT MP4AUDIODECAPI CCompositionUnit_GetChannelMapping(CCompositionUnitPtr self, const unsigned int channelNr, unsigned int* tag);
|
||||
MP4_RESULT MP4AUDIODECAPI CCompositionUnit_GetInvChannelMapping(CCompositionUnitPtr self, const unsigned int tagType, unsigned int* channel);
|
||||
|
||||
/* anc data handling */
|
||||
MP4_RESULT MP4AUDIODECAPI CCompositionUnit_GetAncDataCount(CCompositionUnitPtr self, unsigned int* nFields, unsigned int* nBytes);
|
||||
MP4_RESULT MP4AUDIODECAPI CCompositionUnit_GetAncDataByPos(CCompositionUnitPtr self, const unsigned int nr, unsigned char** ptr, unsigned int* size, unsigned int* tag);
|
||||
|
||||
/* retrieve cu-buffer parameters */
|
||||
MP4_RESULT MP4AUDIODECAPI CCompositionUnit_GetChannels(CCompositionUnitPtr self, unsigned int* nchannels);
|
||||
MP4_RESULT MP4AUDIODECAPI CCompositionUnit_GetSamplesPerChannel(CCompositionUnitPtr self, unsigned int* samplesPerChannel);
|
||||
MP4_RESULT MP4AUDIODECAPI CCompositionUnit_GetSamplingRate(CCompositionUnitPtr self, unsigned int* fs);
|
||||
MP4_RESULT MP4AUDIODECAPI CCompositionUnit_GetPcmPtr(CCompositionUnitPtr self, void* buf);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI CCompositionUnit_GetProperty(CCompositionUnitPtr self, const unsigned int prop, int* value);
|
||||
|
||||
MP4_RESULT MP4AUDIODECAPI CCompositionUnit_GetNextMessage(CCompositionUnitPtr self, int* value);
|
||||
|
||||
|
||||
#if defined(WIN32) || defined(WIN64)
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CUBUFFER_C_H__ */
|
84
Src/aacdec/incs/mp4dec_helpers/err_code.h
Normal file
84
Src/aacdec/incs/mp4dec_helpers/err_code.h
Normal file
@ -0,0 +1,84 @@
|
||||
/***************************************************************************\
|
||||
*
|
||||
* (C) copyright Fraunhofer - IIS (1998)
|
||||
* All Rights Reserved
|
||||
*
|
||||
* $Header: /cvs/root/winamp/aacdec/incs/mp4dec_helpers/err_code.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $
|
||||
* project : MPEG-4 Audio Decoder
|
||||
* contents/description: exported error codes
|
||||
*
|
||||
* 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 __ERR_CODE_H__
|
||||
#define __ERR_CODE_H__
|
||||
|
||||
|
||||
typedef int MP4_RESULT;
|
||||
|
||||
#ifndef MP4AUDIODECAPI
|
||||
#if defined(WIN32) || defined(WIN64)
|
||||
#define MP4AUDIODECAPI __stdcall
|
||||
#else
|
||||
#define MP4AUDIODECAPI
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
enum {
|
||||
MP4AUDIODEC_OK = 0,
|
||||
|
||||
__exported_error_codes_start = -100,
|
||||
|
||||
MP4AUDIODEC_NOT_OK = __exported_error_codes_start,
|
||||
MP4AUDIODEC_INVALID_HANDLE,
|
||||
MP4AUDIODEC_INVALID_POINTER,
|
||||
MP4AUDIODEC_INVALID_PARAMETER,
|
||||
MP4AUDIODEC_INVALID_VALUE,
|
||||
MP4AUDIODEC_INVALID_AUBUFFER,
|
||||
MP4AUDIODEC_INVALID_CUBUFFER,
|
||||
MP4AUDIODEC_INVALID_CHANNELCONFIG,
|
||||
MP4AUDIODEC_INVALID_NROFCHANNELS,
|
||||
MP4AUDIODEC_INVALID_SAMPLERATE,
|
||||
MP4AUDIODEC_INVALID_SAMPLESPERFRAME,
|
||||
MP4AUDIODEC_INVALID_EPCONFIG,
|
||||
MP4AUDIODEC_OUTOFMEMORY,
|
||||
MP4AUDIODEC_NOT_IMPLEMENTED,
|
||||
MP4AUDIODEC_AOT_NOT_SUPPORTED,
|
||||
MP4AUDIODEC_NOLAYERSTODECODE,
|
||||
MP4AUDIODEC_INVALID_FRAME_LENGTH,
|
||||
MP4AUDIODEC_TOOMANYLAYERS,
|
||||
MP4AUDIODEC_UNKNOWNERROR,
|
||||
|
||||
MP4AUDIODEC_INVALID_CORECODER,
|
||||
MP4AUDIODEC_CELP_INVALIDCONFIG,
|
||||
|
||||
MP4AUDIODEC_AUBUFFER_TOOMANYSUBFRAMES,
|
||||
MP4AUDIODEC_AUBUFFER_TOOSMALL,
|
||||
|
||||
MP4AUDIODEC_CUBUFFER_TAGTYPE_NOTFOUND,
|
||||
MP4AUDIODEC_CUBUFFER_INVALIDPARAM,
|
||||
MP4AUDIODEC_CUBUFFER_NOMORE_ANCDATA,
|
||||
MP4AUDIODEC_CUBUFFER_PROPERTYNOTFOUND,
|
||||
MP4AUDIODEC_CUBUFFER_NOTENOUGHCHANNELS,
|
||||
MP4AUDIODEC_CUBUFFER_NOTENOUGHSAMPLES,
|
||||
MP4AUDIODEC_CUBUFFER_NOMORE_MESSAGES,
|
||||
MP4AUDIODEC_CUBUFFER_INVALIDPCMTYPE,
|
||||
|
||||
MP4AUDIODEC_EP_PARSEERROR,
|
||||
MP4AUDIODEC_EP_PARSEERROR_DIRECTMAPPING,
|
||||
|
||||
MP4AUDIODEC_SBRLIBERROR,
|
||||
MP4AUDIODEC_SBR_INVALID_ELEID,
|
||||
|
||||
MP4AUDIODEC_MPEGS_ERROR,
|
||||
|
||||
__exported_error_codes_end
|
||||
};
|
||||
|
||||
#endif
|
101
Src/aacdec/incs/mp4dec_helpers/machine.h
Normal file
101
Src/aacdec/incs/mp4dec_helpers/machine.h
Normal file
@ -0,0 +1,101 @@
|
||||
/***************************************************************************\
|
||||
*
|
||||
* (C) copyright Fraunhofer - IIS (1998)
|
||||
* All Rights Reserved
|
||||
*
|
||||
* $Header: /cvs/root/winamp/aacdec/incs/mp4dec_helpers/machine.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $
|
||||
* project : MPEG-4 Audio Decoder
|
||||
* contents/description: machine dependent type definitions
|
||||
*
|
||||
* 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 __MACHINE_H
|
||||
#define __MACHINE_H
|
||||
|
||||
#define inline __inline
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <basetsd.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef signed char INT8;
|
||||
typedef signed short INT16;
|
||||
typedef signed int INT32;
|
||||
typedef signed int INT;
|
||||
typedef float FLOAT;
|
||||
typedef double DOUBLE;
|
||||
|
||||
/* typedef long LONG; */
|
||||
/* typedef unsigned long ULONG; */
|
||||
/* typedef unsigned int UINT; */
|
||||
/* typedef signed int INT; */
|
||||
typedef unsigned char UINT8;
|
||||
typedef unsigned short UINT16;
|
||||
typedef unsigned int UINT32;
|
||||
|
||||
#if defined _MSC_VER
|
||||
#define ALIGN16 __declspec(align(16))
|
||||
#elif defined __GNUC__ && !defined __sparc__ && !defined __sparc_v9__
|
||||
#define ALIGN16 __attribute__((aligned(16)))
|
||||
#else
|
||||
#define ALIGN16
|
||||
#endif
|
||||
|
||||
#ifndef INT64
|
||||
#if !(defined(WIN32) || defined(WIN64))
|
||||
#define INT64 long long
|
||||
#else
|
||||
#define INT64 __int64
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static inline double FhgSqrt(DOUBLE a){
|
||||
return(sqrt(a));
|
||||
}
|
||||
static inline double FhgExp(DOUBLE a){
|
||||
return(exp((double) a));
|
||||
}
|
||||
static inline double FhgPow(DOUBLE a, DOUBLE b){
|
||||
return(pow((double) a, (double) b));
|
||||
}
|
||||
static inline double FhgSin(DOUBLE a){
|
||||
return(sin((double) a));
|
||||
}
|
||||
static inline double FhgFloor(DOUBLE a){
|
||||
return(floor((double) a));
|
||||
}
|
||||
static inline double FhgCos(DOUBLE a){
|
||||
return(cos((double) a));
|
||||
}
|
||||
static inline double FhgFabs(DOUBLE a){
|
||||
return(fabs((double) a));
|
||||
}
|
||||
static inline double FhgTan(DOUBLE a){
|
||||
return(tan((double) a));
|
||||
}
|
||||
static inline double FhgCeil(DOUBLE a){
|
||||
return(ceil((double) a));
|
||||
}
|
||||
static inline double FhgLog(DOUBLE a){
|
||||
return(log((double) a));
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #define __MACHINE_H */
|
138
Src/aacdec/incs/mp4dec_helpers/usrparam.h
Normal file
138
Src/aacdec/incs/mp4dec_helpers/usrparam.h
Normal file
@ -0,0 +1,138 @@
|
||||
/***************************************************************************\
|
||||
*
|
||||
* (C) copyright Fraunhofer - IIS (2001)
|
||||
* All Rights Reserved
|
||||
*
|
||||
* $Header: /cvs/root/winamp/aacdec/incs/mp4dec_helpers/usrparam.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $
|
||||
* project : MPEG-4 Audio Decoder
|
||||
* contents/description: user changeable parameters, common struct
|
||||
*
|
||||
* 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 __USERPARAM_H__
|
||||
#define __USERPARAM_H__
|
||||
|
||||
|
||||
typedef enum {
|
||||
MP4AUDIODECPARAM_DEFAULT = 0,
|
||||
MP4AUDIODECPARAM_ALL = MP4AUDIODECPARAM_DEFAULT
|
||||
} __mp4AudioDecoder_ResetParam;
|
||||
|
||||
|
||||
typedef enum {
|
||||
INVALID_PARAM = 0,
|
||||
|
||||
__usrparam_param_start = 1000,
|
||||
/* postprocessor tools */
|
||||
DECODE_IMPLICIT,
|
||||
DECODE_SBR,
|
||||
DECODE_PS,
|
||||
DECODE_EBCC,
|
||||
DECODE_MPEGS,
|
||||
DECODE_DRC,
|
||||
|
||||
/* mpeg surround params */
|
||||
MPEGS_UPMIX_TYPE, /* for demo only */
|
||||
MPEGS_HRTF_MODEL, /* for demo only */
|
||||
MPEGS_PART_COMPLEX, /* for demo only */
|
||||
MPEGS_LEVEL, /* for demo only */
|
||||
MPEGS_BINAURAL_FRONT_ANGLE, /* for demo only */
|
||||
MPEGS_BINAURAL_REAR_ANGLE, /* for demo only */
|
||||
MPEGS_BINAURAL_DISTANCE, /* for demo only */
|
||||
MPEGS_BINAURAL_DIALOG_CLARITY, /* for demo only */
|
||||
MPEGS_BINAURAL_QUALITY, /* for demo only */
|
||||
MPEGS_BINAURAL_PRESET,
|
||||
|
||||
/* DRC params */
|
||||
DRC_BOOST,
|
||||
DRC_COMPRESS,
|
||||
DRC_TARGET_REF,
|
||||
|
||||
/* concealment params */
|
||||
CONCEALMENT_ENERGYINTERPOLATION,
|
||||
CONCEALMENT_TECHNIQUE,
|
||||
CONCEALMENT_ATTENUATION,
|
||||
|
||||
/* time domain limiter */
|
||||
TDL_MODE,
|
||||
|
||||
/* hvxc */
|
||||
HVXC_DELAYMODE, /* for conformance test only */
|
||||
HVXC_TESTMODE, /* for conformance test only */
|
||||
HVXC_PITCHFACTOR, /* for conformance test only */
|
||||
HVXC_SPEEDFACTOR, /* for conformance test only */
|
||||
|
||||
/* sls */
|
||||
SLS_TRUNCATIONRATE, /* max sls bitrate per channel to decode, for demo only */
|
||||
|
||||
/* sbr */
|
||||
SBR_LOWPOWERMODE, /* for demo only */
|
||||
|
||||
/* scalable */
|
||||
SCAL_SETOUTPUTLAYER,
|
||||
|
||||
/* advanced windowing - adjusts non-meaningful window sequence transitions */
|
||||
WINDOW_ADJUST_PARAM,
|
||||
|
||||
/* PCM buffer re-shuffling */
|
||||
WAVE_REMAPPING,
|
||||
|
||||
/* debugging only */
|
||||
VERBOSE_LEVEL,
|
||||
|
||||
/* further params come here */
|
||||
|
||||
__usrparam_param_dummy
|
||||
} __mp4AudioDecoder_ConfigureParameters;
|
||||
|
||||
|
||||
typedef enum {
|
||||
|
||||
/* general values */
|
||||
SWITCH_OFF = 0,
|
||||
SWITCH_ON = 1,
|
||||
SWITCH_DISABLED = 0,
|
||||
SWITCH_ENABLED = 1,
|
||||
|
||||
__usrparam_value_start = 10000,
|
||||
|
||||
/** concealment settings **/
|
||||
|
||||
/* preferred */
|
||||
CONCEALMENT_TECHNIQUE_NOISESUBST_FAST_STATIC_PRS = 7,
|
||||
|
||||
/* for debugging and historic reasons */
|
||||
CONCEALMENT_TECHNIQUE_OFF = 0,
|
||||
CONCEALMENT_TECHNIQUE_MUTING = 1,
|
||||
CONCEALMENT_TECHNIQUE_REPETITION = 2,
|
||||
CONCEALMENT_TECHNIQUE_NOISESUBST_FAST = 3,
|
||||
CONCEALMENT_TECHNIQUE_NOISESUBST_IIR = 5,
|
||||
CONCEALMENT_TECHNIQUE_NOISESUBST_IIR_STATIC_PRS = 9,
|
||||
|
||||
/* experimental - not recommended in production environments */
|
||||
CONCEALMENT_TECHNIQUE_NOISESUBST_FAST_PLUS_PRED = 4,
|
||||
CONCEALMENT_TECHNIQUE_NOISESUBST_IIR_PLUS_PRED = 6,
|
||||
CONCEALMENT_TECHNIQUE_NOISESUBST_FAST_STATIC_PRS_PLUS_PRED = 8,
|
||||
CONCEALMENT_TECHNIQUE_NOISESUBST_IIR_STATIC_PRS_PLUS_PRED = 10,
|
||||
|
||||
/** advanced windowing **/
|
||||
WINDOW_ADJUST_PARAM_OFF = 0,
|
||||
WINDOW_ADJUST_PARAM_ON_ONLY_CURRENT = 1,
|
||||
WINDOW_ADJUST_PARAM_ON_PREF_LONG = 2,
|
||||
WINDOW_ADJUST_PARAM_ON_PREF_SHORT = 3,
|
||||
|
||||
__usrparam_value_dummy
|
||||
} __mp4AudioDecoder_ConfigureValues;
|
||||
|
||||
|
||||
#define SLS_TRUNCATIONRATE_OFF (-1.0f)
|
||||
#define SLS_TRUNCATIONRATE_MIN (32000.0f)
|
||||
#define WINDOW_ADJUST_PARAM_DEFAULT (WINDOW_ADJUST_PARAM_OFF)
|
||||
|
||||
#endif
|
272
Src/aacdec/incs/sac_dec_ssc_struct.h
Normal file
272
Src/aacdec/incs/sac_dec_ssc_struct.h
Normal file
@ -0,0 +1,272 @@
|
||||
/***************************************************************************\
|
||||
*
|
||||
* (C) copyright Fraunhofer - IIS (2007)
|
||||
* All Rights Reserved
|
||||
*
|
||||
* $Id: sac_dec_ssc_struct.h,v 1.3 2012/05/08 20:16:49 audiodsp Exp $
|
||||
* project : MPEG surround decoder lib
|
||||
* contents/description: interface - spatial specific config struct
|
||||
*
|
||||
* 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 __SAC_DEC_SSC_STRUCT_H__
|
||||
#define __SAC_DEC_SSC_STRUCT_H__
|
||||
|
||||
|
||||
#define MAX_NUM_QMF_BANDS (128)
|
||||
#define MAX_TIME_SLOTS (72)
|
||||
#define MAX_INPUT_CHANNELS (6)
|
||||
#define MAX_OUTPUT_CHANNELS (8)
|
||||
#define MAX_NUM_OTT (5)
|
||||
#define MAX_NUM_TTT (1)
|
||||
#define MAX_NUM_EXT_TYPES ( 8 )
|
||||
#define MAX_PARAMETER_BANDS (28)
|
||||
|
||||
#define MAX_ARBITRARY_TREE_LEVELS ( 2 )
|
||||
#define MAX_OUTPUT_CHANNELS_AT ( MAX_OUTPUT_CHANNELS * (1<<MAX_ARBITRARY_TREE_LEVELS) )
|
||||
#define MAX_ARBITRARY_TREE_INDEX ( (1<<(MAX_ARBITRARY_TREE_LEVELS+1))-1 )
|
||||
|
||||
|
||||
|
||||
typedef enum {
|
||||
|
||||
SPATIALDEC_FREQ_RES_40 = 40,
|
||||
SPATIALDEC_FREQ_RES_28 = 28,
|
||||
SPATIALDEC_FREQ_RES_23 = 23,
|
||||
SPATIALDEC_FREQ_RES_20 = 20,
|
||||
SPATIALDEC_FREQ_RES_15 = 15,
|
||||
SPATIALDEC_FREQ_RES_14 = 14,
|
||||
SPATIALDEC_FREQ_RES_10 = 10,
|
||||
SPATIALDEC_FREQ_RES_7 = 7,
|
||||
SPATIALDEC_FREQ_RES_5 = 5,
|
||||
SPATIALDEC_FREQ_RES_4 = 4
|
||||
|
||||
} SPATIALDEC_FREQ_RES;
|
||||
|
||||
typedef enum {
|
||||
|
||||
SPATIALDEC_QUANT_FINE_DEF = 0,
|
||||
SPATIALDEC_QUANT_EDQ1 = 1,
|
||||
SPATIALDEC_QUANT_EDQ2 = 2,
|
||||
SPATIALDEC_QUANT_RSVD3 = 3,
|
||||
SPATIALDEC_QUANT_RSVD4 = 4,
|
||||
SPATIALDEC_QUANT_RSVD5 = 5,
|
||||
SPATIALDEC_QUANT_RSVD6 = 6,
|
||||
SPATIALDEC_QUANT_RSVD7 = 7
|
||||
|
||||
} SPATIALDEC_QUANT_MODE;
|
||||
|
||||
typedef enum {
|
||||
|
||||
SPATIALDEC_MODE_5151 = 0,
|
||||
SPATIALDEC_MODE_5152 = 1,
|
||||
SPATIALDEC_MODE_525 = 2,
|
||||
SPATIALDEC_MODE_RSVD3 = 3,
|
||||
SPATIALDEC_MODE_RSVD4 = 4,
|
||||
SPATIALDEC_MODE_RSVD5 = 5,
|
||||
SPATIALDEC_MODE_RSVD6 = 6,
|
||||
SPATIALDEC_MODE_RSVD7 = 7,
|
||||
SPATIALDEC_MODE_RSVD8 = 8,
|
||||
SPATIALDEC_MODE_RSVD9 = 9,
|
||||
SPATIALDEC_MODE_RSVD10 = 10,
|
||||
SPATIALDEC_MODE_RSVD11 = 11,
|
||||
SPATIALDEC_MODE_RSVD12 = 12,
|
||||
SPATIALDEC_MODE_RSVD13 = 13,
|
||||
SPATIALDEC_MODE_RSVD14 = 14,
|
||||
SPATIALDEC_MODE_SIGNAL
|
||||
|
||||
} SPATIALDEC_TREE_CONFIG;
|
||||
|
||||
|
||||
|
||||
typedef enum {
|
||||
|
||||
SPATIALDEC_GAIN_MODE0 = 0,
|
||||
SPATIALDEC_GAIN_RSVD1 = 1,
|
||||
SPATIALDEC_GAIN_RSVD2 = 2,
|
||||
SPATIALDEC_GAIN_RSVD3 = 3,
|
||||
SPATIALDEC_GAIN_RSVD4 = 4,
|
||||
SPATIALDEC_GAIN_RSVD5 = 5,
|
||||
SPATIALDEC_GAIN_RSVD6 = 6,
|
||||
SPATIALDEC_GAIN_RSVD7 = 7,
|
||||
SPATIALDEC_GAIN_RSVD8 = 8,
|
||||
SPATIALDEC_GAIN_RSVD9 = 9,
|
||||
SPATIALDEC_GAIN_RSVD10 = 10,
|
||||
SPATIALDEC_GAIN_RSVD11 = 11,
|
||||
SPATIALDEC_GAIN_RSVD12 = 12,
|
||||
SPATIALDEC_GAIN_RSVD13 = 13,
|
||||
SPATIALDEC_GAIN_RSVD14 = 14,
|
||||
SPATIALDEC_GAIN_RSVD15 = 15
|
||||
|
||||
} SPATIALDEC_FIXED_GAINS;
|
||||
|
||||
|
||||
typedef enum {
|
||||
|
||||
SPATIALDEC_TS_TPNOWHITE = 0,
|
||||
SPATIALDEC_TS_TPWHITE = 1,
|
||||
SPATIALDEC_TS_TES = 2,
|
||||
SPATIALDEC_TS_NOTS = 3,
|
||||
SPATIALDEC_TS_RSVD4 = 4,
|
||||
SPATIALDEC_TS_RSVD5 = 5,
|
||||
SPATIALDEC_TS_RSVD6 = 6,
|
||||
SPATIALDEC_TS_RSVD7 = 7,
|
||||
SPATIALDEC_TS_RSVD8 = 8,
|
||||
SPATIALDEC_TS_RSVD9 = 9,
|
||||
SPATIALDEC_TS_RSVD10 = 10,
|
||||
SPATIALDEC_TS_RSVD11 = 11,
|
||||
SPATIALDEC_TS_RSVD12 = 12,
|
||||
SPATIALDEC_TS_RSVD13 = 13,
|
||||
SPATIALDEC_TS_RSVD14 = 14,
|
||||
SPATIALDEC_TS_RSVD15 = 15
|
||||
|
||||
} SPATIALDEC_TS_CONF;
|
||||
|
||||
|
||||
typedef enum {
|
||||
|
||||
SPATIALDEC_DECORR_MODE0 = 0,
|
||||
SPATIALDEC_DECORR_MODE1 = 1,
|
||||
SPATIALDEC_DECORR_MODE2 = 2,
|
||||
SPATIALDEC_DECORR_RSVD3 = 3,
|
||||
SPATIALDEC_DECORR_RSVD4 = 4,
|
||||
SPATIALDEC_DECORR_RSVD5 = 5,
|
||||
SPATIALDEC_DECORR_RSVD6 = 6,
|
||||
SPATIALDEC_DECORR_RSVD7 = 7,
|
||||
SPATIALDEC_DECORR_RSVD8 = 8,
|
||||
SPATIALDEC_DECORR_RSVD9 = 9,
|
||||
SPATIALDEC_DECORR_RSVD10 = 10,
|
||||
SPATIALDEC_DECORR_RSVD11 = 11,
|
||||
SPATIALDEC_DECORR_RSVD12 = 12,
|
||||
SPATIALDEC_DECORR_RSVD13 = 13,
|
||||
SPATIALDEC_DECORR_RSVD14 = 14,
|
||||
SPATIALDEC_DECORR_RSVD15 = 15
|
||||
|
||||
} SPATIALDEC_DECORR_CONF;
|
||||
|
||||
|
||||
typedef struct T_SPATIALDEC_TREE_DESC {
|
||||
|
||||
/* tbd */
|
||||
int tmp;
|
||||
|
||||
} SPATIALDEC_TREE_DESC;
|
||||
|
||||
|
||||
typedef struct T_SPATIALDEC_OTT_CONF {
|
||||
|
||||
int nOttBands;
|
||||
|
||||
} SPATIALDEC_OTT_CONF;
|
||||
|
||||
|
||||
typedef enum {
|
||||
|
||||
SPATIALDEC_TTT_PRED_DECORR = 0,
|
||||
SPATIALDEC_TTT_PRED_NODECORR = 1,
|
||||
SPATIALDEC_TTT_RSVD2 = 2,
|
||||
SPATIALDEC_TTT_ENERGY_SUB = 3,
|
||||
SPATIALDEC_TTT_RSVD4 = 4,
|
||||
SPATIALDEC_TTT_ENERGY_NOSUB = 5,
|
||||
SPATIALDEC_TTT_RSVD6 = 6,
|
||||
SPATIALDEC_TTT_RSVD7 = 7
|
||||
|
||||
} SPATIALDEC_TTT_MODE;
|
||||
|
||||
|
||||
typedef struct T_SPATIALDEC_TTT_CONF {
|
||||
|
||||
int bTttDualMode;
|
||||
SPATIALDEC_TTT_MODE tttModeLow;
|
||||
SPATIALDEC_TTT_MODE tttModeHigh;
|
||||
int nTttBandsLow;
|
||||
|
||||
} SPATIALDEC_TTT_CONF;
|
||||
|
||||
|
||||
typedef struct T_SPATIALDEC_RESIDUAL_CONF {
|
||||
|
||||
int bResidualPresent;
|
||||
int nResidualBands;
|
||||
|
||||
} SPATIALDEC_RESIDUAL_CONF;
|
||||
|
||||
|
||||
typedef struct T_SPATIAL_SPECIFIC_CONFIG {
|
||||
|
||||
int samplingFreq;
|
||||
int nTimeSlots;
|
||||
int LdMode;
|
||||
SPATIALDEC_FREQ_RES freqRes;
|
||||
SPATIALDEC_TREE_CONFIG treeConfig;
|
||||
SPATIALDEC_QUANT_MODE quantMode;
|
||||
int bOneIcc;
|
||||
int bArbitraryDownmix;
|
||||
|
||||
int arbitraryDownmixResidualSamplingFreq;
|
||||
int arbitraryDownmixResidualFramesPerSpatialFrame;
|
||||
int arbitraryDownmixResidualBands;
|
||||
|
||||
int bResidualCoding;
|
||||
SPATIALDEC_FIXED_GAINS bsFixedGainSur;
|
||||
SPATIALDEC_FIXED_GAINS bsFixedGainLFE;
|
||||
SPATIALDEC_FIXED_GAINS bsFixedGainDMX;
|
||||
|
||||
|
||||
int bMatrixMode;
|
||||
SPATIALDEC_TS_CONF tempShapeConfig;
|
||||
SPATIALDEC_DECORR_CONF decorrConfig;
|
||||
SPATIALDEC_TREE_DESC *pTreeDesc;
|
||||
|
||||
int nInputChannels; /* derived from treeConfig */
|
||||
int nOutputChannels; /* derived from treeConfig */
|
||||
|
||||
|
||||
/* ott config */
|
||||
int nOttBoxes; /* derived from treeConfig */
|
||||
SPATIALDEC_OTT_CONF OttConfig[MAX_NUM_OTT]; /* dimension nOttBoxes */
|
||||
|
||||
/* ttt config */
|
||||
int nTttBoxes; /* derived from treeConfig */
|
||||
SPATIALDEC_TTT_CONF TttConfig[MAX_NUM_TTT]; /* dimension nTttBoxes */
|
||||
|
||||
/* residual config */
|
||||
int residualSamplingFreq;
|
||||
int nResidualFramesPerSpatialFrame;
|
||||
SPATIALDEC_RESIDUAL_CONF ResidualConfig[MAX_NUM_OTT+MAX_NUM_TTT]; /* dimension (nOttBoxes + nTttBoxes) */
|
||||
|
||||
int sacExtCnt;
|
||||
int sacExtType[MAX_NUM_EXT_TYPES];
|
||||
int envQuantMode;
|
||||
|
||||
int bArbitraryTree;
|
||||
int numOutChanAT;
|
||||
int numOttBoxesAT;
|
||||
int OutputChannelPosAT[MAX_OUTPUT_CHANNELS_AT];
|
||||
int OttBoxPresentAT[MAX_OUTPUT_CHANNELS][MAX_ARBITRARY_TREE_INDEX];
|
||||
int OttDefaultCldAT[MAX_OUTPUT_CHANNELS*MAX_ARBITRARY_TREE_INDEX];
|
||||
int OttModeLfeAT[MAX_OUTPUT_CHANNELS*MAX_ARBITRARY_TREE_INDEX];
|
||||
int OttBandsAT[MAX_OUTPUT_CHANNELS*MAX_ARBITRARY_TREE_INDEX];
|
||||
|
||||
int b3DaudioMode;
|
||||
int b3DaudioHRTFset;
|
||||
int HRTFfreqRes;
|
||||
int HRTFnumBand;
|
||||
int HRTFnumChan;
|
||||
int HRTFasymmetric;
|
||||
int HRTFlevelLeft[MAX_OUTPUT_CHANNELS][MAX_PARAMETER_BANDS];
|
||||
int HRTFlevelRight[MAX_OUTPUT_CHANNELS][MAX_PARAMETER_BANDS];
|
||||
int HRTFphase[MAX_OUTPUT_CHANNELS];
|
||||
int HRTFphaseLR[MAX_OUTPUT_CHANNELS][MAX_PARAMETER_BANDS];
|
||||
int HRTFicc[MAX_OUTPUT_CHANNELS];
|
||||
int HRTFiccLR[MAX_OUTPUT_CHANNELS][MAX_PARAMETER_BANDS];
|
||||
|
||||
} SPATIAL_SPECIFIC_CONFIG;
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user