/*************************************************************************** * Copyright (c) 2003-2011, 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/8 $ * $brcm_Date: 6/13/11 10:50a $ * * 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/35125/C0/bvdb.h $ * * Hydra_Software_Devel/8 6/13/11 10:50a yingh * SWDTV-6977: Set GFX plane to 1920x1080 for config402 * * Hydra_Software_Devel/7 6/6/11 3:48p yingh * SWDTV-7398: Corrected the blockout values of VDEC memory clients for * config400 and config401 * * Hydra_Software_Devel/6 5/5/11 1:22p yingh * SWDTV-6549: Added config401 with RTS supported * * Hydra_Software_Devel/5 4/19/11 3:33p yingh * SWDTV-2538: Added config400 with RTS supported * * Hydra_Software_Devel/4 4/8/11 2:56p yingh * SW35125-102: Added PDP buffer allocation flag * * Hydra_Software_Devel/3 4/5/11 11:21a yingh * SW35125-102: Added config402 with RTS supported * * Hydra_Software_Devel/2 11/17/10 3:33p jerrylim * SW35125-22: Removed all 35230 configs except config100 * * Hydra_Software_Devel/1 11/17/10 2:52p jerrylim * SW35125-22: Added 35125 VDB files * ***************************************************************************/ #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 /* TODO: To be moved to RTS Configuration Context */ #define BVDB_MAX_VER_STRING 20 #define BVDB_USAGE_MODE_VER_STRING_CFG100 "Ver. 1.0x" #define BVDB_USAGE_MODE_VER_STRING_CFG400 "Ver. 1.1x" #define BVDB_USAGE_MODE_VER_STRING_CFG401 "Ver. 1.1x" #define BVDB_USAGE_MODE_VER_STRING_CFG402 "Ver. 2.0x" /************************* 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. ***************************************************************************/ #define BVDB_RTS_TABLE_SIZE 77 #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_e1080p3d_30, BVDB_InputFormatGroup_e720p3d_60, BVDB_InputFormatGroup_e720p3d_50, BVDB_InputFormatGroup_eInvalid } BVDB_InputFormatGroup; /* If a source is split, the split source groups will be added to the end */ typedef enum { /* Compressed source */ BVDB_SourceGroup_Avc_e576i = 1 << 0, /* Interlaced SD - 480i/576i*/ BVDB_SourceGroup_Avc_e720p = 1 << 1, /* 480p, 576p, 720p */ BVDB_SourceGroup_Avc_e1080i = 1 << 2, /* 1080i */ BVDB_SourceGroup_Avc_e1080psf = 1 << 3, /* 1080p 24/25/30Hz */ BVDB_SourceGroup_Avc_e1080p = 1 << 4, /* 1080p 50Hz and above */ /* All other non 444 sources */ BVDB_SourceGroup_Rp_e576i = 1 << 5, /* Interlaced SD - 480i/576i*/ BVDB_SourceGroup_Rp_e720p = 1 << 6, /* 480p, 576p, 720p */ BVDB_SourceGroup_Rp_e1080i = 1 << 7, /* 1080i */ BVDB_SourceGroup_Rp_e1080psf = 1 << 8, /* 1080p 24/25/30Hz */ BVDB_SourceGroup_Rp_e1080p = 1 << 9, /* 1080p 50Hz and above */ BVDB_SourceGroup_Rp_e720p3d = 1 << 10, /* 720p 3D 50Hz and above */ BVDB_SourceGroup_Rp_e1080p3d = 1 << 11, /* 1080p 3D 50Hz and above */ BVDB_SourceGroup_Rp_e1080i3d = 1 << 12, /* 1080i 3D 50Hz and above */ /* PC is defined as a source with 444 chroma subsampling */ BVDB_SourceGroup_ePc = 1 << 13,/* PC */ /* JPEG sources */ BVDB_SourceGroup_eJpeg = 1 << 14,/* JPEG */ BVDB_SourceGroup_eAdcCalibration = 1 << 15 /* ADC Calibration */ } BVDB_SourceGroup; #define BVDB_SourceGroup_Any 0xffffffff #define BVDB_SourceGroup_None 0 #define BVDB_SourceGroup_Rp_Pc (BVDB_SourceGroup_Rp_e576i | \ BVDB_SourceGroup_Rp_e720p | \ BVDB_SourceGroup_Rp_e1080i | \ BVDB_SourceGroup_Rp_e1080psf | \ BVDB_SourceGroup_Rp_e1080p | \ BVDB_SourceGroup_ePc) #define BVDB_SourceGroup_Avc (BVDB_SourceGroup_Avc_e576i | \ BVDB_SourceGroup_Avc_e720p | \ BVDB_SourceGroup_Avc_e1080i | \ BVDB_SourceGroup_Avc_e1080psf | \ BVDB_SourceGroup_Avc_e1080p) typedef struct { BVDB_InputFormatGroup oldFormat; bool bMfdSource; BVDB_SourceGroup newFormat; } BVDB_P_MapToNewSourceGroup; typedef enum { BVDB_DisplayMode_Full = 1 << 0, BVDB_DisplayMode_Pig = 1 << 1, BVDB_DisplayMode_Mheg = 1 << 2, BVDB_DisplayMode_Pbp = 1 << 3 } BVDB_P_DisplayMode; #define BVDB_DisplayMode_Any 0xffffffff /*************************************************************************** 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_eInvalid = 0, BVDB_OutputResolution_e1080p = 1 << 0, BVDB_OutputResolution_eWxga = 1 << 1, BVDB_OutputResolution_e1080i = 1 << 2, BVDB_OutputResolution_e720p = 1 << 3, BVDB_OutputResolution_eXga = 1 << 4, BVDB_OutputResolution_e480p = 1 << 5, BVDB_OutputResolution_e576p = 1 << 6, BVDB_OutputResolution_e480i = 1 << 7, BVDB_OutputResolution_e576i = 1 << 8, BVDB_OutputResolution_e1920x2160i = 1 << 9, BVDB_OutputResolution_e1280x1440p = 1 << 10, BVDB_OutputResolution_e1920x2205p = 1 << 11, BVDB_OutputResolution_e1280x1470p = 1 << 12 } BVDB_OutputResolution; #define BVDB_OutputResolution_Any 0xffffffff /*************************************************************************** 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 enumerates the maximum size of OSD that can be used for the specified usage mode. Description: The difference between BVDB_Osd_eNone and BVDB_Osd_eInvalid is that BVDB_Osd_None means OSD is possible with the usage mode but is disabled. See Also: BVDB_UsageMode ****************************************************************************/ typedef enum { BVDB_Osd_e1920_1080p_32bpp = 0, BVDB_Osd_e1920_2205p_32bpp, BVDB_Osd_e1366_1080p_32bpp, BVDB_Osd_e960_1080p_32bpp, BVDB_Osd_e1366_768p_32bpp, BVDB_Osd_e1280_1080p_32bpp, BVDB_Osd_e1280_720p_32bpp, BVDB_Osd_e1024_768p_32bpp, BVDB_Osd_e720_1080p_32bpp, BVDB_Osd_e960_540p_32bpp, BVDB_Osd_e720_720p_32bpp, BVDB_Osd_e720_480p_32bpp, BVDB_Osd_e720_576p_32bpp, BVDB_Osd_e480i_8bpp, BVDB_Osd_e576i_8bpp, BVDB_Osd_eNone, BVDB_Osd_eInvalid } BVDB_Osd; /*************************************************************************** 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 describes the OSD setting for the specified usage mode. Description: eOsd - the OSD type ulReserved - reserved See Also: BVDB_UsageMode, BVDB_Osd ****************************************************************************/ typedef struct { BVDB_Osd eOsd; 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. Note that MAD refers to MCVP in 35230 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 describes the PDP configuration for the specified usage mode. Description: eState - whether PDP is enabled or not eReserved - for future use See Also: BVDB_UsageMode, BVDB_PixelFormat, BVDB_State ****************************************************************************/ typedef struct { BVDB_State eState; uint32_t ulReserved; } BVDB_Pdp; /*************************************************************************** Summary: This describes the FRC configuration for the specified usage mode. Description: eState - whether FRC is enabled or not eReserved - for future use See Also: BVDB_UsageMode, BVDB_PixelFormat, BVDB_State ****************************************************************************/ typedef struct { BVDB_State eState; uint32_t ulReserved; } BVDB_Frc; /*************************************************************************** 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 ulRtsRegisterTableId; 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 { uint32_t usageId; BVDB_InputFormatGroup eInputFormatGroup; BVDB_Display stDisplay; BVDB_Window eWindow; BVDB_Input eInput; BVDB_P_DisplayMode eDisplayMode; uint32_t ulDisplayModeNum; BVDB_OsdInfo stOsd; BVDB_State e3dComb; BVDB_State eOversample; BVDB_State eDnr; BVDB_Anr stAnr; BVDB_CaptureFeeder stCapVfd; BVDB_Mad stMad; /* it refers to MCVP in 35230 */ BVDB_Pdp stPdp; BVDB_Frc stFrc; BVDB_RtsTable *pRtsSet; 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: This structure describes the supported feature set of the selected RTS configuration. Description: bPipSupport - true if PIP is supported bMonitorSupport - true if monitor output is supported bFrcSupport - true if FRC is supported bRtcSupport - true if RTS is supported bPanelReversalSupport - true if panel reversal supported bPdpBufAllocat - true if PDP buffer is needed worstPdpBpp - largest bpp of FRC block maxPipWinHeight - maximum PIP window height if bPipSupport is true. maxPipWinWidth - maximum PIP window width if bPipSupport is true. See Also: None ***************************************************************************/ typedef struct { bool bPipSupport; bool bMonitorSupport; bool bFrcSupport; bool bRtcSupport; bool bPanelReversalSupport; bool bPdpBufAllocat; uint32_t worstPdpBpp; uint32_t maxPipWinHeight; uint32_t maxPipWinWidth; } BVDB_Config_Features; /*************************************************************************** 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: 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 - obsolete 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: 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: 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 bPipVisible - true if currently PIP window is visible bPanelReversed - true if currently the system has panel reversal 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, bool bPipVisible, bool bPanelReversed); /*************************************************************************** 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: 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 returns the features that the slected RTS configuration supports Input: hVdb - the handle to VDB *pConfigFeatures - pointer to which the features are copied Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeed See Also: N/A **************************************************************************/ BERR_Code BVDB_GetFeatures ( BVDB_Handle hVdb, BVDB_Config_Features *pConfigFeatures); /*************************************************************************** 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 function sets the current window size and clip size and this information will be used when finding a matching VDB entry. Input: hVdb - the handle to VDB pstDisplay - the target display eWindow - the destination window 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 Output: None Returns: BERR_INVALID_PARAMETER - Invalid function parameters. BERR_SUCCESS - Function succeeded See Also: BVDB_VideoDisplayMode, BVDB_UsageMode, BVDB_GetDisplaySrcAs **************************************************************************/ BERR_Code BVDB_SetVideoDisplayMode ( BVDB_Handle hVdb, const BVDB_Display *pstDisplay, const BVDB_Window eWindow, 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 bool bAutomaticAspectRatioBoxMode); #ifdef __cplusplus } #endif #endif /* __BVDB_H__ */