| 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: bvdb.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/40 $ |
|---|
| 12 | * $brcm_Date: 8/24/11 4:57p $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * The VDB (Video Usage Modes Database) is a database of all possible video |
|---|
| 16 | * usage modes for a given chipset. This was created to support VDC's |
|---|
| 17 | * new source pending feature that allows applications to configure the |
|---|
| 18 | * BVN according to their requirements. |
|---|
| 19 | * |
|---|
| 20 | * Sample use: |
|---|
| 21 | * |
|---|
| 22 | * BVDB_Handle *hVdb; |
|---|
| 23 | * uint32_t ulEntries; |
|---|
| 24 | * BVDB_UsageMode stUsageMode; |
|---|
| 25 | * const BVDB_RtsTable *pstRtsTbl = NULL; |
|---|
| 26 | * |
|---|
| 27 | // Create VDB |
|---|
| 28 | * BVDB_CreateVdb(&hVdb, &ulEntries); |
|---|
| 29 | * |
|---|
| 30 | * // Get a usage mode given the following parameters |
|---|
| 31 | * strcpy(stUsageMode.acId, "1"); configuration 1 |
|---|
| 32 | * stUsageMode.eInputFormatGroup = BVDB_InputFormatGroup_eNTSC; |
|---|
| 33 | * stUsageMode.eDisplay = BVDB_Display_ePrimary60; |
|---|
| 34 | * stUsageMode.eWindow = BVDB_Window_eMain; |
|---|
| 35 | * stUsageMode.eIput = BVDB_Input_eComponent; |
|---|
| 36 | * stUsageMode.eOsd = BVDB_Osd_e1920_1080p_32bpp |
|---|
| 37 | * stUsageMode.stDisplayMode = 0x3f; "all_FULL_modes" |
|---|
| 38 | * |
|---|
| 39 | * err = BVDB_GetVdbEntry(hVdb, &stUsageMode); |
|---|
| 40 | * if (err != BERR_SUCCESS) |
|---|
| 41 | * { |
|---|
| 42 | * BDBG_ERR(("Usage mode with given paramters not found")); |
|---|
| 43 | * } |
|---|
| 44 | * |
|---|
| 45 | * // Get the RTS table associated with the obtained usage mode |
|---|
| 46 | * pstRtsTbl = BVDB_GetRtsTable(hVdb, stUsageMode.eRtsSet); |
|---|
| 47 | * |
|---|
| 48 | * |
|---|
| 49 | * // Destroy VDB |
|---|
| 50 | * BVDB_DestroyVdb(hVdb); |
|---|
| 51 | * |
|---|
| 52 | * |
|---|
| 53 | * |
|---|
| 54 | * Revision History: |
|---|
| 55 | * |
|---|
| 56 | * $brcm_Log: /magnum/commonutils/vdb/35230/A0/bvdb.h $ |
|---|
| 57 | * |
|---|
| 58 | * Hydra_Software_Devel/40 8/24/11 4:57p yingh |
|---|
| 59 | * SWDTV-7983: Merged back into main branch |
|---|
| 60 | * |
|---|
| 61 | * Hydra_Software_Devel/SWDTV-7983/1 8/4/11 8:06p yingh |
|---|
| 62 | * SWDTV-7983: Merged avc modes for config401 |
|---|
| 63 | * |
|---|
| 64 | * Hydra_Software_Devel/39 6/28/11 6:09p jerrylim |
|---|
| 65 | * SWDTV-7243: Added config205 |
|---|
| 66 | * |
|---|
| 67 | * Hydra_Software_Devel/38 6/21/11 6:18p yingh |
|---|
| 68 | * SWDTV-7186: Updated config200 to support seamless switching between |
|---|
| 69 | * different source formats |
|---|
| 70 | * |
|---|
| 71 | * Hydra_Software_Devel/37 5/27/11 5:26p yingh |
|---|
| 72 | * SWDTV-5785: Modified window and clipping sizes for config402 |
|---|
| 73 | * |
|---|
| 74 | * Hydra_Software_Devel/36 5/2/11 12:40p yingh |
|---|
| 75 | * SWDTV-6375: Added config204 with RTS supported |
|---|
| 76 | * |
|---|
| 77 | * Hydra_Software_Devel/35 4/20/11 6:07p jerrylim |
|---|
| 78 | * SWDTV-5823: modified full modes to support smooth transition within |
|---|
| 79 | * required zoom levels |
|---|
| 80 | * |
|---|
| 81 | * Hydra_Software_Devel/34 4/8/11 4:18p jerrylim |
|---|
| 82 | * SWDTV-6314: Revised config202 to support 1080p3d@30 |
|---|
| 83 | * |
|---|
| 84 | * Hydra_Software_Devel/33 4/6/11 10:45a jerrylim |
|---|
| 85 | * SWDTV-5931: Added config101 for CAP1 buffer capture |
|---|
| 86 | * |
|---|
| 87 | * Hydra_Software_Devel/32 3/16/11 5:32p yingh |
|---|
| 88 | * SWDTV-5403: Added config402 with RTS supported |
|---|
| 89 | * |
|---|
| 90 | * Hydra_Software_Devel/31 2/22/11 3:39p jerrylim |
|---|
| 91 | * SWDTV-5417: Added config203 with RTS supported |
|---|
| 92 | * |
|---|
| 93 | * Hydra_Software_Devel/30 2/14/11 12:11p jerrylim |
|---|
| 94 | * SW35230-2804: Added PC processing option (422 or 444) |
|---|
| 95 | * |
|---|
| 96 | * Hydra_Software_Devel/29 2/9/11 7:31p jerrylim |
|---|
| 97 | * SW35230-3000: Print source mapping table for debug |
|---|
| 98 | * |
|---|
| 99 | * Hydra_Software_Devel/28 2/9/11 4:28p jerrylim |
|---|
| 100 | * SW35230-2843: Added config202 |
|---|
| 101 | * |
|---|
| 102 | * Hydra_Software_Devel/27 2/4/11 3:30p jerrylim |
|---|
| 103 | * SW35230-1724: Added a 3D dual path processing to config200 |
|---|
| 104 | * |
|---|
| 105 | * Hydra_Software_Devel/26 1/27/11 11:58a jerrylim |
|---|
| 106 | * SW35230-2162: updated config300/301 in MCVP0_RWC2 to allocate proper BW |
|---|
| 107 | * |
|---|
| 108 | * Hydra_Software_Devel/25 12/16/10 2:29p jerrylim |
|---|
| 109 | * SW35230-2579: Replaced user mode functions with kernel mode functions |
|---|
| 110 | * |
|---|
| 111 | * Hydra_Software_Devel/24 12/14/10 2:48p jerrylim |
|---|
| 112 | * SWGERRARD-1145: Removed config400 (config401 covers it) and increased |
|---|
| 113 | * OSD size to 1920x1080 in config401 |
|---|
| 114 | * |
|---|
| 115 | * Hydra_Software_Devel/23 10/27/10 10:14a jerrylim |
|---|
| 116 | * SW35230-1957: Integrated update for C0 |
|---|
| 117 | * |
|---|
| 118 | * Hydra_Software_Devel/22 10/7/10 4:26p jerrylim |
|---|
| 119 | * SW35230-1610, SW35230-1607: Put back panel reversal support and |
|---|
| 120 | * extended cropping size to 32% |
|---|
| 121 | * |
|---|
| 122 | * Hydra_Software_Devel/21 9/22/10 4:03p jerrylim |
|---|
| 123 | * SW35230-1464: Add display formats for 3D sources |
|---|
| 124 | * |
|---|
| 125 | * Hydra_Software_Devel/20 9/16/10 3:50p jerrylim |
|---|
| 126 | * SW35230-1335: Add config400, 401 |
|---|
| 127 | * |
|---|
| 128 | * Hydra_Software_Devel/19 9/10/10 5:57p jerrylim |
|---|
| 129 | * SW35230-1332: Add VDB support for PDP and FRC |
|---|
| 130 | * |
|---|
| 131 | * Hydra_Software_Devel/18 8/31/10 10:23a jerrylim |
|---|
| 132 | * SW35230-1203: Changed max clipping size of pig mode in config20x to |
|---|
| 133 | * (25,25) |
|---|
| 134 | * |
|---|
| 135 | * Hydra_Software_Devel/17 8/26/10 5:55p jerrylim |
|---|
| 136 | * SW35230-1170: Added support for OSD size for 3D sources |
|---|
| 137 | * |
|---|
| 138 | * Hydra_Software_Devel/16 8/23/10 6:21p jerrylim |
|---|
| 139 | * SW35230-785: Added support for Auto Aspect Ratio Correction |
|---|
| 140 | * |
|---|
| 141 | * Hydra_Software_Devel/15 8/13/10 4:07p jerrylim |
|---|
| 142 | * SW35230-224: Added a get function which returns feature set that each |
|---|
| 143 | * RTS configuration supports |
|---|
| 144 | * |
|---|
| 145 | * Hydra_Software_Devel/14 7/29/10 5:38p jerrylim |
|---|
| 146 | * SW35230-817: Added 3D support to config200 |
|---|
| 147 | * |
|---|
| 148 | * Hydra_Software_Devel/13 7/23/10 5:47p jerrylim |
|---|
| 149 | * SW35230-670: CAP bpp with panel reversal compensated |
|---|
| 150 | * |
|---|
| 151 | * Hydra_Software_Devel/12 7/22/10 7:51p jerrylim |
|---|
| 152 | * SW35230-742: Modified config200 with 667Mhz support w/o FRC, Added |
|---|
| 153 | * initial revision of config201 |
|---|
| 154 | * |
|---|
| 155 | * Hydra_Software_Devel/11 7/19/10 4:01p jerrylim |
|---|
| 156 | * SW35230-630: Changes made based on usage mode Ver. 3.0 |
|---|
| 157 | * |
|---|
| 158 | * Hydra_Software_Devel/10 7/15/10 5:39p jerrylim |
|---|
| 159 | * SW35230-320: Added initial revision of config300 and config301 |
|---|
| 160 | * |
|---|
| 161 | * Hydra_Software_Devel/9 7/12/10 3:51p jerrylim |
|---|
| 162 | * SW35230-297: Added PIP support. Added more message for easier problem |
|---|
| 163 | * identification |
|---|
| 164 | * |
|---|
| 165 | * Hydra_Software_Devel/8 7/8/10 1:11p jerrylim |
|---|
| 166 | * SW35230-297: Simplified display modes |
|---|
| 167 | * |
|---|
| 168 | * Hydra_Software_Devel/7 7/7/10 4:16p jerrylim |
|---|
| 169 | * SW35230-297: Simplified Get display Mode |
|---|
| 170 | * |
|---|
| 171 | * Hydra_Software_Devel/6 7/6/10 4:03p jerrylim |
|---|
| 172 | * SW35230-297: Made usage mode obey VDB |
|---|
| 173 | * |
|---|
| 174 | * Hydra_Software_Devel/5 7/2/10 5:44p jerrylim |
|---|
| 175 | * SW35230-297: Changed config100 to the new design style |
|---|
| 176 | * |
|---|
| 177 | * Hydra_Software_Devel/4 7/2/10 3:49p jerrylim |
|---|
| 178 | * SW35230-297: Added RTS status print, Added usagemode version print, |
|---|
| 179 | * Removed cfg101(obsolete), Added RTS table ID, Adjusted win to max |
|---|
| 180 | * |
|---|
| 181 | * Hydra_Software_Devel/3 6/29/10 11:18a jerrylim |
|---|
| 182 | * SW35230-297: cleaned up old design. Corrected VDB dump |
|---|
| 183 | * |
|---|
| 184 | * Hydra_Software_Devel/2 6/23/10 5:53p jerrylim |
|---|
| 185 | * SW35230-309: Added config 200 based on Usage Mode Rev.2.0 |
|---|
| 186 | * |
|---|
| 187 | * Hydra_Software_Devel/1 4/30/10 3:06p jerrylim |
|---|
| 188 | * SW35230-99: Added real VDB files |
|---|
| 189 | * |
|---|
| 190 | ***************************************************************************/ |
|---|
| 191 | |
|---|
| 192 | |
|---|
| 193 | #ifndef __BVDB_H__ |
|---|
| 194 | #define __BVDB_H__ |
|---|
| 195 | |
|---|
| 196 | #include "bstd.h" |
|---|
| 197 | #include "berr.h" |
|---|
| 198 | #include "bfmt.h" |
|---|
| 199 | #include "bpxl.h" |
|---|
| 200 | |
|---|
| 201 | #include "blst_circleq.h" |
|---|
| 202 | |
|---|
| 203 | #ifdef __cplusplus |
|---|
| 204 | extern "C" { |
|---|
| 205 | #endif |
|---|
| 206 | |
|---|
| 207 | /* TODO: To be moved to RTS Configuration Context */ |
|---|
| 208 | #define BVDB_USAGE_MODE_VER_CFG100 (11) |
|---|
| 209 | #define BVDB_USAGE_MODE_VER_CFG101 (10) |
|---|
| 210 | #define BVDB_USAGE_MODE_VER_CFG200 (40) |
|---|
| 211 | #define BVDB_USAGE_MODE_VER_CFG201 (32) |
|---|
| 212 | #define BVDB_USAGE_MODE_VER_CFG202 (12) |
|---|
| 213 | #define BVDB_USAGE_MODE_VER_CFG203 (10) |
|---|
| 214 | #define BVDB_USAGE_MODE_VER_CFG204 (10) |
|---|
| 215 | #define BVDB_USAGE_MODE_VER_CFG205 (10) |
|---|
| 216 | #define BVDB_USAGE_MODE_VER_CFG300 (20) |
|---|
| 217 | #define BVDB_USAGE_MODE_VER_CFG301 (20) |
|---|
| 218 | #define BVDB_USAGE_MODE_VER_CFG401 (30) |
|---|
| 219 | #define BVDB_USAGE_MODE_VER_CFG402 (11) |
|---|
| 220 | |
|---|
| 221 | /************************* Module Overview ******************************** |
|---|
| 222 | The Video Usage Modes Database (VDB) intends to capture all the BVN and RTS |
|---|
| 223 | information found in the usage modes spreadsheet and put these in a form |
|---|
| 224 | that can be used readily by an application. |
|---|
| 225 | ***************************************************************************/ |
|---|
| 226 | #define BVDB_RTS_TABLE_SIZE 77 |
|---|
| 227 | |
|---|
| 228 | #define BVDB_SCL_CAP_TOLERANCE_FACTOR 10000 |
|---|
| 229 | |
|---|
| 230 | #define BVDB_MAX_STRLEN 80 |
|---|
| 231 | |
|---|
| 232 | /*************************************************************************** |
|---|
| 233 | Summary: |
|---|
| 234 | This enumeration represents the state of a particular BVN component. |
|---|
| 235 | |
|---|
| 236 | Description: |
|---|
| 237 | BVDB_State_eNo - the BVN component is disabled. |
|---|
| 238 | BVDB_State_eYes - the BVN component is enabled. |
|---|
| 239 | BVDB_State_eNotApplicable - the BVN component is not applicable for the |
|---|
| 240 | usage mode it is used with. |
|---|
| 241 | |
|---|
| 242 | See Also: |
|---|
| 243 | BVDB_Anr, BVBD_CaptureFeeder, BVDB_Mad |
|---|
| 244 | ****************************************************************************/ |
|---|
| 245 | typedef enum |
|---|
| 246 | { |
|---|
| 247 | BVDB_State_eNo = 0, |
|---|
| 248 | BVDB_State_eYes, |
|---|
| 249 | BVDB_State_eNotApplicable |
|---|
| 250 | } BVDB_State; |
|---|
| 251 | |
|---|
| 252 | /*************************************************************************** |
|---|
| 253 | Summary: |
|---|
| 254 | This enumerates the supported source format sets. Each entry represents |
|---|
| 255 | several actual formats. Each usage mode entry must have this. |
|---|
| 256 | |
|---|
| 257 | Description: |
|---|
| 258 | |
|---|
| 259 | See Also: |
|---|
| 260 | BVDB_UsageMode |
|---|
| 261 | ****************************************************************************/ |
|---|
| 262 | typedef enum |
|---|
| 263 | { |
|---|
| 264 | BVDB_InputFormatGroup_eNtsc = 1, |
|---|
| 265 | BVDB_InputFormatGroup_ePal, |
|---|
| 266 | BVDB_InputFormatGroup_e480p, |
|---|
| 267 | BVDB_InputFormatGroup_e576p, |
|---|
| 268 | BVDB_InputFormatGroup_e720p_50, |
|---|
| 269 | BVDB_InputFormatGroup_e720p_60, |
|---|
| 270 | BVDB_InputFormatGroup_e1080i_50, |
|---|
| 271 | BVDB_InputFormatGroup_e1080i_60, |
|---|
| 272 | BVDB_InputFormatGroup_e1080p_24, |
|---|
| 273 | BVDB_InputFormatGroup_e1080p_25, |
|---|
| 274 | BVDB_InputFormatGroup_e1080p_30, |
|---|
| 275 | BVDB_InputFormatGroup_e1080p_50, |
|---|
| 276 | BVDB_InputFormatGroup_e1080p_60, |
|---|
| 277 | BVDB_InputFormatGroup_ePal_60, |
|---|
| 278 | BVDB_InputFormatGroup_e720p_24, |
|---|
| 279 | BVDB_InputFormatGroup_e720p_25, |
|---|
| 280 | BVDB_InputFormatGroup_e720p_30, |
|---|
| 281 | BVDB_InputFormatGroup_e544_576i_50 = 20, |
|---|
| 282 | BVDB_InputFormatGroup_e1440_1080i_50, |
|---|
| 283 | BVDB_InputFormatGroup_e1440_1080p_25, |
|---|
| 284 | BVDB_InputFormatGroup_e544_480i_60, |
|---|
| 285 | BVDB_InputFormatGroup_e1440_1080i_60, |
|---|
| 286 | BVDB_InputFormatGroup_e1440_1080p_30, |
|---|
| 287 | BVDB_InputFormatGroup_e1440_1080p_24, |
|---|
| 288 | BVDB_InputFormatGroup_e1024_768_60_PC = 30, |
|---|
| 289 | BVDB_InputFormatGroup_e1024_768_85_PC, |
|---|
| 290 | BVDB_InputFormatGroup_e1366_768_60_PC, |
|---|
| 291 | BVDB_InputFormatGroup_e1366_768_85_PC, |
|---|
| 292 | BVDB_InputFormatGroup_e1400_1050_60_PC, |
|---|
| 293 | BVDB_InputFormatGroup_e1400_1050_75_PC, |
|---|
| 294 | BVDB_InputFormatGroup_e1920_1080_60_PC, |
|---|
| 295 | BVDB_InputFormatGroup_e1600_1200_60_PC, |
|---|
| 296 | BVDB_InputFormatGroup_eAdcCalibration = 40, |
|---|
| 297 | BVDB_InputFormatGroup_eJpeg_540, |
|---|
| 298 | BVDB_InputFormatGroup_eJpeg_1080, |
|---|
| 299 | BVDB_InputFormatGroup_e1080p3d_24, |
|---|
| 300 | BVDB_InputFormatGroup_e1080p3d_30, |
|---|
| 301 | BVDB_InputFormatGroup_e720p3d_60, |
|---|
| 302 | BVDB_InputFormatGroup_e720p3d_50, |
|---|
| 303 | BVDB_InputFormatGroup_eInvalid |
|---|
| 304 | } BVDB_InputFormatGroup; |
|---|
| 305 | |
|---|
| 306 | |
|---|
| 307 | /* If a source is split, the split source groups will be added to the end */ |
|---|
| 308 | typedef enum |
|---|
| 309 | { |
|---|
| 310 | /* Compressed source */ |
|---|
| 311 | BVDB_SourceGroup_Avc_e576i = 1 << 0, /* Interlaced SD - 480i/576i*/ |
|---|
| 312 | BVDB_SourceGroup_Avc_e720p = 1 << 1, /* 480p, 576p, 720p */ |
|---|
| 313 | BVDB_SourceGroup_Avc_e1080i = 1 << 2, /* 1080i */ |
|---|
| 314 | BVDB_SourceGroup_Avc_e1080psf = 1 << 3, /* 1080p 24/25/30Hz */ |
|---|
| 315 | BVDB_SourceGroup_Avc_e1080p = 1 << 4, /* 1080p 50Hz and above */ |
|---|
| 316 | |
|---|
| 317 | /* All other non 444 sources */ |
|---|
| 318 | BVDB_SourceGroup_Rp_e576i = 1 << 5, /* Interlaced SD - 480i/576i*/ |
|---|
| 319 | BVDB_SourceGroup_Rp_e720p = 1 << 6, /* 480p, 576p, 720p */ |
|---|
| 320 | BVDB_SourceGroup_Rp_e1080i = 1 << 7, /* 1080i */ |
|---|
| 321 | BVDB_SourceGroup_Rp_e1080psf = 1 << 8, /* 1080p 24/25/30Hz */ |
|---|
| 322 | BVDB_SourceGroup_Rp_e1080p = 1 << 9, /* 1080p 50Hz and above */ |
|---|
| 323 | |
|---|
| 324 | BVDB_SourceGroup_Rp_e720p3d = 1 << 10, /* 720p 3D 50Hz and above */ |
|---|
| 325 | BVDB_SourceGroup_Rp_e720p3dDual = 1 << 11, /* 720p 3D 50Hz and above dual |
|---|
| 326 | path processing */ |
|---|
| 327 | BVDB_SourceGroup_Rp_e1080p3d = 1 << 12, /* 1080p 3D 50Hz and above */ |
|---|
| 328 | BVDB_SourceGroup_Rp_e1080p3dDual = 1 << 13, /* 1080p 3D 50Hz and above dual |
|---|
| 329 | path processing */ |
|---|
| 330 | |
|---|
| 331 | BVDB_SourceGroup_Rp_e1080i3d = 1 << 14, /* 1080i 3D 50Hz and above dual |
|---|
| 332 | path processing */ |
|---|
| 333 | BVDB_SourceGroup_Rp_e1080i3dDual = 1 << 15, /* 1080p 3D 50Hz and above */ |
|---|
| 334 | |
|---|
| 335 | /* PC is defined as a source with 444 chroma subsampling */ |
|---|
| 336 | BVDB_SourceGroup_ePc = 1 << 16,/* PC */ |
|---|
| 337 | |
|---|
| 338 | /* JPEG sources */ |
|---|
| 339 | BVDB_SourceGroup_eJpeg = 1 << 17,/* JPEG */ |
|---|
| 340 | |
|---|
| 341 | BVDB_SourceGroup_eAdcCalibration = 1 << 18 /* ADC Calibration */ |
|---|
| 342 | } BVDB_SourceGroup; |
|---|
| 343 | |
|---|
| 344 | |
|---|
| 345 | #define BVDB_SourceGroup_Any 0xffffffff |
|---|
| 346 | #define BVDB_SourceGroup_None 0 |
|---|
| 347 | #define BVDB_SourceGroup_Rp_Pc (BVDB_SourceGroup_Rp_e576i | \ |
|---|
| 348 | BVDB_SourceGroup_Rp_e720p | \ |
|---|
| 349 | BVDB_SourceGroup_Rp_e1080i | \ |
|---|
| 350 | BVDB_SourceGroup_Rp_e1080psf | \ |
|---|
| 351 | BVDB_SourceGroup_Rp_e1080p | \ |
|---|
| 352 | BVDB_SourceGroup_ePc) |
|---|
| 353 | |
|---|
| 354 | #define BVDB_SourceGroup_Rp (BVDB_SourceGroup_Rp_e576i | \ |
|---|
| 355 | BVDB_SourceGroup_Rp_e720p | \ |
|---|
| 356 | BVDB_SourceGroup_Rp_e1080i | \ |
|---|
| 357 | BVDB_SourceGroup_Rp_e1080psf | \ |
|---|
| 358 | BVDB_SourceGroup_Rp_e1080p) |
|---|
| 359 | |
|---|
| 360 | |
|---|
| 361 | #define BVDB_SourceGroup_Avc (BVDB_SourceGroup_Avc_e576i | \ |
|---|
| 362 | BVDB_SourceGroup_Avc_e720p | \ |
|---|
| 363 | BVDB_SourceGroup_Avc_e1080i | \ |
|---|
| 364 | BVDB_SourceGroup_Avc_e1080psf | \ |
|---|
| 365 | BVDB_SourceGroup_Avc_e1080p) |
|---|
| 366 | |
|---|
| 367 | #define BVDB_SourceGroup_Avc_no1080p (BVDB_SourceGroup_Avc_e576i | \ |
|---|
| 368 | BVDB_SourceGroup_Avc_e720p | \ |
|---|
| 369 | BVDB_SourceGroup_Avc_e1080i | \ |
|---|
| 370 | BVDB_SourceGroup_Avc_e1080psf) |
|---|
| 371 | |
|---|
| 372 | #define BVDB_SourceGroup_3d (BVDB_SourceGroup_Rp_e720p3d | \ |
|---|
| 373 | BVDB_SourceGroup_Rp_e1080p3d | \ |
|---|
| 374 | BVDB_SourceGroup_Rp_e1080i3d) |
|---|
| 375 | |
|---|
| 376 | #define BVDB_SourceGroup_3dDual (BVDB_SourceGroup_Rp_e720p3dDual | \ |
|---|
| 377 | BVDB_SourceGroup_Rp_e1080p3dDual | \ |
|---|
| 378 | BVDB_SourceGroup_Rp_e1080i3dDual) |
|---|
| 379 | |
|---|
| 380 | typedef struct |
|---|
| 381 | { |
|---|
| 382 | BVDB_InputFormatGroup oldFormat; |
|---|
| 383 | bool bMfdSource; |
|---|
| 384 | BVDB_SourceGroup newFormat; |
|---|
| 385 | } BVDB_P_MapToNewSourceGroup; |
|---|
| 386 | |
|---|
| 387 | |
|---|
| 388 | |
|---|
| 389 | typedef enum |
|---|
| 390 | { |
|---|
| 391 | BVDB_DisplayMode_Full = 1 << 0, |
|---|
| 392 | BVDB_DisplayMode_Pig = 1 << 1, |
|---|
| 393 | BVDB_DisplayMode_Mheg = 1 << 2, |
|---|
| 394 | BVDB_DisplayMode_Pbp = 1 << 3 |
|---|
| 395 | } BVDB_P_DisplayMode; |
|---|
| 396 | |
|---|
| 397 | #define BVDB_DisplayMode_Any 0xffffffff |
|---|
| 398 | |
|---|
| 399 | /*************************************************************************** |
|---|
| 400 | Summary: |
|---|
| 401 | This enumerates the supported display types. Each usage mode entry must |
|---|
| 402 | have this. |
|---|
| 403 | |
|---|
| 404 | Description: |
|---|
| 405 | |
|---|
| 406 | See Also: |
|---|
| 407 | BVDB_UsageMode |
|---|
| 408 | ****************************************************************************/ |
|---|
| 409 | typedef enum |
|---|
| 410 | { |
|---|
| 411 | BVDB_Display_ePrimary24 = 0, |
|---|
| 412 | BVDB_Display_ePrimary48, |
|---|
| 413 | BVDB_Display_ePrimary50, |
|---|
| 414 | BVDB_Display_ePrimary60, |
|---|
| 415 | BVDB_Display_eSecondary50, |
|---|
| 416 | BVDB_Display_eSecondary60, |
|---|
| 417 | BVDB_Display_eInvalid |
|---|
| 418 | } BVDB_DisplayType; |
|---|
| 419 | |
|---|
| 420 | /*************************************************************************** |
|---|
| 421 | Summary: |
|---|
| 422 | This enumerates the supported output resolutions. Each usage mode entry must |
|---|
| 423 | have this. |
|---|
| 424 | |
|---|
| 425 | Description: |
|---|
| 426 | |
|---|
| 427 | See Also: |
|---|
| 428 | BVDB_UsageMode |
|---|
| 429 | ****************************************************************************/ |
|---|
| 430 | |
|---|
| 431 | |
|---|
| 432 | typedef enum |
|---|
| 433 | { |
|---|
| 434 | BVDB_OutputResolution_eInvalid = 0, |
|---|
| 435 | BVDB_OutputResolution_e1080p = 1 << 0, |
|---|
| 436 | BVDB_OutputResolution_eWxga = 1 << 1, |
|---|
| 437 | BVDB_OutputResolution_e1080i = 1 << 2, |
|---|
| 438 | BVDB_OutputResolution_e720p = 1 << 3, |
|---|
| 439 | BVDB_OutputResolution_eXga = 1 << 4, |
|---|
| 440 | BVDB_OutputResolution_e480p = 1 << 5, |
|---|
| 441 | BVDB_OutputResolution_e576p = 1 << 6, |
|---|
| 442 | BVDB_OutputResolution_e480i = 1 << 7, |
|---|
| 443 | BVDB_OutputResolution_e576i = 1 << 8, |
|---|
| 444 | BVDB_OutputResolution_e1920x2160i = 1 << 9, |
|---|
| 445 | BVDB_OutputResolution_e1280x1440p = 1 << 10, |
|---|
| 446 | BVDB_OutputResolution_e1920x2205p = 1 << 11, |
|---|
| 447 | BVDB_OutputResolution_e1280x1470p = 1 << 12 |
|---|
| 448 | } BVDB_OutputResolution; |
|---|
| 449 | |
|---|
| 450 | #define BVDB_OutputResolution_Any 0xffffffff |
|---|
| 451 | |
|---|
| 452 | /*************************************************************************** |
|---|
| 453 | Summary: |
|---|
| 454 | This enumerates the supported aspect ratios. |
|---|
| 455 | |
|---|
| 456 | Description: |
|---|
| 457 | |
|---|
| 458 | See Also: |
|---|
| 459 | BVDB_UsageMode |
|---|
| 460 | ****************************************************************************/ |
|---|
| 461 | typedef enum |
|---|
| 462 | { |
|---|
| 463 | BVDB_AspectRatio_e4_3 = 0, |
|---|
| 464 | BVDB_AspectRatio_e5_4, |
|---|
| 465 | BVDB_AspectRatio_e15_9, |
|---|
| 466 | BVDB_AspectRatio_e16_9, |
|---|
| 467 | BVDB_AspectRatio_eAllSrc, |
|---|
| 468 | BVDB_AspectRatio_eAllDest, |
|---|
| 469 | BVDB_AspectRatio_eCustom, |
|---|
| 470 | BVDB_AspectRatio_eBypass, |
|---|
| 471 | BVDB_AspectRatio_eInvalid |
|---|
| 472 | } BVDB_AspectRatio; |
|---|
| 473 | |
|---|
| 474 | /*************************************************************************** |
|---|
| 475 | Summary: |
|---|
| 476 | This describes the display configuration for the specified usage mode. |
|---|
| 477 | |
|---|
| 478 | Description: |
|---|
| 479 | |
|---|
| 480 | See Also: |
|---|
| 481 | BVDB_UsageMode, BVDB_DisplayType, BVDB_AspectRatio |
|---|
| 482 | ****************************************************************************/ |
|---|
| 483 | typedef struct |
|---|
| 484 | { |
|---|
| 485 | BVDB_DisplayType eType; |
|---|
| 486 | BVDB_OutputResolution eResolution; |
|---|
| 487 | BVDB_AspectRatio eAspectRatio; |
|---|
| 488 | } BVDB_Display; |
|---|
| 489 | |
|---|
| 490 | /*************************************************************************** |
|---|
| 491 | Summary: |
|---|
| 492 | This enumerates the supported windows. Each usage mode entry must |
|---|
| 493 | have this. |
|---|
| 494 | |
|---|
| 495 | Description: |
|---|
| 496 | |
|---|
| 497 | See Also: |
|---|
| 498 | BVDB_UsageMode |
|---|
| 499 | ****************************************************************************/ |
|---|
| 500 | typedef enum |
|---|
| 501 | { |
|---|
| 502 | BVDB_Window_eMain = 0, |
|---|
| 503 | BVDB_Window_ePip, |
|---|
| 504 | BVDB_Window_eMonitor, |
|---|
| 505 | BVDB_Window_eInvalid |
|---|
| 506 | } BVDB_Window; |
|---|
| 507 | |
|---|
| 508 | /*************************************************************************** |
|---|
| 509 | Summary: |
|---|
| 510 | This enumerates the supported intputs. Each usage mode entry must |
|---|
| 511 | have this. |
|---|
| 512 | |
|---|
| 513 | Description: |
|---|
| 514 | |
|---|
| 515 | See Also: |
|---|
| 516 | BVDB_UsageMode |
|---|
| 517 | ****************************************************************************/ |
|---|
| 518 | typedef enum |
|---|
| 519 | { |
|---|
| 520 | BVDB_Input_eCvbsSvidIfd = 0, |
|---|
| 521 | BVDB_Input_eComponent, |
|---|
| 522 | BVDB_Input_eHdDvi, |
|---|
| 523 | BVDB_Input_eMfd, |
|---|
| 524 | BVDB_Input_eVga, |
|---|
| 525 | BVDB_Input_e656, |
|---|
| 526 | BVDB_Input_eInvalid |
|---|
| 527 | } BVDB_Input; |
|---|
| 528 | |
|---|
| 529 | /*************************************************************************** |
|---|
| 530 | Summary: |
|---|
| 531 | This enumerates the supported deinterlacer field store count. This is |
|---|
| 532 | used with BVDB_Mad only. |
|---|
| 533 | |
|---|
| 534 | Description: |
|---|
| 535 | |
|---|
| 536 | See Also: |
|---|
| 537 | BVDB_Mad, BVDB_UsageMode |
|---|
| 538 | ****************************************************************************/ |
|---|
| 539 | typedef enum |
|---|
| 540 | { |
|---|
| 541 | BVDB_FieldStore_e5Fields, |
|---|
| 542 | BVDB_FieldStore_e4Fields, |
|---|
| 543 | BVDB_FieldStore_e3Fields, |
|---|
| 544 | BVDB_FieldStore_eNotApplicable |
|---|
| 545 | } BVDB_DeinterlacerFieldStore; |
|---|
| 546 | |
|---|
| 547 | |
|---|
| 548 | /*************************************************************************** |
|---|
| 549 | Summary: |
|---|
| 550 | This enumerates the SCL-CAP bias used for orienting the Scaler relative |
|---|
| 551 | to the Capture block |
|---|
| 552 | |
|---|
| 553 | Description: |
|---|
| 554 | |
|---|
| 555 | BVDB_SclCapBias_eAuto - indicates the VDC will determine the orientation |
|---|
| 556 | automatically given certain parameters |
|---|
| 557 | BVDB_SclCapBias_eSclCap - indicates a SCL-CAP orientation bias |
|---|
| 558 | BVDB_SclCapBias_eCapScl - indicates a CAP-SCL orientation bias |
|---|
| 559 | See Also: |
|---|
| 560 | BVDB_UsageMode |
|---|
| 561 | ****************************************************************************/ |
|---|
| 562 | typedef enum |
|---|
| 563 | { |
|---|
| 564 | BVDB_SclCapBias_eAuto = 0, |
|---|
| 565 | BVDB_SclCapBias_eSclCap, |
|---|
| 566 | BVDB_SclCapBias_eCapScl, |
|---|
| 567 | BVDB_SclCapBias_eInvalid |
|---|
| 568 | } BVDB_ScalerCaptureBias; |
|---|
| 569 | |
|---|
| 570 | |
|---|
| 571 | /*************************************************************************** |
|---|
| 572 | Summary: |
|---|
| 573 | This enumerates the maximum size of OSD that can be used for the |
|---|
| 574 | specified usage mode. |
|---|
| 575 | |
|---|
| 576 | Description: |
|---|
| 577 | The difference between BVDB_Osd_eNone and BVDB_Osd_eInvalid is that |
|---|
| 578 | BVDB_Osd_None means OSD is possible with the usage mode but is disabled. |
|---|
| 579 | |
|---|
| 580 | See Also: |
|---|
| 581 | BVDB_UsageMode |
|---|
| 582 | ****************************************************************************/ |
|---|
| 583 | typedef enum |
|---|
| 584 | { |
|---|
| 585 | BVDB_Osd_e1920_1080p_32bpp = 0, |
|---|
| 586 | BVDB_Osd_e1920_2205p_32bpp, |
|---|
| 587 | BVDB_Osd_e1366_1080p_32bpp, |
|---|
| 588 | BVDB_Osd_e960_1080p_32bpp, |
|---|
| 589 | BVDB_Osd_e1366_768p_32bpp, |
|---|
| 590 | BVDB_Osd_e1280_1080p_32bpp, |
|---|
| 591 | BVDB_Osd_e1280_800p_32bpp, |
|---|
| 592 | BVDB_Osd_e1280_720p_32bpp, |
|---|
| 593 | BVDB_Osd_e1024_768p_32bpp, |
|---|
| 594 | BVDB_Osd_e720_1080p_32bpp, |
|---|
| 595 | BVDB_Osd_e960_540p_32bpp, |
|---|
| 596 | BVDB_Osd_e720_720p_32bpp, |
|---|
| 597 | BVDB_Osd_e720_480p_32bpp, |
|---|
| 598 | BVDB_Osd_e720_576p_32bpp, |
|---|
| 599 | BVDB_Osd_e480i_8bpp, |
|---|
| 600 | BVDB_Osd_e576i_8bpp, |
|---|
| 601 | BVDB_Osd_eNone, |
|---|
| 602 | BVDB_Osd_eInvalid |
|---|
| 603 | } BVDB_Osd; |
|---|
| 604 | |
|---|
| 605 | /*************************************************************************** |
|---|
| 606 | Summary: |
|---|
| 607 | This enumerates the pixel formats supported. Applies to BVBD_Mad, |
|---|
| 608 | BVBD_CaptureFeeder, and BVDB_Anr. |
|---|
| 609 | |
|---|
| 610 | Description: |
|---|
| 611 | |
|---|
| 612 | See Also: |
|---|
| 613 | BVDB_Mad, BVBD_CaptureFeeder, BVDB_Anr |
|---|
| 614 | ****************************************************************************/ |
|---|
| 615 | typedef enum |
|---|
| 616 | { |
|---|
| 617 | BVDB_PixelFmt_e8Bit422 = 0, |
|---|
| 618 | BVDB_PixelFmt_e10Bit422, |
|---|
| 619 | BVDB_PixelFmt_e10Bit444, |
|---|
| 620 | BVDB_PixelFmt_eInvalid |
|---|
| 621 | } BVDB_PixelFormat; |
|---|
| 622 | |
|---|
| 623 | |
|---|
| 624 | /*************************************************************************** |
|---|
| 625 | Summary: |
|---|
| 626 | This describes the OSD setting for the specified usage mode. |
|---|
| 627 | |
|---|
| 628 | Description: |
|---|
| 629 | eOsd - the OSD type |
|---|
| 630 | ulReserved - reserved |
|---|
| 631 | |
|---|
| 632 | See Also: |
|---|
| 633 | BVDB_UsageMode, BVDB_Osd |
|---|
| 634 | ****************************************************************************/ |
|---|
| 635 | typedef struct |
|---|
| 636 | { |
|---|
| 637 | BVDB_Osd eOsd; |
|---|
| 638 | uint32_t ulReserved; |
|---|
| 639 | } BVDB_OsdInfo; |
|---|
| 640 | |
|---|
| 641 | /*************************************************************************** |
|---|
| 642 | Summary: |
|---|
| 643 | This describes the ANR configuration for the specified usage mode. |
|---|
| 644 | |
|---|
| 645 | Description: |
|---|
| 646 | eState - whether ANR is enabled or not |
|---|
| 647 | ePixelFormat - the ANR buffer's pixel format. |
|---|
| 648 | eReserved - for future use |
|---|
| 649 | |
|---|
| 650 | See Also: |
|---|
| 651 | BVDB_UsageMode, BVDB_PixelFormat, BVDB_State |
|---|
| 652 | ****************************************************************************/ |
|---|
| 653 | typedef struct |
|---|
| 654 | { |
|---|
| 655 | BVDB_State eState; |
|---|
| 656 | BVDB_PixelFormat ePixelFormat; |
|---|
| 657 | uint32_t ulReserved; |
|---|
| 658 | } BVDB_Anr; |
|---|
| 659 | |
|---|
| 660 | /*************************************************************************** |
|---|
| 661 | Summary: |
|---|
| 662 | This describes the CAP/VFD configuration for the specified usage mode. |
|---|
| 663 | |
|---|
| 664 | Description: |
|---|
| 665 | eState - whether capture is enabled or not |
|---|
| 666 | ePixelFormat - the capture buffer's pixel format |
|---|
| 667 | eReserved - for future use |
|---|
| 668 | |
|---|
| 669 | See Also: |
|---|
| 670 | BVDB_UsageMode, BVDB_PixelFormat, BVDB_State |
|---|
| 671 | ****************************************************************************/ |
|---|
| 672 | typedef struct |
|---|
| 673 | { |
|---|
| 674 | BVDB_State eState; |
|---|
| 675 | BVDB_PixelFormat ePixelFormat; |
|---|
| 676 | uint32_t ulReserved; |
|---|
| 677 | } BVDB_CaptureFeeder; |
|---|
| 678 | |
|---|
| 679 | /*************************************************************************** |
|---|
| 680 | Summary: |
|---|
| 681 | This describes the MAD configuration for the specified usage mode. |
|---|
| 682 | Note that MAD refers to MCVP in 35230 |
|---|
| 683 | |
|---|
| 684 | Description: |
|---|
| 685 | eState - whether MAD is enabled or not |
|---|
| 686 | eFieldStore - the max number of MAD fields |
|---|
| 687 | ePixelFormat - the MAD buffer's pixel format. |
|---|
| 688 | eReserved - for future use |
|---|
| 689 | |
|---|
| 690 | See Also: |
|---|
| 691 | BVDB_UsageMode, BVDB_PixelFormat, BVDB_State, BVDB_DeinterlacerFieldStore |
|---|
| 692 | ****************************************************************************/ |
|---|
| 693 | typedef struct |
|---|
| 694 | { |
|---|
| 695 | BVDB_State eState; |
|---|
| 696 | BVDB_DeinterlacerFieldStore eFieldStore; |
|---|
| 697 | BVDB_PixelFormat ePixelFormat; |
|---|
| 698 | uint32_t ulReserved; |
|---|
| 699 | } BVDB_Mad; |
|---|
| 700 | |
|---|
| 701 | |
|---|
| 702 | /*************************************************************************** |
|---|
| 703 | Summary: |
|---|
| 704 | This describes the PDP configuration for the specified usage mode. |
|---|
| 705 | |
|---|
| 706 | Description: |
|---|
| 707 | eState - whether PDP is enabled or not |
|---|
| 708 | eReserved - for future use |
|---|
| 709 | |
|---|
| 710 | See Also: |
|---|
| 711 | BVDB_UsageMode, BVDB_PixelFormat, BVDB_State |
|---|
| 712 | ****************************************************************************/ |
|---|
| 713 | typedef struct |
|---|
| 714 | { |
|---|
| 715 | BVDB_State eState; |
|---|
| 716 | uint32_t ulReserved; |
|---|
| 717 | } BVDB_Pdp; |
|---|
| 718 | |
|---|
| 719 | |
|---|
| 720 | /*************************************************************************** |
|---|
| 721 | Summary: |
|---|
| 722 | This describes the FRC configuration for the specified usage mode. |
|---|
| 723 | |
|---|
| 724 | Description: |
|---|
| 725 | eState - whether FRC is enabled or not |
|---|
| 726 | eReserved - for future use |
|---|
| 727 | |
|---|
| 728 | See Also: |
|---|
| 729 | BVDB_UsageMode, BVDB_PixelFormat, BVDB_State |
|---|
| 730 | ****************************************************************************/ |
|---|
| 731 | typedef struct |
|---|
| 732 | { |
|---|
| 733 | BVDB_State eState; |
|---|
| 734 | uint32_t ulReserved; |
|---|
| 735 | } BVDB_Frc; |
|---|
| 736 | |
|---|
| 737 | |
|---|
| 738 | |
|---|
| 739 | /*************************************************************************** |
|---|
| 740 | Summary: |
|---|
| 741 | This contains the ID and the RTS register value for a given SCB client. |
|---|
| 742 | |
|---|
| 743 | Description: |
|---|
| 744 | ulId - the client ID |
|---|
| 745 | ulRegValue - the value to be written to the client's SCB register |
|---|
| 746 | |
|---|
| 747 | See Also: |
|---|
| 748 | BVDB_RtsTable |
|---|
| 749 | ****************************************************************************/ |
|---|
| 750 | typedef struct |
|---|
| 751 | { |
|---|
| 752 | uint32_t ulId; |
|---|
| 753 | uint32_t ulRegValue; |
|---|
| 754 | } BVDB_Rts; |
|---|
| 755 | |
|---|
| 756 | /*************************************************************************** |
|---|
| 757 | Summary: |
|---|
| 758 | This contains the table of SCB client's RTS values. A usage mode has this. |
|---|
| 759 | Certain usage modes do not have this and are marked as n/a since the |
|---|
| 760 | clients for that particular usage modes do not requirea new RTS setting. |
|---|
| 761 | |
|---|
| 762 | Description: |
|---|
| 763 | ulValidTableEntries - the number of valid entries in the table. |
|---|
| 764 | astRts - the table of SCB client's RTS values |
|---|
| 765 | |
|---|
| 766 | See Also: |
|---|
| 767 | BVDB_Rts, BVDB_RTS_TABLE_SIZE |
|---|
| 768 | ****************************************************************************/ |
|---|
| 769 | typedef struct |
|---|
| 770 | { |
|---|
| 771 | uint32_t ulRtsRegisterTableId; |
|---|
| 772 | uint32_t ulValidTableEntries; |
|---|
| 773 | BVDB_Rts astRts[BVDB_RTS_TABLE_SIZE]; |
|---|
| 774 | } BVDB_RtsTable; |
|---|
| 775 | |
|---|
| 776 | /*************************************************************************** |
|---|
| 777 | Summary: |
|---|
| 778 | Usage Mode database record. |
|---|
| 779 | |
|---|
| 780 | Description: |
|---|
| 781 | This is the structure used for database entries (record). |
|---|
| 782 | |
|---|
| 783 | See Also: |
|---|
| 784 | |
|---|
| 785 | ***************************************************************************/ |
|---|
| 786 | typedef struct BVDB_UsageMode |
|---|
| 787 | { |
|---|
| 788 | uint32_t usageId; |
|---|
| 789 | BVDB_InputFormatGroup eInputFormatGroup; |
|---|
| 790 | BVDB_Display stDisplay; |
|---|
| 791 | BVDB_Window eWindow; |
|---|
| 792 | BVDB_Input eInput; |
|---|
| 793 | BVDB_P_DisplayMode eDisplayMode; |
|---|
| 794 | uint32_t ulDisplayModeNum; |
|---|
| 795 | BVDB_OsdInfo stOsd; |
|---|
| 796 | BVDB_State e3dComb; |
|---|
| 797 | BVDB_State eOversample; |
|---|
| 798 | BVDB_State eDnr; |
|---|
| 799 | BVDB_Anr stAnr; |
|---|
| 800 | BVDB_CaptureFeeder stCapVfd; |
|---|
| 801 | BVDB_Mad stMad; /* it refers to MCVP in 35230 */ |
|---|
| 802 | BVDB_Pdp stPdp; |
|---|
| 803 | BVDB_Frc stFrc; |
|---|
| 804 | BVDB_RtsTable *pRtsSet; |
|---|
| 805 | uint32_t ulSclCapTolerance; /* This must be divided |
|---|
| 806 | by BVDB_SCL_CAP_TOLERANCE_FACTOR to get |
|---|
| 807 | the actual value. */ |
|---|
| 808 | BVDB_ScalerCaptureBias eSclCapBias; |
|---|
| 809 | bool b3dDualPathProcessing; |
|---|
| 810 | } BVDB_UsageMode; |
|---|
| 811 | |
|---|
| 812 | /*************************************************************************** |
|---|
| 813 | Summary: |
|---|
| 814 | This structure describes the memory allocation requirements for a given |
|---|
| 815 | window heap. |
|---|
| 816 | |
|---|
| 817 | Description: |
|---|
| 818 | BVDB_Heap_Settings is a structure that use to describe the public |
|---|
| 819 | settings of a window heap. |
|---|
| 820 | |
|---|
| 821 | ulBufferCnt_2HD - |
|---|
| 822 | The number of double HD buffers required. |
|---|
| 823 | |
|---|
| 824 | ePixelFormat_2HD - |
|---|
| 825 | The pixel format for double HD buffer. |
|---|
| 826 | |
|---|
| 827 | eBufferFormat_2HD - |
|---|
| 828 | The double HD buffer format. This is typically BFMT_VideoFmt_e1080p_30Hz. |
|---|
| 829 | |
|---|
| 830 | ulBufferCnt_2HD_Pip - |
|---|
| 831 | The numbfer 2HD PIP buffers required. This max PIP size |
|---|
| 832 | is 1/4 of 2HD buffers. Only PIP windows smaller or equal to 1/4 2HD |
|---|
| 833 | buffer size can use these buffers. PIP windows bigger than 1/4 of 2HD |
|---|
| 834 | buffer size needs to use 2HD buffers. |
|---|
| 835 | |
|---|
| 836 | ulBufferCnt_HD - |
|---|
| 837 | The number of HD buffers required. |
|---|
| 838 | |
|---|
| 839 | ePixelFormat_HD - |
|---|
| 840 | The pixel format for single HD buffer. |
|---|
| 841 | |
|---|
| 842 | eBufferFormat_HD - |
|---|
| 843 | The HD buffer format. Typically this is BFMT_VideoFmt_e1080i. |
|---|
| 844 | |
|---|
| 845 | ulBufferCnt_HD_Pip - |
|---|
| 846 | The number HD PIP buffers required. This max PIP size |
|---|
| 847 | is 1/4 of HD buffers. Only PIP windows smaller or equal to 1/4 HD |
|---|
| 848 | buffer size can use these buffers. PIP windows bigger than 1/4 of HD |
|---|
| 849 | buffer size needs to use HD buffers. |
|---|
| 850 | |
|---|
| 851 | ulBufferCnt_SD - |
|---|
| 852 | The number of SD buffers required. |
|---|
| 853 | |
|---|
| 854 | ePixelFormat_SD - |
|---|
| 855 | The pixel format for SD buffer. |
|---|
| 856 | |
|---|
| 857 | eBufferFormat_SD - |
|---|
| 858 | The SD buffer format. This is typically BFMT_VideoFmt_ePAL_G. |
|---|
| 859 | |
|---|
| 860 | |
|---|
| 861 | See Also: |
|---|
| 862 | BVDB_GetMemoryAllocation |
|---|
| 863 | ***************************************************************************/ |
|---|
| 864 | typedef struct |
|---|
| 865 | { |
|---|
| 866 | /* Double HD Buffer settings */ |
|---|
| 867 | uint32_t ulBufferCnt_2HD; |
|---|
| 868 | BPXL_Format ePixelFormat_2HD; |
|---|
| 869 | BFMT_VideoFmt eBufferFormat_2HD; |
|---|
| 870 | uint32_t ulBufferCnt_2HD_Pip; |
|---|
| 871 | |
|---|
| 872 | /* HD Buffer settings */ |
|---|
| 873 | uint32_t ulBufferCnt_HD; |
|---|
| 874 | BPXL_Format ePixelFormat_HD; |
|---|
| 875 | BFMT_VideoFmt eBufferFormat_HD; |
|---|
| 876 | uint32_t ulBufferCnt_HD_Pip; |
|---|
| 877 | |
|---|
| 878 | /* SD Buffer settings */ |
|---|
| 879 | uint32_t ulBufferCnt_SD; |
|---|
| 880 | BPXL_Format ePixelFormat_SD; |
|---|
| 881 | BFMT_VideoFmt eBufferFormat_SD; |
|---|
| 882 | uint32_t ulBufferCnt_SD_Pip; |
|---|
| 883 | |
|---|
| 884 | }BVDB_Heap_Settings; |
|---|
| 885 | |
|---|
| 886 | |
|---|
| 887 | /*************************************************************************** |
|---|
| 888 | Summary: |
|---|
| 889 | This structure describes the supported feature set of the selected RTS |
|---|
| 890 | configuration. |
|---|
| 891 | |
|---|
| 892 | Description: |
|---|
| 893 | bPipSupport - true if PIP is supported |
|---|
| 894 | bMonitorSupport - true if monitor output is supported |
|---|
| 895 | bFrcSupport - true if FRC is supported |
|---|
| 896 | bRtcSupport - true if RTS is supported |
|---|
| 897 | bPanelReversalSupport - true if panel reversal supported |
|---|
| 898 | |
|---|
| 899 | worstPdpBpp - largest bpp of FRC block |
|---|
| 900 | maxPipWinHeight - maximum PIP window height if bPipSupport is true. |
|---|
| 901 | maxPipWinWidth - maximum PIP window width if bPipSupport is true. |
|---|
| 902 | |
|---|
| 903 | See Also: |
|---|
| 904 | None |
|---|
| 905 | ***************************************************************************/ |
|---|
| 906 | typedef struct |
|---|
| 907 | { |
|---|
| 908 | bool bPipSupport; |
|---|
| 909 | bool bMonitorSupport; |
|---|
| 910 | bool bFrcSupport; |
|---|
| 911 | bool bRtcSupport; |
|---|
| 912 | bool bPanelReversalSupport; |
|---|
| 913 | uint32_t worstPdpBpp; |
|---|
| 914 | uint32_t maxPipWinHeight; |
|---|
| 915 | uint32_t maxPipWinWidth; |
|---|
| 916 | } BVDB_Config_Features; |
|---|
| 917 | |
|---|
| 918 | |
|---|
| 919 | /*************************************************************************** |
|---|
| 920 | Summary: |
|---|
| 921 | This enum determines pixel format to use. |
|---|
| 922 | |
|---|
| 923 | BVDB_PixelMode_eByRtsTable - the pixel format in the RTS table to used |
|---|
| 924 | BVDB_PixelMode_e422Forced - regardless of the pixel format of the selected |
|---|
| 925 | usgae mode, a usage mode with 422 will replace |
|---|
| 926 | it |
|---|
| 927 | BVDB_PixelMode_e444Forced; - regardless of the pixel format of the selected |
|---|
| 928 | usage mode, a usage mode with 444 will replace |
|---|
| 929 | it. |
|---|
| 930 | **************************************************************************/ |
|---|
| 931 | typedef enum |
|---|
| 932 | { |
|---|
| 933 | BVDB_PixelMode_eByRtsTable = 0, |
|---|
| 934 | BVDB_PixelMode_e422Forced, |
|---|
| 935 | BVDB_PixelMode_e444Forced |
|---|
| 936 | } BVDB_PixelMode; |
|---|
| 937 | |
|---|
| 938 | /*************************************************************************** |
|---|
| 939 | Summary: |
|---|
| 940 | This structure describes the current system configurations determined by |
|---|
| 941 | either internal operations or app. |
|---|
| 942 | |
|---|
| 943 | bPipVisible - true if currently PIP window is visible |
|---|
| 944 | bPanelReversed - true if currently the system has panel reversal |
|---|
| 945 | b3dDualPathProcessing - true if 3D source is required processed in dual |
|---|
| 946 | paths |
|---|
| 947 | ePixelMode - selects pixel format to use |
|---|
| 948 | **************************************************************************/ |
|---|
| 949 | typedef struct |
|---|
| 950 | { |
|---|
| 951 | bool bPipVisible; |
|---|
| 952 | bool bPanelReversed; |
|---|
| 953 | bool b3dDualPathProcessing; |
|---|
| 954 | BVDB_PixelMode ePixelMode; |
|---|
| 955 | } BVDB_System_Configurations; |
|---|
| 956 | |
|---|
| 957 | |
|---|
| 958 | /*************************************************************************** |
|---|
| 959 | Summary: |
|---|
| 960 | Video Usage Modes Database (VDB) context handle. |
|---|
| 961 | |
|---|
| 962 | Description: |
|---|
| 963 | This is a handle that the application created with BVDB_CreateVdb. |
|---|
| 964 | BVDB_Handle holds the context of the VDB. There should only one |
|---|
| 965 | BVDB_Handle at any given instant. The main VDB handle is use to add, |
|---|
| 966 | delete, and query databse entries. |
|---|
| 967 | |
|---|
| 968 | See Also: |
|---|
| 969 | BVDB_CreateVdb, BVDB_DestroyVdb. |
|---|
| 970 | ***************************************************************************/ |
|---|
| 971 | typedef struct BVDB_P_Context *BVDB_Handle; |
|---|
| 972 | |
|---|
| 973 | |
|---|
| 974 | /*************************************************************************** |
|---|
| 975 | Summary: |
|---|
| 976 | Creates the database. The database is created using a generated C file |
|---|
| 977 | that contains all the usage modes an their information. |
|---|
| 978 | |
|---|
| 979 | Input: |
|---|
| 980 | |
|---|
| 981 | Output: |
|---|
| 982 | phVdb - the VDB handle |
|---|
| 983 | pulEntries - obsolete |
|---|
| 984 | |
|---|
| 985 | Returns: |
|---|
| 986 | BERR_INVALID_PARAMETER - Invalid function parameters. |
|---|
| 987 | BERR_SUCCESS - Function succeed |
|---|
| 988 | |
|---|
| 989 | See Also: |
|---|
| 990 | BVDB_WriteVdbFile |
|---|
| 991 | **************************************************************************/ |
|---|
| 992 | BERR_Code BVDB_CreateVdb |
|---|
| 993 | ( BVDB_Handle *phVdb, |
|---|
| 994 | uint32_t *pulEntries); |
|---|
| 995 | |
|---|
| 996 | |
|---|
| 997 | /*************************************************************************** |
|---|
| 998 | Summary: |
|---|
| 999 | Destroys the database. |
|---|
| 1000 | |
|---|
| 1001 | Input: |
|---|
| 1002 | hVDb - the VDB handle |
|---|
| 1003 | |
|---|
| 1004 | Returns: |
|---|
| 1005 | BERR_INVALID_PARAMETER - Invalid function parameters. |
|---|
| 1006 | BERR_SUCCESS - Function succeed |
|---|
| 1007 | |
|---|
| 1008 | See Also: |
|---|
| 1009 | BVDB_CreateVdb |
|---|
| 1010 | **************************************************************************/ |
|---|
| 1011 | BERR_Code BVDB_DestroyVdb |
|---|
| 1012 | ( BVDB_Handle hVdb ); |
|---|
| 1013 | |
|---|
| 1014 | |
|---|
| 1015 | /*************************************************************************** |
|---|
| 1016 | Summary: |
|---|
| 1017 | Gets a VDB entry based on the Config #, Input Format Group, Display, |
|---|
| 1018 | Window, Input, OSD, and Video Display usage mode. This function takes |
|---|
| 1019 | in a BVDB_Usage mode structure partially filled with the required info. |
|---|
| 1020 | It will then be completely filled if the usage mode requested is found. |
|---|
| 1021 | Otherwise an error will be returned. |
|---|
| 1022 | |
|---|
| 1023 | Description: |
|---|
| 1024 | Example on filling the required fields: |
|---|
| 1025 | |
|---|
| 1026 | strcpy(pstUsageMode->acId, "1"); configuration 1 |
|---|
| 1027 | pstUsageMode->eInputFormatGroup = BVDB_InputFormatGroup_eNTSC; |
|---|
| 1028 | pstUsageMode->eDisplay = BVDB_Display_ePrimary60; |
|---|
| 1029 | pstUsageMode->eWindow = BVDB_Window_eMain; |
|---|
| 1030 | pstUsageMode->eIput = BVDB_Input_eComponent; |
|---|
| 1031 | pstUsageMode->eOsd = BVDB_Osd_e1920_1080p_32bpp |
|---|
| 1032 | pstUsageMode->stDisplayMode = 0x3f; "all_FULL_modes" |
|---|
| 1033 | |
|---|
| 1034 | err = BVDB_GetVdbEntry(hVdb, pstUsageMode); |
|---|
| 1035 | |
|---|
| 1036 | Input: |
|---|
| 1037 | hVdb - the VDB handle |
|---|
| 1038 | pstUsageMode - the usage mode with the required info |
|---|
| 1039 | pstSysConfig - current system configurations that VDB needs |
|---|
| 1040 | to use |
|---|
| 1041 | |
|---|
| 1042 | Output: |
|---|
| 1043 | pstUsageMode - the usage mode with the required info plus |
|---|
| 1044 | the remaining info, if found |
|---|
| 1045 | Returns: |
|---|
| 1046 | BERR_INVALID_PARAMETER - Invalid function parameters. |
|---|
| 1047 | BERR_SUCCESS - Function succeed |
|---|
| 1048 | |
|---|
| 1049 | See Also: |
|---|
| 1050 | |
|---|
| 1051 | **************************************************************************/ |
|---|
| 1052 | BERR_Code BVDB_GetVdbEntry |
|---|
| 1053 | ( BVDB_Handle hVdb, |
|---|
| 1054 | BVDB_UsageMode *pstUsageMode, |
|---|
| 1055 | BVDB_System_Configurations *pstSysConfig); |
|---|
| 1056 | |
|---|
| 1057 | |
|---|
| 1058 | /*************************************************************************** |
|---|
| 1059 | Summary: |
|---|
| 1060 | Prints the usage mode on the console. |
|---|
| 1061 | |
|---|
| 1062 | Input: |
|---|
| 1063 | pstUsageMode - the user specified usage mode |
|---|
| 1064 | |
|---|
| 1065 | Returns: |
|---|
| 1066 | BERR_INVALID_PARAMETER - Invalid function parameters. |
|---|
| 1067 | BERR_SUCCESS - Function succeed |
|---|
| 1068 | |
|---|
| 1069 | See Also: |
|---|
| 1070 | |
|---|
| 1071 | **************************************************************************/ |
|---|
| 1072 | BERR_Code BVDB_PrintUsageMode |
|---|
| 1073 | ( const BVDB_UsageMode *pstUsageMode ); |
|---|
| 1074 | |
|---|
| 1075 | |
|---|
| 1076 | |
|---|
| 1077 | /*************************************************************************** |
|---|
| 1078 | Summary: |
|---|
| 1079 | This gets the input format group given the source's information. A |
|---|
| 1080 | BVDB_InputFormatGroup_eInvalid is returned if a match is not found. |
|---|
| 1081 | |
|---|
| 1082 | Input: |
|---|
| 1083 | hVdb - the handle to VDB |
|---|
| 1084 | ulHeight - the source's height |
|---|
| 1085 | ulWidth - the source's width |
|---|
| 1086 | ulFrameRate - the source's frame rate. The frame rate |
|---|
| 1087 | must be multiplied by 1000 to handle |
|---|
| 1088 | float rates, eg., 23.976 will be passed in |
|---|
| 1089 | as 23976 and 60 will be passed in as 60000. |
|---|
| 1090 | bProgressive - is the source inerlaced or progressive |
|---|
| 1091 | eInput - the input used with the source |
|---|
| 1092 | |
|---|
| 1093 | Output: |
|---|
| 1094 | peInputFormatGroup - the input format group |
|---|
| 1095 | |
|---|
| 1096 | Returns: |
|---|
| 1097 | BERR_INVALID_PARAMETER - Invalid function parameters. |
|---|
| 1098 | BERR_SUCCESS - Function succeed |
|---|
| 1099 | |
|---|
| 1100 | See Also: |
|---|
| 1101 | |
|---|
| 1102 | **************************************************************************/ |
|---|
| 1103 | BERR_Code BVDB_GetInputFormatGroup |
|---|
| 1104 | ( const BVDB_Handle hVdb, |
|---|
| 1105 | const uint32_t ulHeight, |
|---|
| 1106 | const uint32_t ulWidth, |
|---|
| 1107 | const uint32_t ulFrameRate, |
|---|
| 1108 | const bool bProgressive, |
|---|
| 1109 | const bool bJpeg, |
|---|
| 1110 | const BVDB_Input eInput, |
|---|
| 1111 | BVDB_InputFormatGroup *peInputFormatGroup ); |
|---|
| 1112 | |
|---|
| 1113 | /*************************************************************************** |
|---|
| 1114 | Summary: |
|---|
| 1115 | This validates the configuration ID. |
|---|
| 1116 | |
|---|
| 1117 | Input: |
|---|
| 1118 | hVdb - the handle to VDB |
|---|
| 1119 | ulConfigId - the configuration ID |
|---|
| 1120 | |
|---|
| 1121 | Returns: |
|---|
| 1122 | BERR_INVALID_PARAMETER - Invalid function parameters. |
|---|
| 1123 | BERR_SUCCESS - Function succeed |
|---|
| 1124 | |
|---|
| 1125 | See Also: |
|---|
| 1126 | |
|---|
| 1127 | **************************************************************************/ |
|---|
| 1128 | BERR_Code BVDB_ValidateConfigId |
|---|
| 1129 | ( BVDB_Handle hVdb, |
|---|
| 1130 | const uint32_t ulConfigId); |
|---|
| 1131 | |
|---|
| 1132 | |
|---|
| 1133 | /*************************************************************************** |
|---|
| 1134 | Summary: |
|---|
| 1135 | This returns the features that the slected RTS configuration supports |
|---|
| 1136 | |
|---|
| 1137 | Input: |
|---|
| 1138 | hVdb - the handle to VDB |
|---|
| 1139 | *pConfigFeatures - pointer to which the features are copied |
|---|
| 1140 | |
|---|
| 1141 | Returns: |
|---|
| 1142 | BERR_INVALID_PARAMETER - Invalid function parameters. |
|---|
| 1143 | BERR_SUCCESS - Function succeed |
|---|
| 1144 | |
|---|
| 1145 | See Also: |
|---|
| 1146 | N/A |
|---|
| 1147 | **************************************************************************/ |
|---|
| 1148 | BERR_Code BVDB_GetFeatures |
|---|
| 1149 | ( BVDB_Handle hVdb, |
|---|
| 1150 | BVDB_Config_Features *pConfigFeatures); |
|---|
| 1151 | |
|---|
| 1152 | |
|---|
| 1153 | /*************************************************************************** |
|---|
| 1154 | Summary: |
|---|
| 1155 | This returns the memory allocation requirements of a given configuration. |
|---|
| 1156 | |
|---|
| 1157 | Memory allocation depends on the window path, i.e., MAIN, PIP, or MON |
|---|
| 1158 | and on the input type, i.e., digital (MPEG) or analog (VDEC, HDDVI, VGA, |
|---|
| 1159 | or 656). This is necessary to allow the use of memory sharing between |
|---|
| 1160 | the XVD and VDC. |
|---|
| 1161 | |
|---|
| 1162 | The memory allocation requirement is specified by the buffer type, the |
|---|
| 1163 | number of buffers, and the buffer format. Please refer to the |
|---|
| 1164 | BVDB_Heap_Settings struct as this will be used to return the memory |
|---|
| 1165 | allocation requirement. |
|---|
| 1166 | |
|---|
| 1167 | The heap size in bytes is also returned as this will aid the application |
|---|
| 1168 | in determining the total heap size required for the window path when |
|---|
| 1169 | memory sharing is employed. |
|---|
| 1170 | |
|---|
| 1171 | Input: |
|---|
| 1172 | ulConfigId - the ID of the configuration |
|---|
| 1173 | eWindow - the window path, main, pip, or monitor |
|---|
| 1174 | eInput - the input type, digital or analog |
|---|
| 1175 | |
|---|
| 1176 | Output: |
|---|
| 1177 | pHeapSettings - the memory buffer allocation |
|---|
| 1178 | pulHeapSize - the heap size in Kilobytes |
|---|
| 1179 | |
|---|
| 1180 | Returns: |
|---|
| 1181 | BERR_INVALID_PARAMETER - Invalid function parameters. |
|---|
| 1182 | BERR_SUCCESS - Function succeed |
|---|
| 1183 | |
|---|
| 1184 | See Also: BVDB_Window, BVDB_Input, BVDB_Heap_Settings |
|---|
| 1185 | **************************************************************************/ |
|---|
| 1186 | |
|---|
| 1187 | BERR_Code BVDB_GetMemoryAllocation |
|---|
| 1188 | (const uint32_t ulConfigId, |
|---|
| 1189 | const BVDB_Window eWindow, |
|---|
| 1190 | const BVDB_Input eInput, |
|---|
| 1191 | BVDB_Heap_Settings *pstHeapSettings, |
|---|
| 1192 | uint32_t *pulHeapSize ); |
|---|
| 1193 | |
|---|
| 1194 | /*************************************************************************** |
|---|
| 1195 | Summary: |
|---|
| 1196 | This function sets the current window size and clip size and this |
|---|
| 1197 | information will be used when finding a matching VDB entry. |
|---|
| 1198 | |
|---|
| 1199 | Input: |
|---|
| 1200 | hVdb - the handle to VDB |
|---|
| 1201 | pstDisplay - the target display |
|---|
| 1202 | eWindow - the destination window |
|---|
| 1203 | ulSrcHeight - the height of the source |
|---|
| 1204 | ulSrcWidth - the width of the source |
|---|
| 1205 | ulSrcHeightClipAmount - the total amount to clip from the source height |
|---|
| 1206 | ulSrcWidthClipAmount - the total amount to clip from the source width |
|---|
| 1207 | ulDestHeight - the destination window height |
|---|
| 1208 | ulDestWidth - the destination window width |
|---|
| 1209 | |
|---|
| 1210 | Output: |
|---|
| 1211 | None |
|---|
| 1212 | |
|---|
| 1213 | Returns: |
|---|
| 1214 | BERR_INVALID_PARAMETER - Invalid function parameters. |
|---|
| 1215 | BERR_SUCCESS - Function succeeded |
|---|
| 1216 | |
|---|
| 1217 | See Also: BVDB_VideoDisplayMode, BVDB_UsageMode, BVDB_GetDisplaySrcAs |
|---|
| 1218 | **************************************************************************/ |
|---|
| 1219 | BERR_Code BVDB_SetVideoDisplayMode |
|---|
| 1220 | ( BVDB_Handle hVdb, |
|---|
| 1221 | const BVDB_Display *pstDisplay, |
|---|
| 1222 | const BVDB_Window eWindow, |
|---|
| 1223 | const uint32_t ulSrcHeight, |
|---|
| 1224 | const uint32_t ulSrcWidth, |
|---|
| 1225 | const uint32_t ulSrcHeightClipAmount, |
|---|
| 1226 | const uint32_t ulSrcWidthClipAmount, |
|---|
| 1227 | const uint32_t ulDestHeight, |
|---|
| 1228 | const uint32_t ulDestWidth, |
|---|
| 1229 | const bool bAutomaticAspectRatioBoxMode); |
|---|
| 1230 | |
|---|
| 1231 | #ifdef __cplusplus |
|---|
| 1232 | } |
|---|
| 1233 | #endif |
|---|
| 1234 | |
|---|
| 1235 | #endif /* __BVDB_H__ */ |
|---|