| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2004-2010, 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: bsynclib_video_format.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/4 $ |
|---|
| 12 | * $brcm_Date: 6/30/10 3:50p $ |
|---|
| 13 | * |
|---|
| 14 | * Revision History: |
|---|
| 15 | * |
|---|
| 16 | * $brcm_Log: /magnum/syslib/synclib/noarch/bsynclib_video_format.h $ |
|---|
| 17 | * |
|---|
| 18 | * Hydra_Software_Devel/4 6/30/10 3:50p bandrews |
|---|
| 19 | * SW7335-781: check in private function protos |
|---|
| 20 | * |
|---|
| 21 | * Hydra_Software_Devel/3 8/4/09 4:56p bandrews |
|---|
| 22 | * PR52812: added improved rmd for dmv2 |
|---|
| 23 | * |
|---|
| 24 | * Hydra_Software_Devel/2 7/29/09 3:42p bandrews |
|---|
| 25 | * PR50988: Add support for 7 and 14 DIVX rates |
|---|
| 26 | * |
|---|
| 27 | * Hydra_Software_Devel/1 3/24/08 3:10p bandrews |
|---|
| 28 | * PR40865: Fixed |
|---|
| 29 | * |
|---|
| 30 | * Hydra_Software_Devel/2 2/26/08 10:21p bandrews |
|---|
| 31 | * PR37951: Fixed units. Implemented static rate mismatch detection. |
|---|
| 32 | * |
|---|
| 33 | * Hydra_Software_Devel/1 1/3/08 6:02p bandrews |
|---|
| 34 | * PR37951: Updated based on initial feedback |
|---|
| 35 | ***************************************************************************/ |
|---|
| 36 | |
|---|
| 37 | #include "bstd.h" |
|---|
| 38 | #include "bavc.h" |
|---|
| 39 | |
|---|
| 40 | #ifndef BSYNCLIB_VIDEO_FORMAT_H__ |
|---|
| 41 | #define BSYNCLIB_VIDEO_FORMAT_H__ |
|---|
| 42 | |
|---|
| 43 | typedef struct |
|---|
| 44 | { |
|---|
| 45 | bool bValid; |
|---|
| 46 | unsigned int uiHeight; /* height of format, required to predict VDC MAD state changes */ |
|---|
| 47 | bool bInterlaced; /* whether the format is interlaced */ |
|---|
| 48 | BAVC_FrameRateCode eFrameRate; /* the frame rate of the format */ |
|---|
| 49 | } BSYNClib_VideoFormat_Data; |
|---|
| 50 | |
|---|
| 51 | typedef struct |
|---|
| 52 | { |
|---|
| 53 | bool bChanged; |
|---|
| 54 | } BSYNClib_VideoFormat_DiffResults; |
|---|
| 55 | |
|---|
| 56 | typedef struct |
|---|
| 57 | { |
|---|
| 58 | BSYNClib_VideoFormat_Data sData; |
|---|
| 59 | BSYNClib_VideoFormat_Data sSnapshot; |
|---|
| 60 | } BSYNClib_VideoFormat; |
|---|
| 61 | |
|---|
| 62 | void BSYNClib_VideoFormat_Init(BSYNClib_VideoFormat * psFormat); |
|---|
| 63 | |
|---|
| 64 | void BSYNClib_VideoFormat_Reset_isr(BSYNClib_VideoFormat * psFormat); |
|---|
| 65 | |
|---|
| 66 | void BSYNClib_VideoFormat_Diff_isr( |
|---|
| 67 | BSYNClib_VideoFormat * psDesired, |
|---|
| 68 | BSYNClib_VideoFormat * psCurrent, |
|---|
| 69 | BSYNClib_VideoFormat_DiffResults * psResults |
|---|
| 70 | ); |
|---|
| 71 | |
|---|
| 72 | void BSYNClib_VideoFormat_Patch_isr( |
|---|
| 73 | BSYNClib_VideoFormat * psDesired, |
|---|
| 74 | BSYNClib_VideoFormat * psCurrent, |
|---|
| 75 | BSYNClib_VideoFormat_DiffResults * psResults |
|---|
| 76 | ); |
|---|
| 77 | |
|---|
| 78 | void BSYNClib_VideoFormat_Snapshot_isr(BSYNClib_VideoFormat * psFormat); |
|---|
| 79 | |
|---|
| 80 | unsigned int BSYNClib_VideoFormat_P_GetDownconvertedFramePeriod(BSYNClib_VideoFormat * psFormat); |
|---|
| 81 | unsigned int BSYNClib_VideoFormat_P_GetDownconvertedFramePeriod_isr(BSYNClib_VideoFormat * psFormat); |
|---|
| 82 | |
|---|
| 83 | unsigned int BSYNClib_VideoFormat_P_GetUpconvertedFramePeriod(BSYNClib_VideoFormat * psFormat); |
|---|
| 84 | unsigned int BSYNClib_VideoFormat_P_GetUpconvertedFramePeriod_isr(BSYNClib_VideoFormat * psFormat); |
|---|
| 85 | |
|---|
| 86 | unsigned int BSYNClib_VideoFormat_P_GetFramePeriod(BSYNClib_VideoFormat * psFormat); |
|---|
| 87 | unsigned int BSYNClib_VideoFormat_P_GetFramePeriod_isr(BSYNClib_VideoFormat * psFormat); |
|---|
| 88 | |
|---|
| 89 | unsigned int BSYNClib_VideoFormat_P_GetVsyncPeriod(BSYNClib_VideoFormat * psFormat); |
|---|
| 90 | unsigned int BSYNClib_VideoFormat_P_GetVsyncPeriod_isr(BSYNClib_VideoFormat * psFormat); |
|---|
| 91 | |
|---|
| 92 | bool BSYNClib_VideoFormat_P_IsFrameRateSupported(BAVC_FrameRateCode eRate); |
|---|
| 93 | bool BSYNClib_VideoFormat_P_IsFrameRateSupported_isr(BAVC_FrameRateCode eRate); |
|---|
| 94 | |
|---|
| 95 | #ifdef BDBG_DEBUG_BUILD |
|---|
| 96 | const char * BSYNClib_VideoFormat_P_GetFrameRateName(BAVC_FrameRateCode eRate); |
|---|
| 97 | const char * BSYNClib_VideoFormat_P_GetFrameRateName_isr(BAVC_FrameRateCode eRate); |
|---|
| 98 | #endif |
|---|
| 99 | |
|---|
| 100 | #endif /* BSYNCLIB_VIDEO_FORMAT_H__ */ |
|---|
| 101 | |
|---|