source: svn/newcon3bcm2_21bu/magnum/commonutils/vdb/35125/C0/bvdb.h @ 74

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