va.h | va.h | |||
---|---|---|---|---|
skipping to change at line 183 | skipping to change at line 183 | |||
*/ | */ | |||
const char *vaErrorStr(VAStatus error_status); | const char *vaErrorStr(VAStatus error_status); | |||
/* | /* | |||
* Initialization: | * Initialization: | |||
* A display must be obtained by calling vaGetDisplay() before calling | * A display must be obtained by calling vaGetDisplay() before calling | |||
* vaInitialize() and other functions. This connects the API to the | * vaInitialize() and other functions. This connects the API to the | |||
* native window system. | * native window system. | |||
* For X Windows, native_dpy would be from XOpenDisplay() | * For X Windows, native_dpy would be from XOpenDisplay() | |||
*/ | */ | |||
typedef void* NativeDisplay; /* window system dependent */ | typedef void* VANativeDisplay; /* window system dependent */ | |||
int vaDisplayIsValid(VADisplay dpy); | int vaDisplayIsValid(VADisplay dpy); | |||
/* | /* | |||
* Initialize the library | * Initialize the library | |||
*/ | */ | |||
VAStatus vaInitialize ( | VAStatus vaInitialize ( | |||
VADisplay dpy, | VADisplay dpy, | |||
int *major_version, /* out */ | int *major_version, /* out */ | |||
int *minor_version /* out */ | int *minor_version /* out */ | |||
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; | |||
#include <va/va_dec_jpeg.h> | /* data struct for JPEG decoding */ | |||
/* 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. 2 change blocks. | ||||
2 lines changed or deleted | 108 lines changed or added | |||
va_backend.h | va_backend.h | |||
---|---|---|---|---|
skipping to change at line 33 | skipping to change at line 33 | |||
*/ | */ | |||
/* | /* | |||
* Video Decode Acceleration -Backend API | * Video Decode Acceleration -Backend API | |||
*/ | */ | |||
#ifndef _VA_BACKEND_H_ | #ifndef _VA_BACKEND_H_ | |||
#define _VA_BACKEND_H_ | #define _VA_BACKEND_H_ | |||
#include <va/va.h> | #include <va/va.h> | |||
#ifndef ANDROID | ||||
#include <X11/Xlib.h> | ||||
#endif | ||||
#include <linux/videodev2.h> | #include <linux/videodev2.h> | |||
typedef struct VADriverContext *VADriverContextP; | typedef struct VADriverContext *VADriverContextP; | |||
typedef struct VADisplayContext *VADisplayContextP; | typedef struct VADisplayContext *VADisplayContextP; | |||
struct VADriverVTable | struct VADriverVTable | |||
{ | { | |||
VAStatus (*vaTerminate) ( VADriverContextP ctx ); | VAStatus (*vaTerminate) ( VADriverContextP ctx ); | |||
VAStatus (*vaQueryConfigProfiles) ( | VAStatus (*vaQueryConfigProfiles) ( | |||
skipping to change at line 436 | skipping to change at line 433 | |||
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; | void *dri_state; | |||
void *glx; /* opaque for GLX code */ | void *glx; /* opaque for GLX code */ | |||
void *egl; | ||||
unsigned long reserved[45]; /* reserve for future add-ins, decr | unsigned long reserved[44]; /* reserve for future add-ins, decr | |||
ease the subscript accordingly */ | 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 462 | skipping to change at line 459 | |||
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. 3 change blocks. | ||||
6 lines changed or deleted | 13 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.h> | #include <va/va_egl.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. | ||||
1 lines changed or deleted | 50 lines changed or added | |||
va_dricommon.h | va_dricommon.h | |||
---|---|---|---|---|
skipping to change at line 35 | skipping to change at line 35 | |||
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; | |||
} dri2; | } dri2; | |||
struct { | ||||
} dri1; | ||||
}; | }; | |||
struct dri_drawable | struct dri_drawable | |||
{ | { | |||
XID x_drawable; | XID x_drawable; | |||
int is_window; | int is_window; | |||
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; | int fd; | |||
int driConnectedFlag; /* 0: disconnected, 1: DRI, 2: DRI2 */ | int driConnectedFlag; /* 0: disconnected, 1: DRI, 2: DRI2 */ | |||
#ifndef ANDROID | #ifndef ANDROID | |||
drm_handle_t hSAREA; | ||||
drm_context_t hwContext; | ||||
drmAddress pSAREA; | ||||
XID hwContextID; | ||||
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 | |||
}; | }; | |||
Bool isDRI2Connected(VADriverContextP ctx, char **driver_name); | Bool isDRI2Connected(VADriverContextP ctx, char **driver_name); | |||
Bool isDRI1Connected(VADriverContextP ctx, char **driver_name); | ||||
void free_drawable(VADriverContextP ctx, struct dri_drawable* dri_drawable) ; | void free_drawable(VADriverContextP ctx, struct dri_drawable* dri_drawable) ; | |||
void free_drawable_hashtable(VADriverContextP ctx); | void free_drawable_hashtable(VADriverContextP ctx); | |||
struct dri_drawable *dri_get_drawable(VADriverContextP ctx, XID drawable); | struct dri_drawable *dri_get_drawable(VADriverContextP ctx, XID drawable); | |||
void dri_swap_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawabl e); | void dri_swap_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawabl e); | |||
union dri_buffer *dri_get_rendering_buffer(VADriverContextP ctx, struct dri _drawable *dri_drawable); | union dri_buffer *dri_get_rendering_buffer(VADriverContextP ctx, struct dri _drawable *dri_drawable); | |||
#endif /* _VA_DRICOMMON_H_ */ | #endif /* _VA_DRICOMMON_H_ */ | |||
End of changes. 3 change blocks. | ||||
8 lines changed or deleted | 0 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* EGLClientBuffer; | typedef void *VASurfaceEGL; | |||
/*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. | ||||
1 lines changed or deleted | 160 lines changed or added | |||
va_tpi.h | va_tpi.h | |||
---|---|---|---|---|
skipping to change at line 98 | skipping to change at line 98 | |||
unsigned int chroma_u_stride, /* chroma stride */ | unsigned int chroma_u_stride, /* chroma stride */ | |||
unsigned int chroma_v_stride, | unsigned int chroma_v_stride, | |||
unsigned int luma_offset, /* could be 0 */ | unsigned int luma_offset, /* could be 0 */ | |||
unsigned int chroma_u_offset, /* UV offset from the beginning of the me mory */ | unsigned int chroma_u_offset, /* UV offset from the beginning of the me mory */ | |||
unsigned int chroma_v_offset | unsigned int chroma_v_offset | |||
); | ); | |||
/* | /* | |||
* Create surface from the Kernel buffer | * Create surface from the Kernel buffer | |||
*/ | */ | |||
VAStatus vaCreateSurfaceFromKbuf( | VAStatus vaCreateSurfaceFromKBuf( | |||
VADisplay dpy, | VADisplay dpy, | |||
int width, | int width, | |||
int height, | int height, | |||
int format, | int format, | |||
VASurfaceID *surface, /* out */ | VASurfaceID *surface, /* out */ | |||
unsigned int kbuf_handle, /* kernel buffer handle*/ | unsigned int kbuf_handle, /* kernel buffer handle*/ | |||
unsigned size, /* kernel buffer size */ | unsigned size, /* kernel buffer size */ | |||
unsigned int kBuf_fourcc, /* expected fourcc */ | unsigned int kBuf_fourcc, /* expected fourcc */ | |||
unsigned int luma_stride, /* luma stride, could be width aligned with a special value */ | unsigned int luma_stride, /* luma stride, could be width aligned with a special value */ | |||
unsigned int chroma_u_stride, /* chroma stride */ | unsigned int chroma_u_stride, /* chroma stride */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
va_version.h | va_version.h | |||
---|---|---|---|---|
skipping to change at line 40 | skipping to change at line 40 | |||
* | * | |||
* The major version of VA-API (1, if %VA_VERSION is 1.2.3) | * The major version of VA-API (1, if %VA_VERSION is 1.2.3) | |||
*/ | */ | |||
#define VA_MAJOR_VERSION 0 | #define VA_MAJOR_VERSION 0 | |||
/** | /** | |||
* VA_MINOR_VERSION: | * VA_MINOR_VERSION: | |||
* | * | |||
* The minor version of VA-API (2, if %VA_VERSION is 1.2.3) | * The minor version of VA-API (2, if %VA_VERSION is 1.2.3) | |||
*/ | */ | |||
#define VA_MINOR_VERSION 32 | #define VA_MINOR_VERSION 33 | |||
/** | /** | |||
* VA_MICRO_VERSION: | * VA_MICRO_VERSION: | |||
* | * | |||
* The micro version of VA-API (3, if %VA_VERSION is 1.2.3) | * The micro version of VA-API (3, if %VA_VERSION is 1.2.3) | |||
*/ | */ | |||
#define VA_MICRO_VERSION 1 | #define VA_MICRO_VERSION 0 | |||
/** | /** | |||
* VA_VERSION: | * VA_VERSION: | |||
* | * | |||
* The full version of VA-API, like 1.2.3 | * The full version of VA-API, like 1.2.3 | |||
*/ | */ | |||
#define VA_VERSION 0.32.1 | #define VA_VERSION 0.33.0 | |||
/** | /** | |||
* VA_VERSION_S: | * VA_VERSION_S: | |||
* | * | |||
* The full version of VA-API, in string form (suited for string | * The full version of VA-API, in string form (suited for string | |||
* concatenation) | * concatenation) | |||
*/ | */ | |||
#define VA_VERSION_S "0.32.1" | #define VA_VERSION_S "0.33.0" | |||
/** | /** | |||
* VA_VERSION_HEX: | * VA_VERSION_HEX: | |||
* | * | |||
* Numerically encoded version of VA-API, like 0x010203 | * Numerically encoded version of VA-API, like 0x010203 | |||
*/ | */ | |||
#define VA_VERSION_HEX ((VA_MAJOR_VERSION << 24) | \ | #define VA_VERSION_HEX ((VA_MAJOR_VERSION << 24) | \ | |||
(VA_MINOR_VERSION << 16) | \ | (VA_MINOR_VERSION << 16) | \ | |||
(VA_MICRO_VERSION << 8)) | (VA_MICRO_VERSION << 8)) | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 4 lines changed or added | |||