source: svn/newcon3bcm2_21bu/dst/dmw/src/include/GRP_DDI.h @ 76

Last change on this file since 76 was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 12.2 KB
Line 
1/******************************************************************************
2
3Copyright (c) 2004 Digital STREAM Technology Inc. All Rights Reserved
4
5FILE NAME
6
7        GRP_DDI.h
8
9VERSION
10
11        Version 0.4
12
13DESCRIPTION
14
15        This file is for  platform dependent be to used in Graphics LIB .
16
17AUTHOR
18
19        S/W 3 Team                      Jongki Jeong.
20
21HISTORY
22
23        NAME                    DATE                            REMARKS
24
25    Jongki jeong                03-09-2004              Created initial version 0.01
26        Jinsook Kim                     06-25-2004              Updated version : 0.01->0.1
27    Jongki jeong                08-04-2004              AUTOREFRESH °ü·Ã ¸ÅÅ©·ÎÇÔ¼ö ¹ö±×¼öÁ¤
28        Jinsook Kim                     08-18-2004              Updated version : 0.1->0.2
29        Jinsook Kim                     03-30-2005              Updated version : 0.2->0.3
30        Jinsook Kim                     04-21-2005              Updated version : 0.3->0.4
31
32REMARK
33
34
35******************************************************************************/
36#ifndef GRP_DDI_H
37#define GRP_DDI_H
38
39/****************************************************************/
40/*                                                                                                                              */
41/*  Graphics Device Driver Interface                                                    */
42/*  ¿©±â´Â platform dependent ºÎºÐ¸¸ÀÇ ³»¿ëÀ» °¡Áö¸ç                    */
43/*  User °¡ »ç¿ëÇϴ°ÍÀ» Çã¿ëÇÏÁö ¾Ê±â·Î ÇÑ´Ù                                   */
44/***************************************************************/
45
46/****************** COMPILER OPTIONAL PART *********************/
47#define GDDI_MOUSE_USED         0
48
49#define GDDI_DBG                        0
50#define GMN_DBG                         0
51#define GUT_DBG                         0
52#define GFN_DBG                         0
53
54#define SUPPORT_LGDT1111                0
55#define SUPPORT_BCM                             1
56
57/******************* PLATFORM OPTION PART **********************/
58/*=============================================================================
59Description       
60        - PLATFORM ¿¡ ¸Â°Ô Á¶Á¤ ÇÏ½Ã¸é µË´Ï´Ù.
61=============================================================================*/
62#define GDDI_PLATFORM_TL9XX             1
63       
64#define GDDI_ARIB_USED                  0       //arib »ç¿ë¿©ºÎ
65/*      #if GDDI_ARIB_USED
66                #include "ARIBTopologyModel.h"
67        #else
68        //      #include "TLGraphics.h"
69        //      #include "TLPrivate.h"
70                #include "stbos.h"
71                #include "DHL_OSAL.h"   
72                #include "..\..\drv\lgdt1111\gfx\gfx_osd.h"
73        #endif
74//      #define PIXEL_MAP                               int//TLPixMap
75*/
76#include "DHL_OSAL.h"
77#include "DHL_Types.h"
78#if 0 // add sjpark, compile error, 090908
79#include "bgfx.h"
80#include "cache_util.h"
81#endif
82#include "DHL_Graphic.h"//iskang 080910.
83//iskang input start
84
85//      copy from b660_revB_driver\include\TLGraphicsUtils.h
86
87#define CREATE_TLPIXMAP_IN_CPU_MEMORY        0
88#define CREATE_TLPIXMAP_IN_MAIN_PHYS_MEMORY  1
89#define CREATE_TLPIXMAP_IN_AUX_PHYS_MEMORY   2
90#define CREATE_TLPIXMAP_NO_MEMORY                        3      // caller will fill in BaseAddr
91#define CREATE_TLPIXMAP_MEMORY_MASK                      3
92
93typedef enum
94{
95        RGB32                   =       0,
96        YUV16a                  =       1,
97        YUV16b                  =       2,
98        YUV16c                  =       3,
99        AYCbCr                  =       4,
100        ALPHA8_RGB16    =       5,
101        ALPHA8_RGB8             =       6,
102        INDEX8                  =       7,
103        INDEX2                  =       8,
104        INDEX8_ALPHA8   =       9,
105        RGB24                   =       10,
106        INDEX1                  =       11,
107        INDEX4                  =       12,
108        RGB16                   =       13,
109        RGB8                    =       14,
110        ALPHA4                  =       15,
111        YCbCr                   =       16,
112        RGB12                   =       17,
113        RGB15                   =       18,
114        WRMASK                  =       19,
115        YCbCr_PLANAR    =       20,
116        INDEX4Cursor    =       28,
117        TL85x_420               =       32,
118        TL85x_420_AMR2  =       33,
119        TL85x_420_AMR4  =       34,
120        TL85x_422               =       36,
121        TL9xx_420               =       40,
122        TL9xx_422               =       41,
123        ARGB_LGM1               =       42,
124        AYCbCr_LGM1             =       43,
125        ARGB_LGM2               =       44,
126        AYCbCr_LGM2             =       45,
127    Beetle_420      =   46,
128    Beetle_422      =   47,
129    Beetle_444      =   48
130//  Beetle_LGM      =   49
131}       TL_PIXEL_FORMATS;
132/*     
133typedef struct TLPixMap {
134        INT32   x;                                      // X coordinate of top-left corner of bitmap (usually 0)
135        INT32   y;                                      // Y coordinate of top-left corner of bitmap (usually 0)
136        INT32   w;                                      // width in pixels
137        INT32   h;                                      // height in pixels
138        UINT32  pitch;                          // 32 bit words per row. Different contraints depending on fmt and usage
139        TL_PIXEL_FORMATS fmt;           // pixel format
140        UINT8   psize;                          // number of bits per pixel
141        UINT32  *baseAddr;                      // Starting address of pixel buffer
142        UINT32  *baseAddr2;                     // optional Starting address of pixel buffer of field 2 for 2 field formats
143        UINT32  *clut;                          // optional color lookup table for indexed formats
144        TLVideoExtension *ext;          // Supplemental information used by video driver
145        UINT32  tag;                                    // to trace a particular frame in video pipeline
146} TLPixMap;
147*/
148/*
149*iskang:
150*D2A´Â Zoran°ú ´Þ¸®
151*
152*
153
154typedef struct PixelMap_tag{
155        int frame;//view frame: 0, buffer frame: 1
156       
157        INT32   x;                                      // X coordinate of top-left corner of bitmap (usually 0)
158        INT32   y;                                      // Y coordinate of top-left corner of bitmap (usually 0)
159        INT32   w;                                      // width in pixels
160        INT32   h;                                      // height in pixels
161        UINT32  pitch;                          // 32 bit words per row. Different contraints depending on fmt and usage
162        TL_PIXEL_FORMATS fmt;           // pixel format
163        UINT8   psize;                          // number of bits per pixel
164        UINT32  *baseAddr;                      // Starting address of pixel buffer
165        UINT32  *baseAddr2;                     // optional Starting address of pixel buffer of field 2 for 2 field formats
166        UINT32  *clut;                          // optional color lookup table for indexed formats
167}PIXEL_MAP;//iskang
168*/
169
170/*
171static bgfx_io_t g_gddi_s_io =
172{
173    gddi_bin_read,
174    gddi_bin_tell,
175    gddi_bin_set
176};
177*/
178typedef struct PixelMap_tag{
179        int frame;//view frame: 0, buffer frame: 1
180        INT32   x;                                      // X coordinate of top-left corner of bitmap (usually 0)
181        INT32   y;                                      // Y coordinate of top-left corner of bitmap (usually 0)
182        INT32   w;                                      // width in pixels
183        INT32   h;                                      // height in pixels
184        UINT32  pitch;                          // 32 bit words per row. Different contraints depending on fmt and usage
185        TL_PIXEL_FORMATS fmt;           // pixel format
186        UINT8   psize;                          // number of bits per pixel
187        void *baseAddr;                 // Starting address of pixel buffer
188        //void UINT32   *baseAddr;                      // Starting address of pixel buffer
189        UINT32  *baseAddr2;                     // optional Starting address of pixel buffer of field 2 for 2 field formats
190        UINT32  *clut;                          // optional color lookup table for indexed formats
191}PIXEL_MAP;//iskang
192//iskang input end
193
194//bgfx_surf_p *g_GrpSurf;
195
196//graphic blt size limit, for beetle, ÇöÀç »ç¿ë¾ÈÇÔ. Á»´õ Å×½ºÆ®ÇؾßÇÔ
197#define GDDI_BLT_MIN_LIMIT              4096
198        #define GDDI_BLT_LIMIT_USED             0
199
200//TLBLT °¡ ´À¸°°æ¿ì 8 or 4byte·Î align À» ½ÃŰ¸é ºü¸£´Ù
201//pixmap foramt ÀÌ INDEX8 Àΰæ¿ì beetle ¿¡¼± ±×³É ÇÏ¸é ´À¸®´Ù. ¾Æ·¡¿É¼ÇÀ» 1·ÎÇØ¾ß Á¤»ó¼Óµµ·Î ³ª¿Â´Ù
202#define GDDI_ADDR_4BYTE_ALIGN_USED      1
203
204//100 % transparent blend value
205#define GRP_TSP                                 0x00
206///TL driver graphic ¿¡¼­ ¹«Á¶°Ç ÀÌ·¸°Ô »ç¿ëÁßÀÓ
207        #define GRP_TSP_COLOR                   0
208//100 % opaque blend value, 9x:0x80, b6x:0xFF
209#define GRP_OPAQUE                              0xFF
210//9x±âÁØÀ¸·Î 0x80 À» 1·Î ºÃÀ»¶§ÀÇ °ª(256/128), 9x:1, b6x:2
211#define GRP_ALPHA_MULTIPLE              2
212
213/****************** NATION SETTING PART ************************/
214/*=============================================================================
215Description       
216        - application ¿¡¼­ ÇÊ¿äÇÑ ¸¸Å­À» Á¤ÇÏ½Ã¸é µË´Ï´Ù.
217=============================================================================*/
218typedef enum {
219        GRP_USA                 =0,
220        GRP_KOREA               =1,
221        GRP_FRANCE              =2,
222        GRP_SPAIN               =3,
223        GRP_NUM_NATION
224}GRP_NATION;
225
226/****************** OSD RESOLUTION SETTING PART ****************/
227/*=============================================================================
228Description       
229        - application ¿¡¼­ ÇÊ¿äÇÑ ¸¸Å­À» Á¤ÇÏ½Ã¸é µË´Ï´Ù.
230                ´Ü, ¾Æ·¡ÀÇ °ªÀ» ¼öÁ¤ÇÒ °æ¿ì GRP_DDI.c ÀÇ ¾Æ·¡ 3°¡Áö °ªµµ ¼öÁ¤ÇÏ¼Å¾ß ÇÕ´Ï´Ù.
231                GRP_OSD_INFO OsdInfo[GRP_NUM_RESOLUTION]
232                float coordinate_ratio[GRP_NUM_RESOLUTION][2]
233                GRP_OSD_INFO ScaleRect[GRP_NUM_RESOLUTION]
234=============================================================================*/
235#define INCLUDE_BITMAP_DDM10_1ST        0
236#define INCLUDE_BITMAP_HD2000           1
237#define SUPPORT_REF_1366_768P           0
238
239typedef enum  {
240#if INCLUDE_BITMAP_HD2000//HD2000¿ë
241        GRP_1920_1080i                  =0,
242        GRP_1280_720p                   =1,
243        GRP_720_480p                    =2,
244        GRP_720_480i                    =GRP_720_480p,
245        GRP_1366_768p                   =3,
246        GRP_NUM_RESOLUTION              =4
247#elif INCLUDE_BITMAP_DDM10_1ST
248        #if SUPPORT_REF_1366_768P
249        GRP_1366_768p                   =0,
250        #else
251        GRP_1280_720p                   =0,
252        #endif
253        GRP_NUM_RESOLUTION              =1      //iskang 1-->3
254#endif
255}GRP_RESOLUTION;
256
257#ifdef __cplusplus
258extern "C" {
259#endif
260
261/******************* OS DEPENDENT PART *************************/
262//#define       OS_SEMAPHORE_ID SEM_ID
263//#define       OS_SEM_PRIO     SEM_Q_PRIORITY
264//#define       OS_SEM_FIFO SEM_Q_FIFO
265//typedef void (*OS_TASKFUNCTION)(INT32 arg1);
266//#define OS_TASK_ID    int
267//#define       OS_MESSAGEQUEUE_ID      MSG_Q_ID
268//#define       OS_MSGQ_PRIO MSG_Q_PRIORITY
269//#define       OS_MSGQ_FIFO MSG_Q_FIFO
270
271/******************* INTERNAL DEFINE PART **********************/
272#define GDDI_MAX_MENU                   10      //ÇÑ È­¸é¿¡ ³ªÅ¸³¯¼öÀÖ´Â ÃÖ´ë Å©±â ¸Þ´º °¹¼ö
273#define GRP_OK                                  0               
274#define GRP_FAIL                                -1
275#define GDDI_AUTOREFRESH_USED   1
276
277#if GDDI_AUTOREFRESH_USED       
278//neverdai 080929. ¾Ë°í¸®Áò À߸øµÊ.
279//w°¡ canvasÀÇ ³¡¿¡ ´Ù´Ù¸¦¸¸Å­ ºñÁ¤»óÀûÀ¸·Î Ä¿Áö´Â ¹®Á¦°¡ ÀÖÀ½.
280//Ãß°¡·Î 360_240¿¡ ÃÖÀûÈ­ÇÔ.
281#if 0
282#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;}
283#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;}
284#define AUTO_REFRESH_EX(cv,ex)  if((cv)->refresh_r.x+(cv)->refresh_r.w-1<ex)  (cv)->refresh_r.w = ex-(cv)->refresh_r.x+1;
285#define AUTO_REFRESH_EY(cv,ey)  if((cv)->refresh_r.y+(cv)->refresh_r.h-1<ey)  (cv)->refresh_r.h = ey-(cv)->refresh_r.y+1;
286#define AUTO_REFRESH_CLEAR(cv)  (cv)->refresh_r.x=(cv)->refresh_r.y=-1;(cv)->refresh_r.w=(cv)->refresh_r.h =0;
287#else
288
289#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;}
290#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;}
291#define AUTO_REFRESH_EX(cv,ex)  if((cv)->refresh_r.x+(cv)->refresh_r.w-1<ex)  (cv)->refresh_r.w = ex-(cv)->refresh_r.x+1;
292#define AUTO_REFRESH_EY(cv,ey)  if((cv)->refresh_r.y+(cv)->refresh_r.h-1<ey)  (cv)->refresh_r.h = ey-(cv)->refresh_r.y+1;
293#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;
294
295#endif
296
297#else
298#define AUTO_REFRESH_SX(cv,x)   
299#define AUTO_REFRESH_SY(cv,y)   
300#define AUTO_REFRESH_EX(cv,w)   
301#define AUTO_REFRESH_EY(cv,h)   
302#define AUTO_REFRESH_CLEAR(cv)
303#endif
304
305/******************* DEBUG DEFINE PART *************************/
306int ddi_printf(char *fmt, ...) ; 
307
308#ifndef dbg_printf
309        #define dbg_printf              ddi_printf//printf
310#endif
311#ifndef exit_printf     
312        #define exit_printf             ddi_printf//printf
313#endif
314#ifndef ent_printf     
315        #define ent_printf              ddi_printf//printf
316#endif
317#ifndef warn_printf
318        #define warn_printf     ddi_printf//printf
319#endif
320#ifndef err_printf
321        #define err_printf      OS_DbgPrintf//ddi_printf
322#endif
323#ifndef mem_printf
324        #define mem_printf      ddi_printf
325#endif
326
327/******************* TYPE DEFINE PART **************************/
328#ifndef SINT8
329        #define SINT8   char
330#endif
331
332#ifndef SINT16
333        #define SINT16  short
334#endif
335
336#ifndef SINT32
337        #define SINT32  int
338#endif
339
340/******************* RESERVED KEY PART *************************/
341extern UINT32  GRP_SEL_KEY;             //      G2H_SELECT
342extern UINT32  GRP_ITEM_UP_KEY; //      G2H_UP
343extern UINT32  GRP_ITEM_DN_KEY; //      G2H_DOWN
344extern UINT32  GRP_MENU_UP_KEY; //      G2H_LEFT
345extern UINT32  GRP_MENU_DN_KEY; //      G2H_RIGHT
346extern UINT32  GRP_POWER_OFF;   //      G2H_POWER_OFF
347
348
349/******************* KEY FUNCTION PART *************************/
350typedef UINT32 (*USER_KEYFUNC)();
351typedef UINT32 (*USER_RESPONSE_FUNC)();
352typedef UINT32 (*USER_REQUEST_FUNC)();
353void GDDI_RegisterDirectionKey( UINT32 item_up_key, UINT32 item_down_key, 
354                                                                UINT32 sel_key, UINT32 menu_up_key ,UINT32 menu_dn_key);
355void GDDI_RegisterKeyInputFunction(USER_KEYFUNC key_input_function,
356                                                                        USER_RESPONSE_FUNC command_res_function, 
357                                                                        USER_REQUEST_FUNC command_req_function);
358
359/****************************************************************/
360/*                                                                                                                              */
361/*  ¿©±â¼­´Â compile ÇÊ¿ä»ó Á¤ÀÇÇØ³õ¾ÒÀ¸¸ç                                              */
362/*  User °¡ »ç¿ëÇϴ°ÍÀ» Çã¿ëÇÏÁö ¾Ê±â·Î ÇÑ´Ù                                   */
363/*                                                                                                                              */
364/****************************************************************/
365#define GDDI_NUM_COLORS         16//LG/ZORAN: 256, BCM: 16
366
367/******* RECT (X.Y,W,H) ºÎºÐ *************************************************/
368typedef struct {
369        SINT32  x;
370        SINT32  y;
371        SINT32  w;
372        SINT32  h;
373}GRP_RECT;
374
375UINT8 *GET_IMAGE;
376
377#ifdef __cplusplus
378} 
379#endif
380
381#endif
382//-----------------------------------------end of file
Note: See TracBrowser for help on using the repository browser.