va.h | va.h | |||
---|---|---|---|---|
skipping to change at line 630 | skipping to change at line 630 | |||
} VAQMatrixBufferJPEG; | } VAQMatrixBufferJPEG; | |||
typedef struct _VAEncPictureParameterBufferJPEG | typedef struct _VAEncPictureParameterBufferJPEG | |||
{ | { | |||
VASurfaceID reconstructed_picture; | VASurfaceID reconstructed_picture; | |||
unsigned short picture_width; | unsigned short picture_width; | |||
unsigned short picture_height; | unsigned short picture_height; | |||
VABufferID coded_buf; | VABufferID coded_buf; | |||
} VAEncPictureParameterBufferJPEG; | } VAEncPictureParameterBufferJPEG; | |||
/* data struct for JPEG decoding */ | #include <va/va_dec_jpeg.h> | |||
/* Quantization table */ | ||||
typedef struct _VAIQMatrixBufferJPEG | ||||
{ | ||||
int precision[4]; /* valid value: 0(8-bits) , | ||||
1(16-bits), precision[Tq](Tq=0,1,2,3) | ||||
* specifies precision for | ||||
destination Tq | ||||
*/ | ||||
unsigned char quantiser_matrix[4][128]; /* quantiser_matrix[Tq](Tq= | ||||
0,1,2,3) specifies a | ||||
* quantization table for d | ||||
estination Tq in zig-zag | ||||
* scan order. Only the fir | ||||
st 64 bytes are valid for each | ||||
* table if precision is 0( | ||||
8-bits). | ||||
*/ | ||||
} VAIQMatrixBufferJPEG; | ||||
#define VA_JPEG_SOF0 0xC0 | ||||
#define VA_JPEG_SOF1 0xC1 | ||||
#define VA_JPEG_SOF2 0xC2 | ||||
#define VA_JPEG_SOF3 0xC3 | ||||
#define VA_JPEG_SOF5 0xC5 | ||||
#define VA_JPEG_SOF6 0xC6 | ||||
#define VA_JPEG_SOF7 0xC7 | ||||
#define VA_JPEG_SOF9 0xC9 | ||||
#define VA_JPEG_SOF10 0xCA | ||||
#define VA_JPEG_SOF11 0xCB | ||||
#define VA_JPEG_SOF13 0xCD | ||||
#define VA_JPEG_SOF14 0xCE | ||||
/* JPEG Picture Parameter Buffer */ | ||||
typedef struct _VAPictureParameterBufferJPEG | ||||
{ | ||||
unsigned int type; /* SOFn */ | ||||
unsigned int sample_precision; | ||||
unsigned int image_width; | ||||
unsigned int image_height; | ||||
unsigned int num_components; | ||||
struct { | ||||
unsigned char component_id; /* Ci, the range is 0-255, | ||||
see B.2.2 */ | ||||
unsigned char h_sampling_factor; | ||||
unsigned char v_sampling_factor; | ||||
unsigned char quantiser_table_selector; /* Tqi, quantization table | ||||
destination selector */ | ||||
} components[4]; | ||||
/* ROI (region of interest), for JPEG2000 */ | ||||
struct { | ||||
int enabled; | ||||
int start_x; | ||||
int start_y; | ||||
int end_x; | ||||
int end_y; | ||||
} roi; | ||||
int rotation; | ||||
} VAPictureParameterBufferJPEG; | ||||
typedef struct _VAHuffmanTableBufferJPEG | ||||
{ | ||||
struct { | ||||
unsigned char dc_bits[16]; /* Number of Huffman codes of lengt | ||||
h i for DC */ | ||||
unsigned char dc_huffval[20]; /* Value associated with each Huffm | ||||
an code for DC */ | ||||
unsigned char ac_bits[16]; /* Number of Huffman codes of lengt | ||||
h i for AC */ | ||||
unsigned char ac_huffval[256]; /* Value associated with each Huffm | ||||
an code for AC */ | ||||
} huffman_table[4]; /* Up to 4 huffman tables, huffman_ | ||||
table[Th](Th=0,1,2,3) | ||||
* specifies a buffman table for de | ||||
stination Th. | ||||
*/ | ||||
} VAHuffmanTableBufferJPEG; | ||||
/* JPEG Scan Parameter Buffer, The Scan of is similar to | ||||
* the Slice of other codecs */ | ||||
typedef struct _VASliceParameterBufferJPEG | ||||
{ | ||||
unsigned int slice_data_size; /* number of bytes in the slice data | ||||
buffer for this slice */ | ||||
unsigned int slice_data_offset; /* the offset to the first byte of s | ||||
lice data */ | ||||
unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defini | ||||
tions */ | ||||
unsigned int slice_horizontal_position; | ||||
unsigned int slice_vertical_position; | ||||
unsigned int num_components; | ||||
struct { | ||||
int component_id; /* Csj, it must match one of compon | ||||
ent_ids specified in VAPictureParameterBufferJPEG */ | ||||
int dc_selector; /* Tdj(0,1,2,3) */ | ||||
int ac_selector; /* Taj(0,1,2,3) */ | ||||
} components[4]; | ||||
int restart_interval; /* specifies the number of MCUs in restart interv | ||||
al, defined in DRI marker */ | ||||
int num_mcus; /* indicates the number of MCUs in a scan */ | ||||
} VASliceParameterBufferJPEG; | ||||
/**************************** | /**************************** | |||
* MPEG-2 data structures | * MPEG-2 data structures | |||
****************************/ | ****************************/ | |||
/* MPEG-2 Picture Parameter Buffer */ | /* MPEG-2 Picture Parameter Buffer */ | |||
/* | /* | |||
* For each frame or field, and before any slice data, a single | * For each frame or field, and before any slice data, a single | |||
* picture parameter buffer must be send. | * picture parameter buffer must be send. | |||
*/ | */ | |||
End of changes. 1 change blocks. | ||||
107 lines changed or deleted | 1 lines changed or added | |||
va_backend.h | va_backend.h | |||
---|---|---|---|---|
skipping to change at line 38 | skipping to change at line 38 | |||
#ifndef _VA_BACKEND_H_ | #ifndef _VA_BACKEND_H_ | |||
#define _VA_BACKEND_H_ | #define _VA_BACKEND_H_ | |||
#include <va/va.h> | #include <va/va.h> | |||
#include <linux/videodev2.h> | #include <linux/videodev2.h> | |||
typedef struct VADriverContext *VADriverContextP; | typedef struct VADriverContext *VADriverContextP; | |||
typedef struct VADisplayContext *VADisplayContextP; | typedef struct VADisplayContext *VADisplayContextP; | |||
/** \brief VA display types. */ | ||||
enum { | ||||
/** \brief Mask to major identifier for VA display type. */ | ||||
VA_DISPLAY_MAJOR_MASK = 0xf0, | ||||
/** \brief VA/X11 API is used, through vaGetDisplay() entry-point. */ | ||||
VA_DISPLAY_X11 = 0x10, | ||||
/** \brief VA/GLX API is used, through vaGetDisplayGLX() entry-point. * | ||||
/ | ||||
VA_DISPLAY_GLX = (VA_DISPLAY_X11 | (1 << 0)), | ||||
/** \brief VA/Android API is used, through vaGetDisplay() entry-point. | ||||
*/ | ||||
VA_DISPLAY_ANDROID = 0x20, | ||||
/** \brief VA/DRM API is used, through vaGetDisplayDRM() entry-point. * | ||||
/ | ||||
VA_DISPLAY_DRM = 0x30, | ||||
/** \brief VA/Wayland API is used, through vaGetDisplayWl() entry-point | ||||
. */ | ||||
VA_DISPLAY_WAYLAND = 0x40, | ||||
}; | ||||
struct VADriverVTable | struct VADriverVTable | |||
{ | { | |||
VAStatus (*vaTerminate) ( VADriverContextP ctx ); | VAStatus (*vaTerminate) ( VADriverContextP ctx ); | |||
VAStatus (*vaQueryConfigProfiles) ( | VAStatus (*vaQueryConfigProfiles) ( | |||
VADriverContextP ctx, | VADriverContextP ctx, | |||
VAProfile *profile_list, /* out */ | VAProfile *profile_list, /* out */ | |||
int *num_profiles /* out */ | int *num_profiles /* out */ | |||
); | ); | |||
skipping to change at line 431 | skipping to change at line 448 | |||
int max_profiles; | int max_profiles; | |||
int max_entrypoints; | int max_entrypoints; | |||
int max_attributes; | int max_attributes; | |||
int max_image_formats; | int max_image_formats; | |||
int max_subpic_formats; | int max_subpic_formats; | |||
int max_display_attributes; | int max_display_attributes; | |||
const char *str_vendor; | const char *str_vendor; | |||
void *handle; /* dlopen handle */ | void *handle; /* dlopen handle */ | |||
void *dri_state; | /** | |||
* \brief DRM state. | ||||
* | ||||
* This field holds driver specific data for DRM-based | ||||
* drivers. This structure is allocated from libva with | ||||
* calloc(). Do not deallocate from within VA driver | ||||
* implementations. | ||||
* | ||||
* All structures shall be derived from struct drm_state. So, for | ||||
* instance, this field holds a dri_state structure for VA/X11 | ||||
* drivers that use the DRM protocol. | ||||
*/ | ||||
void *drm_state; | ||||
void *glx; /* opaque for GLX code */ | void *glx; /* opaque for GLX code */ | |||
void *egl; | ||||
unsigned long reserved[44]; /* reserve for future add-ins, decr | /** \brief VA display type. */ | |||
ease the subscript accordingly */ | unsigned long display_type; | |||
/** | ||||
* The VA/Wayland implementation hooks. | ||||
* | ||||
* This structure is intended for drivers that implement the | ||||
* VA/Wayland API. libVA allocates this structure with calloc() | ||||
* and owns the resulting memory. | ||||
*/ | ||||
struct VADriverVTableWayland *vtable_wayland; | ||||
unsigned long reserved[43]; /* reserve for future add-ins, decr | ||||
ease the subscript accordingly */ | ||||
}; | }; | |||
#define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */ | #define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */ | |||
struct VADisplayContext | struct VADisplayContext | |||
{ | { | |||
int vadpy_magic; | int vadpy_magic; | |||
VADisplayContextP pNext; | VADisplayContextP pNext; | |||
VADriverContextP pDriverContext; | VADriverContextP pDriverContext; | |||
skipping to change at line 459 | skipping to change at line 501 | |||
void (*vaDestroy) ( | void (*vaDestroy) ( | |||
VADisplayContextP ctx | VADisplayContextP ctx | |||
); | ); | |||
VAStatus (*vaGetDriverName) ( | VAStatus (*vaGetDriverName) ( | |||
VADisplayContextP ctx, | VADisplayContextP ctx, | |||
char **driver_name | char **driver_name | |||
); | ); | |||
void *opaque; /* opaque for display extensions (e.g. GLX) */ | void *opaque; /* opaque for display extensions (e.g. GLX) */ | |||
VAStatus (*vaCreateNativePixmap) ( | ||||
VADisplayContextP pDisplayContext, | ||||
unsigned int width, | ||||
unsigned int height, | ||||
void **native_pixmap); | ||||
VAStatus (*vaFreeNativePixmap) ( | ||||
VADisplayContextP pDisplayContext, | ||||
void *native_pixmap); | ||||
}; | }; | |||
typedef VAStatus (*VADriverInit) ( | typedef VAStatus (*VADriverInit) ( | |||
VADriverContextP driver_context | VADriverContextP driver_context | |||
); | ); | |||
#endif /* _VA_BACKEND_H_ */ | #endif /* _VA_BACKEND_H_ */ | |||
End of changes. 4 change blocks. | ||||
14 lines changed or deleted | 50 lines changed or added | |||
va_backend_egl.h | va_backend_egl.h | |||
---|---|---|---|---|
skipping to change at line 28 | skipping to change at line 28 | |||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. | |||
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR | |||
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | |||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | |||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
*/ | */ | |||
#ifndef VA_BACKEND_EGL_H | #ifndef VA_BACKEND_EGL_H | |||
#define VA_BACKEND_EGL_H | #define VA_BACKEND_EGL_H | |||
#include <va/va_egl.h> | #include <va/va.h> | |||
#include <va/va_backend.h> | #include <va/va_backend.h> | |||
struct VADriverVTableEGL { | struct VADriverVTableEGL { | |||
/* Get EGL ClientBufer buffer index and device id from surface id*/ | /* Get EGL ClientBufer buffer index and device id from surface id*/ | |||
VAStatus (*vaGetEGLClientBufferFromSurface) ( | VAStatus (*vaGetEGLClientBufferFromSurface) ( | |||
VADriverContextP ctx, | VADriverContextP ctx, | |||
VASurfaceID surface, | VASurfaceID surface, | |||
void **buffer | void **buffer | |||
); | ); | |||
/* TBD: more APIs for EGL */ | /* TBD: more APIs for EGL */ | |||
int max_egl_surface_targets; | ||||
int max_egl_surface_attributes; | ||||
VAStatus (*vaQuerySurfaceTargetsEGL)( | ||||
VADriverContextP ctx, | ||||
EGLenum *target_list, /* out */ | ||||
int *num_targets /* out */ | ||||
); | ||||
VAStatus (*vaCreateSurfaceEGL)( | ||||
VADriverContextP ctx, | ||||
EGLenum target, | ||||
unsigned int width, | ||||
unsigned int height, | ||||
VASurfaceEGL *gl_surface | ||||
); | ||||
/* Optional: destroy a VA/EGL surface */ | ||||
VAStatus (*vaDestroySurfaceEGL)( | ||||
VADriverContextP ctx, | ||||
VASurfaceEGL egl_surface | ||||
); | ||||
VAStatus (*vaAssociateSurfaceEGL)( | ||||
VADriverContextP ctx, | ||||
VASurfaceEGL egl_surface, | ||||
VASurfaceID surface, | ||||
unsigned int flags | ||||
); | ||||
VAStatus (*vaSyncSurfaceEGL)( | ||||
VADriverContextP ctx, | ||||
VASurfaceEGL egl_surface | ||||
); | ||||
VAStatus (*vaGetSurfaceInfoEGL)( | ||||
VADisplay dpy, | ||||
VASurfaceEGL egl_surface, | ||||
EGLenum *target, | ||||
EGLClientBuffer *buffer, | ||||
EGLint *attrib_list, | ||||
int *num_attribs | ||||
); | ||||
VAStatus (*vaDeassociateSurfaceEGL)( | ||||
VADriverContextP ctx, | ||||
VASurfaceEGL egl_surface | ||||
); | ||||
}; | }; | |||
#endif /* VA_BACKEND_EGL_H */ | #endif /* VA_BACKEND_EGL_H */ | |||
End of changes. 3 change blocks. | ||||
50 lines changed or deleted | 1 lines changed or added | |||
va_dricommon.h | va_dricommon.h | |||
---|---|---|---|---|
/* | ||||
* Copyright (c) 2012 Intel Corporation. All Rights Reserved. | ||||
* | ||||
* Permission is hereby granted, free of charge, to any person obtaining a | ||||
* copy of this software and associated documentation files (the | ||||
* "Software"), to deal in the Software without restriction, including | ||||
* without limitation the rights to use, copy, modify, merge, publish, | ||||
* distribute, sub license, and/or sell copies of the Software, and to | ||||
* permit persons to whom the Software is furnished to do so, subject to | ||||
* the following conditions: | ||||
* | ||||
* The above copyright notice and this permission notice (including the | ||||
* next paragraph) shall be included in all copies or substantial portions | ||||
* of the Software. | ||||
* | ||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. | ||||
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR | ||||
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
*/ | ||||
#ifndef _VA_DRICOMMON_H_ | #ifndef _VA_DRICOMMON_H_ | |||
#define _VA_DRICOMMON_H_ | #define _VA_DRICOMMON_H_ | |||
#ifndef ANDROID | #ifndef ANDROID | |||
#include <X11/Xlib.h> | #include <X11/Xlib.h> | |||
#include <xf86drm.h> | #include <xf86drm.h> | |||
#include <drm.h> | #include <drm.h> | |||
#include <drm_sarea.h> | #include <drm_sarea.h> | |||
#endif | #endif | |||
#include <va/va_backend.h> | #include <va/va_backend.h> | |||
#include <va/va_drmcommon.h> | ||||
#ifdef ANDROID | #ifdef ANDROID | |||
#define XID unsigned int | #define XID unsigned int | |||
#define Bool int | #define Bool int | |||
#endif | #endif | |||
enum | enum { | |||
{ | /* Compatibility. Do not use for newly-written code. */ | |||
VA_NONE = 0, | VA_NONE = VA_DRM_AUTH_NONE, | |||
VA_DRI1 = 1, | VA_DRI1 = VA_DRM_AUTH_DRI1, | |||
VA_DRI2 = 2, | VA_DRI2 = VA_DRM_AUTH_DRI2, | |||
VA_DUMMY = 3 | VA_DUMMY = VA_DRM_AUTH_CUSTOM | |||
}; | }; | |||
union dri_buffer | union dri_buffer | |||
{ | { | |||
struct { | struct { | |||
unsigned int attachment; | unsigned int attachment; | |||
unsigned int name; | unsigned int name; | |||
unsigned int pitch; | unsigned int pitch; | |||
unsigned int cpp; | unsigned int cpp; | |||
unsigned int flags; | unsigned int flags; | |||
skipping to change at line 51 | skipping to change at line 75 | |||
int x; | int x; | |||
int y; | int y; | |||
unsigned int width; | unsigned int width; | |||
unsigned int height; | unsigned int height; | |||
struct dri_drawable *next; | struct dri_drawable *next; | |||
}; | }; | |||
#define DRAWABLE_HASH_SZ 32 | #define DRAWABLE_HASH_SZ 32 | |||
struct dri_state | struct dri_state | |||
{ | { | |||
int fd; | struct drm_state base; | |||
int driConnectedFlag; /* 0: disconnected, 1: DRI, 2: DRI2 */ | ||||
#ifndef ANDROID | #ifndef ANDROID | |||
struct dri_drawable *drawable_hash[DRAWABLE_HASH_SZ]; | struct dri_drawable *drawable_hash[DRAWABLE_HASH_SZ]; | |||
struct dri_drawable *(*createDrawable)(VADriverContextP ctx, XID x_draw able); | struct dri_drawable *(*createDrawable)(VADriverContextP ctx, XID x_draw able); | |||
void (*destroyDrawable)(VADriverContextP ctx, struct dri_drawable *dri_ drawable); | void (*destroyDrawable)(VADriverContextP ctx, struct dri_drawable *dri_ drawable); | |||
void (*swapBuffer)(VADriverContextP ctx, struct dri_drawable *dri_drawa ble); | void (*swapBuffer)(VADriverContextP ctx, struct dri_drawable *dri_drawa ble); | |||
union dri_buffer *(*getRenderingBuffer)(VADriverContextP ctx, struct dr i_drawable *dri_drawable); | union dri_buffer *(*getRenderingBuffer)(VADriverContextP ctx, struct dr i_drawable *dri_drawable); | |||
void (*close)(VADriverContextP ctx); | void (*close)(VADriverContextP ctx); | |||
#endif | #endif | |||
}; | }; | |||
End of changes. 4 change blocks. | ||||
8 lines changed or deleted | 31 lines changed or added | |||
va_egl.h | va_egl.h | |||
---|---|---|---|---|
#ifndef _VA_EGL_H_ | #ifndef _VA_EGL_H_ | |||
#define _VA_EGL_H_ | #define _VA_EGL_H_ | |||
#include <va/va.h> | #include <va/va.h> | |||
#include <EGL/egl.h> | ||||
#include <EGL/eglext.h> | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
typedef void *VASurfaceEGL; | typedef void* EGLClientBuffer; | |||
/*This function is used to get EGLClientBuffer | /*This function is used to get EGLClientBuffer | |||
* (lower 16bits is buffer index, upper 16bits | * (lower 16bits is buffer index, upper 16bits | |||
* is BC device id.) from surface id. Application | * is BC device id.) from surface id. Application | |||
* should maintain EGLClientBuffer itself.*/ | * should maintain EGLClientBuffer itself.*/ | |||
VAStatus vaGetEGLClientBufferFromSurface ( | VAStatus vaGetEGLClientBufferFromSurface ( | |||
VADisplay dpy, | VADisplay dpy, | |||
VASurfaceID surface, | VASurfaceID surface, | |||
EGLClientBuffer *buffer /* out*/ | EGLClientBuffer *buffer /* out*/ | |||
); | ); | |||
/** | ||||
* Return a suitable VADisplay for VA API | ||||
* | ||||
* @param[in] native_dpy the native display | ||||
* @param[in] egl_dpy the EGL display | ||||
* @return a VADisplay | ||||
*/ | ||||
VADisplay vaGetDisplayEGL( | ||||
VANativeDisplay native_dpy, | ||||
EGLDisplay egl_dpy | ||||
); | ||||
/** | ||||
* Return maximum number of EGL targets supported by the implementation | ||||
* | ||||
* @param[in] dpy the VADisplay | ||||
* @return the maximum number of EGL Target | ||||
*/ | ||||
int vaMaxNumSurfaceTargetsEGL( | ||||
VADisplay dpy | ||||
); | ||||
/** | ||||
* Return maximum number of EGL surface attributes supported by the impleme | ||||
ntation | ||||
* | ||||
* @param[in] dpy the VADisplay | ||||
* @return the maximum number of EGL surface attributes | ||||
*/ | ||||
int vaMaxNumSurfaceAttributesEGL( | ||||
VADisplay dpy | ||||
); | ||||
/** | ||||
* Query supported EGL targets for eglCreateImageKHR(). | ||||
* | ||||
* The caller must provide a "target_list" array that can hold at | ||||
* least vaMaxNumSurfaceTargetsEGL() entries. The actual number of | ||||
* targets returned in "target_list" is returned in "num_targets". | ||||
* | ||||
* @param[in]] dpy the VADisplay | ||||
* @param[out] target_list the array to hold target entries | ||||
* @param[out] num_targets the actual number of targets | ||||
* @return VA_STATUS_SUCCESS if successful | ||||
*/ | ||||
VAStatus vaQuerySurfaceTargetsEGL( | ||||
VADisplay dpy, | ||||
EGLenum *target_list, /* out */ | ||||
int *num_targets /* out */ | ||||
); | ||||
/** | ||||
* Creates a VA/EGL surface with the specified target | ||||
* | ||||
* If target is 0, this means the best efficient target by default. | ||||
* | ||||
* @param[in] dpy the VADisplay | ||||
* @param[in] target the specified EGL target | ||||
* @param[in] width the surface width | ||||
* @param[in] height the surface height | ||||
* @param[out] gl_surface the VA/EGL surface | ||||
* @return VA_STATUS_SUCCESS if successful | ||||
*/ | ||||
VAStatus vaCreateSurfaceEGL( | ||||
VADisplay dpy, | ||||
EGLenum target, | ||||
unsigned int width, | ||||
unsigned int height, | ||||
VASurfaceEGL *gl_surface | ||||
); | ||||
/** | ||||
* Destroy a VA/EGL surface | ||||
* | ||||
* The application shall maintain the live EGL context itself. | ||||
* | ||||
* @param[in] dpy the VA display | ||||
* @param[in] gl_surface the VA surface | ||||
* @return VA_STATUS_SUCCESS if successful | ||||
*/ | ||||
VAStatus vaDestroySurfaceEGL( | ||||
VADisplay dpy, | ||||
VASurfaceEGL gl_surface | ||||
); | ||||
/** | ||||
* Associate a EGL surface with a VA surface | ||||
* | ||||
* @param[in] dpy the VA display | ||||
* @param[in] egl_surface the VA/EGL destination surface | ||||
* @param[in] surface the VA surface | ||||
* @param[in] flags the flags to PutSurface | ||||
* @return VA_STATUS_SUCCESS if successful | ||||
*/ | ||||
VAStatus vaAssociateSurfaceEGL( | ||||
VADisplay dpy, | ||||
VASurfaceEGL egl_surface, | ||||
VASurfaceID surface, | ||||
unsigned int flags | ||||
); | ||||
/** | ||||
* Update the content of a VA/EGL surface | ||||
* | ||||
* Changes to VA surface are committed to VA/EGL surface at this point. | ||||
* | ||||
* @param[in] dpy the VA display | ||||
* @param[in] egl_surface the VA/EGL surface that has been associated with | ||||
a VA surface | ||||
* @return VA_STATUS_SUCCESS if successful | ||||
*/ | ||||
VAStatus vaSyncSurfaceEGL( | ||||
VADisplay dpy, | ||||
VASurfaceEGL egl_surface | ||||
); | ||||
/** | ||||
* Get the necessary information for eglCreateImageKHR() | ||||
* | ||||
* The caller must provide a "attrib_list" array that can hold at | ||||
* least (2 * vaMaxNumSurfaceAttributesEGL()) entries. The last attribute | ||||
* specified in attrib_list must be EGL_NONE | ||||
* | ||||
* @param[in] dpy the VA display | ||||
* @param[in] egl_surface the VA/EGL surface that has been associated with | ||||
a VA surface | ||||
* @param[out] target the type of <buffer> for eglCreateImageKHR() | ||||
* @param[out] buffer the EGLClientBuffer for eglCreateImageKHR() | ||||
* @param[out] attrib_list the list of attribute-value pairs for eglCreateI | ||||
mageKHR() | ||||
* @param[in/out] num_attribs input: the number of allocated attribute-valu | ||||
e pairs in attrib_list; output: the actual number of attribute-value pairs | ||||
* @return VA_STATUS_SUCCESS if successful | ||||
*/ | ||||
VAStatus vaGetSurfaceInfoEGL( | ||||
VADisplay dpy, | ||||
VASurfaceEGL egl_surface, | ||||
EGLenum *target, /* out, the type of <buffer> */ | ||||
EGLClientBuffer *buffer, /* out */ | ||||
EGLint *attrib_list, /* out, the last attribute must be EGL_NONE | ||||
*/ | ||||
int *num_attribs /* in/out, the number of attribute-value pa | ||||
irs */ | ||||
); | ||||
/** | ||||
* Deassociate a EGL surface | ||||
* | ||||
* @param[in] dpy the VA display | ||||
* @param[in] egl_surface the VA/EGL destination surface | ||||
* @return VA_STATUS_SUCCESS if successful | ||||
*/ | ||||
VAStatus vaDeassociateSurfaceEGL( | ||||
VADisplay dpy, | ||||
VASurfaceEGL egl_surface | ||||
); | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif /* _VA_EGL_H_ */ | #endif /* _VA_EGL_H_ */ | |||
End of changes. 3 change blocks. | ||||
160 lines changed or deleted | 1 lines changed or added | |||
va_x11.h | va_x11.h | |||
---|---|---|---|---|
/* | ||||
* Copyright (c) 2012 Intel Corporation. All Rights Reserved. | ||||
* | ||||
* Permission is hereby granted, free of charge, to any person obtaining a | ||||
* copy of this software and associated documentation files (the | ||||
* "Software"), to deal in the Software without restriction, including | ||||
* without limitation the rights to use, copy, modify, merge, publish, | ||||
* distribute, sub license, and/or sell copies of the Software, and to | ||||
* permit persons to whom the Software is furnished to do so, subject to | ||||
* the following conditions: | ||||
* | ||||
* The above copyright notice and this permission notice (including the | ||||
* next paragraph) shall be included in all copies or substantial portions | ||||
* of the Software. | ||||
* | ||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. | ||||
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR | ||||
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
*/ | ||||
#ifndef _VA_X11_H_ | #ifndef _VA_X11_H_ | |||
#define _VA_X11_H_ | #define _VA_X11_H_ | |||
#include <va/va.h> | #include <va/va.h> | |||
#include <X11/Xlib.h> | #include <X11/Xlib.h> | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 23 lines changed or added | |||