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

📄 mrgtmp0

📁 ct952 source code use for Digital Frame Photo
💻
📖 第 1 页 / 共 3 页
字号:
// when force active button is time out, must set the flag,// so that PGC will execute the button commandBYTE    __bCellActiveBTN;#define SKIP_NONE   0#define SKIP_PREPARE    1#define SKIP_NOW        2// for non-seamless angle changeBYTE    __bSkip1Sec;//Micky2.80, review global variables init=SKIP_NONE;// DVD_170Micky, as navigate.c will update __bANL_Ns// cell don't need serach angles number.#ifdef  _DEBUG_ANGLES_NUMBERstatic  BYTE    _bAngleCheck;#endif#endif  //#ifndef NO_DVD// DVD_170Micky, unused anfle search code.//static BYTE    _bSearchAngle;// DVD_103Micky, record last played VOBUSA that has video data// for resume to play w/ video dataDWORD   __dwCellVideo_VOBUSA;BYTE    __bCellState;   // CELL_SEARCH_1ST_NV, do linear serach NV                        // CELL_LINEAR, linear play the remain cell                        // CELL_NORMAL, normal play NV+VOBU                        // CELL_SKIP_VOBU, NV fail, skip VOBU.#ifdef  ENHANCE_CELL_ERROR_CONCEALDWORD   _dwLastVOBUSA;#endif// DVD_161Micky, add a function to update cell rangevoid    _UpdateCellInfo(void);// DVD_171Micky#define CELL_MAX_SKIP_GAP   4// FWDI 20/60/120/240, means 10/30/60/120 seconds// Micky0.87, use smaller skip range, then big range//BYTE code _bSkipGap[CELL_MAX_SKIP_GAP]= {5, 4, 3, 2};//BYTE code _bSkipTime[CELL_MAX_SKIP_GAP]= {10, 30, 60, 120};BYTE code _bSkipGap[CELL_MAX_SKIP_GAP]= {19, 17, 5, 4};BYTE code _bSkipTime[CELL_MAX_SKIP_GAP]= {1, 2, 10, 30};// DVD_171Micky, don't show angle mark when angle change UOP is not allowedBYTE    _bAngleCtrlCheck;// DVD_273.2, for encrpyted DVD begin// clear the auto scan next cell's command.extern BYTE    __bAutoScans;// DVD_273.2, for encrpyted DVD end//Ming0.80, use PCI and DSI directly.// Do not need _UpdateBTNInfo().//// Micky2.31, reduce codes, add API _UpdateBTNInfo()//void    _UpdateBTNInfo(BYTE bBTN_Number);// Micky0.87, code reduce.DWORD   _SearchFWDI(BYTE bIndex);// Micky1.02, fix time search forward, will hang at below loop(after total reset)// video wait pic size to become positive value// but cell wait STC to reach VOBU_E_PTM to send next VOBU// need investigate why can't detect 1st video pts// must force to update STC before play dedicated VOBU.// can remove the force reset STC when the problem is clearedBYTE    _bForceResetSTC;// LLY1.06, add a flag to keep if isse force freeze STC controlBYTE    _bForceFreezeSTC=FALSE;#ifdef CELL_FORCE_LINEAR_PLAY_TESTBYTE _bLinearNPFFlags;void _SwitchLinearPlayAndNVPlay(BYTE bForce2NVPlay);#endif // CELL_FORCE_LINEAR_PLAY_TEST// LLY2.32, porting Micky's code to fix some DVD tile root menu can't play end issue// for Harry Potter & Alexander root menu can't play end--beginvoid	CELL_LinearPlay(void);// for Harry Potter & Alexander root menu can't play end--end//Ming0.80, use PCI and DSI directly.volatile DSI *_pDSI;volatile PCI *_pPCI;//#include "ctkav.h"#include "disp.h"#include "subpict.h"#include "comdec.h"#include "parser.h"volatile PHLI    __pHLIBuffer;BYTE    __bGroupOffset = 0;void _CELL_SetBTNGroup(BYTE bGroupID, BYTE bGroups){    __bGroupOffset = bGroupID*(36/bGroups);}//**********************************************************************//  Function    : CELL_CellInitial//  Description : When change a new cell(The cell must match the Angle),//              : must call this function, and pass the cell play back info.//  Parameters  : pC_PBC, a structure of C_PBI(ref. VI4-100)//**********************************************************************BYTE CELL_CellInitial(C_PBI *pC_PBI){#ifndef NO_DVDextern  DWORD       _dwFirst_VOBS;      // ** TCH0.25;#define cC_PBI  (*pC_PBI)    cC_PBI=*(pC_PBI);    // first sector address for first VOBU of the CELL    __dwCellFVOBUSA= cC_PBI.C_FVOBU_SA;    // end sector address for first ILVU of the CELL    __dwCellFILVUEA= cC_PBI.C_FILVU_EA;    // start sector address for last VOBU of the CELL    __dwCellLVOBUSA= cC_PBI.C_LVOBU_SA;    // end sector address for last VOBU of the CELL    __dwCellLVOBUEA= cC_PBI.C_LVOBU_EA;#ifdef  USE_LITTLE_ENDIAN    COMUTL_SwapDWORD ( &__dwCellFVOBUSA );    COMUTL_SwapDWORD ( &__dwCellFILVUEA );    COMUTL_SwapDWORD ( &__dwCellLVOBUSA );    COMUTL_SwapDWORD ( &__dwCellLVOBUEA );#endif  // #ifdef USE_LITTLE_ENDIAN    // Get cell playback mode, if 1 means VOBU Still    __bVOBUStill=(cC_PBI.C_CAT[1] & 0x40) >> 6;    __dwCellFVOBUSA+= _dwFirst_VOBS;    __dwCellFILVUEA+= _dwFirst_VOBS;    __dwCellLVOBUSA+= _dwFirst_VOBS;    __dwCellLVOBUEA+= _dwFirst_VOBS;#ifdef  DUMP_CELL_INFO    DBG_Printf(DBG_THREAD_CHEERDVD, DBG_INFO_PRINTF, "\nCellFVOBUSA=%lu, CellLVOBUEA=%lu", __dwCellFVOBUSA, __dwCellLVOBUEA);#endif  // #ifdef DUMP_CELL_INFO    // LLY1.06, un-freeze the STC value while each CELL begin & previous STC is force freezed    // Otherwise, STC value maybe freeze @ VOBU_STILL    // But, nobody to un-freeze it except PLAY/ PAUSE key to release VOBU still    // ex. VOBU_STILL --> GoTime/ NEXT/ PREV/ Navigate Time out and go next PGC    if(_bForceFreezeSTC==TRUE)    {        _bForceFreezeSTC=FALSE;        DISP_STCFreeze(0x0, DISP_UNFREEZE_STC);        DBG_Printf(DBG_THREAD_CHEERDVD, DBG_INFO_PRINTF, "Un-freeze STC\n");    }    // flag indicate that the CELL is allocated in interleaved block or not    // bit 26    __bInterleaved=(cC_PBI.C_CAT[0]& 0x04) >> 2;    // flag indicate that the CELL seamless angle change flag    // bit 24    __bSeamlessAngleChange=(cC_PBI.C_CAT[0]& 0x01);    __dwVOBUSA=0;    __dwVOBUSRI=0;    __dwCurrentVOBUSA=0;    //Aron1.15-909, it is not uesd by others, comment it!    //__wNextILVUSZ=0;    __dwNextILVUSA=0;    _bNVRecover=0;    __bAngleChange=FALSE;    //DVD_050aMicky    //Use valid PCI/DSI data    // in title "The title DVD extravaganza, dts test", surround test    // has angle information recorded in NSML_AGL field    // check the C_PBI C_CAT cell block type(VI4-100)    // 1st cell in block and is angle block, then need check number of angles// DVD_170Micky, as navigate.c will update __bANL_Ns// cell don't need serach angles number.#ifdef  _DEBUG_ANGLES_NUMBER    _bAngleCheck=(cC_PBI.C_CAT[0]& 0x30) >>4;    if (_bAngleCheck==0x01) // angle block    {    }    else    // not angle block    {        // prev. cell may have angle information, must clear        __bAngle=1;        __bAGL_Ns=0;    // total angle numbers        __bAGLN= NULL;  // current angle number        OSD_OUTPUT_MACRO ( MSG_ANGLE_CTL, 0, 0);    }#else   // #ifndef  _DEBUG_ANGLES_NUMBER    // angle block, need send OSD message.    // Micky2.78, fix "angle---" display on Ritek menu    // PBC on-> Play 6/1-> press Next twice->Angle--- display at Golden Man menu    // must give _bAngleCtrlCheck an initial value 0.    // assume not a angle block, don't need check angle display    _bAngleCtrlCheck = 0;    if ( ((cC_PBI.C_CAT[0]& 0x30) >>4)==0x01 )    {        // DVD_171Micky, check angle control for cell        // only after one NV_INT is got, query angle change UOP        // if allow angle change, then will display angle information.        // Micky2.78, fix "angle---" display on Ritek menu        // Only __bAGLN is non-zero need check angle display        if ( __bAGLN )            _bAngleCtrlCheck=1;    }    // for non-angle block, should no angle information, done by pgc.#endif  // #ifndef  _DEBUG_ANGLES_NUMBER    // DVD_171-3Micky, fix Tarzan , select "The Music of Tarzan" 1~5 items ,    // it always play DVD menu.    // It will play 37/2(cell play) -> then CallSS(+RSM),    // navigate will do SPRMs[8]=NowNTNNumber<<10(RSM_Control(STATUS_SAVE)    // but CellInitial will clear __bNowBTNNumber as 0, cause SPRMs[8]=0.    // Since _bButtonState has top priority, no need to clear __bNowBTNNumber.///    __bNowBTNNumber=0;    __bCellAction=VOBU_START;    _bCheckNVData=CELL_NV_NONE;    // normal state, not doing any time search    _bEnableTimeSearch=CELL_TIMESEARCH_NONE;    //Ming0.80, use PCI and DSI directly.    _pDSI = (volatile DSI*)DSI_BASE;    _pPCI = (volatile PCI*)PCI_BASE;    // support SCB from chapter end    if (__bModeCmd==KEY_SCB)    {        // Using last VOBU address - 1st VOBU address to get __dwVOBUSA (the offset to the 1st VOBU)        // ie. it used to support SCB from chapter end.        __dwVOBUSA=__dwCellLVOBUSA-__dwCellFVOBUSA;        __dwCurrentVOBUSA=__dwVOBUSA;        // LLY2.38, enable update SCR flag to find 1stSCR while SCB mode crossing cell        // And, remove old procedure: dump 1st NV sector within the cell.        _bUpdateSCR=TRUE;#if 0        // DVD_171-2Micky, only read 1st NV for __dw1stSCR when SCB mode.        __dwTimeBegin = __dwCellFVOBUSA ;        __dwTimeEnd = __dwCellFVOBUSA ;        // LLY2.35, give start and end time for UTL_PlayFromTime() since the API is updated        UTL_PlayFromTime (__dwCellFVOBUSA, __dwTimeEnd) ;        // Ming0.68-909, Must wait for NV to update the SCR.        if(!_WaitParserEventNV(COUNT_500_MSEC))        {            __dw1stSCR = 0;        }        else        {        	//Micky0.68, get SCR from DSI, and use PCI/ DSI information directly            //__dw1stSCR = _pDSI->DSI_GI.NVPCK_SCR;        	__dw1stSCR =COMUTL_ReadBufferDWORD ( (char *)&(_pDSI->DSI_GI.NVPCK_SCR), 0);        }#endif  // #if 0    }    // LLY2.38, must turn-off update SCR flag while no SCB mode.    else    {        _bUpdateSCR = FALSE;    }

⌨️ 快捷键说明

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