source: svn/trunk/newcon3bcm2_21bu/magnum/commonutils/fmt/bfmt.h @ 32

Last change on this file since 32 was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 47.6 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2003-2011, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bfmt.h $
11 * $brcm_Revision: Hydra_Software_Devel/105 $
12 * $brcm_Date: 12/6/11 4:08p $
13 *
14 * Module Description:
15 *   Video format module header file
16 *
17 * Revision History:
18 *
19 * $brcm_Log: /magnum/commonutils/fmt/bfmt.h $
20 *
21 * Hydra_Software_Devel/105   12/6/11 4:08p rgreen
22 * SW7425-597: Add 1080p (60Hz) to BFMT_SUPPORT_HDMI macro
23 *
24 * Hydra_Software_Devel/104   10/7/11 4:09p yuxiaz
25 * SW7425-974: Added new high pixel rate formats.
26 *
27 * Hydra_Software_Devel/103   9/16/11 3:05p pntruong
28 * SW7420-2056: Merged.
29 *
30 * Hydra_Software_Devel/SW7420-2056/1   9/15/11 3:51p vle
31 * SW7420-2056: Fix incorrect Hdmi 3D formats support from parsing EDID
32 *
33 * Hydra_Software_Devel/102   8/24/11 10:56a tdo
34 * SW7425-610: Add support for VESA formats1280x1024
35 *
36 * Hydra_Software_Devel/101   8/8/11 2:27p yuxiaz
37 * SW7425-966: Added BFMT_Orientation_eLeftRight_Enhanced for MRE modes.
38 *
39 * Hydra_Software_Devel/100   6/22/11 1:33p pntruong
40 * SW7425-686: Added clarification regard deprecating of BFMT_VERT_* and
41 * BFMT_PXL_*.
42 *
43 * Hydra_Software_Devel/99   6/22/11 11:22a pntruong
44 * SW7425-686: Added new veritical refresh rate enum for synchronizing
45 * XVD/VDC state.  Also will be using this enum for replacing limited
46 * fmt's veritical refresh rate mask.
47 *
48 * Hydra_Software_Devel/98   12/9/10 2:16p pntruong
49 * SW35230-2250: Merged to mainline.
50 *
51 * Hydra_Software_Devel/97   12/7/10 1:56p tdo
52 * SW7422-44: Add the missing 3D format to BFMT_SUPPORT_HDMI
53 *
54 * Hydra_Software_Devel/96   12/1/10 6:07p tdo
55 * SW7422-44: Handle 3D changes for display
56 *
57 * Hydra_Software_Devel/95   9/30/10 5:01p yuxiaz
58 * SW7422-28: Reorder BFMT_Orientation enums to match RDB.
59 *
60 * Hydra_Software_Devel/94   9/7/10 3:03p yuxiaz
61 * SW7422-28: Add 3D formats to FMT plus additional data structures
62 *
63 * Hydra_Software_Devel/SW7422-28/3   9/3/10 3:21p yuxiaz
64 * SW7422-28: Added more comment for ulActiveSpace
65 *
66 * Hydra_Software_Devel/SW7422-28/2   9/3/10 11:47a yuxiaz
67 * SW7422-28: Rename BFMT_VideoFmt_e3D_1080p_30Hz  to
68 * BFMT_VideoFmt_e1080p_30Hz_3DOU_AS.
69 *
70 * Hydra_Software_Devel/SW7422-28/1   9/2/10 4:08p yuxiaz
71 * SW7422-28: Add 3D formats to FMT plus additional data structures
72 *
73 * Hydra_Software_Devel/92   9/1/10 4:53p yuxiaz
74 * SW7422-29: Added BFMT_Orientation.
75 *
76 * Hydra_Software_Devel/91   7/13/10 11:26a yuxiaz
77 * SW3548-2987: Added new 1080p@30hz support for 3DTV.
78 *
79 * Hydra_Software_Devel/90   5/20/10 5:47p darnstein
80 * SW7125-326: add vertical frequency for 720P@30Hz video.
81 *
82 * Hydra_Software_Devel/89   3/31/10 4:16p pntruong
83 * SW7405-4150: Fixed build errors.
84 *
85 * Hydra_Software_Devel/88   3/31/10 3:39p pntruong
86 * SW7405-4150: Updated the list of HDMI format that matches with HDMI PI
87 * implementation.
88 *
89 * Hydra_Software_Devel/87   2/23/10 3:48p pntruong
90 * SW3548-2764: Allows 2x oversample 480p/576p for hdmi input.
91 *
92 * Hydra_Software_Devel/86   2/23/10 2:53p darnstein
93 * SW7400-2620: add pixel frequency defintions for double-rate 480P.
94 *
95 * Hydra_Software_Devel/85   2/1/10 6:34p hongtaoz
96 * SW3548-2678, SW3548-2680, SW3548-2681: added HDMI1.4 3D formats support
97 * for 3548; added multi-buffer low delay mode support for 1to2 and 2to5
98 * rate gap cases; reduced capture buffer allocation for interlaced
99 * pulldown case;
100 *
101 * Hydra_Software_Devel/BCM3D/4   1/29/10 6:55p hongtaoz
102 * SW3548-2680, SW3548-2681: removed 1470p custom formats since they are
103 * the same as 720p3D formats; added macro to wrap the 3548 specific
104 * legacy 3DTV format;
105 *
106 * Hydra_Software_Devel/BCM3D/3   1/15/10 6:33p hongtaoz
107 * SW3548-2680, SW3548-2681: added custom formats to support HDMI 1.4 3D
108 * 720p50/60 input passed-thru to external panel processor; reanmed 2160i
109 * to custom DVI format;
110 *
111 * Hydra_Software_Devel/BCM3D/2   1/15/10 4:54p hongtaoz
112 * SW3548-2680, SW3548-2681: added new HDMI1.4 3D formats 720p50 input
113 * support; fixed pixel frequency value for 3D formats;
114 *
115 * Hydra_Software_Devel/BCM3D/1   12/17/09 5:55p hongtaoz
116 * SW3548-2680, SW3548-2681: added new HDMI1.4 3D formats 720p60 and
117 * 1080p24; added a special display format 2160i48 for 11-bit BVN;
118 *
119 * Hydra_Software_Devel/84   12/15/09 2:15p pntruong
120 * SW3556-933: Display no signal when input signal is 1440x480@60Hz.
121 *
122 * Hydra_Software_Devel/83   12/2/09 8:24p pntruong
123 * SW7420-447: HDMI: Incorrect preferred format display at hot plug if TV
124 * has preferred format of 1080p/60Hz.
125 *
126 * Hydra_Software_Devel/82   10/16/09 5:20p darnstein
127 * SW7405-3191: Back out all changes in pixel frequency handling. New
128 * design coming soon.
129 *
130 * Hydra_Software_Devel/81   10/15/09 4:47p darnstein
131 * SW7405-3191: Pixel frequency is now defined as both a bitmask, and an
132 * enum. The bitmask option is DEPRECATED.
133 *
134 * Hydra_Software_Devel/80   10/1/09 7:44p darnstein
135 * SW7405-2612: assert that 1360x768 is a VESA video format.
136 *
137 * Hydra_Software_Devel/79   7/31/09 6:05p rpan
138 * PR56037: Change BFMT_PXL_85_5MHz value to avoid collision.
139 *
140 * Hydra_Software_Devel/78   7/21/09 4:22p rpan
141 * PR56037: Initial effort for analog VESA outputs.
142 *
143 * Hydra_Software_Devel/77   5/4/09 4:22p rpan
144 * PR53106: Added new format 720p25/30Hz.
145 *
146 * Hydra_Software_Devel/76   3/18/09 6:04p pntruong
147 * PR53234, PR53395: Added support for wvga, wsvga, sxga.
148 *
149 * Hydra_Software_Devel/75   3/4/09 11:18a pntruong
150 * PR52568: Customer not needed the custom 1340x725p@60hz.
151 *
152 * Hydra_Software_Devel/74   3/2/09 3:05p pntruong
153 * PR52568: Added support for custom format 1340x725p@60hz.
154 *
155 * Hydra_Software_Devel/73   9/20/08 11:00a pntruong
156 * PR47149: Relax const to allow app to dynamically load of custom ucode.
157 *
158 * Hydra_Software_Devel/72   9/20/08 10:55a pntruong
159 * PR47149: Relax const to allow app to dynamically load of custom ucode.
160 *
161 * Hydra_Software_Devel/71   8/6/08 4:44p pntruong
162 * PR45219:  Added new RGB formats.
163 *
164 * Hydra_Software_Devel/70   6/26/08 4:47p rpan
165 * PR39529: Added BFMT_VERT_48Hz.
166 *
167 * Hydra_Software_Devel/69   6/9/08 1:57p rpan
168 * PR39529: Back out FMT_VideoFmt_e1080p_48Hz change. Will use
169 * FMT_Video_eCustom to test 48Hz panel.
170 *
171 * Hydra_Software_Devel/68   6/9/08 10:47a rpan
172 * PR39529: Added new display format FMT_VideoFmt_e1080p_48Hz. uCode is
173 * empty right now.
174 *
175 * Hydra_Software_Devel/67   5/1/08 2:37p rpan
176 * PR42109: Initial work for SECAM variants.
177 *
178 * Hydra_Software_Devel/66   3/26/08 10:24a hongtaoz
179 * PR35398: added BFMT_FREQ_FACTOR to unify Vsync rate and pixel frequency
180 * calculation;
181 *
182 * Hydra_Software_Devel/65   3/11/08 10:45p pntruong
183 * PR40280: Added support for vdec PAL-60.
184 *
185 * Hydra_Software_Devel/PR40133/1   3/11/08 10:32a mlei
186 * PR40280:need PAL-60 support on 3563
187 *
188 * Hydra_Software_Devel/64   12/3/07 11:43a pntruong
189 * PR37790: [PC]: Remove two reduntant formats:
190 * BFMT_VideoFmt_eDVI_1920x1080p_60Hz_Cea; and
191 * BFMT_VideoFmt_eDVI_1920x1080i_60Hz.
192 *
193 * Hydra_Software_Devel/gorgon_temp_20071203/1   12/3/07 2:35p gorgon
194 * PR37790:[PC]: Remove two reduntant
195 * formats:BFMT_VideoFmt_eDVI_1920x1080p_60Hz_Cea and
196 * BFMT_VideoFmt_eDVI_1920x1080i_60Hz
197 *
198 * Hydra_Software_Devel/63   11/1/07 10:00a pntruong
199 * PR36487: Add HDMI support for 1080p_25Hz in FMT module.
200 *
201 * Hydra_Software_Devel/62   10/30/07 7:06p pntruong
202 * PR34239: Allow dynamically loading of vec custom timing.
203 *
204 * Hydra_Software_Devel/61   10/15/07 3:21p pntruong
205 * PR35137: Add NTSC443 support for cvbs/Svideo.
206 *
207 * Hydra_Software_Devel/60   8/17/07 11:45a pntruong
208 * PR34059: Need to fix FMT name for 1024x768i_43Hz.
209 *
210 * Hydra_Software_Devel/PR34059/1   8/17/07 11:40a gorgon
211 * PR34059: Need to fix FMT name for 1024x768i_43Hz
212 *
213 * Hydra_Software_Devel/59   7/19/07 4:33p pntruong
214 * PR33138: [VDEC][PC]:Support PC 1920x1080i_60Hz.
215 *
216 * Hydra_Software_Devel/Gorgon_20070719/1   7/19/07 3:38p gorgon
217 * PR33138:[VDEC][PC]:Support PC 1920x1080i_60Hz.
218 *
219 * Hydra_Software_Devel/58   7/11/07 1:56p pntruong
220 * PR32296, PR32913, PR32919: Added support for 1080p@60Hz_Cea,
221 * 1366x768@60Hz.
222 *
223 * Hydra_Software_Devel/PR32296/2   7/11/07 9:34p gorgon
224 * PR32919:[PC]: Support format 1366x768@60.
225 *
226 * Hydra_Software_Devel/PR32296/1   7/11/07 7:26p gorgon
227 * PR32913:[PC]:Add a new format 1920x1080p@60Hz_Cea.
228 *
229 * Hydra_Software_Devel/57   6/12/07 4:32p pntruong
230 * PR32076, PR32078, PR32081: Updated pc-input pll settings.
231 *
232 * Hydra_Software_Devel/56   6/5/07 8:41p pntruong
233 * PR31619: Add two new format: 1280x768p/60Hz reduced blank and
234 * 1400x1050p/60Hz reduced blank.
235 * PR31619: Update timing and PLL settings for 1400x1050p/60Hz and
236 * 1400x1050p/75Hz.
237 *
238 * Hydra_Software_Devel/55   5/18/07 2:47p yuxiaz
239 * PR28810: Merge in 832x624 support from PR28810 branch.
240 *
241 * Hydra_Software_Devel/PR28810/1   5/16/07 11:18a honglang
242 * PR28810: add format 832x624 support
243 *
244 * Hydra_Software_Devel/53   1/23/07 4:06p pntruong
245 * PR23225: VDEC - PC input.  Updated values for FD detect for PC mode.
246 *
247 * Hydra_Software_Devel/52   12/18/06 11:16p pntruong
248 * PR22577: Merged back to mainline.
249 *
250 * Hydra_Software_Devel/Refsw_Devel_3563/4   10/4/06 6:57p hongtaoz
251 * PR23204, PR23279, PR23280, PR24727: add user-defined custom formats;
252 * removed CUSTOM 1600x1200p format;
253 *
254 * Hydra_Software_Devel/Refsw_Devel_3563/2   9/26/06 11:05a pntruong
255 * PR23550: Add format support for 1360x768@60Hz, 1280x768@60Hz,
256 * 1280x768@60Hz Reduced Blanking.
257 *
258 * Hydra_Software_Devel/Refsw_Devel_3563/1   9/25/06 2:05p pntruong
259 * PR23222, PR23225: Added more entries in format detection table.
260 *
261 * Hydra_Software_Devel/51   9/6/06 4:16p hongtaoz
262 * PR22568, PR23188: added 1080p60 format for 3563;
263 *
264 * Hydra_Software_Devel/50   8/16/06 3:26p pntruong
265 * PR23522: Add supporting hdmi pc input 800x600@56Hz and 800x600@85Hz
266 *
267 * Hydra_Software_Devel/49   8/7/06 11:59a pntruong
268 * PR22494: Support HDDVI new trigger in 3560 B0 software.
269 *
270 * Hydra_Software_Devel/48   7/5/06 6:39p pntruong
271 * PR20913: Need support for smaller formats to avoid clipping issues.
272 * Made 240p and 288p a custom format for 7411 because of non-repeat
273 * pixel support.
274 *
275 * Hydra_Software_Devel/47   6/27/06 1:34p jessem
276 * PR 19995: Added 720p 24Hz, 1080p 24Hz, and 1080p 30Hz to
277 * BFMT_SUPPORT_HDMI(fmt).
278 *
279 * Hydra_Software_Devel/46   6/19/06 10:15a pntruong
280 * PR20913: Need support for smaller formats to avoid clipping issues.
281 * Added 240p60Hz and 288p50Hz hddvi input support.
282 *
283 * Hydra_Software_Devel/45   6/9/06 8:47a jessem
284 * PR 19995, PR 20086: Added 720p 23.976/24Hz support. Added
285 * BFMT_VERT_INVALID.
286 *
287 * Hydra_Software_Devel/44   4/19/06 1:53p hongtaoz
288 * PR20938: redefined pixel frequency enums; updated some vesa mode timing
289 * parameters to comply with DVT Format Support document, i.e. reference
290 * software only supports 50/59.94/60 Hz VESA formats;
291 *
292 * Hydra_Software_Devel/43   3/27/06 1:55p pntruong
293 * PR20239: Added support for 1920x1080P@24Hz, 1920x1080P@30Hz formats on
294 * 3560B0 on HD_DVI input.
295 *
296 * Hydra_Software_Devel/42   3/22/06 5:37p jessem
297 * PR 19517, PR 19995: Added BFMT_VERT_23_976Hz, BFMT_VERT_24Hz, and
298 * BFMT_VERT_25Hz
299 *
300 * Hydra_Software_Devel/42   3/22/06 5:14p jessem
301 * PR 19517, PR 19995: Added BFMT_VERT_23_976Hz, BFMT_VERT_24Hz, and
302 * BFMT_VERT_25Hz.
303 *
304 * Hydra_Software_Devel/41   2/16/06 3:07p pntruong
305 * PR17778: Update pixel clock rate for new formats.
306 *
307 * Hydra_Software_Devel/41   2/16/06 3:06p pntruong
308 * PR17778: Update pixel clock rate for new formats.
309 *
310 * Hydra_Software_Devel/41   2/16/06 3:05p pntruong
311 * PR17778: Update pixel clock rate for new formats.
312 *
313 * Hydra_Software_Devel/40   2/15/06 11:32a jessem
314 * PR 17554: Added support for 1080p 30Hz.
315 *
316 * Hydra_Software_Devel/39   1/31/06 1:52p pntruong
317 * PR17778: Support VESA input for HD_DVI, and merge in 3560B0 support.
318 *
319 * Hydra_Software_Devel/38   1/25/06 11:28a maivu
320 * PR 19138, PR 19157: Added support for BFMT_AspectRatio_eSAR for AVC.
321 * Refer to ulSampleAspectRatioX/ulSampleAspectRatioY if DAR is not
322 * available.
323 *
324 * Hydra_Software_Devel/37   11/16/05 4:07p maivu
325 * PR 18107: Removed unsupported aspect ratio previously added. Those are
326 * actually SAR(for h.264) not display aspect ratio.
327 *
328 * Hydra_Software_Devel/36   9/21/05 7:56p albertl
329 * PR12388:  Added 1366x768 50Hz and removed 50Hz clock from old 1366x768.
330 *
331 * Hydra_Software_Devel/35   6/22/05 2:45p pntruong
332 * PR15820, PR15563, PR15685: Added pixel frequency to aid compute
333 * bandwith equation.
334 *
335 * Hydra_Software_Devel/34   2/9/05 2:52p albertl
336 * PR12560: Added BFMT_VideoFmt_eDVI_1280x768p,
337 * BFMT_VideoFmt_eDVI_1280x720p_50Hz, BFMT_VideoFmt_eDVI_1280x720p, and
338 * BFMT_VideoFmt_eDVI_1280x720p_ReducedBlank formats.
339 *
340 * Hydra_Software_Devel/33   12/22/04 2:31p darnstein
341 * PR 13631:  Implement callback for the unwanted interrupt.
342 * PR 13365:  Support new AVC information (partially done).
343 *
344 * Hydra_Software_Devel/32   12/20/04 2:10p darnstein
345 * PR 13506: Adapt to change BAVC_AspectRatio->BFMT_AspectRatio.
346 *
347 * Hydra_Software_Devel/31   12/16/04 5:30p albertl
348 * PR12388:  Added 50Hz clock to 1366x768.
349 *
350 * Hydra_Software_Devel/30   12/9/04 11:21a syang
351 * PR 13092:  change BFMT and BVDC to use 483 lines for 480p
352 *
353 * Hydra_Software_Devel/29   12/3/04 10:06a jasonh
354 * PR 13448: Added support of digital format width/height to FMT module.
355 *
356 * Hydra_Software_Devel/28   11/17/04 11:06a syang
357 * PR12336: put back the fix again (increase ntsc height to 482)
358 *
359 * Hydra_Software_Devel/27   11/4/04 11:48a syang
360 * PR12336: temp back off the 482 lines for ntsc
361 *
362 * Hydra_Software_Devel/26   11/2/04 4:26p syang
363 * PR 12336: Trully increase NTSC line number to 482, and take off related
364 * work-around in compositor
365 *
366 * Hydra_Software_Devel/25   10/18/04 5:05p albertl
367 * PR12641:  Added PAL formats to HDMI macro.
368 *
369 * Hydra_Software_Devel/24   10/13/04 7:58p hongtaoz
370 * PR12301: added the maximum VBI pass-through lines for each format;
371 * directly use scan width and height to describe the format
372 * rasterization info;
373 *
374 * Hydra_Software_Devel/23   9/27/04 4:05p hongtaoz
375 * PR12641: updated description for video format HDMI support macro;
376 *
377 * Hydra_Software_Devel/22   9/27/04 3:13p hongtaoz
378 * PR12641: added 576p 50Hz dvi support;
379 *
380 * Hydra_Software_Devel/21   9/22/04 12:32p pntruong
381 * PR12728: Fixed -pdantic build warnings and errors.
382 *
383 * Hydra_Software_Devel/20   9/21/04 11:57a albertl
384 * PR 11794: Added 720p 50Hz, 1080i 50Hz, and 1366x768 to
385 * BFMT_SUPPORT_HDMI macro.
386 *
387 * Hydra_Software_Devel/19   9/15/04 4:31p albertl
388 * PR 12388:  Added 1366x768 format, and integrated required settings.
389 *
390 * Hydra_Software_Devel/18   9/9/04 11:31a hongtaoz
391 * PR11868, PR11870: added VESA modes 800x600p and 1024x768p;
392 *
393 * Hydra_Software_Devel/17   7/8/04 5:57p hongtaoz
394 * PR11794: added 720p_50Hz and 1250i_50Hz support;
395 *
396 * Hydra_Software_Devel/16   6/16/04 5:42p jasonh
397 * PR 11562: Added support for test format.
398 *
399 * Hydra_Software_Devel/15   5/4/04 6:44p hongtaoz
400 * PR10073: added refresh rate to the BFMT module;
401 * PR10942: added pixel frequency bit mask into format info; only expose
402 * necessary format macroes;
403 *
404 * Hydra_Software_Devel/14   5/4/04 11:14a hongtaoz
405 * PR10942: moved some useful video format macroes from
406 * bvdc_display_priv.h to BFMT module.
407 *
408 * Hydra_Software_Devel/12   2/19/04 2:42p maivu
409 * PR 9493: Fixed typo in comments.
410 *
411 * Hydra_Software_Devel/11   2/19/04 10:36a maivu
412 * PR 9493: Removed generic PAL. Added specific PAL modes:
413 * B,B1,D,D1,G,H,I,K.
414 *
415 * Hydra_Software_Devel/10   12/17/03 3:47p pntruong
416 * PR 9027: Added BFMT_GetVideoFormatInfoPtr to BFMT.
417 *
418 * Hydra_Software_Devel/9   10/9/03 8:40a pntruong
419 * Added some common use constants.
420 *
421 * Hydra_Software_Devel/8   7/22/03 1:44p pntruong
422 * Added implementation.
423 *
424 * Hydra_Software_Devel/7   7/9/03 5:07p maivu
425 * Added separate PAL-N to distinguish from PAL-NC. Renamed
426 * BFMT_DisplayFmt_xyz to BFMT_VideoFmt_xyz.
427 *
428 * Hydra_Software_Devel/6   7/8/03 6:22p maivu
429 * Rename BFMT_VideoFmt_ePAL_N to BFMT_VideoFmt_ePAL_NC (for N
430 * combination), per Alek's request.
431 *
432 * Hydra_Software_Devel/5   3/19/03 5:54p maivu
433 * Modifications based on feedback from initial internal review.
434 *
435 * Hydra_Software_Devel/4   3/10/03 6:02p pntruong
436 * Fixed semicolon typo.
437 *
438 * Hydra_Software_Devel/3   3/4/03 3:16p maivu
439 * Added total horizontal length, and total vertical height
440 *
441 * Hydra_Software_Devel/2   3/3/03 3:49p maivu
442 * Added comma on last enum defs, so docJet can pick up the comment
443 *
444 * Hydra_Software_Devel/1   3/3/03 3:42p maivu
445 * Initial revision
446 *
447 *
448 ***************************************************************************/
449#ifndef BFMT_H__
450#define BFMT_H__
451
452#ifdef __cplusplus
453extern "C" {
454#endif
455
456/*=************************ Module Overview ********************************
457The purpose of the VideoFormatModule is to provide common Video formats
458information to other Software Modules. It does not require any chip specific
459data, and therefore does not require a handle.
460
461This module defines all possible Video formats, and allows the user to get
462fixed information about the format such as: width, height, top porch, bottom
463porch, front porch, back porch, whether the format is progressive, etc. These
464sort of functions are required by most video applications and by graphics.
465These values are constant from chip to chip. The included functions do no
466access any memory or registers.
467**************************************************************************=*/
468
469/****************************************************************
470 *  Macros
471 ****************************************************************/
472
473/* KLUDE: legacy 3DTV chipsets have picture size limitation, require special
474   display format to support */
475#if (3548 == BCHP_CHIP) || (3556 == BCHP_CHIP)
476#define BFMT_LEGACY_3DTV_SUPPORT            (1)
477#else
478#define BFMT_LEGACY_3DTV_SUPPORT            (0)
479#endif
480
481/* The vertical refresh rate and pixel frequency scaling factor:
482    For example, NTSC has vsync rate of 59.94Hz, its stored ulVertFreq value is
483        59.94 x BFMT_FREQ_FACTOR = 5994;
484    720p has pixel frequency of 74.25MHz, its stored ulPxlFreq value is
485        74.25 x BFMT_FREQ_FACTOR = 7425; */
486#define BFMT_FREQ_FACTOR        (100)
487
488/* To be OBSOLETED: These masks are hitting the limitation of as new format
489 * growth.  These are to be replace with BFMT_Vert_e*. */
490/* The bit masks for picture vertical frequency, or refresh rate */
491#define BFMT_VERT_INVALID            0x00000000
492#define BFMT_VERT_50Hz               0x00000001
493#define BFMT_VERT_59_94Hz            0x00000002
494#define BFMT_VERT_60Hz               0x00000004
495#define BFMT_VERT_70Hz               0x00000008
496#define BFMT_VERT_72Hz               0x00000010
497#define BFMT_VERT_75Hz               0x00000020
498#define BFMT_VERT_85Hz               0x00000040
499#define BFMT_VERT_23_976Hz           0x00000080
500#define BFMT_VERT_24Hz               0x00000100
501#define BFMT_VERT_25Hz               0x00000200
502#define BFMT_VERT_29_97Hz            0x00000400
503#define BFMT_VERT_30Hz               0x00000800
504#define BFMT_VERT_56Hz               0x00001000
505#define BFMT_VERT_87Hz               0x00002000
506#define BFMT_VERT_48Hz               0x00004000
507#define BFMT_VERT_47_952Hz           0x00008000
508#define BFMT_VERT_66Hz               0x00010000
509
510/* To be OBSOLETED: These masks are hitting the limitation of as new format
511 * growth.  These are to be replace with BFMT_Pxl_e*. */
512/* The bit masks for video pixel frequency, or sample rate */
513/* Safe mode: 640x480p */
514#define BFMT_PXL_25_2MHz             0x00000001
515#define BFMT_PXL_25_2MHz_MUL_1_001   0x00000000 /* not used */
516#define BFMT_PXL_25_2MHz_DIV_1_001   0x00000002
517
518/* NTSC and 480p, NTSC is upsampled in VEC from 13.5MHz */
519#define BFMT_PXL_27MHz               0x00000004
520#define BFMT_PXL_27MHz_MUL_1_001     0x00000008 /* 480p @60Hz */
521#define BFMT_PXL_27MHz_DIV_1_001     0x00000000 /* not used */
522
523/* 1080i and 720p */
524#define BFMT_PXL_74_25MHz            0x00000010
525#define BFMT_PXL_74_25MHz_MUL_1_001  0x00000000 /* not used */
526#define BFMT_PXL_74_25MHz_DIV_1_001  0x00000020
527
528/* 1080p */
529#define BFMT_PXL_148_5MHz            0x20000000 /* 60Hz */
530#define BFMT_PXL_148_5MHz_DIV_1_001  0x40000000 /* 59.94 Hz */
531
532/* 1080p60 3D
533 * Reuse bits. BFMT_PXL_39_79MHz and BFMT_PXL_39_79MHz_DIV_1_001
534 * are used for input only */
535#define BFMT_PXL_297MHz              0x00000200 /* 60    Hz */
536#define BFMT_PXL_297MHz_DIV_1_001    0x00000400 /* 59.94 Hz */
537
538/* DTV: 1366x768p  */
539#define BFMT_PXL_56_304MHz           0x00000040 /* 50 Hz */
540#define BFMT_PXL_67_565MHz           0x00000080 /* 60 Hz    */
541#define BFMT_PXL_67_565MHz_MUL_1_001 0x00000000 /* not used */
542#define BFMT_PXL_67_565MHz_DIV_1_001 0x00000100 /* 59.94 Hz */
543
544/* VESA mode: 800x600p @ 60/59.94Hz */
545#define BFMT_PXL_40MHz               0x00000200 /* obsoleted */
546#define BFMT_PXL_39_79MHz            0x00000200 /* 60    Hz */
547#define BFMT_PXL_39_79MHz_DIV_1_001  0x00000400 /* 59.94 Hz */
548
549/* VESA mode: 1024x768p @ 60/59.94Hz */
550#define BFMT_PXL_65MHz               0x00000800
551#define BFMT_PXL_65MHz_DIV_1_001     0x00001000
552
553/* VESA mode: 1280x768p @ 60/59.94Hz */
554#define BFMT_PXL_65_286MHz           0x00002000
555#define BFMT_PXL_65_286MHz_DIV_1_001 0x00004000
556
557/* VESA mode: 1280x720p @ 50Hz */
558#define BFMT_PXL_60_4656MHz          0x00008000
559#define BFMT_PXL_60_375MHz           0x00008000 /* obsoleted */
560
561/* VESA mode: 1280x720p @ 60/59.94Hz */
562#define BFMT_PXL_74_375MHz           0x00010000 /* obsoleted */
563#define BFMT_PXL_74_48MHz            0x00010000
564#define BFMT_PXL_74_48MHz_DIV_1_001  0x00020000
565
566/* VESA mode: 1280x720p @ 60/59.94Hz Reduced Blanking */
567#define BFMT_PXL_64MHz               0x00040000 /* obsoleted */
568#define BFMT_PXL_64_022MHz           0x00040000
569#define BFMT_PXL_64_022MHz_DIV_1_001 0x00080000
570
571/* More PC mode pixel rate */
572#define BFMT_PXL_31_50MHz            0x00100000
573#define BFMT_PXL_35_50MHz            0x00200000
574#define BFMT_PXL_36_00MHz            0x00400000
575#define BFMT_PXL_49_50MHz            0x00800000
576#define BFMT_PXL_50_00MHz            0x01000000
577#define BFMT_PXL_56_25MHz            0x02000000
578#define BFMT_PXL_75_00MHz            0x04000000
579#define BFMT_PXL_78_75MHz            0x08000000
580#define BFMT_PXL_94_50MHz            0x10000000
581
582#define BFMT_PXL_101MHz              0x20000000 /* 60Hz */
583#define BFMT_PXL_121_75MHz           0x20000000 /* 60Hz */
584#define BFMT_PXL_156MHz              0x40000000 /* 60Hz */
585#define BFMT_PXL_162MHz              0x80000000 /* 60Hz */
586
587/* VESA mode: 1360x768p @ 60Hz */
588#define BFMT_PXL_85_5MHz             0x40000000
589#define BFMT_PXL_85_5MHz_DIV_1_001   0x10000000
590
591/* VESA mode: 1920x1080p@60Hz_Red */
592#define BFMT_PXL_138_625MHz          0x20000000
593
594/* 1366x768@60 */
595#define BFMT_PXL_72_014MHz           0x80000000
596
597/* 1024x768i@87 */
598#define BFMT_PXL_44_900MHz           0x00000000/*not used*/
599
600/* VESA mode: 640x480p_CVT @ 60Hz */
601#define BFMT_PXL_23_75MHz            0x00100000
602#define BFMT_PXL_23_75MHz_DIV_1_001  0x00200000
603
604/* VESA mode: 1280x800p @ 60Hz */
605#define BFMT_PXL_83_5MHz             0x00400000
606#define BFMT_PXL_83_5MHz_DIV_1_001   0x00800000
607
608/* VESA mode: 1280x1024p @ 60Hz */
609#define BFMT_PXL_108MHz              0x01000000
610#define BFMT_PXL_108MHz_DIV_1_001    0x02000000
611
612/* VESA mode: 1440x900p @ 60Hz */
613#define BFMT_PXL_106_5MHz            0x04000000
614#define BFMT_PXL_106_5MHz_DIV_1_001  0x08000000
615
616/* 480P output, with 54 MHz pixel sampling with pixel doubling */
617#define BFMT_PXL_54MHz               0x00010000
618#define BFMT_PXL_54MHz_MUL_1_001     0x00020000
619
620/* Check with HDM PI owner before modifying BFMT_IS_VESA_MODE and
621 * BFMT_SUPPORT_HDMI lists */
622#define BFMT_IS_VESA_MODE(fmt) \
623        ((BFMT_VideoFmt_eDVI_640x480p == (fmt)) || \
624         (BFMT_VideoFmt_eDVI_800x600p == (fmt)) || \
625         (BFMT_VideoFmt_eDVI_1024x768p == (fmt)) || \
626         (BFMT_VideoFmt_eDVI_1280x768p == (fmt)) || \
627         (BFMT_VideoFmt_eDVI_1280x720p == (fmt)) || \
628         (BFMT_VideoFmt_eDVI_640x480p_CVT == (fmt)) || \
629         (BFMT_VideoFmt_eDVI_1280x1024p_60Hz == (fmt)) || \
630         (BFMT_VideoFmt_eDVI_1360x768p_60Hz == (fmt)) || \
631         (BFMT_VideoFmt_eDVI_1366x768p_60Hz == (fmt)))
632
633#define BFMT_SUPPORT_HDMI(fmt) \
634        ((BFMT_VideoFmt_eNTSC == (fmt)) || \
635         (BFMT_VideoFmt_ePAL_B == (fmt)) || \
636         (BFMT_VideoFmt_ePAL_B1 == (fmt)) || \
637         (BFMT_VideoFmt_ePAL_D == (fmt)) || \
638         (BFMT_VideoFmt_ePAL_D1 == (fmt)) || \
639         (BFMT_VideoFmt_ePAL_G == (fmt)) || \
640         (BFMT_VideoFmt_ePAL_H == (fmt)) || \
641         (BFMT_VideoFmt_ePAL_I == (fmt)) || \
642         (BFMT_VideoFmt_ePAL_K == (fmt)) || \
643         (BFMT_VideoFmt_ePAL_M == (fmt)) || \
644         (BFMT_VideoFmt_ePAL_N == (fmt)) || \
645         (BFMT_VideoFmt_ePAL_NC == (fmt)) || \
646         (BFMT_VideoFmt_e1080i == (fmt)) || \
647         (BFMT_VideoFmt_e1080p == (fmt)) || \
648         (BFMT_VideoFmt_e720p == (fmt)) || \
649         (BFMT_VideoFmt_e720p_60Hz_3DOU_AS == (fmt)) || \
650         (BFMT_VideoFmt_e720p_50Hz_3DOU_AS == (fmt)) || \
651         (BFMT_VideoFmt_e480p == (fmt)) || \
652         (BFMT_VideoFmt_e576p_50Hz == (fmt)) || \
653         (BFMT_VideoFmt_e1080p_24Hz_3DOU_AS == (fmt)) || \
654         (BFMT_VideoFmt_e1080p_30Hz_3DOU_AS == (fmt)) || \
655         (BFMT_VideoFmt_e1080p_60Hz_3DOU_AS == (fmt)) || \
656         (BFMT_VideoFmt_e1080p_60Hz_3DLR == (fmt)) || \
657         (BFMT_VideoFmt_e3840x2160p_24Hz == (fmt)) || \
658         (BFMT_VideoFmt_e4096x2160p_24Hz == (fmt)) || \
659         (BFMT_VideoFmt_e1080p_24Hz == (fmt)) || \
660         (BFMT_VideoFmt_e1080p_25Hz == (fmt)) || \
661         (BFMT_VideoFmt_e1080p_30Hz == (fmt)) || \
662         (BFMT_VideoFmt_e1080p_50Hz == (fmt)) || \
663         (BFMT_VideoFmt_e1080i_50Hz == (fmt)) || \
664         (BFMT_VideoFmt_e720p_24Hz == (fmt)) || \
665         (BFMT_VideoFmt_e720p_50Hz == (fmt)) || \
666         (BFMT_VideoFmt_eCUSTOM_1366x768p == (fmt)) || \
667         (BFMT_IS_VESA_MODE(fmt)))
668
669#define BFMT_IS_3D_MODE(fmt) \
670        ((BFMT_VideoFmt_e720p_60Hz_3DOU_AS  == (fmt)) || \
671         (BFMT_VideoFmt_e720p_50Hz_3DOU_AS  == (fmt)) || \
672         (BFMT_VideoFmt_e720p_30Hz_3DOU_AS  == (fmt)) || \
673         (BFMT_VideoFmt_e720p_24Hz_3DOU_AS  == (fmt)) || \
674         (BFMT_VideoFmt_e1080p_24Hz_3DOU_AS == (fmt)) || \
675         (BFMT_VideoFmt_e1080p_30Hz_3DOU_AS == (fmt)) || \
676         (BFMT_VideoFmt_e1080p_60Hz_3DOU_AS == (fmt)) || \
677         (BFMT_VideoFmt_e1080p_60Hz_3DLR == (fmt)))
678
679/***************************************************************************
680Summary:
681        This macro are commonly used to described a format.
682
683See Also:
684        BFMT_GetVideoFormatInfoPtr
685***************************************************************************/
686#define BFMT_NTSC_WIDTH                (720)
687#define BFMT_NTSC_HEIGHT               (482)
688
689#define BFMT_PAL_WIDTH                 (720)
690#define BFMT_PAL_HEIGHT                (576)
691
692#define BFMT_PAL_M_WIDTH               BFMT_NTSC_WIDTH    /* Yes! */
693#define BFMT_PAL_M_HEIGHT              BFMT_NTSC_HEIGHT
694
695#define BFMT_PAL_N_WIDTH               BFMT_PAL_WIDTH
696#define BFMT_PAL_N_HEIGHT              BFMT_PAL_HEIGHT
697
698#define BFMT_PAL_NC_WIDTH              BFMT_PAL_WIDTH
699#define BFMT_PAL_NC_HEIGHT             BFMT_PAL_HEIGHT
700
701#define BFMT_SECAM_WIDTH               BFMT_PAL_WIDTH
702#define BFMT_SECAM_HEIGHT              BFMT_PAL_HEIGHT
703
704#define BFMT_DVI_480P_WIDTH            (640)
705#define BFMT_DVI_480P_HEIGHT           (480)
706
707#define BFMT_DVI_600P_WIDTH            (800)
708#define BFMT_DVI_600P_HEIGHT           (600)
709
710#define BFMT_DVI_768P_WIDTH            (1024)
711#define BFMT_DVI_768P_HEIGHT           (768)
712
713#define BFMT_DVI_720P_WIDTH            (1280)
714#define BFMT_DVI_720P_HEIGHT           (720)
715
716#define BFMT_480P_WIDTH                BFMT_NTSC_WIDTH
717#define BFMT_480P_HEIGHT               (483)
718
719#define BFMT_576P_WIDTH                BFMT_PAL_WIDTH
720#define BFMT_576P_HEIGHT               BFMT_PAL_HEIGHT
721
722#define BFMT_720P_WIDTH                (1280)
723#define BFMT_720P_HEIGHT               (720)
724
725#define BFMT_1080I_WIDTH               (1920)
726#define BFMT_1080I_HEIGHT              (1080)
727
728#define BFMT_1080P_WIDTH               BFMT_1080I_WIDTH
729#define BFMT_1080P_HEIGHT              BFMT_1080I_HEIGHT
730
731#define BFMT_1080P3D_HEIGHT            (1125+1080)
732#define BFMT_720P3D_HEIGHT             (750+720)
733
734/***************************************************************************
735Summary:
736        Used to specify the possible aspect ratios.
737
738Description:
739        The values assigned to these enumerations should be kept in step with
740        the ISO 13818-2 specification to minimize effort converting to these
741        types.
742
743See Also:
744****************************************************************************/
745typedef enum
746{
747        BFMT_AspectRatio_eUnknown   = 0, /* Unkown/Reserved */
748        BFMT_AspectRatio_eSquarePxl = 1, /* square pixel */
749        BFMT_AspectRatio_e4_3          , /* 4:3 */
750        BFMT_AspectRatio_e16_9         , /* 16:9 */
751        BFMT_AspectRatio_e221_1        , /* 2.21:1 */
752        BFMT_AspectRatio_e15_9,          /* 15:9 */
753        BFMT_AspectRatio_eSAR            /* no DAR available, use SAR instead */
754
755} BFMT_AspectRatio;
756
757/***************************************************************************
758Summary:
759        Used to specify orientation of the format.
760
761Description:
762        BFMT_Orientation defines all possible orientation of a format.
763
764See Also:
765****************************************************************************/
766typedef enum
767{
768        BFMT_Orientation_e2D = 0,         /* 2D */
769        BFMT_Orientation_e3D_LeftRight,   /* 3D left right */
770        BFMT_Orientation_e3D_OverUnder,   /* 3D over under */
771        BFMT_Orientation_e3D_Left,        /* 3D left */
772        BFMT_Orientation_e3D_Right,       /* 3D right */
773        BFMT_Orientation_eLeftRight_Enhanced  /* multi-resolution 3D */
774
775} BFMT_Orientation;
776
777/***************************************************************************
778Summary:
779        Used to specify veritical refresh rate (vsync rate) of format.
780
781Description:
782        BFMT_Vert defines all possible refresh rate of a format.
783
784See Also:
785****************************************************************************/
786typedef enum
787{
788        BFMT_Vert_eInvalid = 0,
789        BFMT_Vert_e23_976Hz,
790        BFMT_Vert_e24Hz,
791        BFMT_Vert_e25Hz,
792        BFMT_Vert_e29_97Hz,
793        BFMT_Vert_e30Hz,
794        BFMT_Vert_e48Hz,
795        BFMT_Vert_e50Hz,
796        BFMT_Vert_e59_94Hz,
797        BFMT_Vert_e60Hz,
798        BFMT_Vert_eLast
799
800} BFMT_Vert;
801
802
803/***************************************************************************
804Summary:
805        This enumeration contains the Video formats available
806
807Description:
808        BFMT_VideoFmt defines all possible standard Video formats for HD and
809        SD modes. Modes that are supported for DVI outputs only, will have
810        the DVI identification.
811
812        BFMT_VideoFmt_e1080i will set 29.97 or 30 Hz, to match with the input
813        source. BFMT_VideoFmt_e720p will set 59.94 or 60 Hz, depending on the
814        input source.
815
816See Also:
817        BVDC_Display_SetVideoFormat, BVDC_Display_GetVideoFormat,
818        BFMT_GetVideoFormatInfoPtr
819***************************************************************************/
820typedef enum
821{
822        BFMT_VideoFmt_eNTSC = 0,                   /* 480i, NSTC-M for North America */
823        BFMT_VideoFmt_eNTSC_J,                     /* 480i (Japan) */
824        BFMT_VideoFmt_eNTSC_443,                   /* NSTC-443 */
825        BFMT_VideoFmt_ePAL_B,                      /* Australia */
826        BFMT_VideoFmt_ePAL_B1,                     /* Hungary */
827        BFMT_VideoFmt_ePAL_D,                      /* China */
828        BFMT_VideoFmt_ePAL_D1,                     /* Poland */
829        BFMT_VideoFmt_ePAL_G,                      /* Europe */
830        BFMT_VideoFmt_ePAL_H,                      /* Europe */
831        BFMT_VideoFmt_ePAL_K,                      /* Europe */
832        BFMT_VideoFmt_ePAL_I,                      /* U.K. */
833        BFMT_VideoFmt_ePAL_M,                      /* 525-lines (Brazil) */
834        BFMT_VideoFmt_ePAL_N,                      /* Jamaica, Uruguay */
835        BFMT_VideoFmt_ePAL_NC,                     /* N combination (Argentina) */
836        BFMT_VideoFmt_ePAL_60,                     /* 60Hz PAL */
837        BFMT_VideoFmt_eSECAM_L,                    /* France */
838        BFMT_VideoFmt_eSECAM_B,                    /* Middle East */
839        BFMT_VideoFmt_eSECAM_G,                    /* Middle East */
840        BFMT_VideoFmt_eSECAM_D,                    /* Eastern Europe */
841        BFMT_VideoFmt_eSECAM_K,                    /* Eastern Europe */
842        BFMT_VideoFmt_eSECAM_H,                    /* Line SECAM */
843        BFMT_VideoFmt_e1080i,                      /* HD 1080i */
844        BFMT_VideoFmt_e1080p,                      /* HD 1080p 60/59.94Hz, SMPTE 274M-1998 */
845        BFMT_VideoFmt_e720p,                       /* HD 720p */
846        BFMT_VideoFmt_e720p_60Hz_3DOU_AS,          /* HD 3D 720p */
847        BFMT_VideoFmt_e720p_50Hz_3DOU_AS,          /* HD 3D 720p50 */
848        BFMT_VideoFmt_e720p_30Hz_3DOU_AS,          /* HD 3D 720p30 */
849        BFMT_VideoFmt_e720p_24Hz_3DOU_AS,          /* HD 3D 720p24 */
850        BFMT_VideoFmt_e480p,                       /* HD 480p */
851        BFMT_VideoFmt_e1080i_50Hz,                 /* HD 1080i 50Hz, 1125 sample per line, SMPTE 274M */
852        BFMT_VideoFmt_e1080p_24Hz_3DOU_AS,         /* HD 1080p 24Hz, 2750 sample per line, SMPTE 274M-1998 */
853        BFMT_VideoFmt_e1080p_30Hz_3DOU_AS,         /* HD 1080p 30Hz, 2200 sample per line, SMPTE 274M-1998 */
854        BFMT_VideoFmt_e1080p_60Hz_3DOU_AS,         /* HD 1080p 60Hz, 2200 sample per line  */
855        BFMT_VideoFmt_e1080p_60Hz_3DLR,            /* HD 1080p 60Hz, 4400 sample per line  */
856        BFMT_VideoFmt_e1080p_24Hz,                 /* HD 1080p 24Hz, 2750 sample per line, SMPTE 274M-1998 */
857        BFMT_VideoFmt_e1080p_25Hz,                 /* HD 1080p 25Hz, 2640 sample per line, SMPTE 274M-1998 */
858        BFMT_VideoFmt_e1080p_30Hz,                 /* HD 1080p 30Hz, 2200 sample per line, SMPTE 274M-1998 */
859        BFMT_VideoFmt_e1080p_50Hz,                 /* HD 1080p 50Hz. */
860        BFMT_VideoFmt_e1250i_50Hz,                 /* HD 1250i 50Hz, another 1080i_50hz standard SMPTE 295M */
861        BFMT_VideoFmt_e720p_24Hz,                  /* HD 720p 23.976/24Hz, 750 line, SMPTE 296M */
862        BFMT_VideoFmt_e720p_25Hz,                  /* HD 720p 25Hz, 750 line, SMPTE 296M */
863        BFMT_VideoFmt_e720p_30Hz,                  /* HD 720p 30Hz, 750 line, SMPTE 296M */
864        BFMT_VideoFmt_e720p_50Hz,                  /* HD 720p 50Hz (Australia) */
865        BFMT_VideoFmt_e576p_50Hz,                  /* HD 576p 50Hz (Australia) */
866        BFMT_VideoFmt_e240p_60Hz,                  /* NTSC 240p */
867        BFMT_VideoFmt_e288p_50Hz,                  /* PAL 288p */
868        BFMT_VideoFmt_e1440x480p_60Hz,             /* CEA861B */
869        BFMT_VideoFmt_e1440x576p_50Hz,             /* CEA861B */
870        BFMT_VideoFmt_e3840x2160p_24Hz,            /* 3840x2160 24Hz */
871        BFMT_VideoFmt_e4096x2160p_24Hz,            /* 4096x2160 24Hz */
872#if BFMT_LEGACY_3DTV_SUPPORT
873        BFMT_VideoFmt_eCUSTOM1920x2160i_48Hz,    /* 3548 LVDS output for legacy 3DTV support */
874        BFMT_VideoFmt_eCUSTOM1920x2160i_60Hz,    /* 3548 LVDS output for legacy 3DTV support */
875#endif
876        BFMT_VideoFmt_eCUSTOM_1440x240p_60Hz,      /* 240p 60Hz 7411 custom format. */
877        BFMT_VideoFmt_eCUSTOM_1440x288p_50Hz,      /* 288p 50Hz 7411 custom format. */
878        BFMT_VideoFmt_eCUSTOM_1366x768p,           /* Custom 1366x768 mode */
879        BFMT_VideoFmt_eCUSTOM_1366x768p_50Hz,      /* Custom 1366x768 50Hz mode */
880        BFMT_VideoFmt_eDVI_640x480p,               /* DVI Safe mode for computer monitors */
881        BFMT_VideoFmt_eDVI_640x480p_CVT,           /* DVI VESA mode for computer monitors */
882        BFMT_VideoFmt_eDVI_800x600p,               /* DVI VESA mode for computer monitors */
883        BFMT_VideoFmt_eDVI_1024x768p,              /* DVI VESA mode for computer monitors */
884        BFMT_VideoFmt_eDVI_1280x768p,              /* DVI VESA mode for computer monitors */
885        BFMT_VideoFmt_eDVI_1280x768p_Red,          /* DVI VESA mode for computer monitors */
886        BFMT_VideoFmt_eDVI_1280x720p_50Hz,         /* DVI VESA mode for computer monitors */
887        BFMT_VideoFmt_eDVI_1280x720p,              /* DVI VESA mode for computer monitors */
888        BFMT_VideoFmt_eDVI_1280x720p_Red,          /* DVI VESA mode for computer monitors */
889
890        /* Added for HDMI/HDDVI input support!  VEC does not support these timing format!
891         * Convention: BFMT_VideoFmt_eDVI_{av_width}x{av_height}{i/p}_{RefreshRateInHz}.
892         * Eventually VEC can output all these timing formats when we get the microcodes
893         * for it.  Currently there are no microcode for these yet. */
894        BFMT_VideoFmt_eDVI_640x350p_60Hz,          /* DVI VESA mode for computer monitors */
895        BFMT_VideoFmt_eDVI_640x350p_70Hz,          /* DVI VESA mode for computer monitors */
896        BFMT_VideoFmt_eDVI_640x350p_72Hz,          /* DVI VESA mode for computer monitors */
897        BFMT_VideoFmt_eDVI_640x350p_75Hz,          /* DVI VESA mode for computer monitors */
898        BFMT_VideoFmt_eDVI_640x350p_85Hz,          /* DVI VESA mode for computer monitors */
899
900        BFMT_VideoFmt_eDVI_640x400p_60Hz,          /* DVI VESA mode for computer monitors */
901        BFMT_VideoFmt_eDVI_640x400p_70Hz,          /* DVI VESA mode for computer monitors */
902        BFMT_VideoFmt_eDVI_640x400p_72Hz,          /* DVI VESA mode for computer monitors */
903        BFMT_VideoFmt_eDVI_640x400p_75Hz,          /* DVI VESA mode for computer monitors */
904        BFMT_VideoFmt_eDVI_640x400p_85Hz,          /* DVI VESA mode for computer monitors */
905
906        BFMT_VideoFmt_eDVI_640x480p_66Hz,          /* DVI VESA mode for computer monitors */
907        BFMT_VideoFmt_eDVI_640x480p_70Hz,          /* DVI VESA mode for computer monitors */
908        BFMT_VideoFmt_eDVI_640x480p_72Hz,          /* DVI VESA mode for computer monitors */
909        BFMT_VideoFmt_eDVI_640x480p_75Hz,          /* DVI VESA mode for computer monitors */
910        BFMT_VideoFmt_eDVI_640x480p_85Hz,          /* DVI VESA mode for computer monitors */
911
912        BFMT_VideoFmt_eDVI_720x400p_60Hz,          /* DVI VESA mode for computer monitors */
913        BFMT_VideoFmt_eDVI_720x400p_70Hz,          /* DVI VESA mode for computer monitors */
914        BFMT_VideoFmt_eDVI_720x400p_72Hz,          /* DVI VESA mode for computer monitors */
915        BFMT_VideoFmt_eDVI_720x400p_75Hz,          /* DVI VESA mode for computer monitors */
916        BFMT_VideoFmt_eDVI_720x400p_85Hz,          /* DVI VESA mode for computer monitors */
917
918        BFMT_VideoFmt_eDVI_800x600p_56Hz,          /* DVI VESA mode for computer monitors */
919        BFMT_VideoFmt_eDVI_800x600p_59Hz_Red,      /* DVI VESA mode for computer monitors */
920        BFMT_VideoFmt_eDVI_800x600p_70Hz,          /* DVI VESA mode for computer monitors */
921        BFMT_VideoFmt_eDVI_800x600p_72Hz,          /* DVI VESA mode for computer monitors */
922        BFMT_VideoFmt_eDVI_800x600p_75Hz,          /* DVI VESA mode for computer monitors */
923        BFMT_VideoFmt_eDVI_800x600p_85Hz,          /* DVI VESA mode for computer monitors */
924
925        BFMT_VideoFmt_eDVI_1024x768p_66Hz,         /* DVI VESA mode for computer monitors */
926        BFMT_VideoFmt_eDVI_1024x768p_70Hz,         /* DVI VESA mode for computer monitors */
927        BFMT_VideoFmt_eDVI_1024x768p_72Hz,         /* DVI VESA mode for computer monitors */
928        BFMT_VideoFmt_eDVI_1024x768p_75Hz,         /* DVI VESA mode for computer monitors */
929        BFMT_VideoFmt_eDVI_1024x768p_85Hz,         /* DVI VESA mode for computer monitors */
930
931        BFMT_VideoFmt_eDVI_1280x720p_70Hz,         /* DVI VESA mode for computer monitors */
932        BFMT_VideoFmt_eDVI_1280x720p_72Hz,         /* DVI VESA mode for computer monitors */
933        BFMT_VideoFmt_eDVI_1280x720p_75Hz,         /* DVI VESA mode for computer monitors */
934        BFMT_VideoFmt_eDVI_1280x720p_85Hz,         /* DVI VESA mode for computer monitors */
935
936        /* New DVI or PC vdec input support */
937        BFMT_VideoFmt_eDVI_1024x768i_87Hz,         /* DVI VESA mode for computer monitors */
938        BFMT_VideoFmt_eDVI_1152x864p_75Hz,         /* DVI VESA mode for computer monitors */
939        BFMT_VideoFmt_eDVI_1280x768p_75Hz,         /* DVI VESA mode for computer monitors */
940        BFMT_VideoFmt_eDVI_1280x768p_85Hz,         /* DVI VESA mode for computer monitors */
941        BFMT_VideoFmt_eDVI_1280x800p_60Hz,         /* DVI VESA mode for computer monitors */
942        BFMT_VideoFmt_eDVI_1280x960p_60Hz,         /* DVI VESA mode for computer monitors */
943        BFMT_VideoFmt_eDVI_1280x960p_85Hz,         /* DVI VESA mode for computer monitors */
944        BFMT_VideoFmt_eDVI_1280x1024p_60Hz,        /* DVI VESA mode for computer monitors */
945        BFMT_VideoFmt_eDVI_1280x1024p_69Hz,        /* DVI VESA mode for computer monitors */
946        BFMT_VideoFmt_eDVI_1280x1024p_75Hz,        /* DVI VESA mode for computer monitors */
947        BFMT_VideoFmt_eDVI_1280x1024p_85Hz,        /* DVI VESA mode for computer monitors */
948        BFMT_VideoFmt_eDVI_832x624p_75Hz,          /*   MAC-16 */
949        BFMT_VideoFmt_eDVI_1360x768p_60Hz,         /* DVI VESA mode for computer monitors */
950        BFMT_VideoFmt_eDVI_1366x768p_60Hz,         /* DVI VESA mode for computer monitors */
951        BFMT_VideoFmt_eDVI_1400x1050p_60Hz,        /* DVI VESA mode for computer monitors */
952        BFMT_VideoFmt_eDVI_1400x1050p_60Hz_Red,    /* DVI VESA mode for computer monitors */
953        BFMT_VideoFmt_eDVI_1400x1050p_75Hz,        /* DVI VESA mode for computer monitors */
954        BFMT_VideoFmt_eDVI_1600x1200p_60Hz,        /* DVI VESA mode for computer monitors */
955        BFMT_VideoFmt_eDVI_1920x1080p_60Hz_Red,    /* DVI VESA mode for computer monitors */
956        BFMT_VideoFmt_eDVI_848x480p_60Hz,          /* DVI VESA mode for computer monitors */
957        BFMT_VideoFmt_eDVI_1064x600p_60Hz,         /* DVI VESA mode for computer monitors */
958        BFMT_VideoFmt_eDVI_1440x900p_60Hz,         /* DVI VESA mode for computer monitors */
959
960        /* statics: custom formats */
961        BFMT_VideoFmt_eCustom0,         /* 59.94/60 Hz */
962        BFMT_VideoFmt_eCustom1,         /* 50 Hz */
963
964        /* dynamics: custom format */
965        BFMT_VideoFmt_eCustom2,         /* defined at run time by app */
966
967        /* Must be last */
968        BFMT_VideoFmt_eMaxCount         /* Counter. Do not use! */
969
970} BFMT_VideoFmt;
971
972/* NOTE: These names could go away anytime better change to use the real
973 * one from the enumerations above. */
974/* Define BFMT_VideoFmt_eSECAM for backwards compatibility */
975#define BFMT_VideoFmt_eSECAM BFMT_VideoFmt_eSECAM_L
976#define BFMT_VideoFmt_eDVI_1280x720p_ReducedBlank BFMT_VideoFmt_eDVI_1280x720p_Red
977
978#define BFMT_VideoFmt_e3D_720p         BFMT_VideoFmt_e720p_60Hz_3DOU_AS
979#define BFMT_VideoFmt_e3D_720p_50Hz    BFMT_VideoFmt_e720p_50Hz_3DOU_AS
980#define BFMT_VideoFmt_e3D_720p_30Hz    BFMT_VideoFmt_e720p_30Hz_3DOU_AS
981#define BFMT_VideoFmt_e3D_720p_24Hz    BFMT_VideoFmt_e720p_24Hz_3DOU_AS
982#define BFMT_VideoFmt_e3D_1080p_24Hz   BFMT_VideoFmt_e1080p_24Hz_3DOU_AS
983#define BFMT_VideoFmt_e3D_1080p_30Hz   BFMT_VideoFmt_e1080p_30Hz_3DOU_AS
984
985/***************************************************************************
986Summary:
987        This structure describes a custom format tables to be used to program VEC
988        and DVO.
989
990Description:
991        eVideoFmt has to be a custom format;
992        for now, it only supports DVO master mode;
993        a custom format cannot have both 50 and 60 Hz rate manager entries since
994        they are different custom formats; a custom format only tracks either
995        60/59.94Hz or 50Hz frame rate;
996
997        pDvoMicrocodeTbl - Microcode for the custom format timing such as LCD
998        panel.
999
1000        pDvoRmTbl0 - Rate manager setting for given refresh rate.  Such as 60.00Hz,
1001        50.00Hz, 120.00Hz, etc.
1002
1003        pDvoRmTbl1 - Rate manager setting for given refresh rate.  Such as 59.94Hz,
1004        50.00Hz, 120.00Hz, etc.  But this is a frame drop version of pDvoRmTbl0.
1005        For example if pDvoRmTbl0 is 60.00Hz, then pDvoRmTbl1 is 60.00/1.001 Hz
1006
1007See Also:
1008        BFMT_SetCustomFormatInfo
1009***************************************************************************/
1010typedef struct
1011{
1012        /* 64-dword array */
1013        void                               *pDvoMicrocodeTbl;
1014        void                               *pDvoRmTbl0;
1015        void                               *pDvoRmTbl1;
1016
1017} BFMT_CustomFormatInfo;
1018
1019/***************************************************************************
1020Summary:
1021        This structure contains the display format information
1022
1023Description:
1024        BFMT_VideoInfo provides the Video data for a Video format, such
1025        as screen size, resolution, type, and name associated with the format.
1026
1027        eVideoFmt            - This video format enumeration.  Should match
1028                with the enum that user pass in to query the information.
1029
1030        ulWidth              - The active analog screen width.  With given
1031                eVideoFmt the VEC can output multiple paths.  For example with NTSC
1032                the analog height, and its counter part HDMI output have different size.
1033
1034        ulHeight             -  The active analog screen width.  With given
1035                eVideoFmt the VEC can output multiple paths.  For example with NTSC
1036                the analog height, and its counter part HDMI output have different size.
1037
1038        ulDigitalWidth       - The active digital screen width
1039
1040        ulDigitalHeight      - The active digital screen height
1041
1042        ulScanWidth          - The total rasterization width which include
1043                blanking and active video.
1044
1045        ulScanHeight         - The rasterization height which include blanking and
1046                active video.
1047
1048        ulTopActive          - The start active video line of the top field or frame.
1049
1050        ulTopMaxVbiPassThru  - Maximum VBI Pass Through lines at the top field or frame
1051
1052        ulBotMaxVbiPassThru  - Maximum VBI Pass Through lines at the bottom field
1053
1054        ulActiveSpace        - Active space for the format. Specify number of pixels
1055                between the left and right buffers for 3D format. Should be 0 for all 2D
1056                formats.
1057
1058        ulVertFreqMask       - To be obsoleted!  Use ulVertFreq.
1059
1060        ulVertFreq           - To be obsoleted! picture vertical frequency, or
1061                refresh rate in units of 1/100th Hz.  For example 60.00Hz would be
1062                6000, and 59.94Hz would be 5994.
1063
1064        ulPxlFreqMask        - To be obsoleted!  Use ulPxlFreq.
1065
1066        bInterlaced          - Indicate if the format is interlaced or progressive
1067                mode.
1068
1069        eAspectRatio         - Default Aspect Ratio associated with this format.
1070
1071        eOrientation         - Default orientation associated with the format.
1072
1073        ulPxlFreq            - To be obsoleted!  Pixel frequencies
1074                in units of 1/100th Mhz.  For example 74.24Mhz would be 7425, and
1075                148.50Mhz would be 14850.
1076
1077        pchFormatStr         - Video format name.
1078
1079        pCustomInfo          - Custom format info, including microcode/rm tables;
1080                NULL for non-custom formats;  This is mainly for DVO output.
1081
1082See Also:
1083        BFMT_GetVideoFormatInfoPtr
1084***************************************************************************/
1085typedef struct
1086{
1087        BFMT_VideoFmt                      eVideoFmt;
1088        uint32_t                           ulWidth;
1089        uint32_t                           ulHeight;
1090        uint32_t                           ulDigitalWidth;
1091        uint32_t                           ulDigitalHeight;
1092        uint32_t                           ulScanWidth;
1093        uint32_t                           ulScanHeight;
1094        uint32_t                           ulTopActive;
1095        uint32_t                           ulTopMaxVbiPassThru;
1096        uint32_t                           ulBotMaxVbiPassThru;
1097        uint32_t                           ulActiveSpace;
1098        uint32_t                           ulVertFreqMask;
1099        uint32_t                           ulVertFreq; /* in 1 /BFMT_FREQ_FACTOR Hz */
1100        uint32_t                           ulPxlFreqMask;
1101        bool                               bInterlaced;
1102        BFMT_AspectRatio                   eAspectRatio;
1103        BFMT_Orientation                   eOrientation;
1104        uint32_t                           ulPxlFreq;  /* in 1 /BFMT_FREQ_FACTOR MHz */
1105        const char                        *pchFormatStr;
1106        BFMT_CustomFormatInfo             *pCustomInfo;
1107
1108} BFMT_VideoInfo;
1109
1110/***************************************************************************
1111Summary:
1112        This function queries the Video information for a specific Video
1113        format.
1114
1115Description:
1116        Returns the pointer to video information for a specific Video format,
1117        such as width, height, top/bottom/back/front porch, interlaced or
1118        progressive mode, etc.  Users can query the information for any Video
1119        format, whether or not it is supported by a particular chipset.
1120        Used by applications, SysLib, and PortingInterface modules.
1121
1122        NOTE: for BFMT_VideoFmt_eCustom2 BFMT does not have the information
1123        of this format.  It is just an enumeration to indicate that this format
1124        timing will be define at runtime.  It will be loaded thru VDC via
1125        BVDC_Display_SetCustomVideoFormat() API.  The format information of is
1126        kept in application, and also can be query from VDC API
1127        BVDC_Display_GetCustomVideoFormat().
1128
1129Input:
1130        eVideoFmt - Video format
1131
1132Returns:
1133        This function return a 'const BFMT_VideoInfo*'.  If eVideoFmt is an
1134        invalid video format it will return a NULL pointer.  Or passing in
1135        BFMT_VideoFmt_eCustom2.
1136
1137See Also:
1138        BVDC_Display_SetCustomVideoFormat
1139
1140**************************************************************************/
1141const BFMT_VideoInfo* BFMT_GetVideoFormatInfoPtr
1142        ( BFMT_VideoFmt                      eVideoFmt );
1143
1144/***************************************************************************
1145 * Obsoleted!  Should be using BFMT_GetVideoFormatInfoPtr()
1146 ***************************************************************************/
1147BERR_Code BFMT_GetVideoFormatInfo
1148        ( BFMT_VideoFmt                    eVideoFmt,
1149          BFMT_VideoInfo                  *pVideoFmtInfo );
1150
1151#ifdef __cplusplus
1152}
1153#endif
1154
1155#endif /* #ifndef BFMT_H__ */
1156/* End of File */
Note: See TracBrowser for help on using the repository browser.