osd_palette.h
资源名称:8202s.rar [点击查看]
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:6k
源码类别:
DVD
开发平台:
C/C++
- /************************************************************
- define
- ************************************************************/
- #define LINK_NULL (0xffff)
- #define __palette(Y,Cb,Cr,BlendFactor)
- (
- (((UINT32)(Y) & 0x3f)<<10)
- | (((UINT32)(Cb) & 0x0f)<<6)
- | (((UINT32)(Cr) & 0x0f)<<2)
- | (((UINT32)(BlendFactor) & 0x03))
- )
- #define __palette2(Y,Cb,Cr,Blend,Fill)
- (
- (((UINT32)(Y) & 0x3f)<<10)
- | (((UINT32)(Cb) & 0x0f)<<6)
- | (((UINT32)(Cr) & 0x0f)<<2)
- | ((Blend) ? 0x02 : 0x01)
- | ((Fill) ? 0x01 : 0x00)
- )
- #define __paletteF(Y,B,R,BlendFactor)
- __palette((Y)>>2, (B)>>4, (R)>>4, (BlendFactor))
- #define __palette2F(Y,B,R,Blend,Fill)
- __palette2((Y)>>2, (B)>>4, (R)>>4, (Blend), (Fill))
- #define SOUND_MAX_REGION 5
- //#define HEADER_SIZE 0x10
- /*
- #define NORMAL_HEADER 0
- #define EQ_HEADER 1
- #define SETUP_HEADER 2
- #define NES_HEADER 3
- #ifdef BBK_NEW_SETUP //fengjl add for BBK's NEW_SETUP 3-11-17 16:08
- #define BBK_SETUP_HEADER 4
- #endif
- #ifdef VIRTUAL_KEYBOARD
- #define KEYBOARD_HEADER 4 //liweihua add for 256 color keyboard 2003-11-10 19:28
- #endif
- */
- #define ONE_BYTE_POINT 4 //4 color -> 1 byte has 4 point
- #define DASH_MARK 0x2d
- #ifdef NEW_SETUP_OSD // majinping 2002-05-02 for new setup menu
- #define SETUP_MAIN_YSTART 1
- #endif
- #ifndef NULL
- #define NULL ((void *)0)
- #endif
- #define OSD_FONT_HEIGHT 24
- #define REGIONS_ACTIVE 6
- #define SETUP_BTN_HEIGHT (OSD_FONT_HEIGHT+8)
- #define MAX_VOLUME 25
- #define TRANS_COLOR 0x0000
- #define DRK_GREEN_COLOR 0xeeee
- #define MID_GREEN_COLOR 0x8888
- #define BR_GREEN_COLOR 0x9999
- #define YELLOW_COLOR 0x7777
- #define DRK_ORANGE 0x5555
- #define BR_ORANGE 0x5555
- #define DRK_RED_COLOR 0xdddd
- #define BR_RED_COLOR 0xcccc
- #define GRAY_COLOR 0x3333
- const UINT16 bColorTab[]=
- { DRK_GREEN_COLOR,MID_GREEN_COLOR,BR_GREEN_COLOR,
- YELLOW_COLOR,DRK_ORANGE,DRK_RED_COLOR,BR_RED_COLOR
- };
- //0 -> 00(OSD background)
- //1 -> 11(yellow-green)
- //font boundary(only horizontal) -> 01(anti-background)
- #ifdef DRAW_BLACK_FRAME
- static const BYTE PatternEdge[] = { //Detect Edge
- 0x00, //0000 0000 0000
- 0x01, //0001 0000 0001
- 0x04, //0010 0000 0100
- 0x05, //0011 0000 0101
- 0x10, //0100 0001 0000
- 0x11, //0101 0001 0001
- 0x14, //0110 0001 0100
- 0x15, //0111 0001 0101
- 0x40, //1000 0100 0000
- 0x41, //1001 0100 0001
- 0x44, //1010 0100 0100
- 0x45, //1011 0100 0101
- 0x50, //1100 0101 0000
- 0x51, //1101 0101 0001
- 0x54, //1110 0101 0100
- 0x55 //1111 0101 0101
- };
- static const BYTE pattern_4[] = { //old:pattern_4
- 0x00, //0000 0000 0000
- 0x07, //0001 0000 0111
- 0x1d, //0010 0001 1101
- 0x1f, //0011 0001 1111
- 0x74, //0100 0111 0100
- 0x77, //0101 0111 0111
- 0x7d, //0110 0111 1101
- 0x7f, //0111 0111 1111
- 0xd0, //1000 1101 0000
- 0xd7, //1001 1101 0111
- 0xdd, //1010 1101 1101
- 0xdf, //1011 1101 1111
- 0xf4, //1100 1111 0100
- 0xf7, //1101 1111 0111
- 0xfd, //1110 1111 1101
- 0xff, //1111 1111 1111
- };
- #else
- static const BYTE pattern_4[]=
- {//0=>00 1=>11
- 0x00, 0x03, 0x0c, 0x0f, 0x30, 0x33, 0x3c, 0x3f,
- 0xc0, 0xc3, 0xcc, 0xcf, 0xf0, 0xf3, 0xfc, 0xff
- };
- #endif
- const BYTE pattern_a4[]=
- {//0=>10 1=>11
- 0xaa, 0xab, 0xae, 0xaf, 0xba, 0xbb, 0xbe, 0xbf,
- 0xea, 0xeb, 0xee, 0xef, 0xfa, 0xfb, 0xfe, 0xff
- };
- const BYTE pattern_b4[]=
- {//0=>01 1=>11
- 0x55, 0x57, 0x5D, 0x5F, 0x75, 0x77, 0x7D, 0x7F,
- 0xD5, 0xD7, 0xDD, 0xDF, 0xF5, 0xF7, 0xFD, 0xFF,
- };
- //define in osd_drv.h
- //#define OSD_PAL_16b
- //#define OSD_PAL_32b
- //#define OSD_PAL_RGB_32b
- #ifdef OSD_PAL_16b
- #include "osd_pal_16b.h"
- #endif
- #ifdef OSD_PAL_32b
- #include "osd_pal_32b.h"
- #endif
- #ifdef OSD_PAL_RGB_32b
- #include "osd_pal_rgb_32b.h"
- #endif
- //#ifdef OSD_BMP
- //#include "Osd_BmpPalette.h"
- //#endif
- #define OSD_DATA_OFFSET(f) (osd_header_offset[(f)&OSD_FORMAT_MASK])
- #define OBV_BASE (SDRAM_BASE + regs0->osd_base_addr*1024)
- #define get_osdbuf_baseptr() ((void *)OBV_BASE)
- BYTE PatternMode;
- BYTE bEqMaxKeepTm=0;
- BYTE header_id;
- extern UINT8 safe_on;