?? swosd.c
字號:
//////////////////////////////////////////////////////////
// ****** Big modification History Area ******
// LLY.045-1, porting for new define depending on 22QF055.DOC
// - all original include file will be put in "winav.h"
// - remove extern EX1/EX0/EA procedure because it will be dealed in "platform.h"
// LLY.161, remove logo1 relative function API and code to save the code size
// And only using OSD to tell user the info.
//LJY1.10,
// - Remove the reference of CHIP_W9928
#include "winav.h"
#include "utl.h"
#include "cc.h"
#include "cdinfo.h"
#include "w99av.h"
#include "hal.h"
#include "osd.h" // *** DVD.040-1
#include "monitor.h" // brian.155
#include "setup.h" // Brian0.91
#ifndef SYSTEM_8051
#include <malloc.h>
#endif
#ifdef HOST_JPG //alex2.34 JPEG_LOGO
DWORD __dwCTime;
#endif //
#define LINEPERCMD 1 // the line number which a write pixel command can do
//LJY1.20, support 4M flash, remove digest
#ifndef NO_DIGEST
// Digest number font size(16x20) only for VCD
#define FONTN1_W 16
#define FONTN1_H 20
// Digest number font size(16x20) only for SVCD and CVD
#define FONTN2_W 8
#define FONTN2_H 20
// Digest letter font size(12x12)
#define FONTC_H 12
#define FONTC_W 12
// total 10 fonts(0-9)
#define FONTS 10
WORD __wFontH;
WORD __wFontW;
// WYC.050a static BYTE __bShowNumber=TRUE;
#endif
#define FILL_FIFO_BYTES (W99AV_FIFO_SIZE/2)
#define FILL_FIFO_WORDS (FILL_FIFO_BYTES/2)
// Chuan DVD_171 12/11/2001: pwLogoData declared as code * to improve the speed
void _OSD_ShowMPEG(WORD code *pwLogoData);
BYTE _OSD_ShowLogo(void);
// Chuan DVD_171 12/11/2001: pwLogoData declared as code * to improve the speed
BIT _OSD_LogoFillData(WORD wWords, WORD code *pwLogoData);
void _OSD_ShowDigestNumber(WORD wValue);
void _OSD_ShowCDDA(void);
void _OSD_BitmapMoving(void);
void _OSD_SCR_ColorChange(void);
void _OSD_SCR_MovingLocus(void);
// LLY.042 end ...
// only used in DIGEST mode
#ifndef NO_DIGEST
#define SW_CHAR_C 0
#define SW_CHAR_D 1
#define SW_CHAR_A 2
#define SW_CHAR_DASH 3
// The bit data 0 means a dot. 1 means transparent
// the pixel for 0x703F is 3F7
// the font size is FONTC_H * 12
//12*12
WORD code _mat16[4][FONTC_H]={
// C letter
0xf0e0, 0x7080, 0x309e, 0x703f, 0xf03f, 0xf03f, 0xf03f, 0xf03f, 0x703f, 0x309e, 0x7080, 0xf0e0,
// D letter
0xf001, 0x7000, 0x703e, 0x303f, 0x303f, 0x303f, 0x303f, 0x303f, 0x303f, 0x703e, 0x7000, 0xf001,
// A letter
0xf0f1, 0xf0f1, 0xf0e4, 0xf0e4, 0xf0e4, 0x70ce, 0x70ce, 0x70c0, 0x3080, 0x309f, 0x309f, 0x903f,
// -
0xf0ff, 0xf0ff, 0xf0ff, 0xf0ff, 0xf0ff, 0x1080, 0x1080, 0xf0ff, 0xf0ff, 0xf0ff, 0xf0ff, 0xf0ff,
};
// this font only for VCD
WORD code _wFont[FONTS][FONTN1_H]={
// 0
0x07c0, 0x1ff0, 0x1ff0, 0x3c78, 0x3c78, 0x783c, 0x783c, 0x783c, 0x783c, 0x783c,
0x783c, 0x783c, 0x783c, 0x783c, 0x783c, 0x3c78, 0x3c78, 0x1ff0, 0x1ff0, 0x07c0,
// 1
0x0070, 0x00f0, 0x01f0, 0x03f0, 0x0ff0, 0x1ff0, 0x1ef0, 0x1cf0, 0x10f0, 0x00f0,
0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0,
// 2
0x07e0, 0x1ff0, 0x3ff8, 0x3c7c, 0x783c, 0x783c, 0x003c, 0x003c, 0x0078, 0x00f8,
0x01f0, 0x03e0, 0x07c0, 0x0f80, 0x1f00, 0x1e00, 0x3c00, 0x3ffc, 0x7ffc, 0x7ffc,
// 3
0x0fc0, 0x1fe0, 0x3ff0, 0x7cf8, 0x7878, 0x0078, 0x00f0, 0x03f0, 0x03c0, 0x03f0,
0x0078, 0x003c, 0x003c, 0x003c, 0x783c, 0x783c, 0x3c78, 0x3ff8, 0x1ff0, 0x07c0,
// 4
0x0078, 0x0078, 0x00f8, 0x01f8, 0x01f8, 0x03f8, 0x0778, 0x0778, 0x0e78, 0x1c78,
0x1c78, 0x3878, 0x7078, 0x7ffe, 0x7ffe, 0x7ffe, 0x0078, 0x0078, 0x0078, 0x0078,
// 5
0x1ff8, 0x1ff8, 0x3ff8, 0x3c00, 0x3800, 0x3800, 0x3be0, 0x7ff0, 0x7ff8, 0x7878,
0x003c, 0x003c, 0x003c, 0x003c, 0x003c, 0x783c, 0x7c78, 0x3ff0, 0x1ff0, 0x0fc0,
// 6
0x03e0, 0x0ff0, 0x1ff8, 0x3c7c, 0x3c3c, 0x3800, 0x7800, 0x7be0, 0x7ff0, 0x7ff8,
0x7c78, 0x783c, 0x783c, 0x783c, 0x783c, 0x383c, 0x3c78, 0x1ff8, 0x0ff0, 0x07c0,
// 7
0x7ffc, 0x7ffc, 0x7ffc, 0x007c, 0x00f8, 0x00f0, 0x01e0, 0x03e0, 0x03c0, 0x07c0,
0x0780, 0x0780, 0x0f00, 0x0f00, 0x0f00, 0x0f00, 0x1e00, 0x1e00, 0x1e00, 0x1e00,
// 8
0x0fe0, 0x1ff0, 0x3ff8, 0x7c7c, 0x783c, 0x783c, 0x783c, 0x3c78, 0x1ff0, 0x0fe0,
0x1ff0, 0x3c78, 0x783c, 0x783c, 0x783c, 0x783c, 0x7c7c, 0x3ff8, 0x1ff0, 0x07c0,
// 9
0x07c0, 0x1fe0, 0x3ff0, 0x3c78, 0x7838, 0x783c, 0x783c, 0x783c, 0x783c, 0x3c7c,
0x3ffc, 0x1ffc, 0x0fbc, 0x003c, 0x0038, 0x7878, 0x7c78, 0x3ff0, 0x3fe0, 0x0f80,
};
// this font only for SVCD and CVD
BYTE code _bFont[FONTS][FONTN2_H]={
// 0
0x3c, 0x3c, 0x7e, 0x66, 0x66, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7,
0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0x66, 0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0x7f, 0x3f, 0x3f, 0x07, 0xe6, 0xe6, 0x7e, 0x3c, 0x3c,
};
#endif //#ifndef NO_DIGEST
// LLY.050, remove from OSD.C
// (row,col) position for display char; they will used by other module
//LJY279, remove initial value here
//LJY1.20, support 4M flash, remove digest
#ifndef NO_DIGEST
int __iRow, __iCol;
#endif
// wyc.276, remove this variable because now not used it. Also updated follow code that has used it.
//BIT _btLogoSel=0;
// wyc.100
//Kevin1.20, use include rather than file open for epp & e-up
//#ifdef SYSTEM_8051
WORD code _wLogoData[]=
{
#ifdef NO_LOGO
0
#else
// LLY2.79-2, only load small size LOGO while enable SERIAL_DEBUG
// Because code size issue !!
#if defined (HOST_JPG) || defined (SUPPORT_DVD_T) //alex2.34 JPEG_LOGO
#ifdef HOST_JPG
#include "LOGO_JPG.txt"
#endif ///#ifdef HOST_JPG
#ifdef SUPPORT_DVD_T
#include "logo_dvb.txt"
#endif //#ifndef SUPPORT_DVD_T
#else //#if defined (HOST_JPG) || defined (SUPPORT_DVD_T)
#ifndef RELEASE_SETTING
#include "logo_dbg.txt"
#else // #ifndef RELEASE_SETTING
#include "logo.txt"
#endif // #ifndef RELEASE_SETTING
#endif //#if defined (HOST_JPG) || defined (SUPPORT_DVD_T)
#endif // NO_LOGO
};
// LLY.047, re-arrange bitmap data for screen saver usage
DWORD code aBitmapData1[]=
{
#ifdef NO_SCREEN_SAVER
0
#else // #ifdef NO_SCREEN_SAVER
//alex2.34,20040724,baseline saver for porable
//alex2.37,20040913,change baseline_saver as Support_Mini_Screen_Saver
#ifdef SUPPORT_MINI_SCREEN_SAVER
#include "bitmap.ico"
#else ////#ifdef SUPPORT_MINI_SCREEN_SAVER
#include "bitmap.txt" // LLY.050a-1, merge *.tx0 & *.tx1
#endif//#ifdef SUPPORT_MINI_SCREEN_SAVER
#endif // #ifdef NO_SCREEN_SAVER
};
DWORD code aBitmapData2[]=
{
#ifdef NO_SCREEN_SAVER
0
#else
0 // must specify desired bitmap data file
#endif // #ifdef NO_SCREEN_SAVER
};
DWORD code aBitmapData3[]=
{
#ifdef NO_SCREEN_SAVER
0
#else // #ifdef NO_SCREEN_SAVER
0 // must specify desired bitmap data file
#endif // #ifdef NO_SCREEN_SAVER
};
//LJY1.20, per Brian's request, support 4M flash, remove screen saver.
#ifndef NO_SCREEN_SAVER
// Modified WYC.050a begin
//static DWORD __dwDigestHor, __dwDigestVer;
//static DWORD __dwYStart, __dwUStart, __dwVStart;
//static DWORD __dwStrip, __dwStrip2;
// end
// DVD.041, declare some global variable for screen saver mode usage
// WYC.050a DWORD _dwSWOSDAddr;
DWORD _dwSWOSDHeaders[4];
DWORD _dwSWOSDTemp;
// DVD.041 end ...
// LLY.043, keep the relative information for screen saver mode
WORD __wMinSCRX; // left boundary
WORD __wMinSCRY; // top boundary
WORD __wMaxSCRX; // right boundary
WORD __wMaxSCRY; // bottom boundary
WORD __wSCRWidth; // width
WORD __wSCRHeight; // height
BYTE __bSCRResolution; // resolution
// LLY.043 end ...
//LJY279, remove initial value here
BYTE __bBitmapIndex; // brian, the current bitmap of screen saver
extern DWORD _dwMoveCnt; // Brian, used as Mix Ratio
extern WORD _wSCRXPos, _wSCRYPos;
extern BYTE __bFisrtLoad;
extern DWORD __dwBitmapTBuffer, __dwBitmapBBuffer;
#endif //#ifndef NO_SCREEN_SAVER
// *******************************************************************
// Function : SWOSD_DigestInfo()
// Description : Get relative info. for digest mode
// Arguments : NULL
// Return : NULL
// Side Effect :
// ******************************************************************
//LJY1.20, support 4M flash, remove digest
#ifndef NO_DIGEST
void SWOSD_DigestInfo( )
{
// get digest size /// WYC.050a Begin
//W99AV_ReadInfo(W99AV_INFO_DIGEST_HSIZE, &__dwTemp/*&__dwDigestHor*/);
//W99AV_ReadInfo(W99AV_INFO_DIGEST_VSIZE, &__dwDigestVer);
// get digest YUV buffer start
//W99AV_ReadInfo(W99AV_INFO_DIGEST_YBUFFER, &__dwYStart);
//W99AV_ReadInfo(W99AV_INFO_DIGEST_UBUFFER, &__dwUStart);
//W99AV_ReadInfo(W99AV_INFO_DIGEST_VBUFFER, &__dwVStart);
//__dwStrip = (/*__dwDigestHor*/__dwTemp*4L);
//__dwStrip2= (/*__dwDigestHor*/__dwTemp*2L);
/// End
// get the font size of digest number
if(__wDiscType&BOOK_SVCD || __wDiscType&BOOK_CVD)
{
__wFontH=FONTN2_H;
__wFontW=FONTN2_W;
}
// wyc.100
else if (__wDiscType&BOOK_DVD)
{
__wFontH=FONTN2_H;
__wFontW=FONTN2_W;
}
else
{
__wFontH=FONTN1_H;
__wFontW=FONTN1_W;
}
}
#endif
// *********************************************************************
// Function : _OSD_ShowCDDA
// Description : Show CD-DA letters in a digest frame
// Arguments : bShowChar, not used
// Return : NULL
// Side Effect :
// *********************************************************************
//LJY1.20, support 4M flash, remove digest
#ifndef NO_DIGEST
void _OSD_ShowCDDA(/* WYC.050a BYTE bShowChar*/)
{
#if 0
__bShowNumber=FALSE;
if (!__bShowNumber)
{
__wFontH=FONTC_H;
__wFontW=FONTC_W;
_OSD_ShowDigestNumber(SW_CHAR_C); // C
__iCol+=__wFontW;
_OSD_ShowDigestNumber(SW_CHAR_D); // D
__iCol+=__wFontW;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -