va.h   va.h 
skipping to change at line 131 skipping to change at line 131
#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_INVALID_IMAGE_FORMAT 0x00000016
#define VA_STATUS_ERROR_DECODING_ERROR 0x00000017
#define VA_STATUS_ERROR_ENCODING_ERROR 0x00000018
#define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF #define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF
/* De-interlacing flags for vaPutSurface() */ /* De-interlacing flags for vaPutSurface() */
#define VA_FRAME_PICTURE 0x00000000 #define VA_FRAME_PICTURE 0x00000000
#define VA_TOP_FIELD 0x00000001 #define VA_TOP_FIELD 0x00000001
#define VA_BOTTOM_FIELD 0x00000002 #define VA_BOTTOM_FIELD 0x00000002
/* /*
* Enabled the positioning/cropping/blending feature:
* 1, specify the video playback position in the isurface
* 2, specify the cropping info for video playback
* 3, encoded video will blend with background color
*/
#define VA_ENABLE_BLEND 0x00000004 /* video area blend with the con
stant color */
/*
* Clears the drawable with background color. * Clears the drawable with background color.
* for hardware overlay based implementation this flag * for hardware overlay based implementation this flag
* can be used to turn off the overlay * can be used to turn off the overlay
*/ */
#define VA_CLEAR_DRAWABLE 0x00000008 #define VA_CLEAR_DRAWABLE 0x00000008
/* Color space conversion flags for vaPutSurface() */ /* Color space conversion flags for vaPutSurface() */
#define VA_SRC_BT601 0x00000010 #define VA_SRC_BT601 0x00000010
#define VA_SRC_BT709 0x00000020 #define VA_SRC_BT709 0x00000020
#define VA_SRC_SMPTE_240 0x00000040
/* Scaling flags for vaPutSurface() */ /* Scaling flags for vaPutSurface() */
#define VA_FILTER_SCALING_DEFAULT 0x00000000 #define VA_FILTER_SCALING_DEFAULT 0x00000000
#define VA_FILTER_SCALING_FAST 0x00000100 #define VA_FILTER_SCALING_FAST 0x00000100
#define VA_FILTER_SCALING_HQ 0x00000200 #define VA_FILTER_SCALING_HQ 0x00000200
#define VA_FILTER_SCALING_NL_ANAMORPHIC 0x00000300 #define VA_FILTER_SCALING_NL_ANAMORPHIC 0x00000300
#define VA_FILTER_SCALING_MASK 0x00000f00 #define VA_FILTER_SCALING_MASK 0x00000f00
/* /*
* Returns a short english description of error_status * Returns a short english description of error_status
skipping to change at line 275 skipping to change at line 286
/* attribute value for VAConfigAttribRTFormat */ /* attribute value for VAConfigAttribRTFormat */
#define VA_RT_FORMAT_YUV420 0x00000001 #define VA_RT_FORMAT_YUV420 0x00000001
#define VA_RT_FORMAT_YUV422 0x00000002 #define VA_RT_FORMAT_YUV422 0x00000002
#define VA_RT_FORMAT_YUV444 0x00000004 #define VA_RT_FORMAT_YUV444 0x00000004
#define VA_RT_FORMAT_PROTECTED 0x80000000 #define VA_RT_FORMAT_PROTECTED 0x80000000
/* attribute value for VAConfigAttribRateControl */ /* attribute value for VAConfigAttribRateControl */
#define VA_RC_NONE 0x00000001 #define VA_RC_NONE 0x00000001
#define VA_RC_CBR 0x00000002 #define VA_RC_CBR 0x00000002
#define VA_RC_VBR 0x00000004 #define VA_RC_VBR 0x00000004
#define VA_RC_VCM 0x00000008 /* video conference mode */
/* /*
* if an attribute is not applicable for a given * if an attribute is not applicable for a given
* profile/entrypoint pair, then set the value to the following * profile/entrypoint pair, then set the value to the following
*/ */
#define VA_ATTRIB_NOT_SUPPORTED 0x80000000 #define VA_ATTRIB_NOT_SUPPORTED 0x80000000
/* Get maximum number of profiles supported by the implementation */ /* Get maximum number of profiles supported by the implementation */
int vaMaxNumProfiles ( int vaMaxNumProfiles (
VADisplay dpy VADisplay dpy
skipping to change at line 502 skipping to change at line 514
VAImageBufferType = 9, VAImageBufferType = 9,
VAProtectedSliceDataBufferType = 10, VAProtectedSliceDataBufferType = 10,
VAQMatrixBufferType = 11, 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,
VAEncMiscParameterBufferType = 27,
VABufferTypeMax = 0xff
} VABufferType; } VABufferType;
typedef enum
{
VAEncMiscParameterTypeFrameRate = 0,
VAEncMiscParameterTypeRateControl = 1,
VAEncMiscParameterTypeMaxSliceSize = 2,
VAEncMiscParameterTypeAIR = 3,
} VAEncMiscParameterType;
/*
* For application, e.g. set a new bitrate
* VABufferID buf_id;
* VAEncMiscParameterBuffer *misc_param;
* VAEncMiscParameterRateControl *misc_rate_ctrl;
*
* vaCreateBuffer(dpy, context, VAEncMiscParameterBufferType,
* sizeof(VAEncMiscParameterBuffer) + sizeof(VAEncMiscParamete
rRateControl),
* 1, NULL, &buf_id);
*
* vaMapBuffer(dpy,buf_id,(void **)&misc_param);
* misc_param->type = VAEncMiscParameterTypeRateControl;
* misc_rate_ctrl= (VAEncMiscParameterRateControl *)misc_param->data;
* misc_rate_ctrl->bits_per_second = 6400000;
* vaUnmapBuffer(dpy, buf_id);
* vaRenderPicture(dpy, context, &buf_id, 1);
*/
typedef struct _VAEncMiscParameterBuffer
{
VAEncMiscParameterType type;
unsigned int data[0];
} VAEncMiscParameterBuffer;
typedef struct _VAEncMiscParameterRateControl
{
unsigned int bits_per_second; /* this is the maximum bit-rate to be con
strained by the rate control implementation */
unsigned int target_percentage; /* this is the bit-rate the rate contro
l is targeting, as a percentage of the maximum bit-rate */
/* for example if target_percentage is
95 then the rate control will target a bit-rate that is */
/* 95% of the maximum bit-rate */
unsigned int window_size; /* windows size in milliseconds. For example
if this is set to 500, then the rate control will guarantee the */
/* target bit-rate over a 500 ms window */
unsigned int initial_qp; /* initial QP at I frames */
unsigned int min_qp;
} VAEncMiscParameterRateControl;
typedef struct _VAEncMiscParameterFrameRate
{
unsigned int framerate;
} VAEncMiscParameterFrameRate;
/*
* Allow a maximum slice size to be specified (in bits).
* The encoder will attempt to make sure that individual slices do not exce
ed this size
* Or to signal applicate if the slice size exceed this size, see "status"
of VACodedBufferSegment
*/
typedef struct _VAEncMiscParameterMaxSliceSize
{
unsigned int max_slice_size;
} VAEncMiscParameterMaxSliceSize;
typedef struct _VAEncMiscParameterAIR
{
unsigned int air_num_mbs;
unsigned int air_threshold;
unsigned int air_auto; /* if set to 1 then hardware auto-tune the AIR t
hreshold */
} VAEncMiscParameterAIR;
/* /*
* There will be cases where the bitstream buffer will not have enough room to hold * There will be cases where the bitstream buffer will not have enough room to hold
* the data for the entire slice, and the following flags will be used in t he slice * the data for the entire slice, and the following flags will be used in t he slice
* parameter to signal to the server for the possible cases. * parameter to signal to the server for the possible cases.
* If a slice parameter buffer and slice data buffer pair is sent to the se rver with * If a slice parameter buffer and slice data buffer pair is sent to the se rver with
* the slice data partially in the slice data buffer (BEGIN and MIDDLE case s below), * the slice data partially in the slice data buffer (BEGIN and MIDDLE case s below),
* then a slice parameter and data buffer needs to be sent again to complet e this slice. * then a slice parameter and data buffer needs to be sent again to complet e this slice.
*/ */
#define VA_SLICE_DATA_FLAG_ALL 0x00 /* whole slice is in the buf fer */ #define VA_SLICE_DATA_FLAG_ALL 0x00 /* whole slice is in the buf fer */
#define VA_SLICE_DATA_FLAG_BEGIN 0x01 /* The beginning of the slic e is in the buffer but the end if not */ #define VA_SLICE_DATA_FLAG_BEGIN 0x01 /* The beginning of the slic e is in the buffer but the end if not */
skipping to change at line 1112 skipping to change at line 1191
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;
#define H264_LAST_PICTURE_EOSEQ 0x01 /* the last picture in the sequenc
e */
#define H264_LAST_PICTURE_EOSTREAM 0x02 /* the last picture in the stream
*/
typedef struct _VAEncPictureParameterBufferH264 typedef struct _VAEncPictureParameterBufferH264
{ {
VASurfaceID reference_picture; VASurfaceID reference_picture;
VASurfaceID reconstructed_picture; VASurfaceID reconstructed_picture;
VABufferID coded_buf; VABufferID coded_buf;
unsigned short picture_width; unsigned short picture_width;
unsigned short picture_height; unsigned short picture_height;
unsigned char last_picture; /* if set to 1 it indicates the last pictur e in the sequence */ unsigned char last_picture;
} VAEncPictureParameterBufferH264; } VAEncPictureParameterBufferH264;
/**************************** /****************************
* H.263 specific encode data structures * H.263 specific encode data structures
****************************/ ****************************/
typedef struct _VAEncSequenceParameterBufferH263 typedef struct _VAEncSequenceParameterBufferH263
{ {
unsigned int intra_period; unsigned int intra_period;
unsigned int bits_per_second; unsigned int bits_per_second;
skipping to change at line 1217 skipping to change at line 1298
*/ */
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 * 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 */ * FICTURE_AVE_QP(bit7-0): The average Qp value used during this frame
unsigned int bit_offset;/* bit offset into the data buffer where valid * LARGE_SLICE(bit8):At least one slice in the current frame was large
bitstream data begins */ * enough for the encoder to attempt to limit its size.
* SLICE_OVERFLOW(bit9): At least one slice in the current frame has
* exceeded the maximum slice size specified.
*/
#define VA_CODED_BUF_STATUS_PICTURE_AVE_QP_MASK 0xff
#define VA_CODED_BUF_STATUS_LARGE_SLICE_MASK 0x100
#define VA_CODED_BUF_STATUS_SLICE_OVERFLOW_MASK 0x200
/*
* device independent data structure for codedbuffer
*/
typedef struct _VACodedBufferSegment {
unsigned int size;/* size of the data buffer in the coded buffer segmen
t, in bytes */
unsigned int bit_offset; /* bit offset into the data buffer where valid
bitstream data begins */
unsigned int status; /* status set by the driver on the coded buffer*/
unsigned int reserved; /* for future use */
void *buf; /* pointer to the beginning of the data buffer in the coded buffer segment */ void *buf; /* pointer to the beginning of the data buffer in the coded buffer segment */
void *next; /* pointer to the next VACodedBufferSegment */ void *next; /* pointer to the next VACodedBufferSegment */
} 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 * if buffer type is VAEncCodedBufferType, pbuf points to link-list of
skipping to change at line 1687 skipping to change at line 1785
/* PowerVR IEP Lite attributes */ /* PowerVR IEP Lite attributes */
typedef enum typedef enum
{ {
VADISPLAYATTRIB_BLE_OFF = 0x00, VADISPLAYATTRIB_BLE_OFF = 0x00,
VADISPLAYATTRIB_BLE_LOW, VADISPLAYATTRIB_BLE_LOW,
VADISPLAYATTRIB_BLE_MEDIUM, VADISPLAYATTRIB_BLE_MEDIUM,
VADISPLAYATTRIB_BLE_HIGH, VADISPLAYATTRIB_BLE_HIGH,
VADISPLAYATTRIB_BLE_NONE, VADISPLAYATTRIB_BLE_NONE,
} VADisplayAttribBLEMode; } 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 */ /* attribute value for VADisplayAttribRotation */
#define VA_ROTATION_NONE 0x00000000 #define VA_ROTATION_NONE 0x00000000
#define VA_ROTATION_90 0x00000001 #define VA_ROTATION_90 0x00000001
#define VA_ROTATION_180 0x00000002 #define VA_ROTATION_180 0x00000002
#define VA_ROTATION_270 0x00000004 #define VA_ROTATION_270 0x00000004
/* attribute value for VADisplayAttribOutOfLoopDeblock */ /* attribute value for VADisplayAttribOutOfLoopDeblock */
#define VA_OOL_DEBLOCKING_FALSE 0x00000000 #define VA_OOL_DEBLOCKING_FALSE 0x00000000
#define VA_OOL_DEBLOCKING_TRUE 0x00000001 #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
* the new feature of video conference,
* the uncovered area of the surface is filled by this color
* also it will blend with the decoded video color*/
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.
* *
* Don't use it, use flag VASurfaceDisplaying of vaQuerySurfaceStatus s ince * Don't use it, use flag VASurfaceDisplaying of vaQuerySurfaceStatus s ince
skipping to change at line 1739 skipping to change at line 1831
/* PowerVR IEP Lite specific attributes */ /* PowerVR IEP Lite specific attributes */
VADisplayAttribBLEBlackMode = 8, VADisplayAttribBLEBlackMode = 8,
VADisplayAttribBLEWhiteMode = 9, VADisplayAttribBLEWhiteMode = 9,
VADisplayAttribBlueStretch = 10, VADisplayAttribBlueStretch = 10,
VADisplayAttribSkinColorCorrection = 11, VADisplayAttribSkinColorCorrection = 11,
/* /*
* For type VADisplayAttribCSCMatrix, "value" field is a pointer to the color * For type VADisplayAttribCSCMatrix, "value" field is a pointer to the color
* conversion matrix. Each element in the matrix is float-point * conversion matrix. Each element in the matrix is float-point
*/ */
VADisplayAttribCSCMatrix = 12 VADisplayAttribCSCMatrix = 12,
/* specify the constant color used to blend with video surface
* Cd = Cv*Cc*Ac + Cb *(1 - Ac) C means the constant RGB
* d: the final color to overwrite into the frame buffer
* v: decoded video after color conversion,
* c: video color specified by VADisplayAttribBlendColor
* b: background color of the drawable
*/
VADisplayAttribBlendColor = 13,
} 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. 12 change blocks. 
17 lines changed or deleted 128 lines changed or added


 va_dummy.h   va_dummy.h 
skipping to change at line 23 skipping to change at line 23
VADisplay vaGetDisplay ( VADisplay vaGetDisplay (
void *android_dpy void *android_dpy
); );
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
#ifdef ANDROID #ifdef ANDROID
#include <ui/ISurface.h> #include <surfaceflinger/ISurface.h>
using namespace android; using namespace android;
/* /*
* Output rendering * Output rendering
* Following is the rendering interface for Android system, * Following is the rendering interface for Android system,
* to get the decode output surface to an ISurface object. * to get the decode output surface to an ISurface object.
* 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
*/ */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 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/