/****************************************************************************** Copyright (c) 2004 Digital STREAM Technology Inc. All Rights Reserved FILE NAME GRP_DDI.h VERSION Version 0.4 DESCRIPTION This file is for platform dependent be to used in Graphics LIB . AUTHOR S/W 3 Team Jongki Jeong. HISTORY NAME DATE REMARKS Jongki jeong 03-09-2004 Created initial version 0.01 Jinsook Kim 06-25-2004 Updated version : 0.01->0.1 Jongki jeong 08-04-2004 AUTOREFRESH °ü·Ã ¸ÅÅ©·ÎÇÔ¼ö ¹ö±×¼öÁ¤ Jinsook Kim 08-18-2004 Updated version : 0.1->0.2 Jinsook Kim 03-30-2005 Updated version : 0.2->0.3 Jinsook Kim 04-21-2005 Updated version : 0.3->0.4 REMARK ******************************************************************************/ #ifndef GRP_DDI_H #define GRP_DDI_H /****************************************************************/ /* */ /* Graphics Device Driver Interface */ /* ¿©±â´Â platform dependent ºÎºÐ¸¸ÀÇ ³»¿ëÀ» °¡Áö¸ç */ /* User °¡ »ç¿ëÇϴ°ÍÀ» Çã¿ëÇÏÁö ¾Ê±â·Î ÇÑ´Ù */ /***************************************************************/ /****************** COMPILER OPTIONAL PART *********************/ #define GDDI_MOUSE_USED 0 #define GDDI_DBG 0 #define GMN_DBG 0 #define GUT_DBG 0 #define GFN_DBG 0 #define SUPPORT_LGDT1111 0 #define SUPPORT_BCM 1 /******************* PLATFORM OPTION PART **********************/ /*============================================================================= Description - PLATFORM ¿¡ ¸Â°Ô Á¶Á¤ ÇÏ½Ã¸é µË´Ï´Ù. =============================================================================*/ #define GDDI_PLATFORM_TL9XX 1 #define GDDI_ARIB_USED 0 //arib »ç¿ë¿©ºÎ /* #if GDDI_ARIB_USED #include "ARIBTopologyModel.h" #else // #include "TLGraphics.h" // #include "TLPrivate.h" #include "stbos.h" #include "DHL_OSAL.h" #include "..\..\drv\lgdt1111\gfx\gfx_osd.h" #endif // #define PIXEL_MAP int//TLPixMap */ #include "DHL_OSAL.h" #include "DHL_Types.h" #if 0 // add sjpark, compile error, 090908 #include "bgfx.h" #include "cache_util.h" #endif #include "DHL_Graphic.h"//iskang 080910. //iskang input start // copy from b660_revB_driver\include\TLGraphicsUtils.h #define CREATE_TLPIXMAP_IN_CPU_MEMORY 0 #define CREATE_TLPIXMAP_IN_MAIN_PHYS_MEMORY 1 #define CREATE_TLPIXMAP_IN_AUX_PHYS_MEMORY 2 #define CREATE_TLPIXMAP_NO_MEMORY 3 // caller will fill in BaseAddr #define CREATE_TLPIXMAP_MEMORY_MASK 3 typedef enum { RGB32 = 0, YUV16a = 1, YUV16b = 2, YUV16c = 3, AYCbCr = 4, ALPHA8_RGB16 = 5, ALPHA8_RGB8 = 6, INDEX8 = 7, INDEX2 = 8, INDEX8_ALPHA8 = 9, RGB24 = 10, INDEX1 = 11, INDEX4 = 12, RGB16 = 13, RGB8 = 14, ALPHA4 = 15, YCbCr = 16, RGB12 = 17, RGB15 = 18, WRMASK = 19, YCbCr_PLANAR = 20, INDEX4Cursor = 28, TL85x_420 = 32, TL85x_420_AMR2 = 33, TL85x_420_AMR4 = 34, TL85x_422 = 36, TL9xx_420 = 40, TL9xx_422 = 41, ARGB_LGM1 = 42, AYCbCr_LGM1 = 43, ARGB_LGM2 = 44, AYCbCr_LGM2 = 45, Beetle_420 = 46, Beetle_422 = 47, Beetle_444 = 48 // Beetle_LGM = 49 } TL_PIXEL_FORMATS; /* typedef struct TLPixMap { INT32 x; // X coordinate of top-left corner of bitmap (usually 0) INT32 y; // Y coordinate of top-left corner of bitmap (usually 0) INT32 w; // width in pixels INT32 h; // height in pixels UINT32 pitch; // 32 bit words per row. Different contraints depending on fmt and usage TL_PIXEL_FORMATS fmt; // pixel format UINT8 psize; // number of bits per pixel UINT32 *baseAddr; // Starting address of pixel buffer UINT32 *baseAddr2; // optional Starting address of pixel buffer of field 2 for 2 field formats UINT32 *clut; // optional color lookup table for indexed formats TLVideoExtension *ext; // Supplemental information used by video driver UINT32 tag; // to trace a particular frame in video pipeline } TLPixMap; */ /* *iskang: *D2A´Â Zoran°ú ´Þ¸® * * typedef struct PixelMap_tag{ int frame;//view frame: 0, buffer frame: 1 INT32 x; // X coordinate of top-left corner of bitmap (usually 0) INT32 y; // Y coordinate of top-left corner of bitmap (usually 0) INT32 w; // width in pixels INT32 h; // height in pixels UINT32 pitch; // 32 bit words per row. Different contraints depending on fmt and usage TL_PIXEL_FORMATS fmt; // pixel format UINT8 psize; // number of bits per pixel UINT32 *baseAddr; // Starting address of pixel buffer UINT32 *baseAddr2; // optional Starting address of pixel buffer of field 2 for 2 field formats UINT32 *clut; // optional color lookup table for indexed formats }PIXEL_MAP;//iskang */ /* static bgfx_io_t g_gddi_s_io = { gddi_bin_read, gddi_bin_tell, gddi_bin_set }; */ typedef struct PixelMap_tag{ int frame;//view frame: 0, buffer frame: 1 INT32 x; // X coordinate of top-left corner of bitmap (usually 0) INT32 y; // Y coordinate of top-left corner of bitmap (usually 0) INT32 w; // width in pixels INT32 h; // height in pixels UINT32 pitch; // 32 bit words per row. Different contraints depending on fmt and usage TL_PIXEL_FORMATS fmt; // pixel format UINT8 psize; // number of bits per pixel void *baseAddr; // Starting address of pixel buffer //void UINT32 *baseAddr; // Starting address of pixel buffer UINT32 *baseAddr2; // optional Starting address of pixel buffer of field 2 for 2 field formats UINT32 *clut; // optional color lookup table for indexed formats }PIXEL_MAP;//iskang //iskang input end //bgfx_surf_p *g_GrpSurf; //graphic blt size limit, for beetle, ÇöÀç »ç¿ë¾ÈÇÔ. Á»´õ Å×½ºÆ®ÇؾßÇÔ #define GDDI_BLT_MIN_LIMIT 4096 #define GDDI_BLT_LIMIT_USED 0 //TLBLT °¡ ´À¸°°æ¿ì 8 or 4byte·Î align À» ½ÃŰ¸é ºü¸£´Ù //pixmap foramt ÀÌ INDEX8 Àΰæ¿ì beetle ¿¡¼± ±×³É ÇÏ¸é ´À¸®´Ù. ¾Æ·¡¿É¼ÇÀ» 1·ÎÇØ¾ß Á¤»ó¼Óµµ·Î ³ª¿Â´Ù #define GDDI_ADDR_4BYTE_ALIGN_USED 1 //100 % transparent blend value #define GRP_TSP 0x00 ///TL driver graphic ¿¡¼­ ¹«Á¶°Ç ÀÌ·¸°Ô »ç¿ëÁßÀÓ #define GRP_TSP_COLOR 0 //100 % opaque blend value, 9x:0x80, b6x:0xFF #define GRP_OPAQUE 0xFF //9x±âÁØÀ¸·Î 0x80 À» 1·Î ºÃÀ»¶§ÀÇ °ª(256/128), 9x:1, b6x:2 #define GRP_ALPHA_MULTIPLE 2 /****************** NATION SETTING PART ************************/ /*============================================================================= Description - application ¿¡¼­ ÇÊ¿äÇÑ ¸¸Å­À» Á¤ÇÏ½Ã¸é µË´Ï´Ù. =============================================================================*/ typedef enum { GRP_USA =0, GRP_KOREA =1, GRP_FRANCE =2, GRP_SPAIN =3, GRP_NUM_NATION }GRP_NATION; /****************** OSD RESOLUTION SETTING PART ****************/ /*============================================================================= Description - application ¿¡¼­ ÇÊ¿äÇÑ ¸¸Å­À» Á¤ÇÏ½Ã¸é µË´Ï´Ù. ´Ü, ¾Æ·¡ÀÇ °ªÀ» ¼öÁ¤ÇÒ °æ¿ì GRP_DDI.c ÀÇ ¾Æ·¡ 3°¡Áö °ªµµ ¼öÁ¤ÇÏ¼Å¾ß ÇÕ´Ï´Ù. GRP_OSD_INFO OsdInfo[GRP_NUM_RESOLUTION] float coordinate_ratio[GRP_NUM_RESOLUTION][2] GRP_OSD_INFO ScaleRect[GRP_NUM_RESOLUTION] =============================================================================*/ #define INCLUDE_BITMAP_DDM10_1ST 0 #define INCLUDE_BITMAP_HD2000 1 #define SUPPORT_REF_1366_768P 0 typedef enum { #if INCLUDE_BITMAP_HD2000//HD2000¿ë GRP_1920_1080i =0, GRP_1280_720p =1, GRP_720_480p =2, GRP_720_480i =GRP_720_480p, GRP_1366_768p =3, GRP_NUM_RESOLUTION =4 #elif INCLUDE_BITMAP_DDM10_1ST #if SUPPORT_REF_1366_768P GRP_1366_768p =0, #else GRP_1280_720p =0, #endif GRP_NUM_RESOLUTION =1 //iskang 1-->3 #endif }GRP_RESOLUTION; #ifdef __cplusplus extern "C" { #endif /******************* OS DEPENDENT PART *************************/ //#define OS_SEMAPHORE_ID SEM_ID //#define OS_SEM_PRIO SEM_Q_PRIORITY //#define OS_SEM_FIFO SEM_Q_FIFO //typedef void (*OS_TASKFUNCTION)(INT32 arg1); //#define OS_TASK_ID int //#define OS_MESSAGEQUEUE_ID MSG_Q_ID //#define OS_MSGQ_PRIO MSG_Q_PRIORITY //#define OS_MSGQ_FIFO MSG_Q_FIFO /******************* INTERNAL DEFINE PART **********************/ #define GDDI_MAX_MENU 10 //ÇÑ È­¸é¿¡ ³ªÅ¸³¯¼öÀÖ´Â ÃÖ´ë Å©±â ¸Þ´º °¹¼ö #define GRP_OK 0 #define GRP_FAIL -1 #define GDDI_AUTOREFRESH_USED 1 #if GDDI_AUTOREFRESH_USED //neverdai 080929. ¾Ë°í¸®Áò À߸øµÊ. //w°¡ canvasÀÇ ³¡¿¡ ´Ù´Ù¸¦¸¸Å­ ºñÁ¤»óÀûÀ¸·Î Ä¿Áö´Â ¹®Á¦°¡ ÀÖÀ½. //Ãß°¡·Î 360_240¿¡ ÃÖÀûÈ­ÇÔ. #if 0 #define AUTO_REFRESH_SX(cv,sx) if((cv)->refresh_r.x >sx) {(cv)->refresh_r.w += ((cv)->refresh_r.x-sx); (cv)->refresh_r.x = sx;} #define AUTO_REFRESH_SY(cv,sy) if((cv)->refresh_r.y >sy) {(cv)->refresh_r.h += ((cv)->refresh_r.y-sy); (cv)->refresh_r.y = sy;} #define AUTO_REFRESH_EX(cv,ex) if((cv)->refresh_r.x+(cv)->refresh_r.w-1refresh_r.w = ex-(cv)->refresh_r.x+1; #define AUTO_REFRESH_EY(cv,ey) if((cv)->refresh_r.y+(cv)->refresh_r.h-1refresh_r.h = ey-(cv)->refresh_r.y+1; #define AUTO_REFRESH_CLEAR(cv) (cv)->refresh_r.x=(cv)->refresh_r.y=-1;(cv)->refresh_r.w=(cv)->refresh_r.h =0; #else #define AUTO_REFRESH_SX(cv,sx) if((cv)->refresh_r.x >sx) {(cv)->refresh_r.w += (cv)->refresh_r.w==0?1:((cv)->refresh_r.x-sx); (cv)->refresh_r.x = sx;} #define AUTO_REFRESH_SY(cv,sy) if((cv)->refresh_r.y >sy) {(cv)->refresh_r.h += (cv)->refresh_r.h==0?1:((cv)->refresh_r.y-sy); (cv)->refresh_r.y = sy;} #define AUTO_REFRESH_EX(cv,ex) if((cv)->refresh_r.x+(cv)->refresh_r.w-1refresh_r.w = ex-(cv)->refresh_r.x+1; #define AUTO_REFRESH_EY(cv,ey) if((cv)->refresh_r.y+(cv)->refresh_r.h-1refresh_r.h = ey-(cv)->refresh_r.y+1; #define AUTO_REFRESH_CLEAR(cv) (cv)->refresh_r.x=360-1;(cv)->refresh_r.y=240-1;(cv)->refresh_r.w=(cv)->refresh_r.h =0; #endif #else #define AUTO_REFRESH_SX(cv,x) #define AUTO_REFRESH_SY(cv,y) #define AUTO_REFRESH_EX(cv,w) #define AUTO_REFRESH_EY(cv,h) #define AUTO_REFRESH_CLEAR(cv) #endif /******************* DEBUG DEFINE PART *************************/ int ddi_printf(char *fmt, ...) ; #ifndef dbg_printf #define dbg_printf ddi_printf//printf #endif #ifndef exit_printf #define exit_printf ddi_printf//printf #endif #ifndef ent_printf #define ent_printf ddi_printf//printf #endif #ifndef warn_printf #define warn_printf ddi_printf//printf #endif #ifndef err_printf #define err_printf OS_DbgPrintf//ddi_printf #endif #ifndef mem_printf #define mem_printf ddi_printf #endif /******************* TYPE DEFINE PART **************************/ #ifndef SINT8 #define SINT8 char #endif #ifndef SINT16 #define SINT16 short #endif #ifndef SINT32 #define SINT32 int #endif /******************* RESERVED KEY PART *************************/ extern UINT32 GRP_SEL_KEY; // G2H_SELECT extern UINT32 GRP_ITEM_UP_KEY; // G2H_UP extern UINT32 GRP_ITEM_DN_KEY; // G2H_DOWN extern UINT32 GRP_MENU_UP_KEY; // G2H_LEFT extern UINT32 GRP_MENU_DN_KEY; // G2H_RIGHT extern UINT32 GRP_POWER_OFF; // G2H_POWER_OFF /******************* KEY FUNCTION PART *************************/ typedef UINT32 (*USER_KEYFUNC)(); typedef UINT32 (*USER_RESPONSE_FUNC)(); typedef UINT32 (*USER_REQUEST_FUNC)(); void GDDI_RegisterDirectionKey( UINT32 item_up_key, UINT32 item_down_key, UINT32 sel_key, UINT32 menu_up_key ,UINT32 menu_dn_key); void GDDI_RegisterKeyInputFunction(USER_KEYFUNC key_input_function, USER_RESPONSE_FUNC command_res_function, USER_REQUEST_FUNC command_req_function); /****************************************************************/ /* */ /* ¿©±â¼­´Â compile ÇÊ¿ä»ó Á¤ÀÇÇØ³õ¾ÒÀ¸¸ç */ /* User °¡ »ç¿ëÇϴ°ÍÀ» Çã¿ëÇÏÁö ¾Ê±â·Î ÇÑ´Ù */ /* */ /****************************************************************/ #define GDDI_NUM_COLORS 16//LG/ZORAN: 256, BCM: 16 /******* RECT (X.Y,W,H) ºÎºÐ *************************************************/ typedef struct { SINT32 x; SINT32 y; SINT32 w; SINT32 h; }GRP_RECT; UINT8 *GET_IMAGE; #ifdef __cplusplus } #endif #endif //-----------------------------------------end of file