| 1 | /*************************************************************************** |
|---|
| 2 | * (c)2007-2011 Broadcom Corporation |
|---|
| 3 | * |
|---|
| 4 | * This program is the proprietary software of Broadcom Corporation and/or its licensors, |
|---|
| 5 | * and may only be used, duplicated, modified or distributed pursuant to the terms and |
|---|
| 6 | * conditions of a separate, written license agreement executed between you and Broadcom |
|---|
| 7 | * (an "Authorized License"). Except as set forth in an Authorized License, Broadcom grants |
|---|
| 8 | * no license (express or implied), right to use, or waiver of any kind with respect to the |
|---|
| 9 | * Software, and Broadcom expressly reserves all rights in and to the Software and all |
|---|
| 10 | * intellectual property rights therein. IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU |
|---|
| 11 | * HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY |
|---|
| 12 | * NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. |
|---|
| 13 | * |
|---|
| 14 | * Except as expressly set forth in the Authorized License, |
|---|
| 15 | * |
|---|
| 16 | * 1. This program, including its structure, sequence and organization, constitutes the valuable trade |
|---|
| 17 | * secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof, |
|---|
| 18 | * and to use this information only in connection with your use of Broadcom integrated circuit products. |
|---|
| 19 | * |
|---|
| 20 | * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" |
|---|
| 21 | * AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR |
|---|
| 22 | * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO |
|---|
| 23 | * THE SOFTWARE. BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES |
|---|
| 24 | * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, |
|---|
| 25 | * LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION |
|---|
| 26 | * OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF |
|---|
| 27 | * USE OR PERFORMANCE OF THE SOFTWARE. |
|---|
| 28 | * |
|---|
| 29 | * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS |
|---|
| 30 | * LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR |
|---|
| 31 | * EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR |
|---|
| 32 | * USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF |
|---|
| 33 | * THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT |
|---|
| 34 | * ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE |
|---|
| 35 | * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF |
|---|
| 36 | * ANY LIMITED REMEDY. |
|---|
| 37 | * |
|---|
| 38 | * $brcm_Workfile: nexus_display_custom.h $ |
|---|
| 39 | * $brcm_Revision: 3 $ |
|---|
| 40 | * $brcm_Date: 7/8/11 4:13p $ |
|---|
| 41 | * |
|---|
| 42 | * Module Description: |
|---|
| 43 | * |
|---|
| 44 | * Revision History: |
|---|
| 45 | * |
|---|
| 46 | * $brcm_Log: /nexus/modules/display/7400/include/nexus_display_custom.h $ |
|---|
| 47 | * |
|---|
| 48 | * 3 7/8/11 4:13p erickson |
|---|
| 49 | * SW7425-592: add NEXUS_DisplayAspectRatio_eSar for custom display |
|---|
| 50 | * formats |
|---|
| 51 | * |
|---|
| 52 | * 2 2/18/11 2:08p erickson |
|---|
| 53 | * SW7425-64: update NEXUS_DisplayCustomFormatSettings for transcoding |
|---|
| 54 | * settops |
|---|
| 55 | * |
|---|
| 56 | * 1 2/14/11 5:00p erickson |
|---|
| 57 | * SW7425-64: move NEXUS_Display_SetCustomFormatSettings to |
|---|
| 58 | * nexus_display_custom.h |
|---|
| 59 | * |
|---|
| 60 | **************************************************************************/ |
|---|
| 61 | #ifndef NEXUS_DISPLAY_CUSTOM_H__ |
|---|
| 62 | #define NEXUS_DISPLAY_CUSTOM_H__ |
|---|
| 63 | |
|---|
| 64 | #include "nexus_display.h" |
|---|
| 65 | |
|---|
| 66 | #ifdef __cplusplus |
|---|
| 67 | extern "C" { |
|---|
| 68 | #endif |
|---|
| 69 | |
|---|
| 70 | /** |
|---|
| 71 | Summary: |
|---|
| 72 | Custom display format used in NEXUS_Display_SetCustomFormatSettings |
|---|
| 73 | **/ |
|---|
| 74 | typedef struct NEXUS_DisplayCustomFormatSettings |
|---|
| 75 | { |
|---|
| 76 | unsigned width; /* in pixels */ |
|---|
| 77 | unsigned height; /* in pixels */ |
|---|
| 78 | unsigned refreshRate; /* in 1/1000 Hz. for example, 23.976Hz is 23976, 59.94Hz is 59940. */ |
|---|
| 79 | bool interlaced; |
|---|
| 80 | NEXUS_DisplayAspectRatio aspectRatio; |
|---|
| 81 | struct { |
|---|
| 82 | unsigned x, y; |
|---|
| 83 | } sampleAspectRatio; /* Valid is user-specified aspectRatio is NEXUS_AspectRatio_eSar */ |
|---|
| 84 | bool dropFrameAllowed; /* if false, refreshRate will be used exactly. if true, 1001 slip is allowed when tracking to source frame rate. */ |
|---|
| 85 | } NEXUS_DisplayCustomFormatSettings; |
|---|
| 86 | |
|---|
| 87 | /** |
|---|
| 88 | Summary: |
|---|
| 89 | Get default values for NEXUS_DisplayCustomFormatSettings |
|---|
| 90 | **/ |
|---|
| 91 | void NEXUS_Display_GetDefaultCustomFormatSettings( |
|---|
| 92 | NEXUS_DisplayCustomFormatSettings *pSettings /* [out] */ |
|---|
| 93 | ); |
|---|
| 94 | |
|---|
| 95 | /** |
|---|
| 96 | Summary: |
|---|
| 97 | Set a custom display format along with its settings |
|---|
| 98 | |
|---|
| 99 | Description: |
|---|
| 100 | NEXUS_VideoFormat_eCustom0 and NEXUS_VideoFormat_eCustom1 are customizable, but only by replacing magnum/commonuntils/fmt/bfmt_custom.c. |
|---|
| 101 | They are not customizable at runtime using this function. Only NEXUS_VideoFormat_eCustom2 is customizable using this function. |
|---|
| 102 | |
|---|
| 103 | On set-top boxes, this is used for transcoder display configuration. |
|---|
| 104 | |
|---|
| 105 | The DTV version of this function is different. |
|---|
| 106 | **/ |
|---|
| 107 | NEXUS_Error NEXUS_Display_SetCustomFormatSettings( |
|---|
| 108 | NEXUS_DisplayHandle display, |
|---|
| 109 | NEXUS_VideoFormat format, |
|---|
| 110 | const NEXUS_DisplayCustomFormatSettings *pSettings |
|---|
| 111 | ); |
|---|
| 112 | |
|---|
| 113 | #ifdef __cplusplus |
|---|
| 114 | } |
|---|
| 115 | #endif |
|---|
| 116 | |
|---|
| 117 | #endif /* NEXUS_DISPLAY_CUSTOM_H__ */ |
|---|