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

📄 vd.h

📁 三星ic 9980的源代码. 718版.
💻 H
📖 第 1 页 / 共 2 页
字号:
/******************************************************************************
 * File name  : Vd.h                                                          *
 * Start date : 03. July. 2002                                                *
 * By         : Noh Kyungheon                                                 *
 * Contact    :                                                               *
 * Description: Header file of Video Decoder unit control software            *
 ******************************************************************************
 */ 
#ifndef __VD_H__
#define __VD_H__

/* register define */

#define VD_BASE		  			0x328000

#define rVD_CLC_H				(*(volatile unsigned int *)(VD_BASE+0x00))
#define rVD_CLC_L				(*(volatile unsigned int *)(VD_BASE+0x02))
#define rVD_ID_H					(*(volatile unsigned int *)(VD_BASE+0x04))
#define rVD_ID_L					(*(volatile unsigned int *)(VD_BASE+0x06))

/* control registers */

#define rVD_IRQC_H				(*(volatile unsigned int *)(VD_BASE+0x08))
#define rVD_IRQC_L				(*(volatile unsigned int *)(VD_BASE+0x0A))
#define rVD_IRQM_H				(*(volatile unsigned int *)(VD_BASE+0x0C))
#define rVD_IRQM_L				(*(volatile unsigned int *)(VD_BASE+0x0E))
#define rVD_CMD_H				(*(volatile unsigned int *)(VD_BASE+0x10))
#define rVD_CMD_L				(*(volatile unsigned int *)(VD_BASE+0x12))
#define rVD_ST_ACT_H			(*(volatile unsigned int *)(VD_BASE+0x14))
#define rVD_ST_ACT_L			(*(volatile unsigned int *)(VD_BASE+0x16))
#define rVD_ST_INACT_H			(*(volatile unsigned int *)(VD_BASE+0x18))
#define rVD_ST_INACT_L			(*(volatile unsigned int *)(VD_BASE+0x1A))
#define rVD_CTRL_H				(*(volatile unsigned int *)(VD_BASE+0x1C))
#define rVD_CTRL_L				(*(volatile unsigned int *)(VD_BASE+0x1E))
#define rVD_DET_CTRL_H			(*(volatile unsigned int *)(VD_BASE+0x20))
#define rVD_DET_CTRL_L			(*(volatile unsigned int *)(VD_BASE+0x22))
#define rVD_ER_MBP_H			(*(volatile unsigned int *)(VD_BASE+0x24))
#define rVD_ER_MBP_L			(*(volatile unsigned int *)(VD_BASE+0x26))
#define rVD_CONCEAL_THRES_H 	(*(volatile unsigned int *)(VD_BASE+0x30))
#define rVD_CONCEAL_THRES_L 	(*(volatile unsigned int *)(VD_BASE+0x32))
#define rVD_PTS_H				(*(volatile unsigned int *)(VD_BASE+0x28))
#define rVD_PTS_L				(*(volatile unsigned int *)(VD_BASE+0x2A))
#define rVD_MB_ADR_H			(*(volatile unsigned int *)(VD_BASE+0x2C))
#define rVD_MB_ADR_L			(*(volatile unsigned int *)(VD_BASE+0x2E))
#define rVD_LAST_PIC_ADR_H 	(*(volatile unsigned int *)(VD_BASE+0x34))
#define rVD_LAST_PIC_ADR_L 		(*(volatile unsigned int *)(VD_BASE+0x36))
#define rVD_PROC_PTR_H			(*(volatile unsigned int *)(VD_BASE+0x38))
#define rVD_PROC_PTR_L			(*(volatile unsigned int *)(VD_BASE+0x3A))


/* Header information in Elementary stream */

#define rVD_TR0_H				(*(volatile unsigned int *)(VD_BASE+0x40))	// seq header
#define rVD_TR0_L				(*(volatile unsigned int *)(VD_BASE+0x42))	// seq header
#define rVD_TR1_H				(*(volatile unsigned int *)(VD_BASE+0x44))	// seq header
#define rVD_TR1_L				(*(volatile unsigned int *)(VD_BASE+0x46))	// seq header
#define rVD_TR2_H				(*(volatile unsigned int *)(VD_BASE+0x48))	// seq ext hd
#define rVD_TR2_L				(*(volatile unsigned int *)(VD_BASE+0x4A))	// seq ext hd
#define rVD_TR3_H				(*(volatile unsigned int *)(VD_BASE+0x4C))	// seq disp ext hd
#define rVD_TR3_L				(*(volatile unsigned int *)(VD_BASE+0x4E))	// seq disp ext hd
#define rVD_TR4_H				(*(volatile unsigned int *)(VD_BASE+0x50))	// seq disp ext hd
#define rVD_TR4_L				(*(volatile unsigned int *)(VD_BASE+0x52))	// seq disp ext hd
#define rVD_TR5_H				(*(volatile unsigned int *)(VD_BASE+0x54))	// gop header
#define rVD_TR5_L				(*(volatile unsigned int *)(VD_BASE+0x56))	// gop header
#define rVD_TR6_H				(*(volatile unsigned int *)(VD_BASE+0x58))	// pic header
#define rVD_TR6_L				(*(volatile unsigned int *)(VD_BASE+0x5A))	// pic header
#define rVD_TR7_H				(*(volatile unsigned int *)(VD_BASE+0x5C))	// pic cod ext hd
#define rVD_TR7_L				(*(volatile unsigned int *)(VD_BASE+0x5E))	// pic cod ext hd
#define rVD_TR80_H				(*(volatile unsigned int *)(VD_BASE+0x60))	// frame cent offset
#define rVD_TR80_L				(*(volatile unsigned int *)(VD_BASE+0x62))	// frame cent offset
#define rVD_TR81_H				(*(volatile unsigned int *)(VD_BASE+0x64))	// frame cent offset
#define rVD_TR81_L				(*(volatile unsigned int *)(VD_BASE+0x66))	// frame cent offset
#define rVD_TR82_H				(*(volatile unsigned int *)(VD_BASE+0x68))	// frame cent offset
#define rVD_TR82_L				(*(volatile unsigned int *)(VD_BASE+0x6A))	// frame cent offset
#define rVD_TR9_H				(*(volatile unsigned int *)(VD_BASE+0x6C))	// pic disp ext hd
#define rVD_TR9_L				(*(volatile unsigned int *)(VD_BASE+0x6E))	// pic disp ext hd



/* Concealment motion vector base address*/

#define rVD_CMV_BASE_H			(*(volatile unsigned int *)(VD_BASE+0x100))
#define rVD_CMV_BASE_L			(*(volatile unsigned int *)(VD_BASE+0x102))



/* Frame memory base pointers */
// 9908

#define rY_PTR0TO_H				(*(volatile unsigned int *)(VD_BASE+0x200))
#define rY_PTR0TO_L				(*(volatile unsigned int *)(VD_BASE+0x202))
#define rY_PTR0TE_H				(*(volatile unsigned int *)(VD_BASE+0x204))
#define rY_PTR0TE_L				(*(volatile unsigned int *)(VD_BASE+0x206))
#define rY_PTR1TO_H				(*(volatile unsigned int *)(VD_BASE+0x210))
#define rY_PTR1TO_L				(*(volatile unsigned int *)(VD_BASE+0x212))
#define rY_PTR1TE_H				(*(volatile unsigned int *)(VD_BASE+0x214))
#define rY_PTR1TE_L				(*(volatile unsigned int *)(VD_BASE+0x216))
#define rY_PTR2TO_H				(*(volatile unsigned int *)(VD_BASE+0x218))
#define rY_PTR2TO_L				(*(volatile unsigned int *)(VD_BASE+0x21A))
#define rY_PTR2TE_H				(*(volatile unsigned int *)(VD_BASE+0x21C))
#define rY_PTR2TE_L				(*(volatile unsigned int *)(VD_BASE+0x21E))


// I don't want to define the following registers!! jp   ? why and how ???
#define rY_PTR0BO				(*(volatile unsigned int *)(VD_BASE+0x230))
#define rY_PTR0BE				(*(volatile unsigned int *)(VD_BASE+0x230))
#define rY_PTR1BO				(*(volatile unsigned int *)(VD_BASE+0x230))
#define rY_PTR1BE				(*(volatile unsigned int *)(VD_BASE+0x230))
#define rY_PTR2BO				(*(volatile unsigned int *)(VD_BASE+0x230))
#define rY_PTR2BE				(*(volatile unsigned int *)(VD_BASE+0x230))

/* VBV buffer control pointer register */

#define rVBV_RD_PTR_H			(*(volatile unsigned int *)(VD_BASE+0x240))
#define rVBV_RD_PTR_L			(*(volatile unsigned int *)(VD_BASE+0x242))



#define rVBV_TR_SIZE_H			(*(volatile unsigned int *)(VD_BASE+0x244 ))
#define rVBV_TR_SIZE_L			(*(volatile unsigned int*)(VD_BASE+0x246 ))


/* 9908 3 frame structure */
// 9908 Uses above addresses for VBV area setting

#define rVBV_AREA_START_H 		(*(volatile unsigned*)(VD_BASE + 0x248))
#define rVBV_AREA_START_L 		(*(volatile unsigned*)(VD_BASE + 0x24A))



#define rVBV_AREA_END_H 		(*(volatile unsigned*)(VD_BASE + 0x24C))
#define rVBV_AREA_END_L 		(*(volatile unsigned*)(VD_BASE + 0x24E))



// 9908 does not use user_data
#define rPTR0_B2R_CTRL_H  		(*(volatile unsigned int *)(VD_BASE+0x220))
#define rPTR0_B2R_CTRL_L  		(*(volatile unsigned int *)(VD_BASE+0x222))
#define rPTR1_B2R_CTRL_H  		(*(volatile unsigned int *)(VD_BASE+0x224))
#define rPTR1_B2R_CTRL_L  		(*(volatile unsigned int *)(VD_BASE+0x226))
#define rPTR2_B2R_CTRL_H  		(*(volatile unsigned int *)(VD_BASE+0x228))
#define rPTR2_B2R_CTRL_L  		(*(volatile unsigned int *)(VD_BASE+0x22A))


#define rUSER_DATA_WR_PTR_H  	(*(volatile unsigned int *)(VD_BASE+0x234))
#define rUSER_DATA_WR_PTR_L  	(*(volatile unsigned int *)(VD_BASE+0x236))
#define rUSER_DATA_END_PTR_H 	(*(unsigned *)(VD_BASE+0x238))
#define rUSER_DATA_END_PTR_L 	(*(unsigned *)(VD_BASE+0x23A))



// Rewinding point
#define rREW_POINT_H 			(*(volatile unsigned int *)(VD_BASE + 0x70))
#define rREW_POINT_L 			(*(volatile unsigned int *)(VD_BASE + 0x72))


/* Quantization table store base address reg */

#define ACT_INTRA_IQ_TABLE_H 		(volatile unsigned int *)(VD_BASE+0x400)
#define ACT_INTRA_IQ_TABLE_L 		(volatile unsigned int *)(VD_BASE+0x402)
#define ACT_INTER_IQ_TABLE_H 		(volatile unsigned int *)(VD_BASE+0x440)
#define ACT_INTER_IQ_TABLE_L 		(volatile unsigned int *)(VD_BASE+0x442)
#define INACT_INTRA_IQ_TABLE_H 	(unsigned *)(VD_BASE+0x480)
#define INACT_INTRA_IQ_TABLE_L 	(unsigned *)(VD_BASE+0x482)
#define INACT_INTER_IQ_TABLE_H 	(unsigned *)(VD_BASE+0x4c0)
#define INACT_INTER_IQ_TABLE_L 	(unsigned *)(VD_BASE+0x4c2)


#define ACT_INTRA_IQ_TABLE			(volatile unsigned int *)(VD_BASE+0x400)

#define ACT_INTER_IQ_TABLE 			(volatile unsigned int *)(VD_BASE+0x440)

#define INACT_INTRA_IQ_TABLE 		(unsigned *)(VD_BASE+0x480)

#define INACT_INTER_IQ_TABLE 		(unsigned *)(VD_BASE+0x4c0)

/* CMD description */
#define VD_STOP						0x00
#define VD_PIPE_INIT				0x01
#define VD_INIT						0x02
#define VD_SWITCH_CONTEXT			0x03
#define VD_RESET_CMBCNT			0x04
#define VD_FLUSH_VLDB				0x05
#define VD_FLUSH_PSPA				0x06
#define VD_FLUSH_BUF				0x07
#define VD_VLDB_RELEASE			0x08
#define VD_PARSE_STREAM			0x09
#define VD_WRITE_UD2MEM			0x0A
#define VD_DATA_AVAIL				0x0B
#define VD_DEC_MB					0x0C
#define VD_DEC_MB_ROW				0x0D
#define VD_DEC_PIC					0x0E
#define VD_DEC_UNTIL_PIC			0x0F

/*for 3-Frame decoding */
#define VD_DEC_UNTIL_PIC_FL  		0x10F
#define VD_DEC_PIC_FL				0x10E 

#if B_PICTURE_COMPRESS

⌨️ 快捷键说明

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