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

📄 thumb.h

📁 车载电子影音系统dvd播放系统原程序代码
💻 H
📖 第 1 页 / 共 2 页
字号:
//**************************************************************************
//         Copyright (c) 2003, Cheertek Inc . All rights reserved.
//         D300, all right reserved.

//	Product	: WinDVD Firmware

//	Date	: 2003.1.2
//	Author	: Cheertek (D300 CoCo Chiang)
//	Purpose	: Provide the UI for thumbnail.
//	Sources	: Thumb.c
//***************************************************************************
#ifndef __THUMBNAIL_H__
#define __THUMBNAIL_H__

//Open this define to support round highlight.
#define THUMBNAIL_ROUND_HIGHLIGHT       

//define the color of the background
//#define THUMBNAIL_BACKGROUND_COLOR              0x23d460      
#define THUMBNAIL_BACKGROUND_COLOR              0x22d472

#define THUMBNAIL_FRAME_COLOR                   0x8F8080 //0x00EB8080 //0x8F8080

#define THUMBNAIL_HIGHLIGHT_COLOR               0x00AA3BAE

//define the mix ratio for highlight
#define THUMBNAIL_MIX_RATIO_HIGHLIGHT           32

//define the number of rows in a page
#ifdef SUPPORT_FM_BUTTONS
#define ROW_NUM                                 3
#else
#ifdef SUPPORT_JPEG_3_FRAMES
#define ROW_NUM                                 3
#else
#ifdef JPEG_SMALL_BUFFER //CoCo.230, show fewer thumbnails for 16M SDRAM.
#define ROW_NUM                                 3
#else
#define ROW_NUM                                 4
#endif
#endif
#endif

//define the number of rows in a page for "Program List"
#define PROGRAM_LIST_ROW_NUM                    3

//define the number of columns in a page
#ifdef SUPPORT_JPEG_3_FRAMES
#define COLUMN_NUM                              4
#else
#ifdef JPEG_SMALL_BUFFER //CoCo.230, show fewer thumbnails for 16M SDRAM.
#define COLUMN_NUM                              4
#else
#define COLUMN_NUM                              5
#endif
#endif

//define the number of thumbnails in a page
#define TOTAL_NUM_IN_PAGE                       (ROW_NUM*COLUMN_NUM)

//define the number of thumbnail is a page for "Program List"
#define PROGRAM_LIST_TOTAL_NUM_IN_PAGE          (PROGRAM_LIST_ROW_NUM*COLUMN_NUM)

//define the height of font or any GDI object
#define THUMBNAIL_TITLE_FONT_HEIGHT             32
#define THUMBNAIL_HELP_FONT_HEIGHT              32
#define THUMBNAIL_BUTTON_HEIGHT                 40

//define the thickness of the thumbnail's frame
#define THUMBNAIL_FRAME_THICKNESS               4

//define the index of the number for page info.
#define THUMBNAIL_PAGE_INFO_NUM_INDEX           1

//define the type of highlight
#define THUMBNAIL_UPDATE_HIGHLIGHT_DRAW         0
#define THUMBNAIL_UPDATE_HIGHLIGHT_CLEAR        1

//define the display position
#ifdef SUPPORT_JPEG_3_FRAMES
#define THUMBNAIL_DISPLAY_WIDTH                 96
#define THUMBNAIL_DISPLAY_HEIGHT_NTSC           64 //to be modified
#define THUMBNAIL_DISPLAY_HEIGHT_PAL            80
#define THUMBNAIL_DISTANCE_WIDTH                48 //the distance between each thumbnail
#define THUMBNAIL_DISTANCE_HEIGHT_NTSC          48
#define THUMBNAIL_H_REGION                      88 //the region between left side of the buffer and thumbnail
#define THUMBNAIL_V_REGION_NTSC                 88 //the region between top side of the buffer and thumbnail
#define THUMBNAIL_V_REGION_NTSC_PROGRAM_LIST    96 //the region between top side of the buffer and thumbnail for "Program List"
#else
#ifdef JPEG_SMALL_BUFFER //CoCo.230, tune the thumbnail position for 16M SDRAM.
#define THUMBNAIL_DISPLAY_WIDTH                 80
#define THUMBNAIL_DISPLAY_HEIGHT_NTSC           56 //to be modified
#define THUMBNAIL_DISPLAY_HEIGHT_PAL            80
#define THUMBNAIL_DISTANCE_WIDTH                32 //16 //the distance between each thumbnail
#define THUMBNAIL_DISTANCE_HEIGHT_NTSC          32 //16
#define THUMBNAIL_H_REGION                      88 //the region between left side of the buffer and thumbnail
#define THUMBNAIL_V_REGION_NTSC                 88 //the region between top side of the buffer and thumbnail
#define THUMBNAIL_V_REGION_NTSC_PROGRAM_LIST    96 //the region between top side of the buffer and thumbnail for "Program List"
#else
#define THUMBNAIL_DISPLAY_WIDTH                 96
#define THUMBNAIL_DISPLAY_HEIGHT_NTSC           64 //to be modified
#define THUMBNAIL_DISPLAY_HEIGHT_PAL            80
#define THUMBNAIL_DISTANCE_WIDTH                16 //the distance between each thumbnail
#define THUMBNAIL_DISTANCE_HEIGHT_NTSC          16
#define THUMBNAIL_H_REGION                      88 //the region between left side of the buffer and thumbnail
#define THUMBNAIL_V_REGION_NTSC                 88 //the region between top side of the buffer and thumbnail
#define THUMBNAIL_V_REGION_NTSC_PROGRAM_LIST    96 //the region between top side of the buffer and thumbnail for "Program List"
#endif //USE_16M_SDRAM
#endif

#define THUMBNAIL_TUNE_DISPLAY_WIDTH_NTSC       2
#define THUMBNAIL_TUNE_DISPLAY_HEIGHT_NTSC      2

//define the width and height should be tunned for PAL.
#define THUMBNAIL_TUNE_DISPLAY_WIDTH_PAL        2
#define THUMBNAIL_TUNE_DISPLAY_HEIGHT_PAL       16
#define THUMBNAIL_TUNE_DISTANCE_HEIGHT_PAL      16

//define the starting position we want to tune for the frame.
/*
#define THUMBNAIL_TUNE_THUMB_FRAME_H_NTSC       46
#define THUMBNAIL_TUNE_THUMB_FRAME_V_NTSC       20
#define THUMBNAIL_TUNE_THUMB_FRAME_H_PAL        56
#define THUMBNAIL_TUNE_THUMB_FRAME_V_PAL        32
*/

// Brian1.10, adjust the position for VDS and HDS is changed to center the video
#define THUMBNAIL_TUNE_THUMB_FRAME_H_NTSC       66 //50  //CoCo1.24, for OSD's position move
#define THUMBNAIL_TUNE_THUMB_FRAME_V_NTSC       18
#define THUMBNAIL_TUNE_THUMB_FRAME_H_PAL        72 //56 //CoCo1.24, for OSD's position move
#define THUMBNAIL_TUNE_THUMB_FRAME_V_PAL        28 

// Brian1.10, PSCAN is different from Interlace
#define THUMBNAIL_TUNE_THUMB_FRAME_H_NTSC_PSCAN       68 //52 //CoCo1.24, for OSD's position move
#define THUMBNAIL_TUNE_THUMB_FRAME_V_NTSC_PSCAN       18
#define THUMBNAIL_TUNE_THUMB_FRAME_H_PAL_PSCAN        68 //52 //CoCo1.24, for OSD's position move
#define THUMBNAIL_TUNE_THUMB_FRAME_V_PAL_PSCAN        30

//define the position of tunning button in PAL mode.
#define THUMBNAIL_TUNE_BUTTON_START_V_PAL       40

//define the position of tunning title in PAL mode.
#define THUMBNAIL_TUNE_TITLE_START_V_PAL        10

//define the position of tunning title in PAL mode.
#define THUMBNAIL_TUNE_BIG_FRAME_V_PAL          THUMBNAIL_TUNE_TITLE_START_V_PAL

//define the height of tunning the big frame in PAL mode.
#define THUMBNAIL_TUNE_BIG_FRAME_V_HEIGHT_PAL   50

//define the position of tunning help in PAL mode.
#define THUMBNAIL_TUNE_HELP_START_V_PAL         40

//define the display position for title
#define THUMBNAIL_DISPLAY_TITLE_START_H         8 //24 //CoCo1.24, for OSD's position move
#ifdef USE_PSFB_DRAW_THUMB_FRAME //CoCo.230, tune the thumbnail position for 16M SDRAM.
#define THUMBNAIL_DISPLAY_TITLE_START_V         12
#else
#define THUMBNAIL_DISPLAY_TITLE_START_V         25
#endif

//define the display position for page info
#define THUMBNAIL_DISPLAY_PAGE_START_H          368 //400 //CoCo1.24, for OSD's position move
#ifdef USE_PSFB_DRAW_THUMB_FRAME //CoCo.230, tune the thumbnail position for 16M SDRAM.
#define THUMBNAIL_DISPLAY_PAGE_END_H            576
#else
#define THUMBNAIL_DISPLAY_PAGE_END_H            (THUMBNAIL_DISPLAY_WIDTH * COLUMN_NUM + THUMBNAIL_DISTANCE_WIDTH * (COLUMN_NUM-1) + THUMBNAIL_H_REGION-THUMBNAIL_TUNE_THUMB_FRAME_H_NTSC)
#endif
#define THUMBNAIL_DISPLAY_PAGE_START_V          THUMBNAIL_DISPLAY_TITLE_START_V

//define the distance between the thumbnail and the button
#define THUMBNAIL_THUMB_BUTTON_DISTANCE         35

//The width of the button and the distance between the buttons
#define THUMBNAIL_BUTTON_START_H                16 //32 //CoCo1.24, for OSD's position move
//#define THUMBNAIL_BUTTON_START_V                360    
#define THUMBNAIL_BUTTON_START_V                (THUMBNAIL_V_REGION_NTSC-THUMBNAIL_TUNE_THUMB_FRAME_V_NTSC+THUMBNAIL_DISPLAY_HEIGHT_NTSC*ROW_NUM+THUMBNAIL_DISTANCE_WIDTH*(ROW_NUM-1)+THUMBNAIL_THUMB_BUTTON_DISTANCE)
#define THUMBNAIL_BUTTON_DISTANCE               12
#define THUMBNAIL_CIRCLE_BUTTON_WIDTH           40
#define THUMBNAIL_RECTANGLE_BUTTON_WIDTH        120    

//define the distance between the button and the help string.
#define THUMBNAIL_BUTTON_HELP_DISTANCE          10

//define the display position for help
#define THUMBNAIL_DISPLAY_HELP_START_H          THUMBNAIL_DISPLAY_TITLE_START_H
#define THUMBNAIL_DISPLAY_HELP_START_V          (THUMBNAIL_BUTTON_START_V+THUMBNAIL_BUTTON_HEIGHT+THUMBNAIL_BUTTON_HELP_DISTANCE)
      
//define the distance between the title and the big frame
#define THUMBNAIL_TITLE_BIG_FRAME_DISTANCE      4
     
//define the position to draw the frame for Program List
#define THUMBNAIL_DISPLAY_BIG_FRAME_H           0 //8 //CoCo1.24, for OSD's position move
#define THUMBNAIL_DISPLAY_BIG_FRAME_V           (THUMBNAIL_DISPLAY_TITLE_START_V+THUMBNAIL_TITLE_FONT_HEIGHT+THUMBNAIL_TITLE_BIG_FRAME_DISTANCE)
//#define THUMBNAIL_DISPLAY_BIG_FRAME_WIDTH       585
#define THUMBNAIL_DISPLAY_BIG_FRAME_WIDTH       600
#define THUMBNAIL_DISPLAY_BIG_FRAME_HEIGHT      254
#define THUMBNAIL_DISPLAY_BIG_FRAME_THICKNESS   8

//define tge position and size of the background
#define THUMBNAIL_DISPLAY_BACKGROUND_START_H    0
#define THUMBNAIL_DISPLAY_BACKGROUND_START_V    0
#define THUMBNAIL_DISPLAY_BACKGROUND_RIGHT      640
#define THUMBNAIL_DISPLAY_BACKGROUND_BOTTOM     460

//define maximum decoding time
#define THUMBNAIL_MAX_DECODE_TIME               COUNT_10_SEC

//define maximum "parse header" time
#define THUMBNAIL_MAX_PARSEHEADER_TIME          COUNT_3_SEC

//define the maximum times to re-decode a thumbnail when decoding error
#define THUMBNAIL_REDECODE_TIMES                5

⌨️ 快捷键说明

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