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

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

first commit

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