📄 adm01_codec.h
字号:
/******************************************************************************
* Filename : Adm_decoder.h
* Start date : 2002.12.24
* By : Lee Kyung Tae/Chongkun Lee
* Contact : bach1004@samsung.com
* Description : low level api headers.(for only high level api)
* $Log:$
******************************************************************************
*/
#ifndef _ADM_DECODER_H_
#define _ADM_DECODER_H_
#ifdef __cplusplus
extern "C" {
#endif
/******************************************************************************
* FOR AC3
******************************************************************************/
typedef enum {
AC3_CUSTOM0,
AC3_CUSTOM1,
AC3_LINE,
AC3_RF
} AC3_OpMode_t;
typedef enum {
AC3_OM_reserved,
AC3_OM_1_0,
AC3_OM_2_0,
AC3_OM_3_0,
AC3_OM_2_1,
AC3_OM_3_1,
AC3_OM_2_2,
AC3_OM_3_2
} AC3_OutMode_t;
typedef enum {
AC3_DM_Stereo,
AC3_DM_Left_mono,
AC3_DM_Right_mono,
AC3_DM_Mixed_mono
} AC3_DualMode_t;
typedef enum {
AC3_SM_AUTO,
AC3_SM_LTRT,
AC3_SM_LORO
} AC3_StereoMode_t;
#if 0
typedef enum {
AC3_DRC_OFF = 0,
AC3_DRC_1_4 = 2,
AC3_DRC_1_2 = 5,
AC3_DRC_3_4 = 7,
AC3_DRC_FULL = 10
} AC3_DRC_t;
#else
typedef enum {
AC3_DRC_OFF = 0,
AC3_DRC_1_8 = 1,
AC3_DRC_1_4 = 2,
AC3_DRC_3_8 = 3,
AC3_DRC_1_2 = 4,
AC3_DRC_5_8 = 5,
AC3_DRC_3_4 = 6,
AC3_DRC_7_8 = 7,
AC3_DRC_FULL = 10
} AC3_DRC_t;
#endif
/* Define AC3 Audio parameter for S5Haudio audio manager */
typedef struct {
UCHAR Op_Mode; // 1B
UCHAR Out_Mode; // 1B
UCHAR Dual_Mode; // 1B
UCHAR Stereo_Mode; // 1B
UCHAR DRC; // 1B
UCHAR LFE_Enable; // 1B
UCHAR PCM_Scale; // 1B
UCHAR Stream_Type; // 1B // 0: ES(for CD) 1: PES(for DVD)
} AC3_Parameter_t;
/******************************************************************************
* FOR MPA
******************************************************************************/
typedef enum {
MPA_MPEG1_AUDIO =0, /* mpeg audio stereo decoder */
MPA_MPEG2_AUDIO =1, /* mpeg audio 5.1-ch decoder */
MPA_MPEG2_71CH =2 /* mpeg audio 7.1-ch decoder */
} MPA_Version_t;
typedef enum {
MPA_AUDIO_NULL =0,
MPA_MPEG1_MONO =1,
MPA_MPEG1_STEREO =2,
MPA_MPEG2_5CH =3, /* 5.1-ch output */
MPA_MPEG2_7CH =4, /* 7.1-ch output */
MPA_DOWNMIX_2CH =5, /* downmix 2-ch */
MPA_CHANNEL_TEST =6 /* Test channels, output test tone */
} MPA_Output_t;
typedef struct {
UCHAR Version; /* MPEG version */
UCHAR OUT_Mode; /* output channel configuration */
UCHAR LFE_Enable; /* LFE channel On/Off */
UCHAR DRC_Mode; /* dynamic range control On/Off */
UCHAR CRC_Option; /* CRC check option of ext/mc streams */
UCHAR Ext_Present; /* Extension stream present */
UCHAR CH_Contents; /* Select Mono Output, 0: L->R, 1: R->L, 0xFF: Invalid */
} MPA_Param_t;
/******************************************************************************
* FOR LPCM
******************************************************************************/
typedef enum{
LPCM_OM_2_0 = 0,
LPCM_OM_5_1 = 1
}LPCM_OutMode_t;
typedef struct{
UCHAR LPCM_DownSample;
UCHAR LPCM_OutMode;
}LPCM_Param_t;
/******************************************************************************
* FOR CDDA
******************************************************************************/
typedef struct { //jy newcodec
#if AUD_SUPPORT_AVI_PCM
UINT SamplingRate; /* SamplingRate from Parser. CDDA just gives back this to ARM */
UINT BitRate; /* BitRate from Parser. CDDA just gives back this to ARM */
USHORT BitPerSample; /* Bit per sample (8bit, 16bit, 24bit..)*/
UCHAR CH_Contents; /* Select Mono Output, 0: L->R, 1: R->L, 0xFF: STEREO */
UCHAR EC_OnOff; /* Switch Error Correction Mode, 0:OFF, 1:ON */
UCHAR Is_Mono; /* 1:mono stream, else:stereo stream */
#else
UCHAR CH_Contents; /* Select Mono Output, 0: L->R, 1: R->L, 0xFF: STEREO */
UCHAR EC_OnOff; /* Switch Error Correction Mode, 0:OFF, 1:ON */
#endif
}CDDA_Param_t;
/******************************************************************************
* FOR MP3
******************************************************************************/
typedef enum {
MP3_MP3_AUDIO = 0,
MP3_MPA_AUDIO = 1
} MP3_Mpegmode_t;
typedef enum {
MP3_LEFT_MONO = 0,
MP3_RIGHT_MONO = 1,
MP3_STEREO = 2
} MP3_ChContent_t;
typedef struct{
UCHAR MP3_MpegMode; // 0:MP3 mode, 1:MPA mode
UCHAR MP3_ChannelDone;
UCHAR MP3_LayerDone;
UCHAR MP3_EXT_Present;
UCHAR MP3_CH_Contents; /* Select Mono Output, 0: L->R, 1: R->L, 2: STEREO */
}MP3_Param_t;
/******************************************************************************
* FOR WMA
******************************************************************************/
typedef enum{
WMA_EQ_NORM,
WMA_EQ_CLASSIC,
WMA_EQ_POP,
WMA_EQ_ROCK,
WMA_EQ_JAZZ,
WMA_EQ_LIVE
}WMA_EQMODE;
/*
Manjunath updated 050526 for WMA Trick play on 4/16 solution
*/
typedef struct{
UCHAR OptionFlag; //0
UCHAR Volume; //1
UCHAR EqMode; //2
UCHAR Dummy; //3
USHORT PresentTimeH; //4
USHORT PresentTimeL; //6
USHORT GlobalHeaderSize; //8
USHORT PacketSize; //10
USHORT TotalPackets; //12
USHORT SendDuration0; //14
USHORT SendDuration1; //16
USHORT SendDuration2; //18
USHORT SendDuration3; //20
USHORT WMAisMBR; //22
UCHAR StereoMode; /* 0:stereo, 1:L/L, 2:R/R, 3:Mixed mono */ //3
#if (AUD_SUPPORT_AVI_WMA) //jy newcodec
/* added to support raw stream decode for DIVX */
/* 2005. 9. 26 - jae youl kim - */
UCHAR ControlFlag;
USHORT EncodeOption;
USHORT Num_channels;
USHORT BlockAlign;
UINT SamplingRate_p;
UINT AverageBps;
#endif
}WMA_Param_t;
#if (AUD_SUPPORT_AVI_ADPCM)
/* add ADPCM codec for 5010 SOL. */
/* 050902 - Jae Youl Kim */ //jy newcodec
typedef struct {
UCHAR ChannelMode; // -0- 1: mono, 2: stereo
UCHAR UpDownScale; // -1- 0: bypass, others: 1/(2^n), n = 1, 2 only -> for 5010 always 0
USHORT BlockSize; // -2- dependent to SamplesPerBlock => seek and repeat a/b
USHORT SamplesPerBlock; // -4- max 2048 samples
USHORT BytesPerSecond; // -6- average bytes per second => time display
UINT SamplesWritten; // -8- actual packed samples
UINT SamplingRate_p; // -14- ~ 17
UCHAR OverSampleDecode; // -12- 1: 2x, 2: 4x upsample decoding enable, 0: upsampling disable -> for 5010 always 0
UCHAR NumOfCoeffs; // -13-
} ADPCM_Param_t;
#endif
#if (AUD_SUPPORT_AVI_OGG)
/* add OGG codec for 5010 SOL. */
/* 060118 - Jae Youl Kim */ //jy ogg
typedef struct {
UCHAR ChannelMode; // -0- 1: mono, 2: stereo
} OGG_Param_t;
#endif
/******************************************************************************
* FOR DTS
******************************************************************************/
typedef enum{
DTS_DM_NORMAL, // 3_2
DTS_DM_LTRT,
DTS_DM_2_0,
DTS_DM_1_0,
DTS_DM_3_0,
DTS_DM_2_1,
DTS_DM_2_2,
DTS_DM_3_1
}DTS_Out_Mode;
typedef enum{
DTS_DM_Stereo,
DTS_DM_Left_mono,
DTS_DM_Right_mono,
DTS_DM_Mixed_mono
}DTS_DualMode;
typedef enum{
DTS_SM_AUTO,
DTS_SM_LTRT,
DTS_SM_LORO
}DTS_StereoMode;
typedef enum{
DTS_LFE_Disable,
DTS_LFE_Enable
}DTS_LFEEnable;
typedef enum {
DTS_MODE_NORMAL =0, /* normal decoding mode */
DTS_MODE_STREAM_ONLY =1, /* stream output only without increasing input buffer pointer */
DTS_MODE_PCM_ONLY =2 /* pcm output only */
} DTS_Dodec_Mode_t;
/* <<< @: 5010-xxx.JaeYoul_Kim 051223 : move below defines from Adm_dtsdec.c */ //jy noaudext
#if AUD_SUPPORT_AD_32BIT_BUFOFFSET
#define DTS_SECOND_TABLE_OFFSET_FROMS0_DIVX (64*0x800 + 4*(0x1800+0x100))
#else
#define DTS_SECOND_TABLE_OFFSET_FROMS0_DIVX (0x8000 + 4*(0x1800+0x100))
#endif
#define DTS_SECOND_TABLE_OFFSET_FROMS0 (0x8000 + 4*(0x1800+0x100))
#define DTS_SECOND_TABLE_SIZE (0x10000)
/* >>> @: 5010-xxx.JaeYoul_Kim 051223 */
typedef struct{
/* <<< @: 5010-xxx.JaeYoul_Kim 051222 : according to extend S0 buffer, DTS need to be know VQ table offset */ //jy noaudext
#if AUD_SUPPORT_AD_32BIT_BUFOFFSET
UINT VQ_Table_Offset_FromS0;
#endif
/* >>> @: 5010-xxx.JaeYoul_Kim 051222 */
UCHAR DownMix_Mode;
UCHAR Dual_Mode;
UCHAR Stereo_Mode;
UCHAR LFE_Enable;
UCHAR Codec_Mode;
}DTS_Param_t;
/******************************************************************************
* FOR CalibrationNoise
******************************************************************************/
typedef enum{
CN_Fs_48000,
CN_Fs_44100,
CN_Fs_32000
}CN_Fs;
typedef struct{
UCHAR CN_Fs;
UCHAR Channel;
}CN_Param_t;
/******************************************************************************
* FOR Spatializer
******************************************************************************/
typedef enum{
SPTL_N22_NHP,
SPTL_N22_TV,
SPTL_N22_SP,
SPTL_VBX,
SPTL_VLFE
#ifdef USE_VH_INSTEAD_OF_VBX
,
/*
For DVS Protable solution,
below three additional postcodec is ported.
-- hspark 051123
*/
SPTL_VH,
SPTL_VS,
SPTL_VE
#endif
}SPTL_Algorithm;
typedef enum{
SPTL_IM_reserved,
SPTL_IM_1_0,
SPTL_IM_2_0,
SPTL_IM_3_0,
SPTL_IM_2_1,
SPTL_IM_3_1,
SPTL_IM_2_2,
SPTL_IM_3_2
}SPTL_Input_Mode;
typedef enum{
SPTL_Angle_15 = 15,
SPTL_Angle_22 = 22,
SPTL_Angle_30 = 30
}SPTL_Angle;
typedef struct{
UCHAR SPTL_Algorithm;
UCHAR SPTL_UseVLFE;
UCHAR SPTL_Input_Mode;
UCHAR SPTL_Angle;
}SPTL_Param_t;
/******************************************************************************
* FOR Equalizer
******************************************************************************/
typedef enum{
Normal,
Rock,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -