/*************************************************************************** * Copyright (c) 2003-2010, Broadcom Corporation * All Rights Reserved * Confidential Property of Broadcom Corporation * * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. * * $brcm_Workfile: bvdb.h $ * $brcm_Revision: Hydra_Software_Devel/63 $ * $brcm_Date: 8/27/10 12:57p $ * * Module Description: * The VDB (Video Usage Modes Database) is a database of all possible video * usage modes for a given chipset. This was created to support VDC's * new source pending feature that allows applications to configure the * BVN according to their requirements. * * Sample use: * * BVDB_Handle *hVdb; * uint32_t ulEntries; * BVDB_UsageMode stUsageMode; * const BVDB_RtsTable *pstRtsTbl = NULL; * // Create VDB * BVDB_CreateVdb(&hVdb, &ulEntries); * * // Get a usage mode given the following parameters * strcpy(stUsageMode.acId, "1"); configuration 1 * stUsageMode.eInputFormatGroup = BVDB_InputFormatGroup_eNTSC; * stUsageMode.eDisplay = BVDB_Display_ePrimary60; * stUsageMode.eWindow = BVDB_Window_eMain; * stUsageMode.eIput = BVDB_Input_eComponent; * stUsageMode.eOsd = BVDB_Osd_e1920_1080p_32bpp * stUsageMode.stDisplayMode = 0x3f; "all_FULL_modes" * * err = BVDB_GetVdbEntry(hVdb, &stUsageMode); * if (err != BERR_SUCCESS) * { * BDBG_ERR(("Usage mode with given paramters not found")); * } * * // Get the RTS table associated with the obtained usage mode * pstRtsTbl = BVDB_GetRtsTable(hVdb, stUsageMode.eRtsSet); * * * // Destroy VDB * BVDB_DestroyVdb(hVdb); * * * * Revision History: * * $brcm_Log: /magnum/commonutils/vdb/3548/B0/bvdb.h $ * * Hydra_Software_Devel/63 8/27/10 12:57p vineetr * SW3548-3006: Created config23 based on new requirements from customer. * * Hydra_Software_Devel/62 7/13/10 5:11p vineetr * SW3548-2987: Preliminary changes to support new 1080p@30Hz format. The * final update to the usage modes in the VDB table are still pending, * since I am waiting for the RTS to be re-analyzed. Until then, these * changes are 'harmless'. * * Hydra_Software_Devel/57 4/21/10 5:06p jerrylim * SW3548-2888: updated config19 to support smooth scaling. The changes * were maded based on 3548_Usage_Modes.xls Rev.2.94 * * Hydra_Software_Devel/56 4/1/10 3:51p jerrylim * SW3548-2802: added config 19. The change was made based on * 3548_Usage_Modes.xls Rev. 2.91 * * Hydra_Software_Devel/55 3/12/10 10:41a jerrylim * SW3548-2796: Added config20, but not yet completed. The change is based * on 3548_Usage_Modes.xls Rev.2.89 * * Hydra_Software_Devel/54 2/25/10 3:38p jerrylim * SW3548-2784: Added config 17. The changes were made based on * 3548_Usage_Modes.xls Rev.2.87. Refer to the LG Rushmore EU * questionnaire for more details * * Hydra_Software_Devel/53 2/18/10 5:14p jerrylim * CR3548-905: Completed config 18. The changes were made based on * 3548_Usage_Modes.xls Rev. 2.86 * * Hydra_Software_Devel/52 2/12/10 4:16p jerrylim * SW3548-2743, SW3548-2781: Updated config 11 - Added 40Mbps XPT rate, * Used auto scl-cap ordering for the analog RF PBP mode to have more * bandwidth marging * * Hydra_Software_Devel/51 2/1/10 5:22p jerrylim * SW3548-2726: Removed unnecessary usages modes from config 11 and config * 14. It's a clean-up, and doesn't affect operation. The change is based * on 3548_Usage_modes.xls Rev.2.80 * * Hydra_Software_Devel/50 1/29/10 4:52p jerrylim * SW3548-2744: Add 3D RTS support to config 2 * * Hydra_Software_Devel/49 1/25/10 2:34p jerrylim * SW3548-2725, SW3548-2726: XPT client register settings changed to * support 40Mbps TS rate. 3D RTS settings recalculated based on config14 * (It used to be based on config 11.). The changes were made based on * 3548_Usage_Modes.xls Rev.2.76 Jan. 25 2010 * * Hydra_Software_Devel/48 1/19/10 8:34p jerrylim * SW3548-2726: Added 3D support to config 14. The changes were made based * on 3548_Usage_Modes.xls Rev.2.74 * * Hydra_Software_Devel/47 1/19/10 4:34p jerrylim * SW3548-2726: Added two display formats to support 3D sources * * Hydra_Software_Devel/46 1/13/10 6:02p jerrylim * SW3556-826: Added config 16 - EU model, WXGA display, no PIP, PAL * monitor output, no GFX compression. Config 16 was created based on * 3548_Usage_Modes.xls Rev.2.71 13-Jan-10 * * Hydra_Software_Devel/45 1/8/10 11:07a jerrylim * SW3556-825, SW3548-2549: Implemented config 15 to support * Zinwell/Philips US and EU models. The implementation is based on * 3548_Usage_Modes.xls Rev.2.68 on 8-Jan-10 * * Hydra_Software_Devel/44 12/24/09 3:08p jerrylim * SW3548-2683: Changed cropping size to 36% in FULL.8 and recalculated * PBP mode. The changes were maded based on 3548_Usage_Modes.xls * Rev.2.65 2009.12.24 * * Hydra_Software_Devel/43 12/16/09 5:37p jerrylim * SW3548-2668: bpb will be changed to support none/pbp/pip modes, and * this is a temporary change in order not to break the build * * Hydra_Software_Devel/42 12/5/09 4:48p jerrylim * SW3556-846, SW3548-2621: Updated config 14. The changes are based on * 3548_Usage_Modes.xls rev2.61 * * Hydra_Software_Devel/41 11/20/09 2:17a jerrylim * SW3548-2551: config11 updated. No GFD compression. MNR/BNR on/off * allowed for all sources * * Hydra_Software_Devel/40 11/18/09 6:20p jerrylim * SW3556-850, SW3556-846, SW3556-830, SW3548-2614: unified config 14 with * some problem fixes. Refer to the JIRA items for more details * * Hydra_Software_Devel/39 11/7/09 11:46a jerrylim * SW3556-846: [LG-GP2][BCM3549B2][BCM3556C0] unification of config7(ATSC) * and config14(DVB). Now config 14 covers config 7 meaning that the * projects using config 7 can now use config 14. But there is a known * issue that lines are missing in some VGA signals and refer to SW3556- * 830 for more details, and will be addressed soon * * Hydra_Software_Devel/38 10/13/09 4:50p jessem * SW3548-2139: Applied CAP-SCL only to NTSC/PAL non-MFD PIG modes. * Modified RTS 181 to 194 and added RTS 195 to support this. Removed * forced CAP-SCL and SCL-CAP orientation from certain modes. Modified * ulReserved field for certain NTSC/PAL modes. * * Hydra_Software_Devel/37 10/1/09 1:56p jessem * SW3548-2506, SW3556-818: * 1. Added config 14 support (SW3548-2506). * 2. Added WXGA and XGA support for config 7 (SW3556-818). * 3. Added 1024x768_PC@60 and 1024x768_PC@85 input format groups. * 4. Modified algorithm to search for progressive input formats in * BVDB_GetInputFormatGroup. * * Hydra_Software_Devel/36 9/25/09 11:35a jessem * SW3548-2135: Revised Config 12 per new requirements. See * DTV_Questionnaire_3556_Humax.xls. * * Hydra_Software_Devel/35 9/11/09 2:58p jessem * SW3548-2463, SW3548-2465: * 1. Fixed algorithm for checking 4:3 and 16:9 sources as displayed in * 4:3 or 16:9 panels. * 2. Fixed FULL.12 check to include source's aspect ratio. * * Hydra_Software_Devel/34 8/27/09 3:41p jessem * SW3548-2419: * 1. Added config 13 support. * 2. Added RTS tables 241 to 255 for config 13 support. * 3. Added bJpeg parameter to BVDB_GetInputFormatGroup. * 4. Added BVDB_InputFormatGroup_eJpeg_540 and replaced * BVDB_InputFormatGroup_eJpeg with BVDB_InputFormatGroup_eJpeg_1080. * 5. Added BVDB_Osd_e960_540p_32bpp. * * Hydra_Software_Devel/33 8/5/09 5:58p jessem * PR 57391, PR 57392: * 1. Added 1920x1080 PC @ 60 Group. Renamed 1024x768_PC@60 Group to * 1366x768_PC@60 Group , 1280x768_PC@85 Group to 1366x768_PC@85 Group. * Added 1920x1080_PC@60 usage mdoes to all configurations (57391). * 2. Removed and modified certain invalid PC formats (57392). * * Hydra_Software_Devel/32 6/29/09 9:25a jessem * PR 55462, PR 56426: Added config 12. * * Hydra_Software_Devel/31 5/6/09 10:20a jessem * PR 54430: Fixes aply to config 10 only. Added RTS 194. Changed bias for * all PBP and PIG modes to CAP-SCL. * * Hydra_Software_Devel/30 4/27/09 11:18a jessem * PR 51743: Added bPbp parameter to BVDB_GetVideoDisplayMode to * distinguish Main PBP from Main PIG use. RTS needs to distinguish * between Main PBP and Main PIG. See DTV_Questionnaire.xls PIP.2 mode. * * Hydra_Software_Devel/29 4/24/09 2:03p jessem * PR 51709, PR 53506: * 1. Modified Config 9 support and associated RTS tables. Added RTS 177 * to 180. * 2. Added config 10 support and RTS tables 201 to 215. * 3. Added struct BVDB_OsdInfo and replaced BVDB_eOsd field in * BVDB_UsageMode with this new struct to accommodate ulReserved values * for OSD. * * Hydra_Software_Devel/28 4/13/09 3:40p jessem * PR 51743: Modified BVDB_GetDisplaySrcAs and BVDB_GetVideoDisplayModes * to handle source aspect ratio and aspect ratio correction. * * Hydra_Software_Devel/28 4/13/09 3:38p jessem * PR 51743: Modified BVDB_GetDisplaySrcAs and BVDB_GetVideoDisplayModes * to handle source aspect ratio and aspect ratio correction. * * Hydra_Software_Devel/27 4/3/09 3:46p jessem * PR 50564, PR 52821: * 1. Removed MHEG modes from config 8. * 2. Modified RTS 141 to 149 for config 8. * 3. Modified video display modes for config 8. * 4. Added config 10. * * Hydra_Software_Devel/26 3/24/09 5:49p jessem * PR 53388: Added BFMT_AspectRatio param to BVDB_GetInputFormatGroup. * * Hydra_Software_Devel/25 3/24/09 3:35p jessem * PR 53388: Changed implementation of BVDB_GetInputFormatGroup. * * Hydra_Software_Devel/24 3/19/09 3:43p jessem * PR 53388: Modified BVDB_GetInputFormatGroup()'s parameter list and * implementation. * * Hydra_Software_Devel/23 3/18/09 3:48p jessem * PR 53212: Modified RTS 101 to 107 and added RTS 108 to 111 for config * 6. * * Hydra_Software_Devel/22 3/16/09 2:25p jessem * PR 53212: Removed RTS 52 to 53. * * Hydra_Software_Devel/21 3/6/09 4:14p jessem * PR 52520: Added BVDB_Input parameter to BVDB_GetVideoDisplayMode to * handle monitor out cases. Corrected ulMinWinHeight field for all * monitor modes for all configs in astConfigVideoDispModeInfo. * * Hydra_Software_Devel/20 3/3/09 4:21p jessem * PR 51472: Added ulReserved field to BVDB_ANR. Added description to * BVDB_Anr and BVDB_Mad. Added RTS 128 to 130 as placeholders. * * Hydra_Software_Devel/19 2/25/09 7:38p jessem * PR 51848, PR 51743, PR 51472: Added heap size info per window per * config. Modified config 2 RTS to accommodate missing FIFO between CMP * and VEC. * * Hydra_Software_Devel/17 2/20/09 4:16p jessem * PR 51709: Added config 9 support. Removed BVDB_GetNumberOfConfigs and * replaced it wth BVDB_ValidateConfigId. Removed BVDB_Handle parameter * from BVDB_GetMemoryAllocation. Added RTS 161 to 177. * * Hydra_Software_Devel/16 2/18/09 2:52p jessem * PR 51848: Increased BVDB_MAX_STRLEN. Added to BVDB_GetNumberOfConfigs * description. * * Hydra_Software_Devel/15 2/18/09 11:48a jessem * PR 51848: Removed references to VDC. Removed global access to config * info. Added helper functions to access these instead. * * Hydra_Software_Devel/14 2/17/09 6:50p jessem * PR 50031, PR 51848: Added config 8. Added BVDB_GetNumberOfConfigs() and * BVDB_GetMemoryAllocation() functions to VDB API and support for these * new functions. * * Hydra_Software_Devel/13 1/29/09 11:00a jessem * PR 50327: Expanded MHEG FULL to MHEG FULL 1 and MHEG FULL 2 and * expanded MHEG PIG to MHEG PIG 1 and MHEG PIG 2. Updated RTS 48 and * added RTS 54 and 55 to support new MHEG modes. Updated config 3 usage * modes to suppot new MHEG modes. * * Hydra_Software_Devel/12 1/27/09 1:54p jessem * PR 51386: Added config 7. Added RTS 121 to * 127 to support config 7. * * Hydra_Software_Devel/11 1/26/09 10:26a jessem * PR 51472: Added RTS 8 and 53. * * Hydra_Software_Devel/10 1/5/09 12:37p jessem * PR 50327: Add features to config 3. * * Hydra_Software_Devel/9 12/12/08 12:33p jessem * PR 50327: Added MON 3 and 4 display modes. Updated description of * BVDB_VideoDisplayModeInfo struct. * * Hydra_Software_Devel/8 12/10/08 5:36p jessem * PR 48974: Added JPEG support and RTS 47 for config 5. * * Hydra_Software_Devel/7 12/9/08 3:58p jessem * PR 49051, PR 46591, PR 48974, PR 49929, PR 49870, PR 49932: Added * support for dot-by-dot in configs 1 and 2. Added config 4 for 1066Mhz * x16. Added config 6. Added features to config 1 and 2. * * Hydra_Software_Devel/6 11/26/08 10:51p jessem * PR 49405, PR 48974: Fixed strcpy coverity issue. Added 1066x16 config * support. * * Hydra_Software_Devel/5 11/19/08 5:56p jessem * PR49427, PR49428, PR49429, PR49431, PR49432, PR49433, PR49434, PR49435, * PR49436, PR49437, PR49438, PR49440: Fixed strcpy and strcat Coverity * issues. * * Hydra_Software_Devel/4 11/13/08 7:07p jessem * PR 48588: Added config 4 for 1080p/1080i/720p switchable output format. * * Hydra_Software_Devel/3 10/21/08 11:00a jessem * PR 46299: Split BVDB_InputFormatGroup_e1400_1050_PC to * BVDB_InputFormatGroup_e1400_1050_75_PC and * BVDB_InputFormatGroup_e1400_1050_60_PC. * * Hydra_Software_Devel/2 10/17/08 2:53p jessem * PR 46299: Replaced old A0 config support with 800MHZ WXGA and 1080P * configs support. * * Hydra_Software_Devel/1 10/2/08 3:48p jessem * PR 46299: Initial version * ***************************************************************************/ #ifndef __BVDB_H__ #define __BVDB_H__ #include "bstd.h" #include "berr.h" #include "bfmt.h" #include "bpxl.h" #include "blst_circleq.h" #ifdef __cplusplus extern "C" { #endif /************************* Module Overview ******************************** The Video Usage Modes Database (VDB) intends to capture all the BVN and RTS information found in the usage modes spreadsheet and put these in a form that can be used readily by an application. ***************************************************************************/ /* helper macros */ #define BVDB_DISPLAY_MODE_FULL_1_MASK 0x1 #define BVDB_DISPLAY_MODE_FULL_2_MASK 0x2 #define BVDB_DISPLAY_MODE_FULL_3_MASK 0x4 #define BVDB_DISPLAY_MODE_FULL_4_MASK 0x8 #define BVDB_DISPLAY_MODE_FULL_5_MASK 0x10 #define BVDB_DISPLAY_MODE_FULL_6_MASK 0x20 #define BVDB_DISPLAY_MODE_FULL_7_MASK 0x40 /* Dot-by-Dot */ #define BVDB_DISPLAY_MODE_FULL_8_MASK 0x80 #define BVDB_DISPLAY_MODE_FULL_9_MASK 0x100 #define BVDB_DISPLAY_MODE_FULL_10_MASK 0x200 #define BVDB_DISPLAY_MODE_FULL_11_MASK 0x400 #define BVDB_DISPLAY_MODE_PIG_1_MASK 0x800 #define BVDB_DISPLAY_MODE_PIG_2_MASK 0x1000 #define BVDB_DISPLAY_MODE_PIG_3_MASK 0x2000 #define BVDB_DISPLAY_MODE_PIG_4_MASK 0x4000 #define BVDB_DISPLAY_MODE_PIP_1_MASK 0x8000 #define BVDB_DISPLAY_MODE_PIP_2_MASK 0x10000 /* PBP */ #define BVDB_DISPLAY_MODE_PIP_3_MASK 0x20000 #define BVDB_DISPLAY_MODE_MON_1_MASK 0x40000 #define BVDB_DISPLAY_MODE_MON_2_MASK 0x80000 #define BVDB_DISPLAY_MODE_MON_3_MASK 0x100000 #define BVDB_DISPLAY_MODE_MON_4_MASK 0x200000 #define BVDB_DISPLAY_MODE_UNKNOWN_MASK 0x400000 #define BVDB_DISPLAY_MODE_ALL_FULL_MODES_MASK (BVDB_DISPLAY_MODE_FULL_1_MASK | BVDB_DISPLAY_MODE_FULL_2_MASK | \ BVDB_DISPLAY_MODE_FULL_3_MASK | BVDB_DISPLAY_MODE_FULL_4_MASK | \ BVDB_DISPLAY_MODE_FULL_5_MASK | BVDB_DISPLAY_MODE_FULL_6_MASK | \ BVDB_DISPLAY_MODE_FULL_7_MASK | BVDB_DISPLAY_MODE_FULL_8_MASK | \ BVDB_DISPLAY_MODE_FULL_9_MASK | BVDB_DISPLAY_MODE_FULL_10_MASK | \ BVDB_DISPLAY_MODE_FULL_11_MASK) #define BVDB_DISPLAY_MODE_ALL_PIG_MODES_MASK (BVDB_DISPLAY_MODE_PIG_1_MASK | BVDB_DISPLAY_MODE_PIG_2_MASK | \ BVDB_DISPLAY_MODE_PIG_3_MASK | BVDB_DISPLAY_MODE_PIG_4_MASK) #define BVDB_DISPLAY_MODE_ALL_PIP_MODES_MASK (BVDB_DISPLAY_MODE_PIP_1_MASK | BVDB_DISPLAY_MODE_PIP_2_MASK | \ BVDB_DISPLAY_MODE_PIP_3_MASK) #define BVDB_DISPLAY_MODE_ALL_MON_MODES_MASK (BVDB_DISPLAY_MODE_MON_1_MASK | BVDB_DISPLAY_MODE_MON_2_MASK | \ BVDB_DISPLAY_MODE_MON_3_MASK | BVDB_DISPLAY_MODE_MON_4_MASK) #define BVDB_DISP_MODE_IS_PIG(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_ALL_PIG_MODES_MASK) #define BVDB_DISP_MODE_IS_FULL(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_ALL_FULL_MODES_MASK) #define BVDB_DISP_MODE_IS_PIP(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_ALL_PIP_MODES_MASK) #define BVDB_DISP_MODE_IS_MON(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_ALL_MON_MODES_MASK) #define BVDB_DISP_MODE_IS_MHEG_FULL(pMode) ((*((uint32_t*)(void*)(pMode))) & (BVDB_DISPLAY_MODE_FULL_10_MASK | BVDB_DISPLAY_MODE_FULL_11_MASK)) #define BVDB_DISP_MODE_IS_MHEG_FULL_1(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_10_MASK) #define BVDB_DISP_MODE_IS_MHEG_FULL_2(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_11_MASK) #define BVDB_DISP_MODE_IS_MHEG_PIG(pMode) ((*((uint32_t*)(void*)(pMode))) & (BVDB_DISPLAY_MODE_PIG_3_MASK | BVDB_DISPLAY_MODE_PIG_4_MASK)) #define BVDB_DISP_MODE_IS_MHEG_PIG_1(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_PIG_3_MASK) #define BVDB_DISP_MODE_IS_MHEG_PIG_2(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_PIG_4_MASK) #define BVDB_DISP_MODE_IS_ALL_PIG(pMode) (((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_ALL_PIG_MODES_MASK) == BVDB_DISPLAY_MODE_ALL_PIG_MODES_MASK) #define BVDB_DISP_MODE_IS_ALL_FULL(pMode) (((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_ALL_FULL_MODES_MASK) == BVDB_DISPLAY_MODE_ALL_FULL_MODES_MASK) #define BVDB_DISP_MODE_IS_ALL_PIP(pMode) (((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_ALL_PIP_MODES_MASK) == BVDB_DISPLAY_MODE_ALL_PIP_MODES_MASK) #define BVDB_DISP_MODE_IS_ALL_MON(pMode) (((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_ALL_MON_MODES_MASK) == BVDB_DISPLAY_MODE_ALL_MON_MODES_MASK) #define BVDB_DISP_MODE_IS_FULL_1(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_1_MASK) #define BVDB_DISP_MODE_IS_FULL_2(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_2_MASK) #define BVDB_DISP_MODE_IS_FULL_3(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_3_MASK) #define BVDB_DISP_MODE_IS_FULL_4(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_4_MASK) #define BVDB_DISP_MODE_IS_FULL_5(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_5_MASK) #define BVDB_DISP_MODE_IS_FULL_6(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_6_MASK) #define BVDB_DISP_MODE_IS_FULL_7(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_7_MASK) #define BVDB_DISP_MODE_IS_FULL_8(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_8_MASK) #define BVDB_DISP_MODE_IS_FULL_9(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_9_MASK) #define BVDB_DISP_MODE_IS_FULL_10(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_10_MASK) #define BVDB_DISP_MODE_IS_FULL_11(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_FULL_11_MASK) #define BVDB_DISP_MODE_IS_PIG_1(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_PIG_1_MASK) #define BVDB_DISP_MODE_IS_PIG_2(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_PIG_2_MASK) #define BVDB_DISP_MODE_IS_PIG_3(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_PIG_3_MASK) #define BVDB_DISP_MODE_IS_PIG_4(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_PIG_4_MASK) #define BVDB_DISP_MODE_IS_PIP_1(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_PIP_1_MASK) #define BVDB_DISP_MODE_IS_PIP_2(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_PIP_2_MASK) #define BVDB_DISP_MODE_IS_PIP_3(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_PIP_3_MASK) #define BVDB_DISP_MODE_IS_MON_1(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_MON_1_MASK) #define BVDB_DISP_MODE_IS_MON_2(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_MON_2_MASK) #define BVDB_DISP_MODE_IS_MON_3(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_MON_3_MASK) #define BVDB_DISP_MODE_IS_MON_4(pMode) ((*((uint32_t*)(void*)(pMode))) & BVDB_DISPLAY_MODE_MON_4_MASK) #define BVDB_RTS_TABLE_SIZE 100 #define BVDB_SCL_CAP_TOLERANCE_FACTOR 10000 #define BVDB_MAX_STRLEN 80 /*************************************************************************** Summary: This enumeration represents the state of a particular BVN component. Description: BVDB_State_eNo - the BVN component is disabled. BVDB_State_eYes - the BVN component is enabled. BVDB_State_eNotApplicable - the BVN component is not applicable for the usage mode it is used with. See Also: BVDB_Anr, BVBD_CaptureFeeder, BVDB_Mad ****************************************************************************/ typedef enum { BVDB_State_eNo = 0, BVDB_State_eYes, BVDB_State_eNotApplicable } BVDB_State; /*************************************************************************** Summary: This enumerates the supported source format sets. Each entry represents several actual formats. Each usage mode entry must have this. Description: See Also: BVDB_UsageMode ****************************************************************************/ typedef enum { BVDB_InputFormatGroup_eNtsc = 1, BVDB_InputFormatGroup_ePal, BVDB_InputFormatGroup_e480p, BVDB_InputFormatGroup_e576p, BVDB_InputFormatGroup_e720p_50, BVDB_InputFormatGroup_e720p_60, BVDB_InputFormatGroup_e1080i_50, BVDB_InputFormatGroup_e1080i_60, BVDB_InputFormatGroup_e1080p_24, BVDB_InputFormatGroup_e1080p_25, BVDB_InputFormatGroup_e1080p_30, BVDB_InputFormatGroup_e1080p_50, BVDB_InputFormatGroup_e1080p_60, BVDB_InputFormatGroup_ePal_60, BVDB_InputFormatGroup_e720p_24, BVDB_InputFormatGroup_e720p_25, BVDB_InputFormatGroup_e720p_30, BVDB_InputFormatGroup_e544_576i_50 = 20, BVDB_InputFormatGroup_e1440_1080i_50, BVDB_InputFormatGroup_e1440_1080p_25, BVDB_InputFormatGroup_e544_480i_60, BVDB_InputFormatGroup_e1440_1080i_60, BVDB_InputFormatGroup_e1440_1080p_30, BVDB_InputFormatGroup_e1440_1080p_24, BVDB_InputFormatGroup_e1024_768_60_PC = 30, BVDB_InputFormatGroup_e1024_768_85_PC, BVDB_InputFormatGroup_e1366_768_60_PC, BVDB_InputFormatGroup_e1366_768_85_PC, BVDB_InputFormatGroup_e1400_1050_60_PC, BVDB_InputFormatGroup_e1400_1050_75_PC, BVDB_InputFormatGroup_e1920_1080_60_PC, BVDB_InputFormatGroup_e1600_1200_60_PC, BVDB_InputFormatGroup_eAdcCalibration = 40, BVDB_InputFormatGroup_eJpeg_540, BVDB_InputFormatGroup_eJpeg_1080, BVDB_InputFormatGroup_e1080p3d_24, BVDB_InputFormatGroup_e720p3d_60, BVDB_InputFormatGroup_e720p3d_50, BVDB_InputFormatGroup_e1080p3d_30, BVDB_InputFormatGroup_eInvalid } BVDB_InputFormatGroup; /*************************************************************************** Summary: This enumerates the supported display types. Each usage mode entry must have this. Description: See Also: BVDB_UsageMode ****************************************************************************/ typedef enum { BVDB_Display_ePrimary24 = 0, BVDB_Display_ePrimary48, BVDB_Display_ePrimary50, BVDB_Display_ePrimary60, BVDB_Display_eSecondary50, BVDB_Display_eSecondary60, BVDB_Display_eInvalid } BVDB_DisplayType; /*************************************************************************** Summary: This enumerates the supported output resolutions. Each usage mode entry must have this. Description: See Also: BVDB_UsageMode ****************************************************************************/ typedef enum { BVDB_OutputResolution_e1080p = 0, BVDB_OutputResolution_eWxga, BVDB_OutputResolution_e1080i, BVDB_OutputResolution_e720p, BVDB_OutputResolution_eXga, BVDB_OutputResolution_e480p, BVDB_OutputResolution_e576p, BVDB_OutputResolution_e480i = 9, BVDB_OutputResolution_e576i, BVDB_OutputResolution_e1920x2160i, BVDB_OutputResolution_e1280x1440p, BVDB_OutputResolution_eInvalid } BVDB_OutputResolution; /*************************************************************************** Summary: This enumerates the supported aspect ratios. Description: See Also: BVDB_UsageMode ****************************************************************************/ typedef enum { BVDB_AspectRatio_e4_3 = 0, BVDB_AspectRatio_e5_4, BVDB_AspectRatio_e15_9, BVDB_AspectRatio_e16_9, BVDB_AspectRatio_eAllSrc, BVDB_AspectRatio_eAllDest, BVDB_AspectRatio_eCustom, BVDB_AspectRatio_eBypass, BVDB_AspectRatio_eInvalid } BVDB_AspectRatio; /*************************************************************************** Summary: This describes the display configuration for the specified usage mode. Description: See Also: BVDB_UsageMode, BVDB_DisplayType, BVDB_AspectRatio ****************************************************************************/ typedef struct { BVDB_DisplayType eType; BVDB_OutputResolution eResolution; BVDB_AspectRatio eAspectRatio; } BVDB_Display; /*************************************************************************** Summary: This enumerates the supported windows. Each usage mode entry must have this. Description: See Also: BVDB_UsageMode ****************************************************************************/ typedef enum { BVDB_Window_eMain = 0, BVDB_Window_ePip, BVDB_Window_eMonitor, BVDB_Window_eInvalid } BVDB_Window; /*************************************************************************** Summary: This enumerates the supported intputs. Each usage mode entry must have this. Description: See Also: BVDB_UsageMode ****************************************************************************/ typedef enum { BVDB_Input_eCvbsSvidIfd = 0, BVDB_Input_eComponent, BVDB_Input_eHdDvi, BVDB_Input_eMfd, BVDB_Input_eVga, BVDB_Input_e656, BVDB_Input_eInvalid } BVDB_Input; /*************************************************************************** Summary: This enumerates the supported deinterlacer field store count. This is used with BVDB_Mad only. Description: See Also: BVDB_Mad, BVDB_UsageMode ****************************************************************************/ typedef enum { BVDB_FieldStore_e5Fields, BVDB_FieldStore_e4Fields, BVDB_FieldStore_e3Fields, BVDB_FieldStore_eNotApplicable } BVDB_DeinterlacerFieldStore; /*************************************************************************** Summary: This enumerates the SCL-CAP bias used for orienting the Scaler relative to the Capture block Description: BVDB_SclCapBias_eAuto - indicates the VDC will determine the orientation automatically given certain parameters BVDB_SclCapBias_eSclCap - indicates a SCL-CAP orientation bias BVDB_SclCapBias_eCapScl - indicates a CAP-SCL orientation bias See Also: BVDB_UsageMode ****************************************************************************/ typedef enum { BVDB_SclCapBias_eAuto = 0, BVDB_SclCapBias_eSclCap, BVDB_SclCapBias_eCapScl, BVDB_SclCapBias_eInvalid } BVDB_ScalerCaptureBias; /*************************************************************************** Summary: This indicates the supported video display modes for the specified usage mode. Description: Each bitfield represents a video display usage mode. If set, this indicates that this video display mode is allowed in the associated usage mode. Example: pstUsageMode->stDisplayMode = 0x1ff; This means that all FULL modes are allowed in the associated usage mode. See Also: BVDB_UsageMode ****************************************************************************/ typedef struct { uint32_t ulFull1 : 1; uint32_t ulFull2 : 1; uint32_t ulFull3 : 1; uint32_t ulFull4 : 1; uint32_t ulFull5 : 1; uint32_t ulFull6 : 1; uint32_t ulFull7 : 1; /* dot-by-dot */ uint32_t ulFull8 : 1; uint32_t ulFull9 : 1; uint32_t ulFull10 : 1; uint32_t ulFull11 : 1; uint32_t ulPig1 : 1; uint32_t ulPig2 : 1; uint32_t ulPig3 : 1; uint32_t ulPig4 : 1; uint32_t ulPip1 : 1; uint32_t ulPip2 : 1; uint32_t ulPip3 : 1; uint32_t ulMon1 : 1; uint32_t ulMon2 : 1; uint32_t ulMon3 : 1; uint32_t ulMon4 : 1; uint32_t ulUnknown : 1; } BVDB_VideoDisplayMode; /*************************************************************************** Summary: This enumerates the pixel formats supported. Applies to BVBD_Mad, BVBD_CaptureFeeder, and BVDB_Anr. Description: See Also: BVDB_Mad, BVBD_CaptureFeeder, BVDB_Anr ****************************************************************************/ typedef enum { BVDB_PixelFmt_e8Bit422 = 0, BVDB_PixelFmt_e10Bit422, BVDB_PixelFmt_e10Bit444, BVDB_PixelFmt_eInvalid } BVDB_PixelFormat; /*************************************************************************** Summary: This enumerates the RTS tables supported. Description: See Also: BVDB_UsageMode ****************************************************************************/ typedef enum { BVDB_RtsSet_e0 = 0, BVDB_RtsSet_e1, BVDB_RtsSet_e2, BVDB_RtsSet_e3, BVDB_RtsSet_e4, BVDB_RtsSet_e5, BVDB_RtsSet_e6, BVDB_RtsSet_e7, BVDB_RtsSet_e8, BVDB_RtsSet_e21 = 21, BVDB_RtsSet_e22, BVDB_RtsSet_e23, BVDB_RtsSet_e24, BVDB_RtsSet_e25, BVDB_RtsSet_e26, BVDB_RtsSet_e27, BVDB_RtsSet_e28, BVDB_RtsSet_e29, BVDB_RtsSet_e30, BVDB_RtsSet_e31, BVDB_RtsSet_e41 = 41, BVDB_RtsSet_e42, BVDB_RtsSet_e43, BVDB_RtsSet_e44, BVDB_RtsSet_e45, BVDB_RtsSet_e46, BVDB_RtsSet_e47, BVDB_RtsSet_e48, BVDB_RtsSet_e49, BVDB_RtsSet_e50, BVDB_RtsSet_e51, BVDB_RtsSet_e61 = 61, BVDB_RtsSet_e62, BVDB_RtsSet_e63, BVDB_RtsSet_e64, BVDB_RtsSet_e65, BVDB_RtsSet_e66, BVDB_RtsSet_e67, BVDB_RtsSet_e68, BVDB_RtsSet_e81 = 81, BVDB_RtsSet_e82, BVDB_RtsSet_e83, BVDB_RtsSet_e84, BVDB_RtsSet_e85, BVDB_RtsSet_e86, BVDB_RtsSet_e87, BVDB_RtsSet_e101 = 101, BVDB_RtsSet_e102, BVDB_RtsSet_e103, BVDB_RtsSet_e104, BVDB_RtsSet_e105, BVDB_RtsSet_e106, BVDB_RtsSet_e107, BVDB_RtsSet_e108, BVDB_RtsSet_e109, BVDB_RtsSet_e110, BVDB_RtsSet_e111, BVDB_RtsSet_e121 = 121, BVDB_RtsSet_e122, BVDB_RtsSet_e123, BVDB_RtsSet_e124, BVDB_RtsSet_e125, BVDB_RtsSet_e126, BVDB_RtsSet_e127, BVDB_RtsSet_e128, BVDB_RtsSet_e129, BVDB_RtsSet_e130, BVDB_RtsSet_e141 = 141, BVDB_RtsSet_e142, BVDB_RtsSet_e143, BVDB_RtsSet_e144, BVDB_RtsSet_e145, BVDB_RtsSet_e146, BVDB_RtsSet_e147, BVDB_RtsSet_e148, BVDB_RtsSet_e149, BVDB_RtsSet_e150, BVDB_RtsSet_e151, BVDB_RtsSet_e152, BVDB_RtsSet_e153, BVDB_RtsSet_e161 = 161, BVDB_RtsSet_e162, BVDB_RtsSet_e163, BVDB_RtsSet_e164, BVDB_RtsSet_e165, BVDB_RtsSet_e166, BVDB_RtsSet_e167, BVDB_RtsSet_e168, BVDB_RtsSet_e169, BVDB_RtsSet_e170, BVDB_RtsSet_e171, BVDB_RtsSet_e172, BVDB_RtsSet_e173, BVDB_RtsSet_e174, BVDB_RtsSet_e175, BVDB_RtsSet_e176, BVDB_RtsSet_e177, BVDB_RtsSet_e178, BVDB_RtsSet_e179, BVDB_RtsSet_e180, BVDB_RtsSet_e181 = 181, BVDB_RtsSet_e182, BVDB_RtsSet_e183, BVDB_RtsSet_e184, BVDB_RtsSet_e185, BVDB_RtsSet_e186, BVDB_RtsSet_e187, BVDB_RtsSet_e188, BVDB_RtsSet_e189, BVDB_RtsSet_e190, BVDB_RtsSet_e191, BVDB_RtsSet_e192, BVDB_RtsSet_e193, BVDB_RtsSet_e194, BVDB_RtsSet_e195, BVDB_RtsSet_e201 = 201, BVDB_RtsSet_e202, BVDB_RtsSet_e203, BVDB_RtsSet_e204, BVDB_RtsSet_e205, BVDB_RtsSet_e206, BVDB_RtsSet_e207, BVDB_RtsSet_e208, BVDB_RtsSet_e209, BVDB_RtsSet_e210, BVDB_RtsSet_e211 = 211, BVDB_RtsSet_e212, BVDB_RtsSet_e213, BVDB_RtsSet_e214, BVDB_RtsSet_e215, BVDB_RtsSet_e216, BVDB_RtsSet_e217, BVDB_RtsSet_e218, BVDB_RtsSet_e219, BVDB_RtsSet_e220, BVDB_RtsSet_e221 = 221, BVDB_RtsSet_e222, BVDB_RtsSet_e223, BVDB_RtsSet_e224, BVDB_RtsSet_e225, BVDB_RtsSet_e226, BVDB_RtsSet_e227, BVDB_RtsSet_e228, BVDB_RtsSet_e229, BVDB_RtsSet_e230, BVDB_RtsSet_e241 = 241, BVDB_RtsSet_e242, BVDB_RtsSet_e243, BVDB_RtsSet_e244, BVDB_RtsSet_e245, BVDB_RtsSet_e246, BVDB_RtsSet_e247, BVDB_RtsSet_e248, BVDB_RtsSet_e249, BVDB_RtsSet_e250, BVDB_RtsSet_e251, BVDB_RtsSet_e252, BVDB_RtsSet_e253, BVDB_RtsSet_e254, BVDB_RtsSet_e255, BVDB_RtsSet_e261 = 261, BVDB_RtsSet_e262, BVDB_RtsSet_e263, BVDB_RtsSet_e264, BVDB_RtsSet_e265, BVDB_RtsSet_e266, BVDB_RtsSet_e267, BVDB_RtsSet_e268, BVDB_RtsSet_e269, BVDB_RtsSet_e270, BVDB_RtsSet_e271, BVDB_RtsSet_e272, BVDB_RtsSet_e273, BVDB_RtsSet_e274, BVDB_RtsSet_e275, BVDB_RtsSet_e276, BVDB_RtsSet_e277, BVDB_RtsSet_e278, BVDB_RtsSet_e279, BVDB_RtsSet_e280, BVDB_RtsSet_e281 = 281, BVDB_RtsSet_e282, BVDB_RtsSet_e301 = 301, BVDB_RtsSet_e302, BVDB_RtsSet_e303, BVDB_RtsSet_e304, BVDB_RtsSet_e305, BVDB_RtsSet_e306, BVDB_RtsSet_e307, BVDB_RtsSet_e308, BVDB_RtsSet_e309, BVDB_RtsSet_e310, BVDB_RtsSet_e311, BVDB_RtsSet_e312, BVDB_RtsSet_e313, BVDB_RtsSet_e314, BVDB_RtsSet_e315, BVDB_RtsSet_e316, BVDB_RtsSet_e317, BVDB_RtsSet_e318, BVDB_RtsSet_e319, BVDB_RtsSet_e320, BVDB_RtsSet_e321 = 321, BVDB_RtsSet_e322, BVDB_RtsSet_e323, BVDB_RtsSet_e324, BVDB_RtsSet_e325, BVDB_RtsSet_e326, BVDB_RtsSet_e327, BVDB_RtsSet_e328, BVDB_RtsSet_e329, BVDB_RtsSet_e330, BVDB_RtsSet_e331, BVDB_RtsSet_e332, BVDB_RtsSet_e333, BVDB_RtsSet_e401 = 401, BVDB_RtsSet_e402, BVDB_RtsSet_e403, BVDB_RtsSet_e404, BVDB_RtsSet_e405, BVDB_RtsSet_e406, BVDB_RtsSet_e407, BVDB_RtsSet_e408, BVDB_RtsSet_e409, BVDB_RtsSet_e410, BVDB_RtsSet_e411, BVDB_RtsSet_e412, BVDB_RtsSet_e413, BVDB_RtsSet_e414, BVDB_RtsSet_e415, BVDB_RtsSet_e416, BVDB_RtsSet_e417, BVDB_RtsSet_e418, BVDB_RtsSet_e419, BVDB_RtsSet_e420, BVDB_RtsSet_e421, BVDB_RtsSet_e422, BVDB_RtsSet_e423, BVDB_RtsSet_e424, BVDB_RtsSet_e425, BVDB_RtsSet_e426, BVDB_RtsSet_e427, BVDB_RtsSet_e428, BVDB_RtsSet_e429, BVDB_RtsSet_e430, BVDB_RtsSet_e431, BVDB_RtsSet_e432, BVDB_RtsSet_e433, BVDB_RtsSet_e434, BVDB_RtsSet_e435, BVDB_RtsSet_e436, BVDB_RtsSet_e437, BVDB_RtsSet_e438, BVDB_RtsSet_e439, BVDB_RtsSet_e440, BVDB_RtsSet_e441, BVDB_RtsSet_e442, BVDB_RtsSet_e443, BVDB_RtsSet_e444, BVDB_RtsSet_e445, BVDB_RtsSet_e446, BVDB_RtsSet_e447, BVDB_RtsSet_e448, BVDB_RtsSet_e449, BVDB_RtsSet_e450, BVDB_RtsSet_e451, BVDB_RtsSet_e452, BVDB_RtsSet_e453, BVDB_RtsSet_e501 = 501, BVDB_RtsSet_e502, BVDB_RtsSet_e503, BVDB_RtsSet_e504, BVDB_RtsSet_e505, BVDB_RtsSet_e506, BVDB_RtsSet_e507, BVDB_RtsSet_e508, BVDB_RtsSet_e509, BVDB_RtsSet_e510, BVDB_RtsSet_e511, BVDB_RtsSet_e512, BVDB_RtsSet_e513, BVDB_RtsSet_e514, BVDB_RtsSet_e515, BVDB_RtsSet_e516, BVDB_RtsSet_e517, BVDB_RtsSet_e518, BVDB_RtsSet_e519, BVDB_RtsSet_e520, BVDB_RtsSet_e521, BVDB_RtsSet_e522, BVDB_RtsSet_e523, BVDB_RtsSet_e524, BVDB_RtsSet_e525, BVDB_RtsSet_e526, BVDB_RtsSet_e527, BVDB_RtsSet_e528, BVDB_RtsSet_e529, BVDB_RtsSet_e530, BVDB_RtsSet_e531, BVDB_RtsSet_e532, BVDB_RtsSet_e533, BVDB_RtsSet_e534, BVDB_RtsSet_e535, BVDB_RtsSet_e536, BVDB_RtsSet_e537, BVDB_RtsSet_e538, BVDB_RtsSet_e539, BVDB_RtsSet_e540, BVDB_RtsSet_e601 = 601, BVDB_RtsSet_e602, BVDB_RtsSet_e603, BVDB_RtsSet_e604, BVDB_RtsSet_e605, BVDB_RtsSet_e606, BVDB_RtsSet_e607, BVDB_RtsSet_e608, BVDB_RtsSet_e609, BVDB_RtsSet_e610, BVDB_RtsSet_e611, BVDB_RtsSet_e612, BVDB_RtsSet_e613, BVDB_RtsSet_e614, BVDB_RtsSet_e615, BVDB_RtsSet_e616, BVDB_RtsSet_e617, BVDB_RtsSet_e618, BVDB_RtsSet_e619, BVDB_RtsSet_e620, BVDB_RtsSet_e621, BVDB_RtsSet_e622, BVDB_RtsSet_e623, BVDB_RtsSet_e624, BVDB_RtsSet_e625, BVDB_RtsSet_e626, BVDB_RtsSet_e627, BVDB_RtsSet_e628, BVDB_RtsSet_e629, BVDB_RtsSet_e630, BVDB_RtsSet_e631, BVDB_RtsSet_e632, BVDB_RtsSet_e633, BVDB_RtsSet_e701 = 701, BVDB_RtsSet_e702, BVDB_RtsSet_e703, BVDB_RtsSet_e704, BVDB_RtsSet_e705, BVDB_RtsSet_e706, BVDB_RtsSet_e707, BVDB_RtsSet_e708, BVDB_RtsSet_e709, BVDB_RtsSet_e710, BVDB_RtsSet_e711, BVDB_RtsSet_e712, BVDB_RtsSet_e713, BVDB_RtsSet_e714, BVDB_RtsSet_e715, BVDB_RtsSet_e716, BVDB_RtsSet_e717, BVDB_RtsSet_e718, BVDB_RtsSet_e719, BVDB_RtsSet_e720, BVDB_RtsSet_e801 = 801, BVDB_RtsSet_e802, BVDB_RtsSet_e803, BVDB_RtsSet_e804, BVDB_RtsSet_e805, BVDB_RtsSet_e806, BVDB_RtsSet_e807, BVDB_RtsSet_e808, BVDB_RtsSet_e809, BVDB_RtsSet_e810, BVDB_RtsSet_e811, BVDB_RtsSet_e812, BVDB_RtsSet_e813, BVDB_RtsSet_e814, BVDB_RtsSet_e815, BVDB_RtsSet_e816, BVDB_RtsSet_e817, BVDB_RtsSet_e818, BVDB_RtsSet_e819, BVDB_RtsSet_e820, BVDB_RtsSet_e821, BVDB_RtsSet_e822, BVDB_RtsSet_e823, BVDB_RtsSet_e824, BVDB_RtsSet_e825, BVDB_RtsSet_e826, BVDB_RtsSet_e827, BVDB_RtsSet_e828, BVDB_RtsSet_e829, BVDB_RtsSet_e830, BVDB_RtsSet_e831, BVDB_RtsSet_e832, BVDB_RtsSet_e833, BVDB_RtsSet_e834, BVDB_RtsSet_e835, BVDB_RtsSet_e836, BVDB_RtsSet_e837, BVDB_RtsSet_e838, BVDB_RtsSet_e901 = 901, BVDB_RtsSet_e902, BVDB_RtsSet_e903, BVDB_RtsSet_e904, BVDB_RtsSet_e905, BVDB_RtsSet_e906, BVDB_RtsSet_e907, BVDB_RtsSet_e908, BVDB_RtsSet_e1001 = 1001, BVDB_RtsSet_e1002, BVDB_RtsSet_e1003, BVDB_RtsSet_e1004, BVDB_RtsSet_e1005, BVDB_RtsSet_e1006, BVDB_RtsSet_e1007, BVDB_RtsSet_e1008, BVDB_RtsSet_e1009, BVDB_RtsSet_e1010, BVDB_RtsSet_e1011, BVDB_RtsSet_e1012, BVDB_RtsSet_e1013, BVDB_RtsSet_e1014, BVDB_RtsSet_e1015, BVDB_RtsSet_e1016, BVDB_RtsSet_e1017, BVDB_RtsSet_e1018, BVDB_RtsSet_e1019, BVDB_RtsSet_e1020, BVDB_RtsSet_e1021, BVDB_RtsSet_e1022, BVDB_RtsSet_e1023, BVDB_RtsSet_e1024, BVDB_RtsSet_e1025, BVDB_RtsSet_e1026, BVDB_RtsSet_e1027, BVDB_RtsSet_e1028, BVDB_RtsSet_e1029, BVDB_RtsSet_e1030, BVDB_RtsSet_e1031, BVDB_RtsSet_e1032, BVDB_RtsSet_e1033, BVDB_RtsSet_e1034, BVDB_RtsSet_e1035, BVDB_RtsSet_e1036, BVDB_RtsSet_e1101 = 1101, BVDB_RtsSet_e1102, BVDB_RtsSet_e1103, BVDB_RtsSet_e1104, BVDB_RtsSet_e1105, BVDB_RtsSet_e1106, BVDB_RtsSet_e1107, BVDB_RtsSet_e1108, BVDB_RtsSet_e1109, BVDB_RtsSet_e1110, BVDB_RtsSet_e1111, BVDB_RtsSet_e1112, BVDB_RtsSet_e1113, BVDB_RtsSet_e1114, BVDB_RtsSet_e1115, BVDB_RtsSet_e1116, BVDB_RtsSet_e1117, BVDB_RtsSet_e1118, BVDB_RtsSet_e1119, BVDB_RtsSet_e1120, BVDB_RtsSet_e1121, BVDB_RtsSet_e1122, BVDB_RtsSet_e1123, BVDB_RtsSet_e1124, BVDB_RtsSet_e1201 = 1201, BVDB_RtsSet_e1202, BVDB_RtsSet_e1203, BVDB_RtsSet_e1204, BVDB_RtsSet_e1205, BVDB_RtsSet_e1206, BVDB_RtsSet_e1207, BVDB_RtsSet_e1208, BVDB_RtsSet_e1209, BVDB_RtsSet_e1210, BVDB_RtsSet_e1211, BVDB_RtsSet_e1212, BVDB_RtsSet_e1213, BVDB_RtsSet_e1214, BVDB_RtsSet_e1215, BVDB_RtsSet_e1216, BVDB_RtsSet_e1217, BVDB_RtsSet_Max, BVDB_RtsSet_eNotApplicable = BVDB_RtsSet_Max + 1000, BVDB_RtsSet_eTBD } BVDB_RtsSet; /*************************************************************************** Summary: This enumerates the modes on how to display the source Description: See Also: ****************************************************************************/ typedef enum { BVDB_DisplaySourceAs_eFull = 0, BVDB_DisplaySourceAs_eLetterbox, BVDB_DisplaySourceAs_ePillarbox, BVDB_DisplaySourceAs_eDot, BVDB_DisplaySourceAs_ePig, BVDB_DisplaySourceAs_ePip, BVDB_DisplaySourceAs_eInvalid } BVDB_DisplaySourceAs; /*************************************************************************** Summary: This describes the video display mode. Description: ulSrcWidthClipAmount - the maximum amount (in %) to clip the source's width. ulSrcHeightClipAmount - the maximum amount (in %)to clip the source's height. eDisplay16_9SrcOn16_9Display - displays a 16:9 source on a 16:9 panel eDisplay16_9SrcOn4_3Display - displays a 16:9 source on a 4:3 panel eDisplay4_3SrcOn16_9dDisplay - displays a 4:3source on a 16:9 panel eDisplay4_3SrcOn14_3Display - displays a 4:# source on a 4:3 panel ulMaxWinHeight - the maximum height (in %) relative to the display's height ulMaxWinWidth - the maximum width (in %) relative to the display's width ulMinWinHeight - the minimum height (in %) relative to the display's height ulMinWinWidth - the minimum width (in %) relative to the display's width There are a few notable exceptions and they are as follows: For FULL.7 mode (Dot-By-Dot), the max and min widow sizes pertain to the source's size instead of the display size. See Also: BVDB_VideoDisplayMode ****************************************************************************/ typedef struct { uint32_t ulSrcWidthClipAmount; uint32_t ulSrcHeightClipAmount; BVDB_DisplaySourceAs eDisplay16_9SrcOn16_9Display; BVDB_DisplaySourceAs eDisplay16_9SrcOn4_3Display; BVDB_DisplaySourceAs eDisplay4_3SrcOn16_9dDisplay; BVDB_DisplaySourceAs eDisplay4_3SrcOn4_3Display; uint32_t ulMinWinHeight; uint32_t ulMinWinWidth; uint32_t ulMaxWinHeight; uint32_t ulMaxWinWidth; } BVDB_VideoDisplayModeInfo; /*************************************************************************** Summary: This describes the OSD setting for the specified usage mode. Description: eOsd - the OSD type ulReserved - reserved See Also: BVDB_UsageMode, BVDB_Osd ****************************************************************************/ typedef struct { uint32_t ulWidth; uint32_t ulHeight; uint32_t ulBitsPerPixel; uint32_t ulReserved; } BVDB_OsdInfo; /*************************************************************************** Summary: This describes the ANR configuration for the specified usage mode. Description: eState - whether ANR is enabled or not ePixelFormat - the ANR buffer's pixel format. eReserved - for future use See Also: BVDB_UsageMode, BVDB_PixelFormat, BVDB_State ****************************************************************************/ typedef struct { BVDB_State eState; BVDB_PixelFormat ePixelFormat; uint32_t ulReserved; } BVDB_Anr; /*************************************************************************** Summary: This describes the CAP/VFD configuration for the specified usage mode. Description: eState - whether capture is enabled or not ePixelFormat - the capture buffer's pixel format eReserved - for future use See Also: BVDB_UsageMode, BVDB_PixelFormat, BVDB_State ****************************************************************************/ typedef struct { BVDB_State eState; BVDB_PixelFormat ePixelFormat; uint32_t ulReserved; } BVDB_CaptureFeeder; /*************************************************************************** Summary: This describes the MAD configuration for the specified usage mode. Description: eState - whether MAD is enabled or not eFieldStore - the max number of MAD fields ePixelFormat - the MAD buffer's pixel format. eReserved - for future use See Also: BVDB_UsageMode, BVDB_PixelFormat, BVDB_State, BVDB_DeinterlacerFieldStore ****************************************************************************/ typedef struct { BVDB_State eState; BVDB_DeinterlacerFieldStore eFieldStore; BVDB_PixelFormat ePixelFormat; uint32_t ulReserved; } BVDB_Mad; /*************************************************************************** Summary: This contains the ID and the RTS register value for a given SCB client. Description: ulId - the client ID ulRegValue - the value to be written to the client's SCB register See Also: BVDB_RtsTable ****************************************************************************/ typedef struct { uint32_t ulId; uint32_t ulRegValue; } BVDB_Rts; /*************************************************************************** Summary: This contains the table of SCB client's RTS values. A usage mode has this. Certain usage modes do not have this and are marked as n/a since the clients for that particular usage modes do not requirea new RTS setting. Description: ulValidTableEntries - the number of valid entries in the table. astRts - the table of SCB client's RTS values See Also: BVDB_Rts, BVDB_RTS_TABLE_SIZE ****************************************************************************/ typedef struct { uint32_t ulValidTableEntries; BVDB_Rts astRts[BVDB_RTS_TABLE_SIZE]; } BVDB_RtsTable; /*************************************************************************** Summary: Usage Mode database record. Description: This is the structure used for database entries (record). See Also: ***************************************************************************/ typedef struct BVDB_UsageMode { /* Node info: linked-list bookeeping */ BLST_CQ_ENTRY(BVDB_UsageMode) link; /* doubly-linked list support */ char acId[BVDB_MAX_STRLEN]; BVDB_InputFormatGroup eInputFormatGroup; BVDB_Display stDisplay; BVDB_Window eWindow; BVDB_Input eInput; BVDB_VideoDisplayMode stDisplayMode; BVDB_OsdInfo stOsd; BVDB_State e3dComb; BVDB_State eOversample; BVDB_State eMnrBnr; BVDB_State eDcr; BVDB_Anr stAnr; BVDB_CaptureFeeder stCapVfd; BVDB_Mad stMad; BVDB_RtsSet eRtsSet; uint32_t ulSclCapTolerance; /* This must be divided by BVDB_SCL_CAP_TOLERANCE_FACTOR to get the actual value. */ BVDB_ScalerCaptureBias eSclCapBias; }BVDB_UsageMode; /*************************************************************************** Summary: This structure describes the memory allocation requirements for a given window heap. Description: BVDB_Heap_Settings is a structure that use to describe the public settings of a window heap. ulBufferCnt_2HD - The number of double HD buffers required. ePixelFormat_2HD - The pixel format for double HD buffer. eBufferFormat_2HD - The double HD buffer format. This is typically BFMT_VideoFmt_e1080p_30Hz. ulBufferCnt_2HD_Pip - The numbfer 2HD PIP buffers required. This max PIP size is 1/4 of 2HD buffers. Only PIP windows smaller or equal to 1/4 2HD buffer size can use these buffers. PIP windows bigger than 1/4 of 2HD buffer size needs to use 2HD buffers. ulBufferCnt_HD - The number of HD buffers required. ePixelFormat_HD - The pixel format for single HD buffer. eBufferFormat_HD - The HD buffer format. Typically this is BFMT_VideoFmt_e1080i. ulBufferCnt_HD_Pip - The number HD PIP buffers required. This max PIP size is 1/4 of HD buffers. Only PIP windows smaller or equal to 1/4 HD buffer size can use these buffers. PIP windows bigger than 1/4 of HD buffer size needs to use HD buffers. ulBufferCnt_SD - The number of SD buffers required. ePixelFormat_SD - The pixel format for SD buffer. eBufferFormat_SD - The SD buffer format. This is typically BFMT_VideoFmt_ePAL_G. See Also: BVDB_GetMemoryAllocation ***************************************************************************/ typedef struct { /* Double HD Buffer settings */ uint32_t ulBufferCnt_2HD; BPXL_Format ePixelFormat_2HD; BFMT_VideoFmt eBufferFormat_2HD; uint32_t ulBufferCnt_2HD_Pip; /* HD Buffer settings */ uint32_t ulBufferCnt_HD; BPXL_Format ePixelFormat_HD; BFMT_VideoFmt eBufferFormat_HD; uint32_t ulBufferCnt_HD_Pip; /* SD Buffer settings */ uint32_t ulBufferCnt_SD; BPXL_Format ePixelFormat_SD; BFMT_VideoFmt eBufferFormat_SD; uint32_t ulBufferCnt_SD_Pip; }BVDB_Heap_Settings; /*************************************************************************** Summary: Video Usage Modes Database (VDB) context handle. Description: This is a handle that the application created with BVDB_CreateVdb. BVDB_Handle holds the context of the VDB. There should only one BVDB_Handle at any given instant. The main VDB handle is use to add, delete, and query databse entries. See Also: BVDB_CreateVdb, BVDB_DestroyVdb. ***************************************************************************/ typedef struct BVDB_P_Context *BVDB_Handle; /*************************************************************************** Summary: This enumeration represents the current PIP mode Description: BVDB_PipType_eNo - Only Main window is active BVDB_PipType_ePbp - Dual windows are active, and it's in PBP mode where there no overlapped area between two windows BVDB_PipType_ePip - Dual windows are active and it's in PIP mode where there is overlapped area between two windows, e.g., the sub-window is positioned on top of the main-window See Also: ****************************************************************************/ typedef enum { BVDB_PipType_eNo = 0, /* Only Main window is active */ BVDB_PipType_ePbp, /* Dual windows are active, and it's in PBP mode * where there no overlapped area between two * windows */ BVDB_PipType_ePip /* Dual windows are active and it's in PIP mode * where there is overlapped area between two * windows, e.g., the sub-window is positioned on * top of the main-window */ } BVDB_PipType; /*************************************************************************** Summary: Creates the database. The database is created using a generated C file that contains all the usage modes an their information. Input: Output: phVdb - the VDB handle pulEntries - the numberof databse entries(or records) Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: BVDB_WriteVdbFile **************************************************************************/ BERR_Code BVDB_CreateVdb ( BVDB_Handle *phVdb, uint32_t *pulEntries); /*************************************************************************** Summary: Validates the database. Description: This is optional to use but is necessary when new usage modes are added by the application to validate the new entries. Input: configId - the number of the configuration that has to be validated (if 0 is specified, all configurations will be validated) Output: hVdb - the VDB handle Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: BVDB_WriteVdbFile **************************************************************************/ BERR_Code BVDB_ValidateVdb ( BVDB_Handle hVdb, uint32_t configId ); /*************************************************************************** Summary: Destroys the database. Input: hVDb - the VDB handle Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: BVDB_CreateVdb **************************************************************************/ BERR_Code BVDB_DestroyVdb ( BVDB_Handle hVdb ); /*************************************************************************** Summary: Adds an entry to the database. The user specifies the usage mode and passes this to the function. It will then get validated and if it passes, it will be added to the VDB. Input: hVDb - the VDB handle pstUsageMode - the user specified usage mode to add. This must contain the configuration number using the acId field. Description: Example: strcpy(stUsageMode.acId, "1"); "config #" stUsageMode.eInputFormatGroup = BVDB_InputFormatGroup_eNTSC; stUsageMode.eDisplay = BVDB_Display_ePrimary60; stUsageMode.eWindow = BVDB_Window_eMain; stUsageMode.eIput = BVDB_Input_eComponent; stUsageMode.eOsd = BVDB_Osd_e1920_1080p_32bpp stUsageMode.stDisplayMode = 0x3f; "all_FULL_modes" stUsageMode.e3dComb = BVDB_State_eNotApplicable; stUsageMode.eOversample = BVDB_State_eYes; stUsageMode.eMnrBnr = BVDB_State_eNo; stUsageMode.eDcr = BVDB_State_eYes; stUsageMode.stAnr.eState = BVDB_State_eYes; stUsageMode.stAnr.ePixelFormat = BVDB_PixelFmt_e10Bit422; stUsageMode.stCapVfd.eState = BVDB_State_eYes; stUsageMode.stCapVfd.ePixelFormat = BVDB_PixelFmt_e10Bit422; stUsageMode.stMad.eState = BVDB_State_eYes; stUsageMode.stMad.ePixelFormat = BVDB_PixelFmt_e10Bit422; stUsageMode.stMad.eFieldStore = BVDB_FieldStore_e5Fields; stUsageMode.eRtsSet = BVDB_RtsSet_eD; stUsageMode.ulSclCapTolerance = 0; stUsageMode.eSclCapBias = BVDB_SclCapBias_eAuto; err = BVDB_AddVdbEntry(hVdb, &stUsageMode); Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: **************************************************************************/ BERR_Code BVDB_AddVdbEntry ( BVDB_Handle hVdb, const BVDB_UsageMode *pstUsageMode ); /*************************************************************************** Summary: Removes an entry to the database. The user specifies the usage mode and passes this to the function. If the usage mode is found via its ID, it wil then be removed from the VDB. Input: hVDb - the VDB handle pstUsageMode - the user specified usage mode to remove Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: **************************************************************************/ BERR_Code BVDB_RemoveVdbEntry ( BVDB_Handle hVdb, const BVDB_UsageMode *pstUsageMode ); /*************************************************************************** Summary: Gets a VDB entry based on the Config #, Input Format Group, Display, Window, Input, OSD, and Video Display usage mode. This function takes in a BVDB_Usage mode structure partially filled with the required info. It will then be completely filled if the usage mode requested is found. Otherwise an error will be returned. Description: Example on filling the required fields: strcpy(pstUsageMode->acId, "1"); configuration 1 pstUsageMode->eInputFormatGroup = BVDB_InputFormatGroup_eNTSC; pstUsageMode->eDisplay = BVDB_Display_ePrimary60; pstUsageMode->eWindow = BVDB_Window_eMain; pstUsageMode->eIput = BVDB_Input_eComponent; pstUsageMode->eOsd = BVDB_Osd_e1920_1080p_32bpp pstUsageMode->stDisplayMode = 0x3f; "all_FULL_modes" err = BVDB_GetVdbEntry(hVdb, pstUsageMode); Input: hVdb - the VDB handle pstUsageMode - the usage mode with the required info Output: pstUsageMode - the usage mode with the required info plus the remaining info, if found Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: **************************************************************************/ BERR_Code BVDB_GetVdbEntry ( BVDB_Handle hVdb, BVDB_UsageMode *pstUsageMode ); /*************************************************************************** Summary: Gets a VDB entry based on the usage mode ID. This function takes in a BVDB_Usage mode structure partially filled with the ID. It will then be completely filled if the usage mode requested is found. Otherwise an error will be returned. Input: pstUsageMode - the user specified usage mode Output: pstUsageMode - the usage mode with the ID plus the remaining info, if found Description: Example: strcpy(pstUsageMode.acId, "1.0.0.1.2.2") err = BVDB_GetVdbEntry(hVdb, pstUsageMode); Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: **************************************************************************/ BERR_Code BVDB_GetVdbEntryById ( BVDB_Handle hVdb, BVDB_UsageMode *pstUsageMode ); /*************************************************************************** Summary: Prints the usage mode on the console. Input: pstUsageMode - the user specified usage mode Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: **************************************************************************/ BERR_Code BVDB_PrintUsageMode ( const BVDB_UsageMode *pstUsageMode ); /*************************************************************************** Summary: Prints the entire VDB on the console. Input: hVdb - VDB handle Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: **************************************************************************/ BERR_Code BVDB_PrintVdb ( BVDB_Handle hVdb ); /*************************************************************************** Summary: This gets the input format group given the source's information. A BVDB_InputFormatGroup_eInvalid is returned if a match is not found. Input: hVdb - the handle to VDB ulHeight - the source's height ulWidth - the source's width ulFrameRate - the source's frame rate. The frame rate must be multiplied by 1000 to handle float rates, eg., 23.976 will be passed in as 23976 and 60 will be passed in as 60000. bProgressive - is the source inerlaced or progressive eInput - the input used with the source Output: peInputFormatGroup - the input format group Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: **************************************************************************/ BERR_Code BVDB_GetInputFormatGroup ( const BVDB_Handle hVdb, const uint32_t ulHeight, const uint32_t ulWidth, const uint32_t ulFrameRate, const bool bProgressive, const bool bJpeg, const BVDB_Input eInput, BVDB_InputFormatGroup *peInputFormatGroup ); /*************************************************************************** Summary: This validates the configuration ID. Input: hVdb - the handle to VDB ulConfigId - the configuration ID Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: **************************************************************************/ BERR_Code BVDB_ValidateConfigId ( BVDB_Handle hVdb, const uint32_t ulConfigId); /*************************************************************************** Summary: This validates the amount of source clipping for a given usage mode. Input: hVdb - the handle to VDB pstUsageMode - the usage mode ulSrcHeight - the height of the source ulSrcWidth - the width of the source ulHeightClipAmount - the total amount to clip from the height ulWidthClipAmount - the total amount to clip from the width Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: **************************************************************************/ BERR_Code BVDB_ValidateSourceClipAmount ( BVDB_Handle hVdb, const BVDB_UsageMode *pstUsageMode, const uint32_t ulSrcHeight, const uint32_t ulSrcWidth, const uint32_t ulHeightClipAmount, const uint32_t ulWidthClipAmount ); /*************************************************************************** Summary: Gets the RTS table to use with the given the RTS set Input: hVdb - the handle to VDB eRtsSet - the RTS set Returns: BVDB_RtsTable * - if found, returns the table else NULL See Also: **************************************************************************/ const BVDB_RtsTable* BVDB_GetRtsTable ( BVDB_Handle hVdb, const BVDB_RtsSet eRtsSet ); /*************************************************************************** Summary: Gets the client name of the given SCB client ID Input: hVdb - the handle to VDB ulId - the SCB client's ID Output: acClientName - the client name Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: **************************************************************************/ BERR_Code BVDB_GetRtsClientName ( BVDB_Handle hVdb, const uint32_t ulId, char acClientName[20] ); /*************************************************************************** Summary: Gets the input's clipped dimensions based on a given video display mode Input: hVdb - the handle to VDB pulHeight - the height of the input pulWidth - the width of the input pstDispMode - the diplay mode Output: pulHeight - the clipped height of the input pulWidth - the clipped width of the input Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: **************************************************************************/ BERR_Code BVDB_GetClippedSize ( BVDB_Handle hVdb, BVDB_VideoDisplayMode *pstDispMode, uint32_t *pulHeight, uint32_t *pulWidth ); /*************************************************************************** Summary: Gets the mode on how to display the source given a video display mode Input: hVdb - the handle to VDB ulSrcHeight - the source height ulSrcWidth - the source width pstDisplay - the display eSrcAspectRatio - the source's aspect ratio uiSampleAspectRatioX - the X component of the source's pixel aspect ratio uiSampleAspectRatioY - the Y component of the source's pixel aspect ratio eAspectRatioCorrection - the aspect ratio correction pstDispMode - the video display mode Output: peDisplaySourceAs - how to display the source Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: BVDB_DisplaySourceAs, BVDB_Display **************************************************************************/ BERR_Code BVDB_GetDisplaySourceAs ( BVDB_Handle hVdb, BVDB_VideoDisplayMode *pstDispMode, const uint32_t ulSrcHeight, const uint32_t ulSrcWidth, const BVDB_Display *pstDisplay, const BFMT_AspectRatio eSrcAspectRatio, const uint16_t uiSampleAspectRatioX, const uint16_t uiSampleAspectRatioY, const BVDB_AspectRatio eAspectRatioCorrection, BVDB_DisplaySourceAs *peDisplaySourceAs ); /*************************************************************************** Summary: This returns the memory allocation requirements of a given configuration. Memory allocation depends on the window path, i.e., MAIN, PIP, or MON and on the input type, i.e., digital (MPEG) or analog (VDEC, HDDVI, VGA, or 656). This is necessary to allow the use of memory sharing between the XVD and VDC. The memory allocation requirement is specified by the buffer type, the number of buffers, and the buffer format. Please refer to the BVDB_Heap_Settings struct as this will be used to return the memory allocation requirement. The heap size in bytes is also returned as this will aid the application in determining the total heap size required for the window path when memory sharing is employed. Input: ulConfigId - the ID of the configuration eWindow - the window path, main, pip, or monitor eInput - the input type, digital or analog Output: pHeapSettings - the memory buffer allocation pulHeapSize - the heap size in Kilobytes Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: BVDB_Window, BVDB_Input, BVDB_Heap_Settings **************************************************************************/ BERR_Code BVDB_GetMemoryAllocation (const uint32_t ulConfigId, const BVDB_Window eWindow, const BVDB_Input eInput, BVDB_Heap_Settings *pstHeapSettings, uint32_t *pulHeapSize ); /*************************************************************************** Summary: This returns the video display mode for a given config, display, window, source size, source clip amount, destination window size, and the source's aspect ratio information. It is assumed that the user is familiar with the video display modes and how these are represented by the BVDB_VideoDisplayMode type. The display mode whose clip amounts closely matches the requested clip amounts without exceeding them and closely fit the intended display and destination window including the dispayed aspect ratio will be returned. If the requested clip amounts exceed all of the available display modes clip amounts and/or if the dispalyed aspect ratio is not matched, an error will be returned. A few notes on aspect ratio. If the eSrcAspectRatio is set to BFMT_AspectRatio_eSAR, uiSampleAspectRatioX and uiSampleAspectRatioY along with ulSrcHeight and ulSrcWidth will be used to determined the displayed aspect ratio; otherwise, eSrcAspectRatio is used to determine it. Also, eAspectRatioCorrection is used to determine the final displayed aspect ratio. Note that any dislayed aspect ratio that exceeds 16:9 is considered invalid and an error will be returned. Only 1 bitfield will be set in the returned pstDispMode. Once a valid video display mode is returned, a call to BVDB_GetDisplaySourceAs is necessary to get the corresponding eDisplaySrcAs to correctly display the source. Input: hVdb - the handle to VDB ulConfigId - the config ID pstDisplay - the target display eWindow - the destination window bPbp - inidcates if the window is used for PBP eInput - the input used ulSrcHeight - the height of the source ulSrcWidth - the width of the source ulSrcHeightClipAmount - the total amount to clip from the source height ulSrcWidthClipAmount - the total amount to clip from the source width ulDestHeight - the destination window height ulDestWidth - the destination window width eSrcAspectRatio - the source's aspect ratio uiSampleAspectRatioX - the X component of the source's pixel aspect ratio uiSampleAspectRatioY - the Y component of the source's pixel aspect ratio eAspectRatioCorrection - the aspect ratio correction Output: pstDispMode - the display mode. Note that this is in bitfield format. Only 1 bitfield will be set. pDisplayedAspectRatio - the final aspect ratio that will be used to display the source Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeeded See Also: BVDB_VideoDisplayMode, BVDB_UsageMode, BVDB_GetDisplaySrcAs **************************************************************************/ BERR_Code BVDB_GetVideoDisplayMode ( BVDB_Handle hVdb, const uint32_t ulConfigId, const BVDB_Display *pstDisplay, const BVDB_Window eWindow, const bool ePipType, const BVDB_Input eInput, const uint32_t ulSrcHeight, const uint32_t ulSrcWidth, const uint32_t ulSrcHeightClipAmount, const uint32_t ulSrcWidthClipAmount, const uint32_t ulDestHeight, const uint32_t ulDestWidth, const BFMT_AspectRatio eSrcAspectRatio, const uint16_t uiSampleAspectRatioX, const uint16_t uiSampleAspectRatioY, const BVDB_AspectRatio eAspectRatioCorrection, BVDB_VideoDisplayMode *pstDispMode, BFMT_AspectRatio *pDisplayedAspectRatio ); #ifdef __cplusplus } #endif #endif /* __BVDB_H__ */