| 1 | /*************************************************************************** |
|---|
| 2 | * (c)2007-2010 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_striped_surface.h $ |
|---|
| 39 | * $brcm_Revision: 2 $ |
|---|
| 40 | * $brcm_Date: 8/17/10 4:22p $ |
|---|
| 41 | * |
|---|
| 42 | * Module Description: |
|---|
| 43 | * |
|---|
| 44 | * Revision History: |
|---|
| 45 | * |
|---|
| 46 | * $brcm_Log: /nexus/modules/surface/7400/include/nexus_striped_surface.h $ |
|---|
| 47 | * |
|---|
| 48 | * 2 8/17/10 4:22p erickson |
|---|
| 49 | * SW7420-928: use NEXUS_VideoBufferType for striped surface |
|---|
| 50 | * |
|---|
| 51 | * 1 6/23/10 12:14p erickson |
|---|
| 52 | * SW7550-453: add nexus_striped_surface.h interface |
|---|
| 53 | * |
|---|
| 54 | **************************************************************************/ |
|---|
| 55 | #ifndef NEXUS_STRIPED_SURFACE_H__ |
|---|
| 56 | #define NEXUS_STRIPED_SURFACE_H__ |
|---|
| 57 | |
|---|
| 58 | #include "nexus_types.h" |
|---|
| 59 | |
|---|
| 60 | #ifdef __cplusplus |
|---|
| 61 | extern "C" { |
|---|
| 62 | #endif |
|---|
| 63 | |
|---|
| 64 | /** |
|---|
| 65 | Summary: |
|---|
| 66 | A striped surface is a video plane which is obtained from the VideoDecoder. |
|---|
| 67 | Use NEXUS_Graphics2D_Destripe to convert this to a NEXUS_SurfaceHandle, which can be used in the graphics subsystem. |
|---|
| 68 | **/ |
|---|
| 69 | typedef struct NEXUS_StripedSurface *NEXUS_StripedSurfaceHandle; |
|---|
| 70 | |
|---|
| 71 | /** |
|---|
| 72 | Summary: |
|---|
| 73 | Settings for a striped surface |
|---|
| 74 | **/ |
|---|
| 75 | typedef struct NEXUS_StripedSurfaceCreateSettings { |
|---|
| 76 | NEXUS_HeapHandle heap; |
|---|
| 77 | unsigned picMemIndex; /* pic MEMC index for 7400 */ |
|---|
| 78 | unsigned pitch; /* in bytes */ |
|---|
| 79 | |
|---|
| 80 | /* these come from BXVD_StillPictureBuffers */ |
|---|
| 81 | void *pLumaBuffer; /* attr{cached} */ |
|---|
| 82 | void *pChromaBuffer; /* attr{cached} */ |
|---|
| 83 | unsigned long imageWidth; /* in pixels */ |
|---|
| 84 | unsigned long imageHeight; /* in pixels */ |
|---|
| 85 | unsigned long stripedWidth; /* in pixels */ |
|---|
| 86 | unsigned long lumaStripedHeight; /* in pixels */ |
|---|
| 87 | unsigned long chromaStripedHeight; /* in pixels */ |
|---|
| 88 | NEXUS_VideoBufferType bufferType; |
|---|
| 89 | } NEXUS_StripedSurfaceCreateSettings; |
|---|
| 90 | |
|---|
| 91 | /** |
|---|
| 92 | Summary: |
|---|
| 93 | **/ |
|---|
| 94 | void NEXUS_StripedSurface_GetDefaultCreateSettings( |
|---|
| 95 | NEXUS_StripedSurfaceCreateSettings *pSettings /* [out] */ |
|---|
| 96 | ); |
|---|
| 97 | |
|---|
| 98 | /** |
|---|
| 99 | Summary: |
|---|
| 100 | **/ |
|---|
| 101 | NEXUS_StripedSurfaceHandle NEXUS_StripedSurface_Create( |
|---|
| 102 | const NEXUS_StripedSurfaceCreateSettings *pSettings |
|---|
| 103 | ); |
|---|
| 104 | |
|---|
| 105 | /** |
|---|
| 106 | Summary: |
|---|
| 107 | **/ |
|---|
| 108 | void NEXUS_StripedSurface_Destroy( |
|---|
| 109 | NEXUS_StripedSurfaceHandle stripedSurface |
|---|
| 110 | ); |
|---|
| 111 | |
|---|
| 112 | /** |
|---|
| 113 | Summary: |
|---|
| 114 | Get settings for this striped surface. These are set at create time only. |
|---|
| 115 | **/ |
|---|
| 116 | void NEXUS_StripedSurface_GetCreateSettings( |
|---|
| 117 | NEXUS_StripedSurfaceHandle stripedSurface, |
|---|
| 118 | NEXUS_StripedSurfaceCreateSettings *pSettings /* [out] */ |
|---|
| 119 | ); |
|---|
| 120 | |
|---|
| 121 | /** |
|---|
| 122 | Summary: |
|---|
| 123 | Information about a striped surface obtained by NEXUS_StripedSurface_GetStatus |
|---|
| 124 | **/ |
|---|
| 125 | typedef struct NEXUS_StripedSurfaceStatus |
|---|
| 126 | { |
|---|
| 127 | unsigned width; /* same as NEXUS_StripedSurfaceCreateSettings.imageWidth */ |
|---|
| 128 | unsigned height; /* same as NEXUS_StripedSurfaceCreateSettings.imageHeight */ |
|---|
| 129 | } NEXUS_StripedSurfaceStatus; |
|---|
| 130 | |
|---|
| 131 | /** |
|---|
| 132 | Summary: |
|---|
| 133 | DEPRECATED: Get information about the striped surface |
|---|
| 134 | |
|---|
| 135 | Description: |
|---|
| 136 | Use NEXUS_StripedSurface_GetCreateSettings to get equivalent information. |
|---|
| 137 | |
|---|
| 138 | A striped surface is the output of NEXUS_StillDecoder_GetStripedSurface. |
|---|
| 139 | Also see NEXUS_Graphics2D_Destripe. |
|---|
| 140 | This function is used if you want to know the dimensions of a striped surface before destriping it. |
|---|
| 141 | **/ |
|---|
| 142 | NEXUS_Error NEXUS_StripedSurface_GetStatus( |
|---|
| 143 | NEXUS_StripedSurfaceHandle stripedSurface, |
|---|
| 144 | NEXUS_StripedSurfaceStatus *pStatus /* [out] */ |
|---|
| 145 | ); |
|---|
| 146 | |
|---|
| 147 | #ifdef __cplusplus |
|---|
| 148 | } |
|---|
| 149 | #endif |
|---|
| 150 | |
|---|
| 151 | #endif |
|---|