DSP3Codec.inc
上传用户:caisangzi8
上传日期:2013-10-25
资源大小:15756k
文件大小:4k
- #ifndef _DSP3CODEC_INC_
- #define _DSP3CODEC_INC_
- // **************************************************************************************** //
- const DSP3_CODEC_INFO* g_aDSP3CodecInfo[] =
- {
- //CODING_MODE_AC3
- &DSP3Info_AC3,
-
- //CODING_MODE_PPCM
- #ifdef DVD_AUDIO
- &DSP3Info_PPCM,
- #else
- &DSP3Info_MP3,
- #endif
- //CODING_MODE_MP1
- &DSP3Info_MP3,
-
- //CODING_MODE_MP2
- &DSP3Info_MP3,
-
- //CODING_MODE_LPCM
- &DSP3Info_LPCM,
- //CODING_MODE_JPG
- &DSP3Info_MP3,
-
- //CODING_MODE_DTS
- #if !defined(NO_DTS_OUTPUT)||defined(FORCE_NO_DTS_OUTPUT)
- &DSP3Info_DTS,
- #elif defined(DTS_SPDIF_NO_OUTPUT)
- &DSP3Info_AC3,
- #else
- &DSP3Info_SPDIF,
- #endif
- //CODING_MODE_SDDS
- &DSP3Info_MP3,
-
- //CODING_MODE_MP3
- &DSP3Info_MP3,
-
- //CODING_MODE_PCM
- #ifdef USE_LPCM_REPLACE_PCM
- &DSP3Info_LPCM,
- #else
- &DSP3Info_CD,
- #endif
- //CODING_MODE_MIDI
- #ifdef SUPPORT_MIDI
- &DSP3Info_MIDI,
- #else
- &DSP3Info_MP3,
- #endif
- //CODING_MODE_NES
- #ifdef SUPPORT_NESGAME
- &DSP3Info_NES,
- #else
- &DSP3Info_MP3,
- #endif
- //CODING_MODE_SPDIF
- #if ( defined(SDRAM_16Mb_Mode) && !defined(SUPPORT_SDRAM16M_AC3_5_1CH_OUTPUT) && !defined(RAW_HAVE_ANALOG_OUTPUT) )
- &DSP3Info_SPDIF,
- #else
- &DSP3Info_MP3,
- #endif
- //CODING_MODE_DTSCD
- #if defined(NO_DTS_OUTPUT) && !defined(FORCE_NO_DTS_OUTPUT)
- #ifdef USE_LPCM_REPLACE_PCM
- #if defined(DTS_SPDIF_NO_OUTPUT)
- &DSP3Info_AC3,
- #else
- &DSP3Info_LPCM,
- #endif
- #else
- #if defined(DTS_SPDIF_NO_OUTPUT)
- &DSP3Info_AC3,
- #else
- &DSP3Info_CD,
- #endif
- #endif
- #else
- #if defined(SPHE8202) || defined(SPHE1000)
- &DSP3Info_DTS,
- #else
- &DSP3Info_DTSCD,
- #endif
- #endif
-
- //CODING_MODE_WMA
- #ifdef SUPPORT_WMA
- &DSP3Info_WMA,
- #else
- &DSP3Info_MP3,
- #endif
- #ifdef SUPPORT_SPDIF_IN
- //CODING_MODE_SPDIFINCD
- &DSP3Info_SPDIFINCD,
-
- //CODING_MODE_SPDIFINAC3
- &DSP3Info_SPDIFINAC3,
- #ifdef SUPPORT_SPDIF_DTS
- //CODING_MODE_SPDIFINDTS
- &DSP3Info_SPDIFINDTS,
- #endif
- #else
- //CODING_MODE_SPDIFINCD
- &DSP3Info_MP3,
-
- //CODING_MODE_SPDIFINAC3
- &DSP3Info_MP3,
-
- //CODING_MODE_SPDIFINDTS
- &DSP3Info_MP3,
- #endif
- //CODING_MODE_TUNER
- #if defined(SUPPORT_AV_IN) || defined(SUPPORT_SECOND_AV_IN) || defined(SUPPORT_TUNER_MV114)
- &DSP3Info_TUNER,
- #else
- &DSP3Info_MP3,
- #endif
- //CODING_MODE_NOISE
- #ifdef SUPPORT_TESTSPK
- &DSP3Info_NOISE,
- #else
- &DSP3Info_MP3,
- #endif
- //CODING_MODE_AAC
- #ifdef SUPPORT_AAC
- &DSP3Info_AAC,
- #else
- &DSP3Info_MP3,
- #endif
- };
- // **************************************************************************************** //
- static inline UINT32 GetDSPCodecIndex( UINT32 uiCodingMode )
- {
- UINT32 i = 0;
- for( ; i < 32; i++ )
- {
- if( ( uiCodingMode >> i ) & 0x01 )
- break;
- }
- // if something wrong with our input, using MP3 codec
- return ( i >= sizeof( g_aDSP3CodecInfo ) / sizeof( DSP3_CODEC_INFO* ) ) ? CODING_MODE_MP3 : i;
- }
- // **************************************************************************************** //
- static inline const DSP3_CODEC_INFO* GetDSPCodecInfo( UINT32 uiIndex )
- {
- return g_aDSP3CodecInfo[ uiIndex ];
- }
- // **************************************************************************************** //
- #endif