diff options
author | Waldo Bastian <waldo.bastian@intel.com> | 2007-10-29 16:17:23 -0700 |
---|---|---|
committer | Waldo Bastian <waldo.bastian@intel.com> | 2007-10-29 16:17:23 -0700 |
commit | 4a9db08281a992fcb51e34a77bf3f4ce94d687fc (patch) | |
tree | ad908f0e4012fe24e068c1aff02c016501161cfc /src/va_backend.h | |
parent | 12e8a2285aa804855eb0f5c23074d31b807a7091 (diff) |
Update to VA API v0.25
Diffstat (limited to 'src/va_backend.h')
-rwxr-xr-x | src/va_backend.h | 130 |
1 files changed, 78 insertions, 52 deletions
diff --git a/src/va_backend.h b/src/va_backend.h index 68149e4..890b07e 100755 --- a/src/va_backend.h +++ b/src/va_backend.h @@ -34,28 +34,14 @@ #include <stdlib.h> + typedef struct VADriverContext *VADriverContextP; -struct VADriverContext +struct VADriverVTable { - VADriverContextP pNext; - Display *x11_dpy; - int x11_screen; - int version_major; - int version_minor; - int max_profiles; - int max_entrypoints; - int max_attributes; - int max_image_formats; - int max_subpic_formats; - int max_display_attributes; - void *handle; /* dlopen handle */ - void *pDriverData; - struct VADriverVTable - { - VAStatus (*vaTerminate) ( VADriverContextP ctx ); + VAStatus (*vaTerminate) ( VADriverContextP ctx ); - VAStatus (*vaQueryConfigProfiles) ( + VAStatus (*vaQueryConfigProfiles) ( VADriverContextP ctx, VAProfile *profile_list, /* out */ int *num_profiles /* out */ @@ -105,12 +91,12 @@ struct VADriverContext int height, int format, int num_surfaces, - VASurface *surfaces /* out */ + VASurfaceID *surfaces /* out */ ); - VAStatus (*vaDestroySurface) ( + VAStatus (*vaDestroySurfaces) ( VADriverContextP ctx, - VASurface *surface_list, + VASurfaceID *surface_list, int num_surfaces ); @@ -120,14 +106,14 @@ struct VADriverContext int picture_width, int picture_height, int flag, - VASurface *render_targets, + VASurfaceID *render_targets, int num_render_targets, - VAContext *context /* out */ + VAContextID *context /* out */ ); VAStatus (*vaDestroyContext) ( VADriverContextP ctx, - VAContext *context + VAContextID context ); VAStatus (*vaCreateBuffer) ( @@ -168,38 +154,37 @@ struct VADriverContext VAStatus (*vaBeginPicture) ( VADriverContextP ctx, - VAContext *context, - VASurface *render_target + VAContextID context, + VASurfaceID render_target ); VAStatus (*vaRenderPicture) ( VADriverContextP ctx, - VAContext *context, + VAContextID context, VABufferID *buffers, int num_buffers ); VAStatus (*vaEndPicture) ( VADriverContextP ctx, - VAContext *context + VAContextID context ); VAStatus (*vaSyncSurface) ( VADriverContextP ctx, - VAContext *context, - VASurface *render_target + VAContextID context, + VASurfaceID render_target ); VAStatus (*vaQuerySurfaceStatus) ( VADriverContextP ctx, - VAContext *context, - VASurface *render_target, + VASurfaceID render_target, VASurfaceStatus *status /* out */ ); VAStatus (*vaPutSurface) ( VADriverContextP ctx, - VASurface *surface, + VASurfaceID surface, Drawable draw, /* X Drawable */ short srcx, short srcy, @@ -230,23 +215,34 @@ struct VADriverContext VAStatus (*vaDestroyImage) ( VADriverContextP ctx, - VAImage *image + VAImageID image ); - + + VAStatus (*vaSetImagePalette) ( + VADriverContextP ctx, + VAImageID image, + /* + * pointer to an array holding the palette data. The size of the array is + * num_palette_entries * entry_bytes in size. The order of the components + * in the palette is described by the component_order in VAImage struct + */ + unsigned char *palette + ); + VAStatus (*vaGetImage) ( VADriverContextP ctx, - VASurface *surface, + VASurfaceID surface, int x, /* coordinates of the upper left source pixel */ int y, unsigned int width, /* width and height of the region */ unsigned int height, - VAImage *image + VAImageID image ); VAStatus (*vaPutImage) ( VADriverContextP ctx, - VASurface *surface, - VAImage *image, + VASurfaceID surface, + VAImageID image, int src_x, int src_y, unsigned int width, @@ -264,24 +260,24 @@ struct VADriverContext VAStatus (*vaCreateSubpicture) ( VADriverContextP ctx, - VAImage *image, - VASubpicture *subpicture /* out */ + VAImageID image, + VASubpictureID *subpicture /* out */ ); VAStatus (*vaDestroySubpicture) ( VADriverContextP ctx, - VASubpicture *subpicture + VASubpictureID subpicture ); VAStatus (*vaSetSubpictureImage) ( VADriverContextP ctx, - VASubpicture *subpicture, - VAImage *image + VASubpictureID subpicture, + VAImageID image ); VAStatus (*vaSetSubpicturePalette) ( VADriverContextP ctx, - VASubpicture *subpicture, + VASubpictureID subpicture, /* * pointer to an array holding the palette data. The size of the array is * num_palette_entries * entry_bytes in size. The order of the components @@ -292,21 +288,23 @@ struct VADriverContext VAStatus (*vaSetSubpictureChromakey) ( VADriverContextP ctx, - VASubpicture *subpicture, + VASubpictureID subpicture, unsigned int chromakey_min, - unsigned int chromakey_max + unsigned int chromakey_max, + unsigned int chromakey_mask ); VAStatus (*vaSetSubpictureGlobalAlpha) ( VADriverContextP ctx, - VASubpicture *subpicture, + VASubpictureID subpicture, float global_alpha ); VAStatus (*vaAssociateSubpicture) ( VADriverContextP ctx, - VASurface *target_surface, - VASubpicture *subpicture, + VASubpictureID subpicture, + VASurfaceID *target_surfaces, + int num_surfaces, short src_x, /* upper left offset in subpicture */ short src_y, short dest_x, /* upper left offset in surface */ @@ -320,6 +318,13 @@ struct VADriverContext unsigned int flags ); + VAStatus (*vaDeassociateSubpicture) ( + VADriverContextP ctx, + VASubpictureID subpicture, + VASurfaceID *target_surfaces, + int num_surfaces + ); + VAStatus (*vaQueryDisplayAttributes) ( VADriverContextP ctx, VADisplayAttribute *attr_list, /* out */ @@ -341,12 +346,33 @@ struct VADriverContext VAStatus (*vaDbgCopySurfaceToBuffer) ( VADriverContextP ctx, - VASurface *surface, + VASurfaceID surface, void **buffer, /* out */ unsigned int *stride /* out */ ); +}; + +struct VADriverContext +{ + VADriverContextP pNext; + + void *pDriverData; + struct VADriverVTable vtable; + + Display *x11_dpy; + int x11_screen; - } vtable; + int version_major; + int version_minor; + int max_profiles; + int max_entrypoints; + int max_attributes; + int max_image_formats; + int max_subpic_formats; + int max_display_attributes; + const char *str_vendor; + + void *handle; /* dlopen handle */ }; typedef VAStatus (*VADriverInit) ( |