NVGADEFS.H
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:36k
- /***********************************************************************/
- /* File: */
- /* ===== */
- /* Descripton: */
- /* =========== */
- /* */
- /* Log: */
- /* ===== */
- /*
- $Name: $
- $Header: /I76/I76_Common/I76_Reference/Playcore/Nav_DVD/Header/NVGADEFS.H 10 04-03-31 20:26 Angieh $
- $Log: /I76/I76_Common/I76_Reference/Playcore/Nav_DVD/Header/NVGADEFS.H $
- *
- * 10 04-03-31 20:26 Angieh
- * Add support for index and page search.
- *
- * 9 2/20/04 6:17p Glenl
- * Merged S1 code
- *
- * 8 12/30/03 11:28a Leonh
- * Angieh:Change for DVD AUDIO navigator header.
- *
- * 16 11/06/03 8:34a Leslie
- * clean up the code
- *
- * 15 10/20/03 11:46a Leslie
- * check the variable type and change the dvda rtpb schedule way as the
- * same with DVD Video
- *
- * 14 8/20/03 2:56p Leonh
- * Merge dvd audio code with the latest nav_dvd code with reference
- *
- * 9 03-05-13 16:46 Leonh
- * merge pgc_construct()
- *
- * 8 03-05-08 18:18 Leonh
- *
- * 7 03-05-08 13:46 Leonh
- *
- * 6 03-04-30 15:35 Fwang
- * audio pgc define
- *
- * 5 03-04-30 10:41 Fwang
- * compilation error
- *
- * 4 03-04-28 17:52 Fwang
- * nav command define for DVDA
- *
- * 3 03-04-28 17:47 Fwang
- * pgc type define
- *
- * 2 03-04-28 17:40 Fwang
- * Add DVDA definition.
- *
- * 1 03-04-28 11:15 Fwang
- * Initial for DVDA
- *
- * 7 03-07-30 18:09 Leonh
- * differentiate the cell presentation access restriction and parent level
- * wrong
- *
- * 9 27/05/02 18:13 Nirm
- * - Fixed typo in pre-compilation definition.
- *
- * 8 5/21/02 12:38p Leslie
- * Support 5 DVD Bookmarks
- *
- * 7 9/05/02 21:47 Nirm
- * - Added pre-caching of CGMS information, in order to minimize
- * File-System accesses when possible.
- *
- * 6 9/05/02 16:14 Nirm
- * - Alternative implementation to CGMS support.
- *
- * 5 5/01/02 14:35 Rinata
- * get category code and copy bit
- *
- * 4 4/30/02 17:11 Rinata
- * CGMS/WSS support
- *
- * 3 4/26/02 12:46p Leslie
- * Comment out useless Macros.
- * Replace npi_flags with npi_resume_lbn in
- * S_NAV_PK_INFO_FIFO
- *
- * 2 23/04/02 9:34 Nirm
- * - Added dependency in "Config.h".
- *
- * 1 2/17/02 12:12 Rinata
- *
- * 1 2/17/02 11:38 Rinata
- *
- * 2 8/01/02 16:24 Nirm
- * Corrected Include-Paths.
- Revision 1.22 2001/09/28 23:11:02Z stephaneh
- Merged changes from ZCH for DVD navigator
- Revision 1.21 2001/05/17 17:50:34Z bhupeshv
- Added Tias' SRAM DATA savings.
- Revision 1.21 2001/05/15 10:55:23 tia
- Remove sprm.initial. Saves 48 bytes from SRAM.
- Revision 1.20 2001/03/29 04:48:15 tia
- Add DVD Chapter remain time information.
- Revision 1.19 2001/01/20 05:15:52 tia
- Fix for Bonus Disc Toy Story.
- Revision 1.18 2000/11/09 18:24:07 tia
- Revision 1.17 2000/07/27 22:11:30 tia
- Revision 1.16 2000/07/14 05:55:55 tia
- Revision 1.15 2000/07/13 00:01:38 tia
- Revision 1.14 2000/06/14 02:46:25 tia
- Revision 1.13 2000/06/06 20:59:46 tia
- Revision 1.12 2000/06/02 02:45:33 tia
- Revision 1.11 2000/05/24 23:32:22 tia
- Revision 1.10 2000/05/19 03:48:26 tia
- Revision 1.9 2000/05/17 02:41:38 tia
- Revision 1.8 2000/05/16 03:12:20 tia
- Revision 1.7 2000/05/13 02:20:58 tia
- Revision 1.6 2000/05/11 22:36:04 tia
- Revision 1.5 2000/05/02 23:31:30 tia
- Revision 1.4 2000/05/02 02:57:50 tia
- Revision 1.3 2000/04/27 02:47:18 tia
- Revision 1.2 2000/04/20 20:17:52 tia
- Revision 1.1 2000/04/18 18:51:12 tia
- Initial revision
- Revision 1.1 2000/04/14 02:02:12 tia
- Initial revision
- */
- /***********************************************************************/
- #include "Config.h" // Global Configuration - do not remove!
- #ifndef _NVGADEFS_H
- #define _NVGADEFS_H
- #include "PlaycoreNav_DVDHeaderhli_defs.h"
- #include "PlaycoreNav_DVDHeaderccmpeg.h"
- #include "PlaycoreNav_DVDHeaderstream.h"
- #include "PlaycoreNav_DVDHeaderdvddef.h"
- /* CRealTimePlayback and PCI opBuffer sizes, influence STATIC variable size requirements */
- enum {
- MAX_NP_INFO = 8, /* NAV PACK INFO FIFO depth, lag between DSI processing and PCI processing */
- MAX_SCHEDULED_OPS = 4,
- MAX_PCI_BUFFER = 2 /* 2 for ping-pong buffer */
- };
- //
- // Capability defines
- //
- typedef enum {AUDIO_ALGORITHM,
- VIDEO_ALGORITHM,
- AUDIO_MODE,
- VIDEO_MODE
- }PRESENTATION_CAP;
- // *************************************
- //
- // Video algorithm values (can be ORed together in return codes)
- //
- #define VIDEO_ALGORITHM_MPEG1 0x1
- #define VIDEO_ALGORITHM_MPEG2 0x3
- // *************************************
- //
- // Audio algorithm values (can be ORed together in return codes)
- //
- #define AUDIO_ALGORITHM_MPEG1 0x1
- #define AUDIO_ALGORITHM_MPEG2 0x3
- #define AUDIO_ALGORITHM_AC3 0x4
- #define AUDIO_ALGORITHM_PCM 0x8
- #define AUDIO_ALGORITHM_AC_3 0x4000
- #define AUDIO_ALGORITHM_MPEG 0x1000
- #define AUDIO_ALGORITHM_DTS 0x0800
- #define AUDIO_ALGORITHM_SDDS 0x0400
- #define AUDIO_ALGORITHM_LPCM_K 0x0080
- #define AUDIO_ALGORITHM_AC3_K 0x0040
- #define AUDIO_ALGORITHM_MPEG_K 0x0010
- #define AUDIO_ALGORITHM_DTS_K 0x0008
- #define AUDIO_ALGORITHM_SDDS_K 0x0004
- //#endif
- // *************************************
- //
- // Video mode values (can be ORed togethe in return codes)
- //
- // Video_SetMode syntax: mode details extra return
- //--------------------------------------------------------------------
- #define VIDEO_MODE_WIDE 0x1 /* - - success */
- #define VIDEO_MODE_LETTER_BOX 0x2 /* - - success */
- #define VIDEO_MODE_PAN_SCAN 0x4 /* - - success */
- // *************************************
- //
- // Audio mode values (can be ORed togethe in return codes)
- //
- // Audio_SetMode syntax: mode details extra return
- //--------------------------------------------------------------------
- #define AUDIO_MODE_VOLUME 0x1
- #define SET_ABS 0
- #define SET_REL 1
- // value new volume (0 - 1000)
- #define AUDIO_MODE_BALANCE 0x2
- // SET_ABS
- // SET_REL
- // value new balance (-1000 - 1000)
- // NOTE: Volume and Balance units are measured in thousands.
- // Relative settings are added to the current values.
- // The new absolute values are returned.
- // Negative balance represents right to left ratio (right lower than left)
- // Positive balance represents left to right ratio (left lower than right)
- #define AUDIO_MODE_SURROUND 0x4 /* TBD TBD success */
- #define AUDIO_MODE_KARAOKE 0x8 /* SPRM(11) - success */
- // *************************************
- // *************************************
- //
- // Presentation events
- //
- // playback window identity change
- #define PRESENTATION_EVENT_WINDOW_ID 1
-
- // ****************************************************************************
- // Events
- // ****************************************************************************
- //
- // event value result return comment
- //
- //
- #define DVD_EVENT_ANGLE_CHANGE 256 // - - SUCCESS/FAILURE synchronizes angle change in PGC
- #define DVD_EVENT_EMPTY_STREAM_PUMP 257 // - - SUCCESS/FAILURE retrieves the VOBU to play
- #define DVD_EVENT_PTM 258 // - - SUCCESS/FAILURE retrieves the VOBU to play
- #define DVD_EVENT_TIME 259 // ID - SUCCESS/FAILURE retrieves the VOBU to play
- #define DVD_EVENT_CLOCK 260 // ID - SUCCESS/FAILURE retrieves the VOBU to play
- #define DVD_EVENT_STOP_STATUS 261 // - - -
- #define THREAD_SWITCH_EVENT 1000
- // =============================================
- // SPRM -- symbolic definitions
- enum
- {
- M_LCD = 0, ASTN, SPSTN, AGLN,
- TTN, VTS_TTN, TT_PGCN, PTTN_SEQ,
- HL_BTTN, NV_TMR, TT_PGCN_NV_TMR, P_A_MXMD,
- CTY_CD_PTL_MA, PTL_LVL, P_CFG_VIDEO, P_CFG_AUDIO,
- INI_LCD_AST, INI_LCD_EXT_AST, INI_LCD_SPST, INI_LCD_EXT_SPST,
- PLAYER_REG_CODE, RESERVED_1, RESERVED_2, EXTENDED_PLAY,
- // Add some additional SPRM's for DVD Audio
- PG_NUM = 7,
- ATT_GRN = 21,
- ATTN = 22, // Att number
- TKN = 23,
- ASVN = 24
- };
- #define NO_AUDIO_STREAM 0xF
- #define NO_SP_STREAM 62
- #define DUMMY_SP_STREAM 63
- #define SP_FORCED_CAPTION 0x09 //FW0906 According to DVD Spec. VI3-57
- #define CODE_NOT_SPECIFIED (-1)
- #define EXT_NOT_SPECIFIED 0
- #define PTL_NOT_SPECIFIED 0xF
- // Karaoke mode not supported
- #define P_CFG_AUDIO_DTS 0x0800
- #define P_CFG_AUDIO_AC_3 0x4000
- #define P_CFG_AUDIO_MPEG 0x1000
-
- // there's no bit assigned for PCM capability -- see SPRM( 15 ),
- // use bit15 as LPCM capability bit
- #define P_CFG_AUDIO_LPCM 0x8000
- enum {
- VOBU_STILL = 1,
- CELL_STILL = 2,
- PGC_STILL = 3,
- SYNC_STILL = 4,
- STOP_STILL = 5
- };
- //
- // System Menu IDs
- //
- enum { MENU__TITLE = 2,
- MENU__ROOT = 3,
- MENU__SUBPICTURE = 4,
- MENU__AUDIO = 5,
- MENU__ANGLE = 6,
- MENU__PTT = 7
- };
- // Domain ID -- see JumpSS/CallSS
- typedef enum { FP_DOM = 0,
- VMGM_DOM = 1,
- VTSM_DOM = 2,
- VMGM_PGCN = 3,
- // Values not needed fpr JumpSS/CallSS
- TT_DOM = 4,
- STOP = 5,
- // Domain IDs for DVD-AUDIO
- AMGM_DOM = 1, // same value as VMGM_DOM
- AVTT_GR_DOM = 4, // same value as TT_DOM
- AOTT_GR_DOM = 6
- }DOMAIN_ID;
- // CGMS Information collected for each VOB file, from the File-System
- #define MAX_VTS_CNT_PER_CACHE 1
- #define MAX_FILES_PER_VTS 10 // Up to 9 files, plus one optional (VTS_XX_0.VOB)
- #define MAX_CGMS_ENTRIES (1 + (MAX_FILES_PER_VTS * MAX_VTS_CNT_PER_CACHE))
- #define CGMS_ENTRIES_ON_FLY (1+3)//For reducing the caching time when chagne the VTS
- typedef struct {
- DWORD dwVOBStartLBN;
- DWORD dwVOBEndLBN;
- BYTE ucCGMS;
- } S_VOB_CGMS_INFO;
- // PCI General Information
- typedef struct
- {
- DWORD NV_PCK_LBN; // logical block number of navigation pack
- DWORD VOBU_UOP_CTL; // user operation control of VOBU
- DWORD VOBU_S_PTM; // start Presentation TiMe of the video data in VOBU
- DWORD VOBU_E_PTM; // end PTM of VOBU
- DWORD VOBU_SE_E_PTM; // end PTM of sequence end in VOBU
- DWORD C_ELTM; // cell elapse time
- WORD VOBU_CAT; // analogue protection sytem (APS)
- BYTE TC_FLAG; // tc_flag
- } S_PCI_GI;
- // structure filled by C_PCI_PKT.Get_HL_GI()
- typedef struct
- {
- long HLI_S_PTM; // start PTM of HLI
- long HLI_E_PTM; // end PTM of HLI
- long BTN_SL_E_PTM; // end PTM of button select
- BYTE HLI_SS; // status of highlight information
- BYTE FOSL_BTNN; // forcedly selected button number
- BYTE FOAC_BTNN; // forcedly activated button number
- BYTE BTN_OFN; //button offset number
- BYTE BTN_Ns; //number of buttons
- BYTE NSL_BTN_Ns; //number of numerical select buttons
- } S_HL_GI;
- // Selection/Action mode
- enum { SELECT,
- ACTIVATE
- };
- // structure filled by C_PCI_PKT.Get_Button_Links()
- typedef struct
- {
- WORD UP_BTNN; // upper button number
- WORD LO_BTNN;
- WORD LEFT_BTNN;
- WORD RIGHT_BTNN;
- } S_AJBTN;
- // enumerated data type for display mode
- enum { Normal = 0x0000,
- Wide = 0x0001,
- Letterbox = 0x0002,
- Panscan = 0x0004
- };
- 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,
- #ifdef DVD_AUDIO_SUPPORT//LeonH_1017_2003: add the runtime schedule uop for dvd audio
- RTPB_AOB_MUTED_NEXTPLAY,
- RTPB_AOB_UPDATE_PGNUM,
- RTPB_AOB_DISPLAY_DLIST,
- RTPB_AOB_RTN_MENU,
- RTPB_AOB_ASV_IS_DISPLAYED,
- RTPB_AOB_MUTED_PREVPLAY,
- #endif
- 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 */
- #if 0//LX042602
- // bits used in DSI / PCI to descibe VOBU content
- #define VIDEO_VOBU_FLAG 0x01
- #define NOSPDATA_VOBU_FLAG 0x02
- #define BEGINSPU_VOBU_FLAG 0x03
- #endif
- // 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;
- // structure filled by C_PGC_GI.Get_SP_Palette()
- //typedef struct {
- // int Luminance;
- // int Coldif_Cr;
- // int Coldif_Cb;
- //} S_PAL_ENTRY;
- 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 ]; */
- #ifdef NO_SCPAD
- /* from C_DSI_PKT */
- BYTE *DSI_SA;
- BYTE buffer[DSI_SIZE];
- #else
- WORD sc_handle;
- #endif
- // 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;
- #ifdef NO_SCPAD
- BYTE data[ PCI_SIZE ];
- #else
- WORD sc_handle;
- #endif
- } 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 ];
- /* from C_PCI_PKT */
- #ifdef NO_SCPAD
- BYTE *PCI_SA;
- #else
- WORD PCI_SA_sc_handle;
- #endif
- /* from C_PCI */
- // continuity flags
- 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;
- #ifdef NO_SCPAD
- S_STORAGE stream_attr_st;
- S_STORAGE PGC_table_st;
- BYTE* pgcit_data;
- BYTE *atrt_data;
- #else
- S_SC_STORAGE stream_attr_sc_st;
- /*S_SC_STORAGE PGC_table_sc_st;*//* ZORAN TC0116 : Ultimate Toy Story Box disc #3 */
- WORD atrt_data_sc_handle;
- #endif
- 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 */
- #ifdef EXINO2
- BOOL b_IsAvailable_MenuDom;// SEC shKang070903 : this is not enough to check if can go to menu domain.
- #endif // EXINO2
- }S_DOM;
- /********** C_VMG class translation -data **************/
- typedef struct{
- #ifdef NO_SCPAD
- S_STORAGE parental_table_st;
- #else
- S_SC_STORAGE parental_table_sc_st;
- #endif
- S_DOM menu;
- S_DOM power_on;
- S_STORAGE st;
- #ifdef NO_SCPAD
- BYTE* tt_data;
- S_STORAGE title_table_st;
- #else
- S_SC_STORAGE title_table_sc_st;
- #endif
- #ifdef NO_SCPAD
- BYTE* ptl_data;
- #else
- /* S_SC_STORAGE ptl_data_sc_st; */ /* not needed, equivalent to parental_table_sc_st */
- #endif
- #ifdef NO_VMGI_DATA_REDUCTION
- BYTE data[ VMGI_MAT_SIZE ];
- #else
- #endif
- #ifdef NO_SCPAD
- BYTE power_on_atrt_data[ T_ATRT_SIZE ]; /* defined here temporarely */
- BYTE menu_atrt_data[ M_ATRT_SIZE ]; /* defined here temporarely */
- #else
- WORD power_on_atrt_data_sc_handle; /* defined here temporarely */
- WORD menu_atrt_data_sc_handle; /* defined here temporarely */
- #endif
- VOLUME_ID vol_id;
- BYTE vol_cat;
- BYTE vts_count;
- BOOL initialized;
- }S_VMG;
- /********** C_VTS class translation -data **************/
- typedef struct{
- S_DOM menu;
- S_DOM title;
- S_FPOS part_table;
- #ifdef NO_SCPAD
- BYTE* part_data;
- int part_size;
- #else
- S_SC_STORAGE part_data_sc_st;
- #endif
- S_FPOS time_table;
- #ifdef NO_VTS_DATA_REDUCTION
- S_STORAGE st;
- BYTE data[ VTSI_MAT_SIZE ];
- #endif
- #ifdef NO_SCPAD
- BYTE title_atrt_data[ T_ATRT_SIZE ];
- BYTE menu_atrt_data[ M_ATRT_SIZE ];
- #else
- WORD title_atrt_data_sc_handle;
- WORD menu_atrt_data_sc_handle;
- #endif
- BOOL initialized;
- #ifdef LANGUAGE_LEARNING_SUPPORT
- BYTE LanguageLearning_SubStreamID;//0xFF = no data
- #endif
- }S_VTS;
- #define AOTT_AOB_ATR_SIZE 128
- #define ATS_DM_COEFT_SIZE 288
- /********** ATS data **************/
- typedef struct{
- S_DOM title;
- #ifdef NO_SCPAD
- BYTE AOTT_AOBS_ATR[ AOTT_AOB_ATR_SIZE ]; // audio attributes
- BYTE ATS_DM_COEFT[ATS_DM_COEFT_SIZE]; // down mix coefficients
- #else
- S_SC_STORAGE aott_aobs_atr_sc_st;
- S_SC_STORAGE ats_dm_coeft_sc_st;
- #endif
- BOOL initialized;
- }S_ATS;
- /********** CRealTimePlayback class translation - data ********/
- typedef struct{
- long stopPersistence; // Embedded - suspicius - long is better
- int cell;
- S_C_PBI c_pbi;
- S_C_POSIT c_posit;
- S_ATS_C_PBI ats_c_pbi;
- // cell piece address
- S_CP cp;
- S_CP vobu; // last played VOBU
- // scheduled operations buffer
- S_ScheduledOp opBuffer[ MAX_SCHEDULED_OPS ];
- #ifdef SET_ANGLE_OUT_OF_ANGLE_BLOCK//Angie_0824_2004:For Funai, need to set the angle out of angle block.
- WORD angle_count; //Use to recode the angle number in current title.
- #endif
- WORD available_angles;
- // actual VTSN
- WORD actualVTSN;
- BOOL stopped;
- BOOL pumpSought;
- // handle EOD
- BOOL EODStatus;
- BOOL starvation;
- BOOL Wait4ASV;
- }S_RTPBINFO;
- /**************** C_Acton translation - data and defs *********/
- typedef DWORD CmdID; // mainly for the embedded port
- enum {
- // Table 4.6.3.2-1. valid in both CNavigationCommand and CAction
- GoToCmd = 0,
- // Table 4.6.3.2-1, but valid only in CNavigationCommand
- Link_Jump = 1, SetSystem = 2, Set = 3, Set_Compare_LinkSIns = 4,
- Compare_and_Set_LinkSIns = 5, Compare_Set_and_LinkSIns = 6, Reserved = 7,
- // Valid only in CAction
- Link = 64, Jump, InitialAccess, PartPlay, TimePlay,
- CellPlay, BookmarkPlay, NonSeamlessCellPlay,
- Still,
- Resume, ReportError, Navigation, Breakpoint, Nothing
- };
- typedef DWORD CmdOpt; // mainly for the embedded port
- enum {
- // although is not always legal
- Nop = 0,
- // Table 4.6.3.2-2 Compare
- BC = 1, EQ = 2, NE = 3, GE = 4, GT = 5, LE = 6, LT = 7,
- // Table 4.6.3.2-3 GoTo
- GoTo = 1, Break = 2, SetTmpPML = 3,
- // Table 4.6.3.2-4 Link
- LinkSIns = 1, LinkTKN = 2, LinkDLISTN = 3, LinkPGCN = 4, LinkPTTN = 5, LinkPGN = 6, LinkCN = 7,
- LinkTKNGP = 10, LinkDLISTNGP = 11, LinkPGCNGP = 12, LinkPGNGP = 14, LinkCNGP = 15,
- // LinkSIns -- see 4.6.4.2
- LinkNoLink = 0x00, LinkTopC = 0x01, LinkNextC = 0x02, LinkPrevC = 0x03,
- LinkTopPG = 0x05, LinkNextPG = 0x06, LinkPrevPG = 0x07, LinkTopPGC = 0x09,
- LinkNextPGC = 0x0A, LinkPrevPGC = 0x0B, LinkGoUpPGC = 0x0C, LinkTailPGC = 0x0D, RSM = 0x10,
- LinkNextDLIST = 0x12, LinkPrevDLIST = 0x13,
- // Table 4.6.3.2-5 Jump
- Exit = 1, JumpTT = 2, JumpVTS_TT = 3, JumpVTS_PTT = 5, JumpSS = 6, CallSS = 8,
- JumpTT_GR = 9, JumpTK = 10, AMGM_RSM = 11,
- // Table 4.6.3.2-6 SetSystem
- SetSTN = 1, SetNVTMR = 2, SetGPRMMD = 3, SetAMXMD = 4, SetHL_BTTN = 6,
- PlayerReserved = 7, SPRM0Reserved = 8,
- // Table 4.6.3.2-7 Set
- Mov = 1, Swp = 2, Add = 3, Sub = 4, Mul = 5, Div = 6,
- Mod = 7, Rnd = 8, And = 9, Or = 10, Xor = 11,
- // BookmarkPlay options
- BmkPlay = 0, BmkRepeat, BmkResume, BmkScan,
-
- // ReportError codes
- NoError = 0, InvalidRegion,
- BadOperand, InvalidOpCode, DivideByZero, WrongContext,
- MenuDomainIgnored, FirstPlayIgnored, InconsistentData,
- RestrictedAccess, ProhibitedUOP, PendingUOP, StopState,WrongParentLevel
- // <<< ZKR GL082103 : Added "InvalidTVSystem" error report.
- #if defined(D_PROHIBIT_PAL_TO_NTSC)
- , InvalidTVSystem
- #endif
- // ZKR GL082103 >>>
- };
- #define COMMAND_LENGTH 8
- typedef struct{
- DWORD cod;
- DWORD opt;
- DWORD arg;
- BYTE raw[ COMMAND_LENGTH ];
- CmdOpt last_error;
- }S_Action;
- typedef struct{
- CmdOpt error_code;
- S_Action *dvd_act;
- }S_EmitAction;
- typedef struct{
- S_STORAGE st;
- S_EmitAction ea;
- }S_NavigationCommand;
- /**************** C_PGC class translation - data **************/
- enum{
- start=0,
- init_pre_command, pre_command,
- init_presentation,
- program_presentation,
- cell_presentation, cell_still,
- cell_command, cell_command_acp,
- loop_count, loop_count_acp,
- pgc_still,
- init_post_command, init_post_command_acp,
- post_command,
- #ifdef LANGUAGE_LEARNING_SUPPORT
- grammer_command,
- #endif
- link,
- stop
- };
- typedef BYTE PGC_STATE;
- #define MAX_REPEAT 100
- enum {
- NO_PRECOMMAND = 0x01,
- TIME_PLAY_SEARCH = 0x02
- };
- typedef enum { VIDEO_PGC = 0, AUDIO_PGC , AMGM_PGC } PgcTypes;
- typedef struct{
- DWORD cur_pg_pbtime; /* ZORAN TC0327 : Current program total playback time */
- DWORD e_pg_time; /* ZORAN TC0327 : Current program elapsed time of previous cells composing the cell */
- DWORD e_cell_time;
- DWORD e_time;
- DWORD entryVOBU;
- S_EmitAction ea;
- // PGC content and navigation
- S_PGC_CNT pgc_cnt;
- S_PGC_NV_CTL pgc_nv_ctl;
-
- short requested_program_index; /* -1 means no user search requested , in case of PTT play, we must make sure that we play the requested program even if pre_commands wants to link to another CN */
- WORD e_program_index;
- /* int repeat_value; */
- WORD PGCN;
- // actual program (index in playback_order, 0, ..., repeat - 1)
- WORD program_index; /* start from 1 in VP2K */
- // next cell
- WORD next_c_n;
- // previous, entry cell, and first non-cell
- WORD prev_c_n;
- WORD entry_c_n;
- WORD fnon_c_n;
- // the cell number used in CellPlay
- WORD lplay_c_n;
- // first cell in the angle block
- WORD fagl_c_n;
- // actual cell number and PBI
- WORD actual_c_n;
- S_C_PBI actual_c_pbi;
- #ifdef DVD_AUDIO_INDEX
- WORD current_index;
- WORD number_of_indexes;
- #endif
-
- // entry VOBU for Time_Play / Time_Search (valid when != 0x3FFFFFFF)
- #ifdef NO_SCPAD
- S_STORAGE info_st; // Contains also the first 6 bytes of the CMDT
- S_STORAGE cell_position_st;
- S_STORAGE playback_info_st;
- S_STORAGE command_table_st;
- S_STORAGE program_map_st;
- #else
- S_SC_STORAGE info_sc_st; // Contains also the first 6 bytes of the CMDT
- S_SC_STORAGE cell_position_sc_st;
- S_SC_STORAGE playback_info_sc_st;
- S_SC_STORAGE command_table_sc_st;
- S_SC_STORAGE program_map_sc_st;
- #endif
- S_C_PBI decoded_c_pbi;
- // PGC_GI -- has 6 more bytes for the size of CMDT
- #ifdef NO_SCPAD
- BYTE pgc_gi_data[ 236 + 6 ];
- #endif
- // Actual data buffer for PGC_GI and PGCI (doesn't contain PGC_GI)
- #ifdef NO_SCPAD
- BYTE *pgci_data;
- #endif
- // actual command
- BYTE command;
- // actual angle
- BYTE actual_angle;
- // Any aditional play conditions?
- // PGC state
- PGC_STATE state;
- PGC_STATE next_state;
- BYTE play_mode;
- BOOL initialized;
- // ----- the following extensions are for DVD_AUDIO
- BYTE PgcType;
- WORD ATS_PGIT_SA;
- WORD ATS_C_PBIT_SA;
- WORD ATS_ASV_PBIT_SA;
- DWORD ATS_PG_CNT;
- #ifdef NO_SCPAD
- S_STORAGE asv_pbit_st;
- #else
- S_SC_STORAGE asv_pbit_sc_st;
- #endif
- DWORD entryTime;
- DWORD curr_fac_s_ptm;
- DWORD aob_cell_time;
- }S_PGC;
- #define BMARK_RESUME 0
- #define BMARK_A 0
- #define BMARK_B 1
- #define BMARK_1 2
- #define BMARK_2 3
- #define BMARK_3 4
- #ifdef SUPPORT_FIVE_DVD_BOOKMARKS
- #define BMARK_4 5
- #define BMARK_5 6
- #define BMARK_MAX 7
- #elif D_SUPPORT_TWELVE_BOOKMARKS
- #define BMARK_4 5
- #define BMARK_5 6
- #define BMARK_6 7
- #define BMARK_7 8
- #define BMARK_8 9
- #define BMARK_9 10
- #define BMARK_10 11
- #define BMARK_11 12
- #define BMARK_12 13
- #define BMARK_MAX 14
- #else
- #define BMARK_MAX 5
- #endif//SUPPORT_FIVE_DVD_BOOKMARKS
- #define BMARK_NUM(n) (n-1+BMARK_1)
- /********** S_DVD_NAVIGATION data structure **********/
- #define VTSN_NOT_INITIALIZED 0xFF
- #define ANGLE_OFFSET_COUNT 10
- #define ANGLE_OFFSET_SIZE (ANGLE_OFFSET_COUNT*sizeof(DWORD))
- typedef struct
- {
- DWORD PGC_UOP_CTL;
- DWORD VOBUEndPTM;
- int ScanSpeed;
- int UserRepeat;
- S_DOM *domain;
- DOMAIN_ID domainID;
- WORD VideoAttribute;
- WORD prev_VideoAttribute;
- WORD CurrentP_CFGVideo;
- WORD UserP_CFGVideo;
- WORD special_requirements;
- // bookmark data
- DVD_BOOKMARK Bookmark;
- #ifdef NO_SCPAD
- DVD_BOOKMARK SavedBookmark[BMARK_MAX];
- DWORD AnglesOffset[ 10 ];
- #else
- DVD_BOOKMARK PlayBookmark; /* needed when STOP occurs when bookmark play is requested */
- #endif
- BYTE EventNumber;
- BYTE crt_VTSN; /* originally a CSpace private member */
- BYTE SystemASTN;
- BYTE SystemSPSTN;
- BYTE Title_Playback;
- BYTE StillType;
- BOOL DSIAngleOffset;
- BOOL BreakpointMode;
- BOOL Pause;
- BOOL UseNavigationTimer;
- BOOL Validated;
- BOOL PlayingATS; // True if playing from ATS , false if playing from VTS
- BYTE CopyBit;
- BYTE CategoryCode;
- // <<< ZKR GL082103 : Added TV system validation.
- #if defined(D_PROHIBIT_PAL_TO_NTSC)
- BOOL TVSystemValidated;
- #endif
- // ZKR GL082103 >>>
- } S_DVD_NAVIGATION_C;
- /************ Navigation Manager class translation -data *********/
- typedef struct{
- DWORD actualUOP_CTL;
- /* Auto Notification parameter (formerly VOID-Thread switch event ) */
- S_ScheduledOp *auto_notification_schop;
- S_EmitAction ea;
- S_Action action;
- S_Action pending_action;
- // resume data
- DVD_BOOKMARK resume_bookmark;
- #ifdef NO_SCPAD
- DWORD resume_anglesoffset[ 10 ];
- #endif
- // stop waiting flag
- BOOL WaitingForStop;
- // Play mode
- BOOL PlayStatus;
- BOOL pending;
- BOOL pending_argument;
- } S_NavigationManager;
- typedef struct{
- DWORD npi_stc_offset[MAX_NP_INFO];
- // BYTE npi_flags[MAX_NP_INFO];
- DWORD npi_resume_lbn[MAX_NP_INFO];//LX042602
- BYTE wr_cnt;
- BYTE rd_cnt;
- BYTE level;
- } S_NAV_PK_INFO_FIFO;
- #define PLAY_MODE_NORMAL 0
- #define PLAY_MODE_CONTINUE 1
- #define PLAY_MODE_FAST 2
- #define PLAY_MODE_SLOWR 3
- typedef enum{
- PASSWORD_IN_PROGRESS,
- PASSWORD_FAILED,
- PASSWORD_OK
- }PASSWORD_STATUS;
- #endif /* __NVGATI_C_H */