source: svn/newcon3bcm2_21bu/dst/app/src/Function/App_Fnc_Video.h

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

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

  • Property svn:executable set to *
File size: 7.2 KB
Line 
1/****************************************************************************
2* NAME: App_Fnc_Video.h
3*----------------------------------------------------------------------------
4* Copyright (c) 2007-2009 DIGITAL STREAM Technology Inc.
5*----------------------------------------------------------------------------
6* CREATED_BY: Chan Hun Jeon
7* CREATION_DATE: 2009/08/27
8* $Author: chjeon $
9* $Revision: 1.1 $
10* $Date: 2009/07/08 15:08:26 $
11*----------------------------------------------------------------------------
12* PURPOSE:
13*       - Implement video timing change, mode change, HDMI monitor
14*****************************************************************************/
15
16#ifndef __APP_FNC_VIDEO_H__
17#define __APP_FNC_VIDEO_H__
18
19/*_____ I N C L U D E __________________________________________*/
20
21
22
23
24
25#if COMMENT
26____Overview____(){}
27#endif
28
29/*
30        Video Module
31        - Aspect Ratio
32        - Display Mode
33        - Freeze On/Off
34        - Toggle Analog to Digital
35        - Resolution Change
36        - AFD
37
38        Dependencies
39        - DHL_AVCAP Module
40        - CC DMW
41        - App_Fnc_NvRam
42
43*/
44
45
46
47
48
49/*_____ D E F I N I T I O N ____________________________________*/
50
51#if COMMENT
52____Config____(){}
53#endif
54
55#define APP_DISP_TIMING_STR(t) ( \
56                (t)==APP_DISP_TIMING_1080I ? "1080i" : \
57                (t)==APP_DISP_TIMING_720P  ? "720p" : \
58                (t)==APP_DISP_TIMING_480P  ? "480p" : \
59                (t)==APP_DISP_TIMING_480I  ? "480i" : "??" )
60
61#define APP_DISP_TIMING_STR(t) ( \
62                (t)==APP_DISP_TIMING_1080I ? "1080i" : \
63                (t)==APP_DISP_TIMING_720P  ? "720p" : \
64                (t)==APP_DISP_TIMING_480P  ? "480p" : \
65                (t)==APP_DISP_TIMING_480I  ? "480i" : "??" )
66
67#define APP_DISP_TIMING_TO_DMC_VOUT(t) (VOUT_FORMAT)( \
68                (t)==APP_DISP_TIMING_1080I ? VOUT_1080I : \
69                (t)==APP_DISP_TIMING_720P  ? VOUT_720P  : \
70                (t)==APP_DISP_TIMING_480P  ? VOUT_480P  : \
71                (t)==APP_DISP_TIMING_480I  ? VOUT_480I  : VOUT_1080I)
72               
73
74
75#define APP_VIDEO_MUTE_TYPE_STR(t) ( \
76                (t)==APP_VIDEO_MUTE_RBLOCK ? "Rblock" : \
77                (t)==APP_VIDEO_MUTE_CBLOCK ? "Cblock" : \
78                (t)==APP_VIDEO_MUTE_OFF_READY ? "OffReady" : \
79                (t)==APP_VIDEO_MUTE_SIGMON ? "SigMon" : \
80                (t)==APP_VIDEO_MUTE_HOSTMUTE ? "Host" : \
81                "??" )
82               
83
84
85
86
87#if COMMENT
88____Types____(){}
89#endif
90
91/*
92        CB¿¡¼­´Â Display Ratio´Â ¸ðµÎ 4:3 À» °¡Á¤ÇϹǷΠNARROW °ª¸¸ÀÌ »ç¿ëµÉ °ÍÀÓ.
93        ±×·¯³ª ȣȯ¼ºÀ» À§Çؼ­ ÀÏ´Ü type Á¤ÀÇ´Â ³²°ÜµÎµµ·Ï ÇÑ´Ù.
94                --> 4:3À̳ª 16:9 Ratio ¸ðµÎ »ç¿ë
95*/
96typedef enum
97{
98        APP_DISP_RATIO_WIDE = VOUT_WIDE,
99        APP_DISP_RATIO_NARROW = VOUT_NARROW,
100       
101} APP_DISP_RATIO;
102
103
104typedef enum
105{
106        APP_DISP_MODE_WIDE = 0, // 16:9(¿ÍÀ̵å 16:9)
107        APP_DISP_MODE_NORM = 1, // 4:3 compress(Áß¾Óº¸±â)
108        APP_DISP_MODE_ZOOM = 2, // 4:3 expand(Àüüº¸±â)
109        APP_DISP_MODE_14_9 = 3, // Wide 14:9(¿ÍÀ̵å 16:9)
110        APP_DISP_MODE_AUTO = 4, 
111
112        APP_DISP_MODE_MAX = 4,
113       
114} APP_DISP_MODE;
115
116
117/*
118        CB¿¡¼­´Â Component Ãâ·ÂÀº Áö¿øÇÏÁö ¾Ê´Â´Ù.
119*/
120typedef enum
121{
122        APP_DISP_COLOR_YPBPR = VOUT_YPBPR,
123        APP_DISP_COLOR_RGB = VOUT_RGB,
124
125} APP_DISP_COLOR_MODE;
126
127
128typedef enum
129{
130        APP_DISP_TIMING_1080I = 0,
131        APP_DISP_TIMING_720P = 1,
132        APP_DISP_TIMING_480P = 2,
133        APP_DISP_TIMING_480I = 3,
134
135} APP_DISP_TIMING;
136
137
138
139typedef enum
140{
141        APP_VIDEO_FORMAT_1080I = 0,
142        APP_VIDEO_FORMAT_720P = 1,
143        APP_VIDEO_FORMAT_480P = 2,
144        APP_VIDEO_FORMAT_480I = 3,
145        APP_VIDEO_FORMAT_1080P = 4,
146        APP_VIDEO_FORMAT_NONE = 99,
147} APP_VIDEO_FORMAT;
148
149
150typedef enum
151{
152        APP_VIDEO_MUTE_RBLOCK = 0, // rating block
153        APP_VIDEO_MUTE_CBLOCK = 1, // channel block
154        APP_VIDEO_MUTE_TEMP = 2,    // usage not defined yet.
155        APP_VIDEO_MUTE_OFF_READY = 3, // Power off ready,
156        APP_VIDEO_MUTE_SIGMON = 4, // signal monitor
157        APP_VIDEO_MUTE_HOSTMUTE = 5, // request mute from host
158        APP_VIDEO_MUTE_AUDIOONLY = 6, // Audio Only Video Mute
159} APP_VIDEO_MUTE_TYPE;
160
161
162typedef enum
163{
164        TV_4_3=0,
165        TV_16_9,
166}APP_TV_MODE;
167
168
169typedef enum
170{
171        APP_VIDEO_EDGE_BLACK,
172        APP_VIDEO_EDGE_GRAY
173} APP_VIDEO_EDGE_COLOR;
174
175
176
177
178
179#if COMMENT
180____Variables____(){}
181#endif
182
183extern APP_DISP_TIMING g_App_VideoDisplayTiming;
184        // display output timing
185
186
187//extern APP_DISP_COLOR_MODE DST_VoutType;
188        // VOUT_YPBPR: 1, VOUT_MONITOR:2
189        // output color type
190
191
192//extern APP_DISP_RATIO DST_Ratio;
193        // VOUT_WIDE            = 0,
194        // VOUT_NARROW          = 1,
195        // Main displayÀÇ Wide/Narrow  (VideoRatio_Wide, ..)    0 À̸é Wide display..
196
197extern UINT8 g_App_VideoDisplayModeSet;
198        // type of 'two APP_DISP_MODE set'
199
200extern UINT8 g_App_VideoDisplayModeAuto;
201        // BOOLEAN
202
203//extern AuxVideoSetting DST_AuxType;
204        // ½ÇÁ¦·Î Dmc_InitDisplay ¿¡ Àû¿ëµÇ´Â AuxVideoSetting °ª.. (showAuxVideoAndGraphicsWide, ..)
205       
206extern tDHL_DispARC g_App_VideoAdjustmentHd, g_App_VideoAdjustmentSd;
207        // type tDHL_DispARC
208        // if user change DST_VideoDisplayMode, it will be automatically changed
209        // according to source format.
210
211
212
213
214
215#if COMMENT
216____NvParam____(){}
217#endif
218
219typedef struct
220{
221        UINT8 VideoDisplayModeSet;
222        UINT8 VideoDisplayModeAuto;
223        UINT8 screen_ratio;
224        UINT8 edge_color;
225        UINT8 output_resolution;
226} nvparam_video;
227
228void App_Video_GetDefaultParamValue(nvparam_video* param);
229
230
231
232
233
234/*_____ F U N C T I O N ________________________________________*/
235
236#if COMMENT
237____Function____(){}
238#endif
239
240//---- Format ----
241APP_VIDEO_FORMAT App_GetInputVideoFormat(void);
242BOOL App_IsInputVideoWideFormat(void);
243
244//---- Mute ----
245void App_VideoSetBlank(BOOL bBlank, APP_VIDEO_MUTE_TYPE type); // cafrii 060609 add
246
247//---- Disp ----
248const char *PnxDisplayModeString(APP_DISP_MODE mode);
249BOOL App_VideoIsCorrectDisplayMode(APP_DISP_MODE mode);
250APP_DISP_MODE App_VideoGetDisplayModeFlag(BOOL bSrcWide);
251void App_VideoSetDisplayModeFlag(BOOL bSrcWide, APP_DISP_MODE mode);
252        // ÀÌ µÎ ÇÔ¼ö´Â Àß ¸ð¸£´Â »óÅ¿¡¼­´Â »ç¿ëÇÏÁö ¸»ÀÚ.
253
254void App_VideoScreenAdjustCallback(ScreenAdjustmentParam *sap);
255APP_DISP_MODE App_VideoGetCurrentDisplayMode(BOOL *pbSourceWide);
256void App_VideoChangeDisplayMode(APP_DISP_MODE mode, BOOL bSaveNvRam);
257APP_DISP_MODE App_VideoShowOrChangeDisplayMode(BOOL bChangeToNext);
258
259//---- Output Resolution ----
260void App_VideoSetPreferedResolution(APP_VIDEO_FORMAT format, BOOL bSave);
261APP_VIDEO_FORMAT App_VideoGetPreferedResolution(void);
262
263APP_VIDEO_FORMAT App_VideoGetOutputResolution(void);
264void App_VideoSetOutputResolution(APP_VIDEO_FORMAT format);
265APP_VIDEO_FORMAT App_VideoGetAndSetNextSupportedFormat(void);
266
267//---- Screen Ratio ----
268void App_VideoSetScrRatio(APP_DISP_RATIO ratio, BOOL bSave);
269APP_DISP_RATIO App_VideoGetScrRatio(void);
270
271void App_VideoSetEdgeColor(APP_VIDEO_EDGE_COLOR color, BOOL bSave);
272APP_VIDEO_EDGE_COLOR App_VideoGetEdgeColor(void);
273
274//---- Menu Opacity ----
275tDHL_AlphaMode APP_GetMenuOpacity(void);
276void APP_SetMenuOpacity(tDHL_AlphaMode mode);
277
278
279//---- Freeze ----
280BOOL App_VideoToggleFreeze(void); // cafrii 060621 change prototype
281void App_ForceDisableFreeze(void);
282
283//---- A/D toggle ----
284BOOL App_VideoToggleAD(void);
285        // return current GPIO status. check schematic what it means..
286
287//---- Timing ----
288void App_SetResolutionSwitchInfo(APP_DISP_TIMING timing);
289
290
291//---- AFD ----
292#if SUPPORT_AFD
293void App_VideoAfdInit(void);
294void App_VideoAfdTriggerDefaultAfd(void);
295void App_VideoAfdStartMonitor(BOOL bOn);
296#endif
297
298//---- Test ----
299void App_StartVideoWatchdog(BOOL bStart);
300
301//---- Init ----
302void App_VideoInit(void);
303void App_VideoParamInit(void);
304
305
306
307
308#endif  /* __APP_FNC_VIDEO_H__ */
Note: See TracBrowser for help on using the repository browser.