va.h   va.h 
skipping to change at line 59 skipping to change at line 59
* rev 0.27 (11/19/2007 Matt Sottek) - Added DeriveImage * rev 0.27 (11/19/2007 Matt Sottek) - Added DeriveImage
* rev 0.28 (12/06/2007 Jonathan Bian) - Added new versions of PutImage and AssociateSubpicture * rev 0.28 (12/06/2007 Jonathan Bian) - Added new versions of PutImage and AssociateSubpicture
* to enable scaling * to enable scaling
* rev 0.29 (02/07/2008 Jonathan Bian) - VC1 parameter fixes, * rev 0.29 (02/07/2008 Jonathan Bian) - VC1 parameter fixes,
* added VA_STATUS_ERROR_RESOLUTION_N OT_SUPPORTED * added VA_STATUS_ERROR_RESOLUTION_N OT_SUPPORTED
* rev 0.30 (03/01/2009 Jonathan Bian) - Added encoding support for H.264 B P and MPEG-4 SP and fixes * rev 0.30 (03/01/2009 Jonathan Bian) - Added encoding support for H.264 B P and MPEG-4 SP and fixes
* for ISO C conformance. * for ISO C conformance.
* rev 0.31 (09/02/2009 Gwenole Beauchesne) - VC-1/H264 fields change for V DPAU and XvBA backend * rev 0.31 (09/02/2009 Gwenole Beauchesne) - VC-1/H264 fields change for V DPAU and XvBA backend
* Application needs to relink with t he new library. * Application needs to relink with t he new library.
* *
* rev 0.31.1 (03/29/2009) - Data structure for JPEG encode
*
* Acknowledgements: * Acknowledgements:
* Some concepts borrowed from XvMC and XvImage. * Some concepts borrowed from XvMC and XvImage.
* Waldo Bastian (Intel), Matt Sottek (Intel), Austin Yuan (Intel), and G wenole Beauchesne (SDS) * Waldo Bastian (Intel), Matt Sottek (Intel), Austin Yuan (Intel), and G wenole Beauchesne (SDS)
* contributed to various aspects of the API. * contributed to various aspects of the API.
*/ */
#ifndef _VA_H_ #ifndef _VA_H_
#define _VA_H_ #define _VA_H_
#ifdef IN_LIBVA
#include "va_version.h"
#else
#include <va/va_version.h> #include <va/va_version.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
Overview Overview
The VA API is intended to provide an interface between a video decode/encod e/display The VA API is intended to provide an interface between a video decode/encod e/display
application (client) and a hardware accelerator (server), to off-load application (client) and a hardware accelerator (server), to off-load
skipping to change at line 132 skipping to change at line 130
#define VA_STATUS_ERROR_UNSUPPORTED_PROFILE 0x0000000c #define VA_STATUS_ERROR_UNSUPPORTED_PROFILE 0x0000000c
#define VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT 0x0000000d #define VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT 0x0000000d
#define VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT 0x0000000e #define VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT 0x0000000e
#define VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE 0x0000000f #define VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE 0x0000000f
#define VA_STATUS_ERROR_SURFACE_BUSY 0x00000010 #define VA_STATUS_ERROR_SURFACE_BUSY 0x00000010
#define VA_STATUS_ERROR_FLAG_NOT_SUPPORTED 0x00000011 #define VA_STATUS_ERROR_FLAG_NOT_SUPPORTED 0x00000011
#define VA_STATUS_ERROR_INVALID_PARAMETER 0x00000012 #define VA_STATUS_ERROR_INVALID_PARAMETER 0x00000012
#define VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED 0x00000013 #define VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED 0x00000013
#define VA_STATUS_ERROR_UNIMPLEMENTED 0x00000014 #define VA_STATUS_ERROR_UNIMPLEMENTED 0x00000014
#define VA_STATUS_ERROR_SURFACE_IN_DISPLAYING 0x00000015 #define VA_STATUS_ERROR_SURFACE_IN_DISPLAYING 0x00000015
#define VA_STATUS_ERROR_INVALID_IMAGE_FORMAT 0x00000016
#define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF #define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF
/* De-interlacing flags for vaPutSurface() */
#define VA_FRAME_PICTURE 0x00000000
#define VA_TOP_FIELD 0x00000001
#define VA_BOTTOM_FIELD 0x00000002
/*
* Clears the drawable with background color.
* for hardware overlay based implementation this flag
* can be used to turn off the overlay
*/
#define VA_CLEAR_DRAWABLE 0x00000008
/* Color space conversion flags for vaPutSurface() */
#define VA_SRC_BT601 0x00000010
#define VA_SRC_BT709 0x00000020
/* /*
* Returns a short english description of error_status * Returns a short english description of error_status
*/ */
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* NativeDisplay; /* window system dependent */
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 201 skipping to change at line 218
VAProfileMPEG2Main = 1, VAProfileMPEG2Main = 1,
VAProfileMPEG4Simple = 2, VAProfileMPEG4Simple = 2,
VAProfileMPEG4AdvancedSimple = 3, VAProfileMPEG4AdvancedSimple = 3,
VAProfileMPEG4Main = 4, VAProfileMPEG4Main = 4,
VAProfileH264Baseline = 5, VAProfileH264Baseline = 5,
VAProfileH264Main = 6, VAProfileH264Main = 6,
VAProfileH264High = 7, VAProfileH264High = 7,
VAProfileVC1Simple = 8, VAProfileVC1Simple = 8,
VAProfileVC1Main = 9, VAProfileVC1Main = 9,
VAProfileVC1Advanced = 10, VAProfileVC1Advanced = 10,
VAProfileH263Baseline = 11 VAProfileH263Baseline = 11,
VAProfileJPEGBaseline = 12
} VAProfile; } VAProfile;
/* /*
* Currently defined entrypoints * Currently defined entrypoints
*/ */
typedef enum typedef enum
{ {
VAEntrypointVLD = 1, VAEntrypointVLD = 1,
VAEntrypointIZZ = 2, VAEntrypointIZZ = 2,
VAEntrypointIDCT = 3, VAEntrypointIDCT = 3,
VAEntrypointMoComp = 4, VAEntrypointMoComp = 4,
VAEntrypointDeblocking = 5, VAEntrypointDeblocking = 5,
VAEntrypointEncSlice = 6 /* slice level encode */ VAEntrypointEncSlice = 6, /* slice level encode */
VAEntrypointEncPicture = 7 /* pictuer encode, JPEG, etc */
} VAEntrypoint; } VAEntrypoint;
/* Currently defined configuration attribute types */ /* Currently defined configuration attribute types */
typedef enum typedef enum
{ {
VAConfigAttribRTFormat = 0, VAConfigAttribRTFormat = 0,
VAConfigAttribSpatialResidual = 1, VAConfigAttribSpatialResidual = 1,
VAConfigAttribSpatialClipping = 2, VAConfigAttribSpatialClipping = 2,
VAConfigAttribIntraResidual = 3, VAConfigAttribIntraResidual = 3,
VAConfigAttribEncryption = 4, VAConfigAttribEncryption = 4,
skipping to change at line 397 skipping to change at line 416
*/ */
VAStatus vaCreateSurfaces ( VAStatus vaCreateSurfaces (
VADisplay dpy, VADisplay dpy,
int width, int width,
int height, int height,
int format, int format,
int num_surfaces, int num_surfaces,
VASurfaceID *surfaces /* out */ VASurfaceID *surfaces /* out */
); );
/* Wrap a CI (camera imaging) frame as a VA surface to share captured video
between camear
* and VA encode. With frame_id, VA driver need to call CI interfaces to ge
t the information
* of the frame, and to determine if the frame can be wrapped as a VA surfa
ce
*
* Application should make sure the frame is idle before the frame is passe
d into VA stack
* and also a vaSyncSurface should be called before application tries to ac
cess the frame
* from CI stack
*/
VAStatus vaCreateSurfaceFromCIFrame (
VADisplay dpy,
unsigned long frame_id,
VASurfaceID *surface /* out */
);
/* /*
* vaDestroySurfaces - Destroy resources associated with surfaces. * vaDestroySurfaces - Destroy resources associated with surfaces.
* Surfaces can only be destroyed after the context associated has been * Surfaces can only be destroyed after the context associated has been
* destroyed. * destroyed.
* dpy: display * dpy: display
* surfaces: array of surfaces to destroy * surfaces: array of surfaces to destroy
* num_surfaces: number of surfaces in the array to be destroyed. * num_surfaces: number of surfaces in the array to be destroyed.
*/ */
VAStatus vaDestroySurfaces ( VAStatus vaDestroySurfaces (
VADisplay dpy, VADisplay dpy,
skipping to change at line 482 skipping to change at line 487
VAIQMatrixBufferType = 1, VAIQMatrixBufferType = 1,
VABitPlaneBufferType = 2, VABitPlaneBufferType = 2,
VASliceGroupMapBufferType = 3, VASliceGroupMapBufferType = 3,
VASliceParameterBufferType = 4, VASliceParameterBufferType = 4,
VASliceDataBufferType = 5, VASliceDataBufferType = 5,
VAMacroblockParameterBufferType = 6, VAMacroblockParameterBufferType = 6,
VAResidualDataBufferType = 7, VAResidualDataBufferType = 7,
VADeblockingParameterBufferType = 8, VADeblockingParameterBufferType = 8,
VAImageBufferType = 9, VAImageBufferType = 9,
VAProtectedSliceDataBufferType = 10, VAProtectedSliceDataBufferType = 10,
VAQMatrixBufferType = 11,
/* Following are encode buffer types */ /* Following are encode buffer types */
VAEncCodedBufferType = 21, VAEncCodedBufferType = 21,
VAEncSequenceParameterBufferType = 22, VAEncSequenceParameterBufferType = 22,
VAEncPictureParameterBufferType = 23, VAEncPictureParameterBufferType = 23,
VAEncSliceParameterBufferType = 24, VAEncSliceParameterBufferType = 24,
VAEncH264VUIBufferType = 25, VAEncH264VUIBufferType = 25,
VAEncH264SEIBufferType = 26, VAEncH264SEIBufferType = 26,
} VABufferType; } VABufferType;
/* /*
skipping to change at line 513 skipping to change at line 519
/* Codec-independent Slice Parameter Buffer base */ /* Codec-independent Slice Parameter Buffer base */
typedef struct _VASliceParameterBufferBase typedef struct _VASliceParameterBufferBase
{ {
unsigned int slice_data_size; /* number of bytes in the slice data buffer for this slice */ 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_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_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defini tions */
} VASliceParameterBufferBase; } VASliceParameterBufferBase;
/**************************** /****************************
* JEPG data structure
***************************/
typedef struct _VAQMatrixBufferJPEG
{
int load_lum_quantiser_matrix;
int load_chroma_quantiser_matrix;
unsigned char lum_quantiser_matrix[64];
unsigned char chroma_quantiser_matrix[64];
} VAQMatrixBufferJPEG;
typedef struct _VAEncPictureParameterBufferJPEG
{
VASurfaceID reconstructed_picture;
unsigned short picture_width;
unsigned short picture_height;
VABufferID coded_buf;
} VAEncPictureParameterBufferJPEG;
/****************************
* 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.
*/ */
typedef struct _VAPictureParameterBufferMPEG2 typedef struct _VAPictureParameterBufferMPEG2
{ {
skipping to change at line 1069 skipping to change at line 1094
/**************************** /****************************
* H.264 specific encode data structures * H.264 specific encode data structures
****************************/ ****************************/
typedef struct _VAEncSequenceParameterBufferH264 typedef struct _VAEncSequenceParameterBufferH264
{ {
unsigned char seq_parameter_set_id; unsigned char seq_parameter_set_id;
unsigned char level_idc; unsigned char level_idc;
unsigned int intra_period; unsigned int intra_period;
unsigned int intra_idr_period;
unsigned int picture_width_in_mbs; unsigned int picture_width_in_mbs;
unsigned int picture_height_in_mbs; unsigned int picture_height_in_mbs;
unsigned int bits_per_second; unsigned int bits_per_second;
unsigned int frame_rate; unsigned int frame_rate;
unsigned int initial_qp; unsigned int initial_qp;
unsigned int min_qp; unsigned int min_qp;
unsigned int basic_unit_size; unsigned int basic_unit_size;
unsigned char vui_flag; unsigned char vui_flag;
} VAEncSequenceParameterBufferH264; } VAEncSequenceParameterBufferH264;
skipping to change at line 1182 skipping to change at line 1208
* this will communicate to the server the number of slice parameters * this will communicate to the server the number of slice parameters
* that are valid in the buffer. * that are valid in the buffer.
*/ */
VAStatus vaBufferSetNumElements ( VAStatus vaBufferSetNumElements (
VADisplay dpy, VADisplay dpy,
VABufferID buf_id, /* in */ VABufferID buf_id, /* in */
unsigned int num_elements /* in */ unsigned int num_elements /* in */
); );
/* /*
* device independent data structure for codedbuffer
*/
typedef struct _VACodedBufferSegment {
unsigned int size; /* size of the data buffer in the coded buffer segme
nt, in bytes */
unsigned int bit_offset;/* bit offset into the data buffer where valid
bitstream data begins */
void *buf; /* pointer to the beginning of the data buffer in the coded
buffer segment */
void *next; /* pointer to the next VACodedBufferSegment */
} VACodedBufferSegment;
/*
* Map data store of the buffer into the client's address space * Map data store of the buffer into the client's address space
* vaCreateBuffer() needs to be called with "data" set to NULL before * vaCreateBuffer() needs to be called with "data" set to NULL before
* calling vaMapBuffer() * calling vaMapBuffer()
*
* if buffer type is VAEncCodedBufferType, pbuf points to link-list of
* VACodedBufferSegment, and the list is terminated if "next" is NULL
*/ */
VAStatus vaMapBuffer ( VAStatus vaMapBuffer (
VADisplay dpy, VADisplay dpy,
VABufferID buf_id, /* in */ VABufferID buf_id, /* in */
void **pbuf /* out */ void **pbuf /* out */
); );
/* /*
* After client making changes to a mapped data store, it needs to * After client making changes to a mapped data store, it needs to
* "Unmap" it to let the server know that the data is ready to be * "Unmap" it to let the server know that the data is ready to be
skipping to change at line 1631 skipping to change at line 1670
unsigned short height; unsigned short height;
} VARectangle; } VARectangle;
/* /*
* Display attributes * Display attributes
* Display attributes are used to control things such as contrast, hue, sat uration, * Display attributes are used to control things such as contrast, hue, sat uration,
* brightness etc. in the rendering process. The application can query wha t * brightness etc. in the rendering process. The application can query wha t
* attributes are supported by the driver, and then set the appropriate att ributes * attributes are supported by the driver, and then set the appropriate att ributes
* before calling vaPutSurface() * before calling vaPutSurface()
*/ */
/* PowerVR IEP Lite attributes */
typedef enum
{
VADISPLAYATTRIB_BLE_OFF = 0x00,
VADISPLAYATTRIB_BLE_LOW,
VADISPLAYATTRIB_BLE_MEDIUM,
VADISPLAYATTRIB_BLE_HIGH,
VADISPLAYATTRIB_BLE_NONE,
} VADisplayAttribBLEMode;
typedef enum
{
VADISPLAYATTRIB_CSC_FORMAT_YCC_BT601 = 0x00,
VADISPLAYATTRIB_CSC_FORMAT_YCC_BT709,
VADISPLAYATTRIB_CSC_FORMAT_YCC_SMPTE_240,
VADISPLAYATTRIB_CSC_FORMAT_RGB,
VADISPLAYATTRIB_CSC_FORMAT_NONE,
} VADisplayAttribCSCFormat;
/* attribute value for VADisplayAttribRotation */
#define VA_ROTATION_NONE 0x00000000
#define VA_ROTATION_90 0x00000001
#define VA_ROTATION_180 0x00000002
#define VA_ROTATION_270 0x00000004
/* attribute value for VADisplayAttribOutOfLoopDeblock */
#define VA_OOL_DEBLOCKING_FALSE 0x00000000
#define VA_OOL_DEBLOCKING_TRUE 0x00000001
/* Currently defined display attribute types */ /* Currently defined display attribute types */
typedef enum typedef enum
{ {
VADisplayAttribBrightness = 0, VADisplayAttribBrightness = 0,
VADisplayAttribContrast = 1, VADisplayAttribContrast = 1,
VADisplayAttribHue = 2, VADisplayAttribHue = 2,
VADisplayAttribSaturation = 3, VADisplayAttribSaturation = 3,
/* client can specifiy a background color for the target window */ /* client can specifiy a background color for the target window */
VADisplayAttribBackgroundColor = 4, VADisplayAttribBackgroundColor = 4,
/* /*
* this is a gettable only attribute. For some implementations that use the * this is a gettable only attribute. For some implementations that use the
* hardware overlay, after PutSurface is called, the surface can not be * hardware overlay, after PutSurface is called, the surface can not be
* re-used until after the subsequent PutSurface call. If this is the c ase * re-used until after the subsequent PutSurface call. If this is the c ase
* then the value for this attribute will be set to 1 so that the clien t * then the value for this attribute will be set to 1 so that the clien t
* will not attempt to re-use the surface right after returning from a call * will not attempt to re-use the surface right after returning from a call
* to PutSurface. * to PutSurface.
*/ */
VADisplayAttribDirectSurface = 5, VADisplayAttribDirectSurface = 5,
VADisplayAttribRotation = 6,
VADisplayAttribOutofLoopDeblock = 7,
/* PowerVR IEP Lite specific attributes */
VADisplayAttribBLEBlackMode = 8,
VADisplayAttribBLEWhiteMode = 9,
VADisplayAttribBlueStretch = 10,
VADisplayAttribSkinColorCorrection = 11,
VADisplayAttribCSCInputColorFormat = 12,
VADisplayAttribCSCHue = 13,
VADisplayAttribCSCSaturation = 14,
VADisplayAttribCSCBrightness = 15,
VADisplayAttribCSCContrast = 16,
} VADisplayAttribType; } VADisplayAttribType;
/* flags for VADisplayAttribute */ /* flags for VADisplayAttribute */
#define VA_DISPLAY_ATTRIB_NOT_SUPPORTED 0x0000 #define VA_DISPLAY_ATTRIB_NOT_SUPPORTED 0x0000
#define VA_DISPLAY_ATTRIB_GETTABLE 0x0001 #define VA_DISPLAY_ATTRIB_GETTABLE 0x0001
#define VA_DISPLAY_ATTRIB_SETTABLE 0x0002 #define VA_DISPLAY_ATTRIB_SETTABLE 0x0002
typedef struct _VADisplayAttribute typedef struct _VADisplayAttribute
{ {
VADisplayAttribType type; VADisplayAttribType type;
 End of changes. 16 change blocks. 
25 lines changed or deleted 103 lines changed or added


 va_backend.h   va_backend.h 
skipping to change at line 32 skipping to change at line 32
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
/* /*
* 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_
#ifdef IN_LIBVA
#include "va.h"
#include "x11/va_x11.h"
#else
#include <va/va.h> #include <va/va.h>
#include <va/va_x11.h> #ifndef ANDROID
#include <X11/Xlib.h>
#endif #endif
#include <stdlib.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;
struct VADriverVTable struct VADriverVTable
{ {
VAStatus (*vaTerminate) ( VADriverContextP ctx ); VAStatus (*vaTerminate) ( VADriverContextP ctx );
VAStatus (*vaQueryConfigProfiles) ( VAStatus (*vaQueryConfigProfiles) (
skipping to change at line 189 skipping to change at line 184
VAStatus (*vaQuerySurfaceStatus) ( VAStatus (*vaQuerySurfaceStatus) (
VADriverContextP ctx, VADriverContextP ctx,
VASurfaceID render_target, VASurfaceID render_target,
VASurfaceStatus *status /* out */ VASurfaceStatus *status /* out */
); );
VAStatus (*vaPutSurface) ( VAStatus (*vaPutSurface) (
VADriverContextP ctx, VADriverContextP ctx,
VASurfaceID surface, VASurfaceID surface,
Drawable draw, /* X Drawable */ void* draw, /* Drawable of window system */
short srcx, short srcx,
short srcy, short srcy,
unsigned short srcw, unsigned short srcw,
unsigned short srch, unsigned short srch,
short destx, short destx,
short desty, short desty,
unsigned short destw, unsigned short destw,
unsigned short desth, unsigned short desth,
VARectangle *cliprects, /* client supplied clip list */ VARectangle *cliprects, /* client supplied clip list */
unsigned int number_cliprects, /* number of clip rects in th e clip list */ unsigned int number_cliprects, /* number of clip rects in th e clip list */
skipping to change at line 346 skipping to change at line 341
VADisplayAttribute *attr_list, /* in/out */ VADisplayAttribute *attr_list, /* in/out */
int num_attributes int num_attributes
); );
VAStatus (*vaSetDisplayAttributes) ( VAStatus (*vaSetDisplayAttributes) (
VADriverContextP ctx, VADriverContextP ctx,
VADisplayAttribute *attr_list, VADisplayAttribute *attr_list,
int num_attributes int num_attributes
); );
/* device specific */ /* used by va trace */
VAStatus (*vaCreateSurfaceFromCIFrame) ( VAStatus (*vaBufferInfo) (
VADriverContextP ctx, VADriverContextP ctx,
unsigned long frame_id, VAContextID context, /* in */
VASurfaceID *surface /* out */ VABufferID buf_id, /* in */
); VABufferType *type, /* out */
unsigned int *size, /* out */
VAStatus (*vaCreateSurfaceFromV4L2Buf) ( unsigned int *num_elements /* out */
VADriverContextP ctx,
int v4l2_fd, /* file descriptor of V4L2 device */
struct v4l2_format *v4l2_fmt, /* format of V4L2 */
struct v4l2_buffer *v4l2_buf, /* V4L2 buffer */
VASurfaceID *surface /* out */
); );
VAStatus (*vaCopySurfaceToBuffer) ( /* lock/unlock surface for external access */
VAStatus (*vaLockSurface) (
VADriverContextP ctx, VADriverContextP ctx,
VASurfaceID surface, VASurfaceID surface,
unsigned int *fourcc, /* out for follow argument */ unsigned int *fourcc, /* out for follow argument */
unsigned int *luma_stride, unsigned int *luma_stride,
unsigned int *chroma_u_stride, unsigned int *chroma_u_stride,
unsigned int *chroma_v_stride, unsigned int *chroma_v_stride,
unsigned int *luma_offset, unsigned int *luma_offset,
unsigned int *chroma_u_offset, unsigned int *chroma_u_offset,
unsigned int *chroma_v_offset, unsigned int *chroma_v_offset,
void **buffer unsigned int *buffer_name, /* if it is not NULL, assign the
low lever
* surface buffer name
*/
void **buffer /* if it is not NULL, map the surface buffer
for
* CPU access
*/
); );
VAStatus (*vaUnlockSurface) (
VADriverContextP ctx,
VASurfaceID surface
);
/* Optional: GLX support hooks */
struct VADriverVTableGLX *glx;
}; };
struct VADriverContext struct VADriverContext
{ {
void *pDriverData; void *pDriverData;
struct VADriverVTable vtable; struct VADriverVTable vtable;
void *vtable_tpi; /* the structure is malloc-ed */
Display *x11_dpy; void *native_dpy;
int x11_screen; int x11_screen;
int version_major; int version_major;
int version_minor; int version_minor;
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; void *dri_state;
void *glx; /* opaque for GLX code */
}; };
#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 417 skipping to change at line 423
); );
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) */
}; };
typedef VAStatus (*VADriverInit) ( typedef VAStatus (*VADriverInit) (
VADriverContextP driver_context VADriverContextP driver_context
); );
#endif /* _VA_BACKEND_H_ */ #endif /* _VA_BACKEND_H_ */
 End of changes. 12 change blocks. 
24 lines changed or deleted 34 lines changed or added


 va_dri2.h   va_dri2.h 
skipping to change at line 36 skipping to change at line 36
* other dealings in this Software without prior written authorization of * other dealings in this Software without prior written authorization of
* the copyright holder. * the copyright holder.
* *
* Authors: * Authors:
* Kristian Høgsberg (krh@redhat.com) * Kristian Høgsberg (krh@redhat.com)
*/ */
#ifndef _VA_DRI2_H_ #ifndef _VA_DRI2_H_
#define _VA_DRI2_H_ #define _VA_DRI2_H_
#include <X11/Xproto.h>
#include <X11/extensions/Xfixes.h> #include <X11/extensions/Xfixes.h>
#include <X11/Xfuncproto.h> #include <X11/Xfuncproto.h>
#include <xf86drm.h> #include <xf86drm.h>
typedef struct { typedef 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 66 skipping to change at line 67
VA_DRI2Authenticate(Display *display, XID window, drm_magic_t magic); VA_DRI2Authenticate(Display *display, XID window, drm_magic_t magic);
extern void extern void
VA_DRI2CreateDrawable(Display *display, XID drawable); VA_DRI2CreateDrawable(Display *display, XID drawable);
extern void extern void
VA_DRI2DestroyDrawable(Display *display, XID handle); VA_DRI2DestroyDrawable(Display *display, XID handle);
extern VA_DRI2Buffer * extern VA_DRI2Buffer *
VA_DRI2GetBuffers(Display *dpy, XID drawable, VA_DRI2GetBuffers(Display *dpy, XID drawable,
int *width, int *height, int *width, int *height,
unsigned int *attachments, int count, unsigned int *attachments, int count,
int *outCount); int *outCount);
#if 0
extern void extern void
VA_DRI2CopyRegion(Display *dpy, XID drawable, XserverRegion region, VA_DRI2CopyRegion(Display *dpy, XID drawable, XserverRegion region,
CARD32 dest, CARD32 src); CARD32 dest, CARD32 src);
#endif extern void
VA_DRI2SwapBuffers(Display *dpy, XID drawable, CARD64 target_msc, CARD64 di
visor,
CARD64 remainder, CARD64 *count);
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 6 lines changed or added


 va_dricommon.h   va_dricommon.h 
#ifndef _VA_DRICOMMON_H_ #ifndef _VA_DRICOMMON_H_
#define _VA_DRICOMMON_H_ #define _VA_DRICOMMON_H_
#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
#include "va_backend.h" #include <va/va_backend.h>
#ifdef ANDROID
#define XID unsigned int
#define Bool int
#endif
enum enum
{ {
VA_NONE = 0, VA_NONE = 0,
VA_DRI1 = 1, VA_DRI1 = 1,
VA_DRI2 = 2 VA_DRI2 = 2,
VA_DUMMY = 3
}; };
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 48 skipping to change at line 55
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
drm_handle_t hSAREA; drm_handle_t hSAREA;
drm_context_t hwContext; drm_context_t hwContext;
drmAddress pSAREA; drmAddress pSAREA;
XID hwContextID; 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
}; };
Bool isDRI2Connected(VADriverContextP ctx, char **driver_name); Bool isDRI2Connected(VADriverContextP ctx, char **driver_name);
Bool isDRI1Connected(VADriverContextP ctx, char **driver_name); Bool isDRI1Connected(VADriverContextP ctx, char **driver_name);
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. 7 change blocks. 
3 lines changed or deleted 12 lines changed or added


 va_version.h   va_version.h 
skipping to change at line 47 skipping to change at line 47
* *
* The minor version of the VA library (2, if %VA_VERSION is 1.2.3) * The minor version of the VA library (2, if %VA_VERSION is 1.2.3)
*/ */
#define VA_MINOR_VERSION (31) #define VA_MINOR_VERSION (31)
/** /**
* VA_MICRO_VERSION: * VA_MICRO_VERSION:
* *
* The micro version of the VA library (3, if %VA_VERSION is 1.2.3) * The micro version of the VA library (3, if %VA_VERSION is 1.2.3)
*/ */
#define VA_MICRO_VERSION (0) #define VA_MICRO_VERSION (1)
/** /**
* VA_VERSION: * VA_VERSION:
* *
* The full version of the VA library, like 1.2.3 * The full version of the VA library, like 1.2.3
*/ */
#define VA_VERSION 0.31.0 #define VA_VERSION 0.31.1
/** /**
* VA_VERSION_S: * VA_VERSION_S:
* *
* The full version of the VA library, in string form (suited for * The full version of the VA library, in string form (suited for
* string concatenation) * string concatenation)
*/ */
#define VA_VERSION_S "0.31.0" #define VA_VERSION_S "0.31.1"
/** /**
* VA_VERSION_HEX: * VA_VERSION_HEX:
* *
* Numerically encoded version of the VA library, like 0x010203 * Numerically encoded version of the VA library, 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. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 va_x11.h   va_x11.h 
#ifndef _VA_X11_H_ #ifndef _VA_X11_H_
#define _VA_X11_H_ #define _VA_X11_H_
#ifdef IN_LIBVA
#include "va.h"
#else
#include <va/va.h> #include <va/va.h>
#endif
#include <X11/Xlib.h> #include <X11/Xlib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
* Returns a suitable VADisplay for VA API * Returns a suitable VADisplay for VA API
*/ */
VADisplay vaGetDisplay ( VADisplay vaGetDisplay (
skipping to change at line 30 skipping to change at line 26
); );
/* /*
* Output rendering * Output rendering
* Following is the rendering interface for X windows, * Following is the rendering interface for X windows,
* to get the decode output surface to a X drawable * to get the decode output surface to a X drawable
* It basically performs a de-interlacing (if needed), * It basically performs a de-interlacing (if needed),
* color space conversion and scaling to the destination * color space conversion and scaling to the destination
* rectangle * rectangle
*/ */
/* de-interlacing flags for vaPutSurface */
#define VA_FRAME_PICTURE 0x00000000
#define VA_TOP_FIELD 0x00000001
#define VA_BOTTOM_FIELD 0x00000002
/*
* clears the drawable with background color.
* for hardware overlay based implementation this flag
* can be used to turn off the overlay
*/
#define VA_CLEAR_DRAWABLE 0x00000008
/* color space conversion flags for vaPutSurface */
#define VA_SRC_BT601 0x00000010
#define VA_SRC_BT709 0x00000020
VAStatus vaPutSurface ( VAStatus vaPutSurface (
VADisplay dpy, VADisplay dpy,
VASurfaceID surface, VASurfaceID surface,
Drawable draw, /* X Drawable */ Drawable draw, /* X Drawable */
short srcx, short srcx,
short srcy, short srcy,
unsigned short srcw, unsigned short srcw,
unsigned short srch, unsigned short srch,
short destx, short destx,
short desty, short desty,
 End of changes. 3 change blocks. 
20 lines changed or deleted 0 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/