?? digest.c
字號(hào):
__iYDigest=(int)((__dwCountSystem % 157) + 30);
if(__iXDigest<=24 && __iYDigest<=44) // can't cover the digest number
{
__iXDigest=32;
__iYDigest=50;
}
///////////////////////////////////////////
// "20" means show 20 Frames in one track
if ( __bTrackRepeat <= 20 )
{
__btDigestEnableAudio= TRUE;
_DIGEST_DisplayFrame ( __bTrackNO );
__bTrackRepeat++;
_DIGEST_ShowInfor ( );
}
else
{
__bTrackRepeat= NULL;
__bTrackNO++;
if ( __bTrackNO > __wTrackEnd )
__bTrackNO= (BYTE)__wTrackBegin; // Play ending Track, then Play first Track
}
}
break;
case DIGEST_STYLE_DISCVIEW:
{
if ( ! __bTrackRepeat )
{
__bTemp= __bPlayOrder % 3;
__iXDigest= __bTableX[__bTemp];
__bTemp= __bPlayOrder / 3;
__iYDigest= __bTableY[__bTemp];
__btDigestEnableAudio= FALSE;
// Calculate The Absolute time
__dwTimeShow=__dwTimeDiscBegin+
(__bPlayOrder*((__dwTimeDiscEnd-__dwTimeDiscBegin)/9));
__dwTemp=__dwTimeShow;
//get track number
CDINFO_ParseInfo ( VCD_ENTRIES_TRACK, &__dwTemp, NULL );
__bTrackNO=(BYTE)__dwTemp;
_DIGEST_DisplayFrame ( __bTrackNO );
_DIGEST_ShowInfor ( );
__bTrackRepeat++;
}
else
{
/// WYC.050a for digest A/V hang
//__bModePlay= MODE_PLAYUNKNOW;
__bTrackRepeat= NULL;
W99AV_EnableInterrupt(NULL);
// Preapre next track playing
__bPlayOrder++;
if ( __bPlayOrder > 8 )
__bPlayOrder= NULL;
}
}
break;
case DIGEST_STYLE_ROUND:
if ( __bTrackRepeat <= 20 )
{
if ( ! __bTrackRepeat )
{
// Record the time
// WYC.051
__dwTimeDigestBegin = UTL_GetSysTimer();
//__dwTimeDigestBegin= __dwCountSystem;
__bTemp= __bPlayOrder % 3;
__iXDigest= __bTableX[__bTemp];
__bTemp= __bPlayOrder / 3;
__iYDigest= __bTableY[__bTemp];
__btDigestEnableAudio= TRUE;
_DIGEST_ShowInfor ( );
_DIGEST_DisplayFrame ( __bTrackNO );
_DIGEST_ShowInfor ( );
}
else
{
// Let OSD char can Flash
if ( __bTrackRepeat % 2 )
_DIGEST_ShowInfor ( );
else
_DIGEST_ShowInfor ( );
}
__bTrackRepeat++;
UTL_DelayTime ( COUNT_500_MSEC, TRUE );
// Limit only show 5 secs.
if ( /* wyc.051 __dwCountSystem*/UTL_GetSysTimer() > ( __dwTimeDigestBegin+ COUNT_5_SEC ) )
__bTrackRepeat+= 100;
}
else
{
// Recover to first image
__btDigestEnableAudio= FALSE;
__bTrackRepeat= NULL;
_DIGEST_DisplayFrame ( __bTrackNO );
W99AV_EnableInterrupt(NULL);
_DIGEST_ShowInfor ( );
__bTrackNO++;
if ( __bTrackNO > __wTrackEnd )
__bTrackNO= (BYTE)__wTrackBegin;
__bPlayOrder++;
if ( __bPlayOrder > 8 )
__bPlayOrder= NULL;
}
break;
case DIGEST_STYLE_FREEZE:
// "17" means "FREEZE" mode will turn 2 rounds
if ( __bTrackRepeat <= 17 )
{
// First time will Mute the audio
if ( !__bTrackRepeat)
__btDigestEnableAudio= FALSE;
__bTemp= __bPlayOrder % 3;
__iXDigest= __bTableX[__bTemp];
__bTemp= __bPlayOrder / 3;
__iYDigest= __bTableY[__bTemp];
_DIGEST_ShowInfor ( );
_DIGEST_DisplayFrame ( __bTrackNO );
__btDigestEnableAudio= TRUE;
_DIGEST_ShowInfor ( );
_DIGEST_DisplayFrame ( __bTrackNO );
_DIGEST_ShowInfor ( );
__bTrackRepeat++;
__bPlayOrder++;
if ( __bPlayOrder > 8 )
__bPlayOrder= NULL;
}
else
{
__btDigestEnableAudio= FALSE;
_DIGEST_ShowInfor ( );
__bTrackRepeat= NULL;
__bPlayOrder= NULL;
__bTrackNO++;
if ( __bTrackNO > __wTrackEnd )
__bTrackNO= (BYTE)__wTrackBegin;
}
break;
#endif // DIGEST_TWO_MODE
case DIGEST_STYLE_NORMAL:
case DIGEST_STYLE_NORMAL4:
// style DIGEST_STYLE_NORMAL4 and
// style DIGEST_STYLE_NORMAL can be distinguished by __bGrid
default:
if ( __bTrackRepeat <= 35 )
{
if ( ! __bTrackRepeat )
{
//LJY278, fixed SONY test title 7/7 -> play black screen issue. The audio track won't be shown.
if(UTL_CheckPlayItemMode ( __bTrackNO ) == MODE_PLAYAUDIO)
{
__bPlayOrder= NULL;
__bTrackNO= __bPlayOrder+ __bPageNO* (__bGrid* __bGrid)+ (BYTE)__wTrackBegin;
break;
}
__dwTimeDigestBegin = UTL_GetSysTimer();
__bTemp= __bPlayOrder % __bGrid;
__iXDigest= __bTableX[__bTemp];
__bTemp= __bPlayOrder / __bGrid;
__iYDigest= __bTableY[__bTemp];
__btDigestEnableAudio= TRUE;
//LJY2.81, for DVCD discview in stop mode
if(__bStyle & DIGEST_DVCD_DISCVIEW)
{
__dwTimeShow=__dwTimeDiscBegin + (__bPlayOrder*((__dwTimeDiscEnd-__dwTimeDiscBegin)/9));
__dwTemp=__dwTimeShow;
//get track number
CDINFO_ParseInfo ( VCD_ENTRIES_TRACK, &__dwTemp, NULL );
__bTrackNO=(BYTE)__dwTemp;
}
_DIGEST_DisplayFrame ( __bTrackNO );
_DIGEST_ShowInfor ( );
}
else
{
// let interrupt handle the IFSC only
// should be the same action???
// disable it make the swosd not show so fast
// wyc.100 The delay purpose is because when want decrease the flash frequency
// of swosd number, we should to add delay to make the audio longer
//LJY276
#ifdef SUPPORT_CDIF
if(__bServoAutoCtrl)
UTL_DelayTime (COUNT_100_MSEC, TRUE );
else
{
MONITOR_CheckBuffer(); //LJY277.3rd
_dwTemp = UTL_GetSysTimer();
while ( ( UTL_GetSysTimer()- _dwTemp ) < COUNT_100_MSEC);
}
#else
UTL_DelayTime (COUNT_100_MSEC, TRUE );
#endif // #ifdef SUPPORT_CDIF
if (__bTrackRepeat == 0)
_DIGEST_ShowInfor ( );
}
__bTrackRepeat++;
// limit only show 5 secs.
if( !(__bStyle & DIGEST_DVCD_DISCVIEW))
if ( /* wyc.051 __dwCountSystem*/UTL_GetSysTimer() > ( __dwTimeDigestBegin+ COUNT_5_SEC ) )
__bTrackRepeat+= 100;
}
else
{
// Recover to first image
__bTrackRepeat= NULL;
W99AV_EnableInterrupt(NULL);
//LJY2.81, for DVCD discview in stop mode
if(__bStyle & DIGEST_DVCD_DISCVIEW)
{
__bPlayOrder++;
if ( __bPlayOrder > 8 )
__bPlayOrder= NULL;
break;
}
__btDigestEnableAudio= FALSE;
_DIGEST_DisplayFrame ( __bTrackNO );
// same number, not show???
_DIGEST_ShowInfor ( );
// Preapre next track playing
__bPlayOrder++;
// style DIGEST_STYLE_NORMAL4 and
// style DIGEST_STYLE_NORMAL can be distinguished by __bGrid
if ( __bPlayOrder > (__bGrid* __bGrid- 1 ) )
__bPlayOrder= NULL;
__bTrackNO= __bPlayOrder+ __bPageNO* (__bGrid* __bGrid)+ (BYTE)__wTrackBegin;
if ( __bTrackNO > __wTrackEnd )
{
__bPlayOrder= NULL;
__bTrackNO= __bPlayOrder+ __bPageNO* (__bGrid* __bGrid)+ (BYTE)__wTrackBegin;
}
}
break;
} // __bStyle
return TRUE;
}
/////////////////////////////////////////
// protect function
// *********************************************************************
// Function : _DIGEST_DisplayFrame
// Description : The function can move Sub-Picture position
// __bTrackRepeat is a important factor when Display Frame
// FIRST TIME/ OTHER TIMES in one bitstream
// Arguments : bTrackNO: which Track
// Return :
// Side Effect :
// *********************************************************************
BIT _DIGEST_DisplayFrame ( BYTE bTrackNO )
{
// WYC.050a DWORD dwThreshold;
BYTE i;
// Stop to process if bTrackNO is out of range
// wyc.100
if (( bTrackNO > __wTrackEnd ) && (!__bDVDDigest))
return FALSE;
if ( ! __bTrackRepeat ) // first time
{
// update the new track information
// wyc.100
if (!__bDVDDigest)
UTL_ShowTrack(MSG_TRACK, bTrackNO,0);
// f/w 0.45, MICKY, must close INT or last IFSC will fail
W99AV_EnableInterrupt(NULL);
// for BC5380, IFSC means the decoded frame is moved to digest grid
//LJY1.05, recover the drak frame issue.(it may be caused by the last frame data combine with new frame data)
#if 1
if (( __bDigestModePlay & MODE_PLAYMOTION ) && (!__bDVDDigest))
{
i=FALSE;
// should if the IFSC can't be found in the track end ???
// when the next track data is input, it may cause invalid data
// Wait for last I-Frame can be display complete
//__dwCheckTime= __dwCountSystem;
// wyc.051
__dwCheckTime= UTL_GetSysTimer();
// wyc.100 , in check IFSC progress, disable the ISR check IFSC to avoid error
EX1 = 0;
while ( (UTL_GetSysTimer() - __dwCheckTime ) < COUNT_4_SEC )
{
//LJY276
#ifdef SUPPORT_CDIF
if(__bServoAutoCtrl)
SERVO_Monitor();
else
MONITOR_CheckBuffer(); //LJY277.3rd
#else
SERVO_Monitor();
#endif // SUPPORT_CDIF
if (HAL_CheckInterrupt(INT_IFSC))
{
i=TRUE;
__dwIFrames++;
break;
}
} // while
EX1 = 1;
} // PLAYMOTION
#endif
// it's possible the PSR_IFSC is not detected
// & CD-IF is closed,
// it will cause the last frame data combine with new frame data
// HAL_ControlCDIF(HAL_CDIF_CLOSE); //LJY276, marked
CHIPS_OpenAudio( FALSE );
// get play mode for this track
// wyc.100
if (!__bDVDDigest)
__bDigestModePlay = UTL_CheckPlayItemMode ( bTrackNO );
else
__bDigestModePlay = MODE_PLAYMOTION;
// should add some delay here ???
// Changing the Coordination, The most safe condition is Chip is not displaying now
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -