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

📄 nvgadefs.h

📁 Zoran V966 DVD 解码 Soc芯片的源程序
💻 H
📖 第 1 页 / 共 3 页
字号:

typedef struct
{
	long VOBU_SA;
	BOOL V_Exist1;
	BOOL V_Exist2;
} S_VOBU_SRI;

typedef struct
{
	DWORD NV_PCK_SCR;		// the lower 32 bits of SCR_base
	DWORD NV_PCK_LBN;		// address of NV_PCK in wich DSI is included with RLBN...
	DWORD VOBU_EA;			// End address of VOBU
	DWORD VOBU_1STREF_EA;	// first reference picture end address
	DWORD VOBU_2NDREF_EA;
	DWORD VOBU_3RDREF_EA;
	DWORD C_ELTM;			// Cell elapse time
	WORD  VOBU_VOB_IDN;		// VOB ID number
	BYTE  VOBU_C_IDN;			// Cell ID number
} S_DSI_GI;

typedef struct
{
	DWORD ILVU_EA;		  // interleaved unit end address
	DWORD NT_ILVU_SA;	  // next interleaved unit start address
	DWORD VOB_V_S_PTM;	// video start PTM in VOB
	DWORD VOB_V_E_PTM;	// video end PTM in VOB
	WORD  VOBU_SML_CAT; // unit end, unit start, ILVU, PREU flag
	WORD  NT_ILVU_SZ;		// next interleaved unit size
} S_SML_PBI;



// Op codes used with CRunScheduledOp
enum { STOP_OP = 1,
       FLUSH_OP,
       VOBU_STILL_OP,

       PCI_DECODE,
       THREAD_SWITCH,

       HLI_S_OP,
       HLI_E_OP,
       BTN_SL_E_OP
};


#define PCI_SIZE      790 /* originaly 1024, specs says  979 but we don't care about 189 bytes of Recording information */

#ifdef LANGUAGE_LEARNING_SUPPORT
#define MAX_NUMOF_DSI_GRAMMER_CMD		8

#define DSI_GRAMMER_CMD_SIZE		    8
#define DSI_GRAMMER_ID_SIZE				4
#define DSI_GRAMMER_NUMCMD_SIZE			4
#define DSI_GRAMMER_ID_INDEX			546
#define DSI_GRAMMER_NUMCMD_INDEX		( DSI_GRAMMER_ID_INDEX + DSI_GRAMMER_ID_SIZE )	//Only the last byte is usefull
#define DSI_GRAMMER_CMD_INDEX			( DSI_GRAMMER_NUMCMD_INDEX + DSI_GRAMMER_NUMCMD_SIZE )
#define DSI_SIZE	                    618//=( MAX_NUMOF_DSI_GRAMMER_CMD*8 + DSI_GRAMMER_NUMCMD_SIZE + DSI_GRAMMER_ID_SIZE )
#else
#define DSI_SIZE      546 /* originaly 1024, specs says 1017 but there are 471 of reserved bytes (don't care ) */
#endif

#define PGC_GI_SIZE		(236+6) /* read 6 more bytes for the size of CMDT */

// structure filled by C_PGC_PGMAP.GET_ENTRY_CELL()

typedef struct {
	WORD entry_cell; // entry cell number
	WORD first_non_cell; // entry cell of next program or 0 for last prog
} S_PG;

//	structure filled by C_PTT.GET_ENTRY(), C_VTS.GetPTT() and also by
//	  C_PGC_TBL.Fill_Struct(), C_PGC_TBL.Fill_Status()
typedef struct {
	DWORD PGCI_SA;
	WORD PGCN;
	WORD PGN;
	BYTE   status;
} S_PGC_SRP;    // This is PGCI_SRP and PTT_SRP plus the status

// S_PGC_SRP status 
enum {
  VALID_PGCN=0,
  WRONG_PGCN,
  WRONG_PTLV,
  NOFPLAY_PGC
};

//  structure filled by C_TT.Get_TT_SRP()
typedef struct {
	DWORD VTS_SA;			    // Start adress of the VTS
	WORD N_PTT;				    // Number of Part_of_Titles
	WORD Parental_ID;		  // Parental_ID_Field for Title
	BYTE Title_Playback;		// Title Playback Type
	BYTE N_Angle;			    // Number of Angles
	BYTE VTSN;				      // VTS number
	BYTE VTS_TTN;			    // VTS Title number
} S_TT_SRP;

//  ATT_SRP structure 
typedef struct {
	BYTE    ATT_CAT;       		// category
	BYTE    ATT_PG_Ns;			// Number of programs
	BYTE    AGL_Ns;             // Number of angles (only for AVTT)
	BYTE    ATSN;	   		    // ATS/VTS number
	BYTE    ATS_TTN;  		    // ATS/VTS Title number
	DWORD   ATT_PB_TM;          // playback time
	DWORD   ATS_SA;			    // Start adress of the ATS/VTS
	int     PGIdx;           // index of requested track within this ATT
} S_ATT_SRP;

// structure filled by C_PGC_GI::Get_Program_Content()
typedef struct {
	WORD Number_of_Programs;
	WORD Number_of_Cells;
} S_PGC_CNT;

//	structure filled by C_PGC_GI.Get_Audio_Control_Info()
typedef struct  {
	BYTE decod_AST_Downmix;
	BYTE decod_AST;
	BOOL availability;
} S_PGC_AST_CTL;

//	structure filled by C_PGC_GI.Get_SP_Control_Info()
typedef struct {
	BYTE decod_SP_43;
	BYTE decod_SP_Wide;
	BYTE decod_SP_Letterbox;
	BYTE decod_SP_Panscan;
	BOOL availability;
} S_PGC_SPST_CTL;

//	structure filled by C_PGC_GI.Get_Navigation_Info()
typedef struct {
	WORD Next_PGCN;
	WORD Prev_PGCN;
	WORD GoUp_PGCN;
	BYTE PG_Playback;
	BYTE Still_Time;
} S_PGC_NV_CTL;

typedef enum {
  AC_3  = 0x00, 
  MPEG1 = 0x02,
  MPEG2 = 0x03,
  LPCM  = 0x04,
  DTS   = 0x06
}DVD_AUDIO_STREAM_TYPE;

//	structure filled by C_???_ATR.Get_Audio_MultiChanel_Attr()
typedef struct {
	BYTE audio_mix;
	BYTE ACH_mixmode;
	BYTE ACH_contents;
	BYTE alpha;
	BYTE betha;
} S_MU_A_ATR;	// audio streams may be #0 to #7

//	structure filled by C_???_ATR.Get_SP_Attr()
typedef struct {
	WORD spec_code;
	BYTE coding_mode;  // subpicture coding mode
	BYTE stype;	       //sub-picture type
	BYTE spec_code_ext;
} S_SP_ATR;


//  structure filled by C_C_POSIT.Get_Cell_Position()
typedef struct {
	WORD C_VOB_IDN; //VOB number of the cell
	BYTE C_IDN; // cell number
} S_C_POSIT;


//  structure filled by C_C_PBIT.Get_Cell_PBI()
enum { 
  NO_BLOCK    = 0, 
  ANGLE_BLOCK = 1,

  FIRST_CELL  = 1, 
  LAST_CELL   = 3 
};

typedef struct {
    DWORD PBTM;
    DWORD FVOBU_SA;
    DWORD FILVU_EA;
    DWORD LVOBU_SA;
    DWORD LVOBU_EA;
   	BYTE   still_time;
   	BYTE   command_number;
   	BYTE   position_in_block;
   	BYTE   type;
   	BYTE   block_type;
   	BOOL  seamless;
   	BOOL  interleaved;
   	BOOL  discontinuity;
   	BOOL  seamless_angle_change;
   	BOOL  VOBU_still;
   	BOOL  restricted_access;
} S_C_PBI;

typedef struct {
   	BYTE   ATS_C_IXN;
   	BYTE   ATS_C_TY;
    DWORD  ATS_C_SA;
    DWORD  ATS_C_EA;
} S_ATS_C_PBI;

typedef struct
{
	DWORD CP_SA; // cell piece start LBN address
	DWORD CP_EA; // cell piece end LBN address
} S_CP;

#define T_ATRT_SIZE 472
#define M_ATRT_SIZE  92

#define VMGI_MAT_SIZE 348
#define VTSI_MAT_SIZE 984



/************ C_SPRM class translation - data *****************/
#define NSPRM	25
typedef struct{
	WORD value[NSPRM]; /* used by UI */
	/* WORD initial[NSPRM]; */ /* TC0515 : Remove initial for memory saving */
}S_SPRM;

/************ C_GPRM class translation - data *****************/
#define NGPRM	16
#define REGISTER 0
#define COUNTER	 1

#define SET_GPRM_REGISTER( mode_flags, n )		(mode_flags) &= 0xFFFF^(1<<n)
#define SET_GPRM_COUNTER( mode_flags, n )		(mode_flags) |= (1<<n)
#define IS_GPRM_COUNTER( mode_flags, n)			((mode_flags)&(1<<n))
typedef struct{
	WORD value[NGPRM];
	WORD mode_flags;
}S_GPRM;


/************ C_DSI C_DSI_PKT class translataion - data *************/
enum { DISABLED = 0, ARMED  = 1, ACTIVE   = 3 };

typedef struct {
	// previous VOB_V_E_PTM, actual VOB_V_S_PTM
	DWORD pVOB_V_E_PTM;
	DWORD aVOB_V_S_PTM;
	long STCoffset;
	/* from C_DSI */
	S_DSI_GI  dsi_gi;
	S_SML_PBI sml_pbi;
	WORD angle;

	/* MR: Only need 1 buffer, no need for ping-pong buffer */
	/* int container_index; */
	/* BYTE buffer[ 2 ][ DSI_SIZE ];  */

	BYTE* sc_handle;

	// DSI-based VOBU processing
	S_CP cell, cell_piece, vobu;
	// E-STD model flag and PCI address

	// SPU stream
	BYTE SPUstream;

	BYTE E_STDmode;
	// This is a "Patch" for Nav Test Disc vol.1 Pres.Still test:
	BOOL Is_CellVOBU_Still; // Hold TRUE if the current cell is a VOBU still cell
	// End of Patch
	BOOL Is_LastVOBU;
	BOOL Is_SeamlessAngleChange;  // Updated from c_pbi - signals if angle changes should be seamless
	BOOL Is_DSI_Valid;
	BOOL actual_container;
	DWORD dwAngleScanVobu;//LX0703
#ifdef LANGUAGE_LEARNING_SUPPORT
	BYTE ucNumOfGrammerCmds;
	BYTE ucGrammerCmdIndex;
#endif	
	DWORD dwLatestVOBUSize;//LX082402:
}S_DSI;


/********** Class from presentation.cpp ********/
typedef struct{
  DWORD  PTM;
  DWORD  arg;
  LBN    VOBU;
  BYTE  func;
  BYTE	client_type;
  BYTE  e_nbr;
}S_ScheduledOp;

#define SCHEDULE_CLIENT_RTPB	1
#define SCHEDULE_CLIENT_PCI		2
#define SCHEDULE_CLIENT_AOB_RTPB		3

#define SCHOP_PTM( schop )	(((S_ScheduledOp *) schop)->PTM)


typedef struct {
	S_DATA_CONTAINER c;
	S_ScheduledOp opS;
	BYTE* sc_handle;  
} PCI_BUFFER;

/************ C_PCI C_PCI_PKT class translation - data *************/

#define NO_PCI_BUFFER_REJECTED	0xFF

typedef struct {
    long buffered_packets;
    long decoded_packets;
    long empty_pumps;
    int packet_index; // MODULU so int is OK
    int opS_index;    // MODULU so int is OK
    S_DATA_CONTAINER *crt_packet, *next_packet;
    PCI_BUFFER buffer[ MAX_PCI_BUFFER ]; 

	BYTE* PCI_SA_sc_handle;

	/* from C_PCI */
    S_PCI_GI pci_gi;
    S_HL_GI  hl_gi;
    S_ScheduledOp hli_s, hli_e;
    S_ScheduledOp btn_sl_e;
    WORD angle;
    WORD previous_APSTB;
    BYTE GRN;          /* number of groups */
    BYTE crt_GR;       /* group currently aimed at */
	BYTE rejected_buffer_num; /* indicate PCI buffer number that was previously rejected. -1 means none were rejected */

    // Reference time to be set at the next PCI
    BOOL setReferenceTime;
    BOOL decoder_locked;
    BOOL active_HLIdecoder;
    BOOL stopped;
} S_PCI;

/************ C_DOM class translation - data ***********************/
typedef struct{
	// LBN address of the corresponding VOBS
	LBN VOBS_LBNaddress;

	S_SC_STORAGE stream_attr_sc_st;
	/*S_SC_STORAGE PGC_table_sc_st;*//* ZORAN TC0116 : Ultimate Toy Story Box disc #3 */

	BYTE* atrt_data_sc_handle;

	S_FPOS  pgcit_addr;
	S_FPOS  fpdom_addr;
/* <<< ZORAN TC0116 : Ultimate Toy Story Box disc #3 */
	WORD pgc_count;
	BYTE b_init_pgc_table;
/* ZORAN TC0116 >>> */

	BYTE type; /* Title domain or Menu domain */
}S_DOM;

/********** C_VMG class translation -data **************/
typedef struct{
	S_SC_STORAGE parental_table_sc_st;
	S_DOM  menu;
	S_DOM power_on;
	S_STORAGE st;
	S_SC_STORAGE title_table_sc_st;
	/* S_SC_STORAGE ptl_data_sc_st; */ /* not needed, equivalent to parental_table_sc_st */

#ifdef NO_VMGI_DATA_REDUCTION
	BYTE data[ VMGI_MAT_SIZE ];
#else

⌨️ 快捷键说明

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