📄 fsosd.h
字号:
/* Copyright 1996, ESS Technology, Inc. *//* SCCSID @(#)fsosd.h 4.7 11/10/03 */ /* * $Log$ */#ifndef _FSOSD_H_#define _FSOSD_H_#include "common.h"/************************************************************************ * OSD's font definitions * ************************************************************************//* * Font related macros */#include "font.h"/* definitions for special digit2ascii[] symbols */#define D2A_BLANK 0xa#define D2A_COLON 0xb#define D2A_SLASH 0xc#define D2A_MINUS 0xd#define D2A_PLUS 0xe#define D2A_NULL 0xf#ifdef NON_PLAY_OSD#define NPOSD_LINES 5 /* Maximum is 5!! */#else#define NPOSD_LINES 0#endif/* * OSD related macros */#define OSD_KEEP_TIMEOUT 0xfe /* Keep previous timeout, used in * * OSD language change */#define OSD_MAX_CHAR 20 /* Max. number of OSD char's */#define OSD_CHAR_WIDTH 24 /* Horizontal char size (pels) */#define OSD_PIXEL 2 /* 2 bits/pixel */#define OSD_CHAR_HEIGHT 32 /* Vertical char size (pels) */#define OSD_RESTRICTED_SIZE 960 /* Size in dwords..restricted */#define NPOSD_DRAM_SIZE (OSD_CHAR_WIDTH*(OSD_CHAR_HEIGHT/2) * \ OSD_MAX_CHAR*NPOSD_LINES*2/32)#define OSD_AREA1_SIZE (OSD_CHAR_WIDTH*(OSD_CHAR_HEIGHT/2) * \ OSD_MAX_CHAR*OSD_LINES_IN_AREA_1*2/32)/* * When used as "deltas" in buscon_xfer(), there are bitsize limitations: * 0 <= OSD_DRAM_DX <= 511 * 0 <= OSD_DRAM_DY <= 127 *//* DWORDs per OSD line */#define OSD_DRAM_DX (OSD_CHAR_WIDTH*OSD_MAX_CHAR/16) #define OSD_DRAM_DY (OSD_MAX_LINES*OSD_CHAR_HEIGHT/2) #define NPOSD_DRAM_DY (NPOSD_LINES*OSD_CHAR_HEIGHT/2) #define OSD_SM_WIDTH 3 /* Width in WORD for English */#define OSD_LG_WIDTH 6 /* Width in WORD for Chinese *//* Dword offset of position i with respect to OSD_DRAM_START */#define OSD_OFFSET(i) ((((i) << 1) + (i)) >> 1) /* 1.5*i *//************************************************************************ * Local typedefs's * ************************************************************************//* PV FSOSD * * Example Full Screen OSD Configuration: * * AREA 1______________________________ * | | | | * | REGION 1 | REGION 2 | REGION 3 | LINE 1 (AREA 1) * ----------------------------------- * | REGION 4 | REGION 5 | REGION 6 | LINE 2 * ----------------------------------- * | REGION 7 | REGION 8 | REGION 9 | LINE 3 * ------------------------------------- * . . . * . . . * . . . * AREA 2______________________________ * | | | | * | REGION 10 | REGION 11 | REGION 12 | LINE 1 (AREA 2) * ----------------------------------- * * * NOTE: When reconfiguring OSD Areas, verify that the following defines are * correct for your intended layout. * 1. OSD_TOTAL_AREAS * 2. OSD_LINES_IN_AREA_1 and OSD_LINES_IN_AREA_2 * 3. OSD_REGIONS_PER_LINE * 4. OSD_TIME_REGION & OSD_TIME_REGION_MASK * 5. OSD_TRACK_REGION & OSD_TRACK_REGION_MASK */ #define OSD_TOTAL_AREAS 2#define OSD_LINES_IN_AREA_1 3#define OSD_LINES_IN_AREA_2 1#define OSD_REGIONS_PER_LINE 3#define OSD_MAX_LINES (OSD_LINES_IN_AREA_1 + OSD_LINES_IN_AREA_2)#define OSD_MAX_REGIONS (OSD_REGIONS_PER_LINE * \ (OSD_LINES_IN_AREA_1 + OSD_LINES_IN_AREA_2)) /* * NOTE: To convert from NTSC to PAL vert. position, the following equation * can be used. This is needed to prevent the vertical shifting of the * OSD Areas when switching between NTSC and PAL output. * * Y_pal = (6 * Y_ntsc / 5) + 4 */#define OSD_HORZ_POS 110 /* OSD horizontal display position */#define OSD_HORIZ_END (OSD_MAX_CHAR * OSD_CHAR_WIDTH)#define OSD_NTSC_VERT_POS1 30 /* Area1 vertical display position for NTSC */#define OSD_PAL_VERT_POS1 (6*OSD_NTSC_VERT_POS1/5 + 4) /* Area1 v.start PAL */#define OSD_NTSC_VERT_END1 (OSD_NTSC_VERT_POS1 + \ OSD_LINES_IN_AREA_1 * OSD_CHAR_HEIGHT/2 -1)#define OSD_PAL_VERT_END1 (OSD_PAL_VERT_POS1 + \ OSD_LINES_IN_AREA_1 * OSD_CHAR_HEIGHT/2 -1)#ifdef NON_PLAY_OSD#define OSD_VERT_POS_GAP 23 /* Gap between vert_end1 and vert_pos2(NTSC)*/#else#define OSD_VERT_POS_GAP 73 /* Gap between vert_end1 and vert_pos2(NTSC)*/#endif /*NON_PLAY_OSD*/#define OSD_NTSC_VERT_POS2 (OSD_NTSC_VERT_END1 + OSD_VERT_POS_GAP)#define OSD_PAL_VERT_POS2 (6*OSD_NTSC_VERT_POS2/5 + 4)#ifdef NON_PLAY_OSD#define OSD_NTSC_VERT_END2 (OSD_NTSC_VERT_POS2 + \ NPOSD_LINES * OSD_CHAR_HEIGHT/2 -1)#define OSD_PAL_VERT_END2 (OSD_PAL_VERT_POS2 + \ NPOSD_LINES * OSD_CHAR_HEIGHT/2 -1)#else#define OSD_NTSC_VERT_END2 (OSD_NTSC_VERT_POS2 + \ OSD_LINES_IN_AREA_2 * OSD_CHAR_HEIGHT/2 -1)#define OSD_PAL_VERT_END2 (OSD_PAL_VERT_POS2 + \ OSD_LINES_IN_AREA_2 * OSD_CHAR_HEIGHT/2 -1)#endif /* NON_PLAY_OSD */ #define OSD_AREA_1 0#define OSD_AREA_2 1#define OSD_LINE_1 0#define OSD_LINE_2 1#define OSD_LINE_3 2#define OSD_LINE_4 3#define OSD_LINE_5 4#define OSD_LINE_1_MASK 0x0007#define OSD_LINE_2_MASK 0x0038#define OSD_LINE_3_MASK 0x01c0#define OSD_LINE_4_MASK 0x0e00#define OSD_LINE_5_MASK 0x7000#define OSD_SECT_1 0x1249 /* REGIONS 1,4,7,10,13 */#define OSD_SECT_2 0x2492 /* REGIONS 2,5,8,11,14 */#define OSD_SECT_3 0x4924 /* REGIONS 3,6,9,12,15 */#define OSD_REGION_1 0x0001 /* OSD_REGION_# are mask values for the region */#define OSD_REGION_2 0x0002#define OSD_REGION_3 0x0004#define OSD_REGION_4 0x0008#define OSD_REGION_5 0x0010#define OSD_REGION_6 0x0020#define OSD_REGION_7 0x0040#define OSD_REGION_8 0x0080#define OSD_REGION_9 0x0100#define OSD_REGION_10 0x0200#define OSD_REGION_11 0x0400#define OSD_REGION_12 0x0800#define OSD_REGION_13 0x1000#define OSD_REGION_14 0x2000#define OSD_REGION_15 0x4000#define NPOSD_MASK 0x8000/* Track and Time regions are special, in that once specified, * no other OSD messages can be displayed in those regions directly! */#ifdef P4O#define OSD_TIME_REGION_MASK 0 /* Change time & track region also! */ #define OSD_TRACK_REGION_MASK 0#define OSD_TIME_REGION 0 /* Change track & time masks above also! */#define OSD_TRACK_REGION 0#else#define OSD_TRACK_REGION 2#define OSD_TRACK_REGION_MASK OSD_REGION_2#define OSD_TIME_REGION_MASK OSD_REGION_3 /* Change time & track region also! */ #define OSD_TIME_REGION 3 /* Change track & time masks above also! */#endif /* P4O *//* * OSD_TIME_SIZE and OSD_TRACK_SIZE should be the exact width of the * displayed string */#define OSD_TIME_SIZE 6#define OSD_TRACK_SIZE 7 #ifdef P4O#define OSD_AUDIO_REGION 7#define OSD_DIGEST_REGION 8#define OSD_VOCAL_REGION 9#define OSD_KARAOKE_REGION 11#define OSD_VOLUME_REGION 11#define OSD_FUNCTION_STATUS_REGION 1#define OSD_TV_STANDARD_REGION 6#define OSD_CD_TYPE_REGION 4#define OSD_REPEAT_REGION 1#define OSD_PAUSE_REGION 3#define OSD_VIEW_REGION 2#else /* not P4O */#define OSD_FUNCTION_STATUS_REGION 1#define OSD_INPUT_MODE_REGION 1#define OSD_KARAOKE_REGION 11#define OSD_AUDFX_REGION 7#define OSD_AUDIO_REGION 9#define OSD_VOCAL_REGION 8#define OSD_PBC_REGION 5#define OSD_REPEAT_REGION 5#define OSD_CD_TYPE_REGION 4#define OSD_TV_STANDARD_REGION 6#define OSD_PLAY_ORDER_REGION 4#define OSD_GOTO_REGION 5#define OSD_TIME_TYPE_REGION 1#define OSD_DIGEST_REGION 11#ifdef P2O#define OSD_PAUSE_REGION 1#endif /*P2O*/#endif /* P4O *//* OSD timeouts (in seconds) */#define DISPLAY_TIME_OUT 2#define QUICK_TIME_OUT 1#define DIGEST_OSD_TIME_OUT 5#define EXTENDED_TIME_OUT 4/* OSD_output macros */#ifdef BILINGUAL_OSD#define OUTOSD(area, msg1, msg2, sec) OSD_output(area, msg1, msg2, sec)#define OUTOSDX(area, msg1, msg2, sec) OUTOSD(area, msg1, msg2, sec)#ifdef DEBUG_OSD#define DBG_OSD(a, b, c, d) OUTOSD(a, b, c, d)#else#define DBG_OSD(a, b, c, d)#endif /* DEBUG_OSD */#else#define OUTOSD(area, msg, dummy_msg, sec) OSD_output(area, msg, sec)#define OUTOSDX(area, msg, dummy, sec) OUTOSD(area, msg, dummy, sec)#ifdef DEBUG_OSD#define DBG_OSD(a, b, c, d) OUTOSD(a, b, d)#else#define DBG_OSD(a, b, c, d)#endif /* DEBUG_OSD */#endif /* BILINGUAL_OSD */#define CLEAROSD(area) OSD_clear_region(area)#ifdef NON_PLAY_OSD#define CLEARALLOSD() {OSD_clear_all(1);NPOSD_clear_all();}#else#define CLEARALLOSD() OSD_clear_all(1)#endif#define CG_MAP_COLOR(a,b,c) /* dummy */#define CG_MAP_DELAYED(a,b,c) /* dummy *//* Used in OSD_init() to set colors */#define OSD_BLACK 0x9000 #define OSD_CLEAR 0x7000#define OSD_BLUE 0xb7f0#define OSD_GREEN 0x1ba0#define OSD_PINK 0x1f40#define OSD_RED 0xde70#define OSD_WHITE 0x7000#define OSD_PURPLE 0xd620#define OSD_MAGENTA 0xf560#define OSD_YELLOW 0x5910#define OSD_BROWN 0xbf40#define OSD_GRAY 0x1000#define OSD_CYAN 0x3290#define OSD_ORANGE 0x0c50/* from green to red */#define OSD_G2R1 OSD_GREEN#define OSD_G2R2 0x2bc0#define OSD_G2R3 0x3ae0#define OSD_G2R4 0x4af0#define OSD_G2R5 OSD_YELLOW#define OSD_G2R6 0x3a30#define OSD_G2R7 0x1b40#define OSD_G2R8 0xfc60#define OSD_G2R9 OSD_RED#ifdef EQUALIZER/* index of OSD_palette_4b[]..used in OSD_paint_rect() */#define OSD_COLOR_0 0x0000#define OSD_COLOR_1 0x1111#define OSD_COLOR_2 0x2222#define OSD_COLOR_3 0x3333#define OSD_COLOR_4 0x4444#define OSD_COLOR_5 0x5555#define OSD_COLOR_6 0x6666#define OSD_COLOR_7 0x7777#define OSD_COLOR_8 0x8888#define OSD_COLOR_9 0x9999#define OSD_COLOR_10 0xaaaa#define OSD_COLOR_11 0xbbbb#define OSD_COLOR_12 0xcccc#define OSD_COLOR_13 0xdddd#define OSD_COLOR_14 0xeeee#define OSD_COLOR_15 0xffff#endif EQUALIZER#define NO_OSD 2#define CHINESE_OSD 1#define ENGLISH_OSD 0/* Get line index from region */#define OSD_LINE_NUM(x) (OSD_line_index[x])#define OSD_DRAM_YOFFSET(x) (OSD_line_index[x])typedef struct { char start, end;} OSD_Region;/************************************************************************ * Global variables * ************************************************************************/GBLDEF(unsigned short OSD_total_areas, OSD_TOTAL_AREAS);GBLDEF(unsigned short OSD_dram_dx, OSD_DRAM_DX);GBLDEF(unsigned short OSD_dram_dy, OSD_DRAM_DY);GBLDEF(unsigned short OSD_ntsc_vert_end1, OSD_NTSC_VERT_END1);GBLDEF(unsigned short OSD_pal_vert_end1, OSD_PAL_VERT_END1);GBLDEF(unsigned short OSD_ntsc_vert_end2, OSD_NTSC_VERT_END2);GBLDEF(unsigned short OSD_pal_vert_end2, OSD_PAL_VERT_END2);GBLDEF(unsigned short OSD_ntsc_vert_pos1, OSD_NTSC_VERT_POS1);GBLDEF(unsigned short OSD_pal_vert_pos1, OSD_PAL_VERT_POS1);GBLDEF(unsigned short OSD_ntsc_vert_pos2, OSD_NTSC_VERT_POS2);GBLDEF(unsigned short OSD_pal_vert_pos2, OSD_PAL_VERT_POS2);GBLDEF_0(unsigned short vid_scn_osd_vstart1, 0);GBLDEF_0(unsigned short vid_scn_osd_vend1, 0);GBLDEF_0(unsigned short vid_scn_osd_vstart2, 0);GBLDEF_0(unsigned short vid_scn_osd_vend2, 0);EXPORT unsigned char OSD_lines[][OSD_MAX_CHAR];EXPORT OSD_Region OSD_regions[];EXPORT unsigned short OSD_displayed_regions; /* bits indicate region(s) with */ /* message actively displayed */EXPORT unsigned short OSD_scheduled_regions; /* bits indicate region(s) */ /* scheduled for clearing */EXPORT unsigned short OSD_suppressed_regions; /* bits indicate region(s) */ /* whose display(s) are suppressed */EXPORT unsigned short OSD_update_regions; /* regions to be updated in dram */EXPORT int OSD_schedule_time[];EXPORT unsigned char OSD_new_time[];EXPORT unsigned char OSD_new_track[];EXPORT unsigned char OSD_new[];EXPORT unsigned char OSD_line_index[];EXPORT unsigned short *ptrLshift;#ifdef BILINGUAL_OSDEXPORT unsigned char OSD_language;#endifEXPORT unsigned int OSD_next_update; /* next update allowed */ EXPORT unsigned char OSD_update_time;EXPORT unsigned char OSD_time_minute; /* BCD time for minute*/EXPORT unsigned char OSD_time_second; /* BCD time for second *//************************************************************************ * Global functions * ************************************************************************/EXPORT void OSD_init(void);EXPORT void OSD_vertical_shift(int);EXPORT void OSD_horizontal_shift(int);EXPORT void OSD_set_vstart_end(int);#ifdef BILINGUAL_OSDEXPORT void OSD_language_change(void);EXPORT void OSD_output(int, unsigned char *, unsigned char *, int);#elseEXPORT void OSD_output(int, unsigned char *, int);#endifEXPORT void OSD_clear_region(int);EXPORT void OSD_delay_clear_region(int, int);EXPORT void OSD_update_info(void);EXPORT void OSD_clear_line(int, unsigned short);EXPORT void OSD_clear_all(int);EXPORT void OSD_init_display(void);EXPORT void OSD_echo(void);EXPORT void OSD_pitch_bar(int);EXPORT void OSD_time_track(unsigned short, int);EXPORT void OSD_digest_menu(int);#ifdef NON_PLAY_OSDEXPORT void NPOSD_output(int, int, unsigned char *);EXPORT void NPOSD_clear(int, int, int);EXPORT void NPOSD_clear_all(void);#endif /*NON_PLAY_OSD*/EXPORT void OSD_copy_data(int);EXPORT void OSD_copy_one_char(unsigned int, int, int, int);EXPORT void OSD_put_one_char(int, int, uchar);EXPORT void OSD_schedule_check(void);EXPORT void OSD_setup(int);EXPORT void OSD_paint_rect(int, int, int, int, uint);EXPORT void OSD_paint_spectrum(int, int, int, int, int);EXPORT void OSD_cfgline (char, char, char, char, char);#endif /* _FSOSD_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -