2 * Copyright (c) 2007-2009 Intel Corporation. All Rights Reserved.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sub license, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19 * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
20 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 VAExternalMemoryNULL
, /* it is not external buffer, but requires the implementation allocates
36 * the surface with the input attribute
38 VAExternalMemoryV4L2Buffer
,
39 VAExternalMemoryCIFrame
, /* the memory is from camera frames and buffers points the frame ID list */
40 VAExternalMemoryUserPointer
, /* the memory is malloc-ed and buffers points to the buffers */
41 VAExternalMemoryKernelDRMBufffer
, /* the memory is from kernel DRM buffers and buffers points the
42 * DRM buffer handle list
44 VAExternalMemoryAndroidGrallocBuffer
, /* the memory is from Android Gralloc memory, and buffers points
45 * the gralloc native_handle_t list
47 } VASurfaceMemoryType
;
49 typedef struct _VASurfaceAttributeTPI
{
50 VASurfaceMemoryType type
;
54 unsigned int pixel_format
; /* buffer format */
55 unsigned int tiling
; /* the memory is tiling or not */
56 unsigned int luma_stride
; /* luma stride, could be width aligned with a special value */
57 unsigned int chroma_u_stride
; /* chroma stride */
58 unsigned int chroma_v_stride
;
59 unsigned int luma_offset
; /* could be 0 */
60 unsigned int chroma_u_offset
; /* U offset from the beginning of the memory */
61 unsigned int chroma_v_offset
; /* V offset from the beginning of the memory */
62 unsigned int count
; /* buffer count for surface creation */
63 unsigned int *buffers
; /* buffer handles or user pointers */
64 unsigned int reserved
[4]; /* used to pass additional information, like
65 * Android native window pointer
67 } VASurfaceAttributeTPI
;
70 VAStatus
vaPutSurfaceBuf (
83 VARectangle
*cliprects
, /* client supplied clip list */
84 unsigned int number_cliprects
, /* number of clip rects in the clip list */
85 unsigned int flags
/* de-interlacing flags */
89 VAStatus
vaCreateSurfacesWithAttribute (
95 VASurfaceID
*surfaces
, /* out */
96 VASurfaceAttributeTPI
*attribute_tpi