mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 00:45:46 -04:00
Initial community commit
This commit is contained in:
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
|
Reference in New Issue
Block a user