⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stereo_user.h

📁 关于DVD上的PCM的解码的代码,PCM的DSP压缩,解调的算法,用RISC32指令来写.
💻 H
字号:
/* location in DRAM for the left search_buffer (correlation), size 0x1000 max*/
#ifdef EFFECT
#if	LS388
#define LSBUF_START_high  0x11           //0x1f
#else	// LS388
#define LSBUF_START_high  0x1e           //0x1f
#endif	// LS388
#define LSBUF_START_low   0xa000
#define LSBUF_END         0xb000
#else	//EFFECT
#define LSBUF_START_high  0xf
#define LSBUF_START_low   0xa000
#endif 	//EFFECT

/* location in DRAM for the right search_buffer, size 0x1000 max */
#ifdef EFFECT
#if	LS388
#define RSBUF_START_high  0x11           //0x1f
#else	// LS388
#define RSBUF_START_high  0x1e           //0x1f
#endif	// LS388
#define RSBUF_START_low   0xb000
#define RSBUF_END         0xc000
#else	//EFFECT
#define RSBUF_START_high  0xf
#define RSBUF_START_low   0xb000
#endif 	//EFFECT


/* location in DRAM for the history of the filter, left and right channel */
/* ByteSize=0x2e : 0xc000-0xc02e, 0xc040-0xc06e */
#define Lhistory   0xc000
/* left history starts at @ 7c000*/
#define Rhistory   0xc040
/* right history starts at @ 7c080*/

/* location in the DRAM for the pointer on history, left and right channel */
#define Lhist_point       0xc030
/* left history_ptr is located at @ 0x7c030 */
#define Rhist_point       0xc070
/* right history_ptr is located at @ 0x7c070 */


/* trebble bass filters definition */
/* location in DRAM of the history buffers for the trebble bass filters */
/* buffers are located at adresses 0x7c080 and 0x7c090, each =4Bytes */
#define Lu0u1			0xc080
#define Ru0u1			0xc090

/* 3D sound filter definition */
/* location in DRAM of the history of the filter for the 3D sound */
/* buffer TDu0u1 is located at adress 0x7c0a0, 4 Bytes  */
#define TDu0u1          0xc0a0

/* location in DRAM of the history buffer for the trebble filter (9 Khz) */
#define TLu0u1          0xc0b0
#define TRu0u1          0xc0c0

/* location in DRAM of the history of the filter for decimation by 4 (echo)*/
/* buffer for decimation = 0xfe Bytes, 0xc100-0xc200 */
#define dec_hist        0xc100

  
/* location in DRAM of the history of the filter for rate sampling (micro) */
/* buffer for the interpolation : 32 elements */
; adress =0x7c220
#define rate_hist	   	0xc220


/* echo related definitions : location in DRAM of AP histories */
#ifdef EFFECT
#define HBASE			0xc300
#define	pcm_dec_hist	0x8000			//used by pcm_dec.s for decimation

#else  //EFFECT
#define HBASE			0x8000
#endif //EFFECT

/* Echo decimated samples storage */
#define	Decimated_echo_storge_start (0x8000>>2)
//#define	Decimated_echo_storge_start (0x7000>>2)			//ZhangWei:it can't used in PCM
#define	Decimated_echo_storge_end	(0x9400>>2)
//#define	Decimated_echo_storge_end	(0x8400>>2)		//ZhangWei
#define	Decimated_echo_storge_size	(0x1400>>2)

; begin/end adress in DRAM of DL1 history (M0=256)
#define DL1_SIZE		0x200
#define DL1_START		HBASE
#define DL1_END			DL1_START+DL1_SIZE

; begin/end adress in DRAM of OAP1 history (T3=64)
#define OAP1_SIZE		0x80
#define OAP1_START		DL1_END
#define OAP1_END		OAP1_START+OAP1_SIZE

; begin/end adress in DRAM of NAP1 history (M1=242)
#define NAP1_SIZE		0x1e4
#define NAP1_START		OAP1_END
#define NAP1_END		NAP1_START+NAP1_SIZE

; begin/end adress in DRAM of NAP2 history (M2=91)
#define NAP2_SIZE		0xb6
#define NAP2_START		NAP1_END
#define NAP2_END		NAP2_START+NAP2_SIZE

;begin/end adress in DRAM of small history between two AOP
#define DL2_SIZE		0x14

#ifdef EFFECT
#define DL2_START		NAP2_END+2   //make it word-aligned
#else //EFFECT
#define DL2_START		NAP2_END
#endif //EFFECT

#define DL2_END			DL2_START+DL2_SIZE

;begin/end adress in DRAM of NAP3 history (M4=330)
#define NAP3_SIZE		0x294
#define NAP3_START		DL2_END
#define NAP3_END		NAP3_START+NAP3_SIZE

;begin/end adress in DRAM of OAP2 history (T5=396)
#define OAP2_SIZE		0x318
#define OAP2_START		NAP3_END
#define OAP2_END		OAP2_START+OAP2_SIZE

;begin/end adress in DRAM of the history of the low-pass filter (T6=15)
#define LP_SIZE			0x1c
#define LP_START		OAP2_END
#define LP_END			LP_START+LP_SIZE

; total buffer size 
#define TOTAL_SIZE		0xaf6

#ifdef EFFECT
#if	LS388
#if	SVCD
#define	DataSeg			0xa	//0x21
#else	// SVCD
#define	DataSeg			0x11
#endif	// SVCD
#else	// LS388
#define	DataSeg			0x1e
#endif	// LS388
#else
#define	DataSeg			0xf
#endif

#define	OLD_PCM_BUF_SEG	0		// 1
#define	OLD_PCM_IN_SEG	0

//---------------------- added to merge mpeg and key-shift ------------------------
//in 0x1e segmant

#if 0
//0x0000 - 0x1fff for mpeg_context
#define mpeg_context 0x0000

//0x2000 - 0x3fff for keyshift_context
#define keyshift_context 0x2000

//0x4000 - 0x7000 for middle_buf
#define MIDDLE_BUF 0x4000
#define MIDDLE_BUF_WORD 0x1000
#define MIDDLE_BUF_END_WORD 0x1c00
#define MIDDLE_BUF_SIZE 0x3000
#define MIDDLE_BUF_SIZE_WORD 0xc00

#else

//0xd000 - 0xefff for mpeg_context
#define mpeg_context 0xd000

//0x3000 - 0x4fff for keyshift_context
#define keyshift_context 0x3000

//0x5000 - 0x8000 for middle_buf
#define MIDDLE_BUF 0x5000
#define MIDDLE_BUF_WORD 0x1400
#define MIDDLE_BUF_END_WORD 0x2000
#define MIDDLE_BUF_SIZE 0x3000
#define MIDDLE_BUF_SIZE_WORD 0xc00
#endif

//0x8000 - 0x8fff for SRS_context
#define SRS_context	0x8000


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -