| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003-2008, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: bvdb_priv.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/2 $ |
|---|
| 12 | * $brcm_Date: 11/19/08 6:05p $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * See Module Overview below. |
|---|
| 16 | * |
|---|
| 17 | * Revision History: |
|---|
| 18 | * |
|---|
| 19 | * $brcm_Log: /magnum/commonutils/vdb/3548/A0/bvdb_priv.h $ |
|---|
| 20 | * |
|---|
| 21 | * Hydra_Software_Devel/2 11/19/08 6:05p jessem |
|---|
| 22 | * PR49427, PR49428, PR49429, PR49431, PR49432, PR49433, PR49434, PR49435, |
|---|
| 23 | * PR49436, PR49437, PR49438, PR49440: Fixed strcpy and strcat Coverity |
|---|
| 24 | * issues. |
|---|
| 25 | * |
|---|
| 26 | * Hydra_Software_Devel/1 6/18/08 12:31p jessem |
|---|
| 27 | * PR 43759: Initial version. |
|---|
| 28 | * |
|---|
| 29 | ***************************************************************************/ |
|---|
| 30 | |
|---|
| 31 | #ifndef __BVDB_PRIV_H__ |
|---|
| 32 | #define __BVDB_PRIV_H__ |
|---|
| 33 | |
|---|
| 34 | #include "bvdb.h" |
|---|
| 35 | #include "blst_circleq.h" |
|---|
| 36 | |
|---|
| 37 | #ifdef __cplusplus |
|---|
| 38 | extern "C" { |
|---|
| 39 | #endif |
|---|
| 40 | |
|---|
| 41 | #if BDBG_DEBUG_BUILD |
|---|
| 42 | #define BVDB_P_GENERIC_GET_CONTEXT(handle, context, structname) \ |
|---|
| 43 | do { \ |
|---|
| 44 | (context) = (handle); \ |
|---|
| 45 | BDBG_ASSERT(context); \ |
|---|
| 46 | } while(0) |
|---|
| 47 | #else |
|---|
| 48 | #define BVDB_P_GENERIC_GET_CONTEXT(handle, context, structname) \ |
|---|
| 49 | (context) = (handle) |
|---|
| 50 | #endif |
|---|
| 51 | |
|---|
| 52 | #define BVDB_P_GET_CONTEXT(handle, context) \ |
|---|
| 53 | BVDB_P_GENERIC_GET_CONTEXT(handle, context, BVDB_P_Context) |
|---|
| 54 | |
|---|
| 55 | /* VDB list access */ |
|---|
| 56 | #define BVDB_P_UsageMode_GetNextNode(pNode) \ |
|---|
| 57 | BLST_CQ_NEXT(pNode, link) |
|---|
| 58 | |
|---|
| 59 | #define BVDB_P_UsageMode_GetPrevNode(pNode) \ |
|---|
| 60 | BLST_CQ_PREV(pNode, link) |
|---|
| 61 | |
|---|
| 62 | /* helper macros */ |
|---|
| 63 | #define BVDB_P_STRCPY(DSTR, SSTR) \ |
|---|
| 64 | strncpy(DSTR, SSTR, BVDB_MAX_STRLEN) |
|---|
| 65 | |
|---|
| 66 | #define BVDB_P_STRCAT(DSTR, SSTR) \ |
|---|
| 67 | strncat(DSTR, SSTR, BVDB_MAX_STRLEN) |
|---|
| 68 | |
|---|
| 69 | /*************************************************************************** |
|---|
| 70 | * BVDB_P_Context |
|---|
| 71 | * Head of the doubly-linked list |
|---|
| 72 | ***************************************************************************/ |
|---|
| 73 | typedef struct BVDB_P_Context BVDB_P_Context; |
|---|
| 74 | BLST_CQ_HEAD(BVDB_P_Context, BVDB_UsageMode); |
|---|
| 75 | |
|---|
| 76 | typedef enum |
|---|
| 77 | { |
|---|
| 78 | BVDB_ModeType_eFull = 0, |
|---|
| 79 | BVDB_ModeType_ePig, |
|---|
| 80 | BVDB_ModeType_ePip, |
|---|
| 81 | BVDB_ModeType_eVcr, |
|---|
| 82 | BVDB_ModeType_eInvalid |
|---|
| 83 | } BVDB_DispModeType; |
|---|
| 84 | |
|---|
| 85 | /* Functions */ |
|---|
| 86 | bool BVDB_P_IsSd |
|---|
| 87 | (BVDB_SourceFormatSet eSrcFmtSet ); |
|---|
| 88 | |
|---|
| 89 | bool BVDB_P_IsSourceProgressive |
|---|
| 90 | ( BVDB_SourceFormatSet eSrcFmt ); |
|---|
| 91 | |
|---|
| 92 | uint32_t BVDB_P_GetConfigId |
|---|
| 93 | ( char *pcStr ); |
|---|
| 94 | |
|---|
| 95 | BVDB_DispModeType BVDB_P_GetVideoDisplayModeType |
|---|
| 96 | ( BVDB_VideoDisplayMode *pstVidDispMode ); |
|---|
| 97 | |
|---|
| 98 | BERR_Code BVDB_P_GetSourceFormatSetId |
|---|
| 99 | ( BVDB_SourceFormatSet eSrcFmt, |
|---|
| 100 | char *pcId ); |
|---|
| 101 | |
|---|
| 102 | BERR_Code BVDB_P_CreateId |
|---|
| 103 | ( BVDB_P_Context *pVdb, |
|---|
| 104 | BVDB_UsageMode *pstUsageMode ); |
|---|
| 105 | |
|---|
| 106 | BERR_Code BVDB_P_CreateRts |
|---|
| 107 | ( BVDB_UsageMode *pstUsageMode, |
|---|
| 108 | char *acRts ); |
|---|
| 109 | |
|---|
| 110 | void BVDB_P_GetSourceFormatSetStr |
|---|
| 111 | ( BVDB_SourceFormatSet eSrcFmt, |
|---|
| 112 | char *pcStr ); |
|---|
| 113 | |
|---|
| 114 | void BVDB_P_GetDisplayStr |
|---|
| 115 | ( BVDB_Display eDisplay, |
|---|
| 116 | char *pcStr ); |
|---|
| 117 | |
|---|
| 118 | void BVDB_P_GetWindowStr |
|---|
| 119 | ( BVDB_Window eWin, |
|---|
| 120 | char *pcStr ); |
|---|
| 121 | |
|---|
| 122 | void BVDB_P_GetInputStr |
|---|
| 123 | ( BVDB_Input eInput, |
|---|
| 124 | char *pcStr ); |
|---|
| 125 | |
|---|
| 126 | void BVDB_P_GetVideoDisplayModeStr |
|---|
| 127 | ( BVDB_VideoDisplayMode *pstVidDispMode, |
|---|
| 128 | char *pcStr ); |
|---|
| 129 | |
|---|
| 130 | void BVDB_P_GetOsdStr |
|---|
| 131 | ( BVDB_Osd eOsd, |
|---|
| 132 | char *pcStr ); |
|---|
| 133 | |
|---|
| 134 | void BVDB_P_GetPixelFormatStr |
|---|
| 135 | ( BVDB_PixelFormat ePxlFormat, |
|---|
| 136 | BVDB_State eState, |
|---|
| 137 | char *pcStr ); |
|---|
| 138 | |
|---|
| 139 | void BVDB_P_GetFieldStoreCntStr |
|---|
| 140 | ( BVDB_DeinterlacerFieldStore eFieldStore, |
|---|
| 141 | char *pcStr ); |
|---|
| 142 | |
|---|
| 143 | void BVDB_P_GetRtsSetStr |
|---|
| 144 | ( BVDB_RtsSet stRtsSet, |
|---|
| 145 | char *pcStr ); |
|---|
| 146 | |
|---|
| 147 | void BVDB_P_GetStateStr |
|---|
| 148 | ( BVDB_State eState, |
|---|
| 149 | char *pcStr ); |
|---|
| 150 | |
|---|
| 151 | void BVDB_P_GetSclCapBiasStr |
|---|
| 152 | ( BVDB_ScalerCaptureBias eBias, |
|---|
| 153 | char *pcStr ); |
|---|
| 154 | |
|---|
| 155 | BERR_Code BVDB_P_ValidateId |
|---|
| 156 | ( BVDB_P_Context *pVdb, |
|---|
| 157 | BVDB_UsageMode *pstUsageMode ); |
|---|
| 158 | |
|---|
| 159 | BERR_Code BVDB_P_ValidateOsd |
|---|
| 160 | ( BVDB_UsageMode *pstUsageMode ); |
|---|
| 161 | |
|---|
| 162 | BERR_Code BVDB_P_Validate3dComb |
|---|
| 163 | ( BVDB_UsageMode *pstUsageMode ); |
|---|
| 164 | |
|---|
| 165 | BERR_Code BVDB_P_ValidateRtsSet |
|---|
| 166 | ( BVDB_UsageMode *pstUsageMode ); |
|---|
| 167 | |
|---|
| 168 | BERR_Code BVDB_P_ValidateOversample |
|---|
| 169 | ( BVDB_UsageMode *pstUsageMode ); |
|---|
| 170 | |
|---|
| 171 | BERR_Code BVDB_P_ValidateMnrBnr |
|---|
| 172 | ( BVDB_UsageMode *pstUsageMode ); |
|---|
| 173 | |
|---|
| 174 | BERR_Code BVDB_P_ValidateDcr |
|---|
| 175 | ( BVDB_UsageMode *pstUsageMode ); |
|---|
| 176 | |
|---|
| 177 | BERR_Code BVDB_P_ValidateAnr |
|---|
| 178 | ( BVDB_UsageMode *pstUsageMode ); |
|---|
| 179 | |
|---|
| 180 | BERR_Code BVDB_P_ValidateCapVfd |
|---|
| 181 | ( BVDB_UsageMode *pstUsageMode ); |
|---|
| 182 | |
|---|
| 183 | BERR_Code BVDB_P_ValidateMad |
|---|
| 184 | ( BVDB_UsageMode *pstUsageMode ); |
|---|
| 185 | |
|---|
| 186 | BERR_Code BVDB_P_ValidateVdbEntry |
|---|
| 187 | ( BVDB_P_Context *pVdb, |
|---|
| 188 | BVDB_UsageMode *pstUsageMode ); |
|---|
| 189 | |
|---|
| 190 | BERR_Code BVDB_P_ValidateVdb |
|---|
| 191 | ( BVDB_P_Context *pVdb ); |
|---|
| 192 | |
|---|
| 193 | |
|---|
| 194 | #if 0 |
|---|
| 195 | BERR_Code BVDB_P_ValidateSourceFormat |
|---|
| 196 | BFMT_VideoFmt eSourceFmt, |
|---|
| 197 | BVDB_UsageMode *pstUsageMode ); |
|---|
| 198 | #endif |
|---|
| 199 | |
|---|
| 200 | #ifdef __cplusplus |
|---|
| 201 | } |
|---|
| 202 | #endif |
|---|
| 203 | |
|---|
| 204 | #endif /* __BVDB_PRIV_H__ */ |
|---|