diff options
author | Austin Yuan <shengquan.yuan@intel.com> | 2009-08-28 17:33:21 +0800 |
---|---|---|
committer | Austin Yuan <shengquan.yuan@intel.com> | 2009-08-28 17:33:21 +0800 |
commit | a7dbd4e05ab1f30d7f020ff0b25d8f1948924f91 (patch) | |
tree | 05aac000089bf8d980998d1c046a300fcc421bb7 /src | |
parent | fb431c22c4aeb593da780faf4f29573e00b01674 (diff) | |
parent | 2822d025263d516bd619c8bbe1d17ff4c1bd1af2 (diff) | |
download | libva-a7dbd4e05ab1f30d7f020ff0b25d8f1948924f91.tar.gz |
Merge branch 'master-fd.o'
Conflicts:
Makefile.am
configure.ac
dummy_drv_video/dummy_drv_video.c
i965_drv_video/Makefile.am
i965_drv_video/i965_drv_video.c
src/Makefile.am
src/va.c
src/va.h
src/va_backend.h
src/x11/va_x11.c
test/test_12.c
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 12 | ||||
-rw-r--r-- | src/va.c | 69 | ||||
-rw-r--r-- | src/va.h | 283 | ||||
-rw-r--r-- | src/va_backend.h | 31 | ||||
-rw-r--r-- | src/x11/va_x11.c | 21 |
5 files changed, 154 insertions, 262 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 5fac8b5..3849e8f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -28,10 +28,18 @@ INCLUDES = \ LDADD = \ $(LIBVA_LT_LDFLAGS) -libva_la_LTLIBRARIES = libva.la +lib_LTLIBRARIES = \ + libva.la \ + libva-x11.la + libva_ladir = $(libdir) libva_la_LDFLAGS = $(LDADD) -no-undefined -libva_la_LIBADD = $(LIBVA_LIBS) -ldl -lX11 -lXext x11/libva_x11.la -ldrm -lXfixes +libva_la_LIBADD = $(LIBVA_LIBS) -ldl + +libva_x11_la_SOURCES = +libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS) +libva_x11_la_LDFLAGS = $(LDADD) +libva_x11_la_DEPENDENCIES = $(libvacorelib) SUBDIRS = x11 @@ -56,7 +56,11 @@ static int va_debug_trace = 0; -int vaDisplayIsValid(VADisplay dpy); +static int vaDisplayIsValid(VADisplay dpy) +{ + VADisplayContextP pDisplayContext = (VADisplayContextP)dpy; + return pDisplayContext && pDisplayContext->vaIsValid(pDisplayContext); +} static void va_errorMessage(const char *msg, ...) { @@ -217,7 +221,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) CHECK_VTABLE(vaStatus, ctx, SetImagePalette); CHECK_VTABLE(vaStatus, ctx, GetImage); CHECK_VTABLE(vaStatus, ctx, PutImage); - CHECK_VTABLE(vaStatus, ctx, PutImage2); CHECK_VTABLE(vaStatus, ctx, QuerySubpictureFormats); CHECK_VTABLE(vaStatus, ctx, CreateSubpicture); CHECK_VTABLE(vaStatus, ctx, DestroySubpicture); @@ -225,7 +228,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) CHECK_VTABLE(vaStatus, ctx, SetSubpictureChromakey); CHECK_VTABLE(vaStatus, ctx, SetSubpictureGlobalAlpha); CHECK_VTABLE(vaStatus, ctx, AssociateSubpicture); - CHECK_VTABLE(vaStatus, ctx, AssociateSubpicture2); CHECK_VTABLE(vaStatus, ctx, DeassociateSubpicture); CHECK_VTABLE(vaStatus, ctx, QueryDisplayAttributes); CHECK_VTABLE(vaStatus, ctx, GetDisplayAttributes); @@ -707,7 +709,6 @@ VAStatus vaEndPicture ( VAStatus vaSyncSurface ( VADisplay dpy, - VAContextID context, VASurfaceID render_target ) { @@ -716,7 +717,7 @@ VAStatus vaSyncSurface ( ctx = CTX(dpy); TRACE(vaSyncSurface); - return ctx->vtable.vaSyncSurface( ctx, context, render_target ); + return ctx->vtable.vaSyncSurface( ctx, render_target ); } VAStatus vaQuerySurfaceStatus ( @@ -871,30 +872,6 @@ VAStatus vaPutImage ( VAImageID image, int src_x, int src_y, - unsigned int width, - unsigned int height, - int dest_x, - int dest_y -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaPutImage); - return ctx->vtable.vaPutImage ( ctx, surface, image, src_x, src_y, width, height, dest_x, dest_y ); -} - -/* - * Similar to vaPutImage but with additional destination width - * and height arguments to enable scaling - */ -VAStatus vaPutImage2 ( - VADisplay dpy, - VASurfaceID surface, - VAImageID image, - int src_x, - int src_y, unsigned int src_width, unsigned int src_height, int dest_x, @@ -907,8 +884,8 @@ VAStatus vaPutImage2 ( CHECK_DISPLAY(dpy); ctx = CTX(dpy); - TRACE(vaPutImage2); - return ctx->vtable.vaPutImage2 ( ctx, surface, image, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height ); + TRACE(vaPutImage); + return ctx->vtable.vaPutImage ( ctx, surface, image, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height ); } /* @@ -1092,32 +1069,6 @@ VAStatus vaAssociateSubpicture ( int num_surfaces, short src_x, /* upper left offset in subpicture */ short src_y, - short dest_x, /* upper left offset in surface */ - short dest_y, - unsigned short width, - unsigned short height, - /* - * whether to enable chroma-keying or global-alpha - * see VA_SUBPICTURE_XXX values - */ - unsigned int flags -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaAssociateSubpicture); - return ctx->vtable.vaAssociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, dest_x, dest_y, width, height, flags ); -} - -VAStatus vaAssociateSubpicture2 ( - VADisplay dpy, - VASubpictureID subpicture, - VASurfaceID *target_surfaces, - int num_surfaces, - short src_x, /* upper left offset in subpicture */ - short src_y, unsigned short src_width, unsigned short src_height, short dest_x, /* upper left offset in surface */ @@ -1135,8 +1086,8 @@ VAStatus vaAssociateSubpicture2 ( CHECK_DISPLAY(dpy); ctx = CTX(dpy); - TRACE(vaAssociateSubpicture2); - return ctx->vtable.vaAssociateSubpicture2 ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height, flags ); + TRACE(vaAssociateSubpicture); + return ctx->vtable.vaAssociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height, flags ); } /* @@ -125,6 +125,7 @@ typedef int VAStatus; /* Return status type from functions */ #define VA_STATUS_ERROR_FLAG_NOT_SUPPORTED 0x00000011 #define VA_STATUS_ERROR_INVALID_PARAMETER 0x00000012 #define VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED 0x00000013 +#define VA_STATUS_ERROR_UNIMPLEMENTED 0x00000014 #define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF /* @@ -572,7 +573,7 @@ typedef struct _VAMacroblockParameterBufferMPEG2 unsigned int field_motion_type : 2; unsigned int dct_type : 1; } bits; - unsigned char value; + unsigned int value; } macroblock_modes; unsigned char motion_vertical_field_select; /* @@ -626,18 +627,18 @@ typedef struct _VAPictureParameterBufferMPEG4 VASurfaceID backward_reference_picture; union { struct { - unsigned char short_video_header : 1; - unsigned char chroma_format : 2; - unsigned char interlaced : 1; - unsigned char obmc_disable : 1; - unsigned char sprite_enable : 2; - unsigned char sprite_warping_accuracy : 2; - unsigned char quant_type : 1; - unsigned char quarter_sample : 1; - unsigned char data_partitioned : 1; - unsigned char reversible_vlc : 1; + unsigned int short_video_header : 1; + unsigned int chroma_format : 2; + unsigned int interlaced : 1; + unsigned int obmc_disable : 1; + unsigned int sprite_enable : 2; + unsigned int sprite_warping_accuracy : 2; + unsigned int quant_type : 1; + unsigned int quarter_sample : 1; + unsigned int data_partitioned : 1; + unsigned int reversible_vlc : 1; } bits; - unsigned short value; + unsigned int value; } vol_fields; unsigned char no_of_sprite_warping_points; short sprite_trajectory_du[3]; @@ -645,14 +646,14 @@ typedef struct _VAPictureParameterBufferMPEG4 unsigned char quant_precision; union { struct { - unsigned char vop_coding_type : 2; - unsigned char backward_reference_vop_coding_type : 2; - unsigned char vop_rounding_type : 1; - unsigned char intra_dc_vlc_thr : 3; - unsigned char top_field_first : 1; - unsigned char alternate_vertical_scan_flag : 1; + unsigned int vop_coding_type : 2; + unsigned int backward_reference_vop_coding_type : 2; + unsigned int vop_rounding_type : 1; + unsigned int intra_dc_vlc_thr : 3; + unsigned int top_field_first : 1; + unsigned int alternate_vertical_scan_flag : 1; } bits; - unsigned short value; + unsigned int value; } vop_fields; unsigned char vop_fcode_forward; unsigned char vop_fcode_backward; @@ -722,28 +723,41 @@ typedef struct _VAPictureParameterBufferVC1 /* sequence layer for AP or meta data for SP and MP */ union { struct { - unsigned char interlace : 1; /* SEQUENCE_LAYER::INTERLACE */ - unsigned char syncmarker : 1;/* METADATA::SYNCMARKER */ - unsigned char overlap : 1;/* METADATA::OVERLAP */ + unsigned int pulldown : 1; /* SEQUENCE_LAYER::PULLDOWN */ + unsigned int interlace : 1; /* SEQUENCE_LAYER::INTERLACE */ + unsigned int tfcntrflag : 1; /* SEQUENCE_LAYER::TFCNTRFLAG */ + unsigned int finterpflag : 1; /* SEQUENCE_LAYER::FINTERPFLAG */ + unsigned int psf : 1; /* SEQUENCE_LAYER::PSF */ + unsigned int multires : 1; /* METADATA::MULTIRES */ + unsigned int overlap : 1; /* METADATA::OVERLAP */ + unsigned int syncmarker : 1; /* METADATA::SYNCMARKER */ + unsigned int rangered : 1; /* METADATA::RANGERED */ + unsigned int max_b_frames : 3; /* METADATA::MAXBFRAMES */ } bits; - unsigned char value; + unsigned int value; } sequence_fields; unsigned short coded_width; /* ENTRY_POINT_LAYER::CODED_WIDTH */ unsigned short coded_height; /* ENTRY_POINT_LAYER::CODED_HEIGHT */ - unsigned char closed_entry; /* ENTRY_POINT_LAYER::CLOSED_ENTRY */ - unsigned char broken_link; /* ENTRY_POINT_LAYER::BROKEN_LINK */ - unsigned char loopfilter; /* ENTRY_POINT_LAYER::LOOPFILTER */ + union { + struct { + unsigned int broken_link : 1; /* ENTRY_POINT_LAYER::BROKEN_LINK */ + unsigned int closed_entry : 1; /* ENTRY_POINT_LAYER::CLOSED_ENTRY */ + unsigned int panscan_flag : 1; /* ENTRY_POINT_LAYER::PANSCAN_FLAG */ + unsigned int loopfilter : 1; /* ENTRY_POINT_LAYER::LOOPFILTER */ + } bits; + unsigned int value; + } entrypoint_fields; unsigned char conditional_overlap_flag; /* ENTRY_POINT_LAYER::CONDOVER */ unsigned char fast_uvmc_flag; /* ENTRY_POINT_LAYER::FASTUVMC */ union { struct { - unsigned char luma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPY_FLAG */ - unsigned char luma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPY */ - unsigned char chroma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPUV_FLAG */ - unsigned char chroma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPUV */ + unsigned int luma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPY_FLAG */ + unsigned int luma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPY */ + unsigned int chroma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPUV_FLAG */ + unsigned int chroma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPUV */ } bits; - unsigned char value; + unsigned int value; } range_mapping_fields; unsigned char b_picture_fraction; /* PICTURE_LAYER::BFRACTION */ @@ -757,88 +771,88 @@ typedef struct _VAPictureParameterBufferVC1 unsigned char luma_shift; /* PICTURE_LAYER::LUMSHIFT */ union { struct { - unsigned char picture_type : 2; /* PICTURE_LAYER::PTYPE */ - unsigned char frame_coding_mode : 3; /* PICTURE_LAYER::FCM */ - unsigned char top_field_first : 1; /* PICTURE_LAYER::TFF */ - unsigned char is_first_field : 1; /* set to 1 if it is the first field */ - unsigned char intensity_compensation : 1; /* PICTURE_LAYER::INTCOMP */ + unsigned int picture_type : 3; /* PICTURE_LAYER::PTYPE */ + unsigned int frame_coding_mode : 3; /* PICTURE_LAYER::FCM */ + unsigned int top_field_first : 1; /* PICTURE_LAYER::TFF */ + unsigned int is_first_field : 1; /* set to 1 if it is the first field */ + unsigned int intensity_compensation : 1; /* PICTURE_LAYER::INTCOMP */ } bits; - unsigned char value; + unsigned int value; } picture_fields; union { struct { - unsigned char mv_type_mb : 1; /* PICTURE::MVTYPEMB */ - unsigned char direct_mb : 1; /* PICTURE::DIRECTMB */ - unsigned char skip_mb : 1; /* PICTURE::SKIPMB */ - unsigned char field_tx : 1; /* PICTURE::FIELDTX */ - unsigned char forward_mb : 1; /* PICTURE::FORWARDMB */ - unsigned char ac_pred : 1; /* PICTURE::ACPRED */ - unsigned char overflags : 1; /* PICTURE::OVERFLAGS */ + unsigned int mv_type_mb : 1; /* PICTURE::MVTYPEMB */ + unsigned int direct_mb : 1; /* PICTURE::DIRECTMB */ + unsigned int skip_mb : 1; /* PICTURE::SKIPMB */ + unsigned int field_tx : 1; /* PICTURE::FIELDTX */ + unsigned int forward_mb : 1; /* PICTURE::FORWARDMB */ + unsigned int ac_pred : 1; /* PICTURE::ACPRED */ + unsigned int overflags : 1; /* PICTURE::OVERFLAGS */ } flags; - unsigned char value; + unsigned int value; } raw_coding; union { struct { - unsigned char bp_mv_type_mb : 1; /* PICTURE::MVTYPEMB */ - unsigned char bp_direct_mb : 1; /* PICTURE::DIRECTMB */ - unsigned char bp_skip_mb : 1; /* PICTURE::SKIPMB */ - unsigned char bp_field_tx : 1; /* PICTURE::FIELDTX */ - unsigned char bp_forward_mb : 1; /* PICTURE::FORWARDMB */ - unsigned char bp_ac_pred : 1; /* PICTURE::ACPRED */ - unsigned char bp_overflags : 1; /* PICTURE::OVERFLAGS */ + unsigned int bp_mv_type_mb : 1; /* PICTURE::MVTYPEMB */ + unsigned int bp_direct_mb : 1; /* PICTURE::DIRECTMB */ + unsigned int bp_skip_mb : 1; /* PICTURE::SKIPMB */ + unsigned int bp_field_tx : 1; /* PICTURE::FIELDTX */ + unsigned int bp_forward_mb : 1; /* PICTURE::FORWARDMB */ + unsigned int bp_ac_pred : 1; /* PICTURE::ACPRED */ + unsigned int bp_overflags : 1; /* PICTURE::OVERFLAGS */ } flags; - unsigned char value; + unsigned int value; } bitplane_present; /* signal what bitplane is being passed via the bitplane buffer */ union { struct { - unsigned char reference_distance_flag : 1;/* PICTURE_LAYER::REFDIST_FLAG */ - unsigned char reference_distance : 5;/* PICTURE_LAYER::REFDIST */ - unsigned char num_reference_pictures: 1;/* PICTURE_LAYER::NUMREF */ - unsigned char reference_field_pic_indicator : 1;/* PICTURE_LAYER::REFFIELD */ + unsigned int reference_distance_flag : 1;/* PICTURE_LAYER::REFDIST_FLAG */ + unsigned int reference_distance : 5;/* PICTURE_LAYER::REFDIST */ + unsigned int num_reference_pictures: 1;/* PICTURE_LAYER::NUMREF */ + unsigned int reference_field_pic_indicator : 1;/* PICTURE_LAYER::REFFIELD */ } bits; - unsigned short value; + unsigned int value; } reference_fields; union { struct { - unsigned char mv_mode : 3; /* PICTURE_LAYER::MVMODE */ - unsigned char mv_mode2 : 3; /* PICTURE_LAYER::MVMODE2 */ - unsigned char mv_table : 3; /* PICTURE_LAYER::MVTAB/IMVTAB */ - unsigned char two_mv_block_pattern_table: 2; /* PICTURE_LAYER::2MVBPTAB */ - unsigned char four_mv_switch : 1; /* PICTURE_LAYER::4MVSWITCH */ - unsigned char four_mv_block_pattern_table : 2; /* PICTURE_LAYER::4MVBPTAB */ - unsigned char extended_mv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_MV */ - unsigned char extended_mv_range : 2; /* PICTURE_LAYER::MVRANGE */ - unsigned char extended_dmv_flag : 1; /* ENTRY_POCHAR_LAYER::EXTENDED_DMV */ - unsigned char extended_dmv_range : 2; /* PICTURE_LAYER::DMVRANGE */ + unsigned int mv_mode : 3; /* PICTURE_LAYER::MVMODE */ + unsigned int mv_mode2 : 3; /* PICTURE_LAYER::MVMODE2 */ + unsigned int mv_table : 3; /* PICTURE_LAYER::MVTAB/IMVTAB */ + unsigned int two_mv_block_pattern_table: 2; /* PICTURE_LAYER::2MVBPTAB */ + unsigned int four_mv_switch : 1; /* PICTURE_LAYER::4MVSWITCH */ + unsigned int four_mv_block_pattern_table : 2; /* PICTURE_LAYER::4MVBPTAB */ + unsigned int extended_mv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_MV */ + unsigned int extended_mv_range : 2; /* PICTURE_LAYER::MVRANGE */ + unsigned int extended_dmv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_DMV */ + unsigned int extended_dmv_range : 2; /* PICTURE_LAYER::DMVRANGE */ } bits; unsigned int value; } mv_fields; union { struct { - unsigned char dquant : 2; /* ENTRY_POINT_LAYER::DQUANT */ - unsigned char quantizer : 2; /* ENTRY_POINT_LAYER::QUANTIZER */ - unsigned char half_qp : 1; /* PICTURE_LAYER::HALFQP */ - unsigned char pic_quantizer_scale : 5;/* PICTURE_LAYER::PQUANT */ - unsigned char pic_quantizer_type : 1;/* PICTURE_LAYER::PQUANTIZER */ - unsigned char dq_frame : 1; /* VOPDQUANT::DQUANTFRM */ - unsigned char dq_profile : 2; /* VOPDQUANT::DQPROFILE */ - unsigned char dq_sb_edge : 2; /* VOPDQUANT::DQSBEDGE */ - unsigned char dq_db_edge : 2; /* VOPDQUANT::DQDBEDGE */ - unsigned char dq_binary_level : 1; /* VOPDQUANT::DQBILEVEL */ - unsigned char alt_pic_quantizer : 5;/* VOPDQUANT::ALTPQUANT */ + unsigned int dquant : 2; /* ENTRY_POINT_LAYER::DQUANT */ + unsigned int quantizer : 2; /* ENTRY_POINT_LAYER::QUANTIZER */ + unsigned int half_qp : 1; /* PICTURE_LAYER::HALFQP */ + unsigned int pic_quantizer_scale : 5;/* PICTURE_LAYER::PQUANT */ + unsigned int pic_quantizer_type : 1;/* PICTURE_LAYER::PQUANTIZER */ + unsigned int dq_frame : 1; /* VOPDQUANT::DQUANTFRM */ + unsigned int dq_profile : 2; /* VOPDQUANT::DQPROFILE */ + unsigned int dq_sb_edge : 2; /* VOPDQUANT::DQSBEDGE */ + unsigned int dq_db_edge : 2; /* VOPDQUANT::DQDBEDGE */ + unsigned int dq_binary_level : 1; /* VOPDQUANT::DQBILEVEL */ + unsigned int alt_pic_quantizer : 5;/* VOPDQUANT::ALTPQUANT */ } bits; - unsigned long value; + unsigned int value; } pic_quantizer_fields; union { struct { - unsigned char variable_sized_transform_flag : 1;/* ENTRY_POINT_LAYER::VSTRANSFORM */ - unsigned char mb_level_transform_type_flag : 1;/* PICTURE_LAYER::TTMBF */ - unsigned char frame_level_transform_type : 2;/* PICTURE_LAYER::TTFRM */ - unsigned char transform_ac_codingset_idx1 : 2;/* PICTURE_LAYER::TRANSACFRM */ - unsigned char transform_ac_codingset_idx2 : 2;/* PICTURE_LAYER::TRANSACFRM2 */ - unsigned char intra_transform_dc_table : 1;/* PICTURE_LAYER::TRANSDCTAB */ + unsigned int variable_sized_transform_flag : 1;/* ENTRY_POINT_LAYER::VSTRANSFORM */ + unsigned int mb_level_transform_type_flag : 1;/* PICTURE_LAYER::TTMBF */ + unsigned int frame_level_transform_type : 2;/* PICTURE_LAYER::TTFRM */ + unsigned int transform_ac_codingset_idx1 : 2;/* PICTURE_LAYER::TRANSACFRM */ + unsigned int transform_ac_codingset_idx2 : 2;/* PICTURE_LAYER::TRANSACFRM2 */ + unsigned int intra_transform_dc_table : 1;/* PICTURE_LAYER::TRANSDCTAB */ } bits; - unsigned short value; + unsigned int value; } transform_fields; } VAPictureParameterBufferVC1; @@ -882,6 +896,7 @@ This is simplely a buffer containing raw bit-stream bytes typedef struct _VAPictureH264 { VASurfaceID picture_id; + unsigned int frame_idx; unsigned int flags; unsigned int TopFieldOrderCnt; unsigned int BottomFieldOrderCnt; @@ -909,30 +924,41 @@ typedef struct _VAPictureParameterBufferH264 unsigned char num_ref_frames; union { struct { - unsigned char chroma_format_idc : 2; - unsigned char residual_colour_transform_flag : 1; - unsigned char frame_mbs_only_flag : 1; - unsigned char mb_adaptive_frame_field_flag : 1; - unsigned char direct_8x8_inference_flag : 1; - unsigned char MinLumaBiPredSize8x8 : 1; /* see A.3.3.2 */ + unsigned int chroma_format_idc : 2; + unsigned int residual_colour_transform_flag : 1; + unsigned int gaps_in_frame_num_value_allowed_flag : 1; + unsigned int frame_mbs_only_flag : 1; + unsigned int mb_adaptive_frame_field_flag : 1; + unsigned int direct_8x8_inference_flag : 1; + unsigned int MinLumaBiPredSize8x8 : 1; /* see A.3.3.2 */ + unsigned int log2_max_frame_num_minus4 : 4; + unsigned int pic_order_cnt_type : 2; + unsigned int log2_max_pic_order_cnt_lsb_minus4 : 4; + unsigned int delta_pic_order_always_zero_flag : 1; } bits; - unsigned char value; + unsigned int value; } seq_fields; unsigned char num_slice_groups_minus1; unsigned char slice_group_map_type; + unsigned short slice_group_change_rate_minus1; signed char pic_init_qp_minus26; + signed char pic_init_qs_minus26; signed char chroma_qp_index_offset; signed char second_chroma_qp_index_offset; union { struct { - unsigned char entropy_coding_mode_flag : 1; - unsigned char weighted_pred_flag : 1; - unsigned char weighted_bipred_idc : 2; - unsigned char transform_8x8_mode_flag : 1; - unsigned char field_pic_flag : 1; - unsigned char constrained_intra_pred_flag : 1; + unsigned int entropy_coding_mode_flag : 1; + unsigned int weighted_pred_flag : 1; + unsigned int weighted_bipred_idc : 2; + unsigned int transform_8x8_mode_flag : 1; + unsigned int field_pic_flag : 1; + unsigned int constrained_intra_pred_flag : 1; + unsigned int pic_order_present_flag : 1; + unsigned int deblocking_filter_control_present_flag : 1; + unsigned int redundant_pic_cnt_present_flag : 1; + unsigned int reference_pic_flag : 1; /* nal_ref_idc != 0 */ } bits; - unsigned char value; + unsigned int value; } pic_fields; unsigned short frame_num; } VAPictureParameterBufferH264; @@ -1006,10 +1032,10 @@ typedef struct _VAEncSliceParameterBuffer unsigned int slice_height; /* slice height measured in MB */ union { struct { - unsigned char is_intra : 1; - unsigned char disable_deblocking_filter_idc : 2; + unsigned int is_intra : 1; + unsigned int disable_deblocking_filter_idc : 2; } bits; - unsigned char value; + unsigned int value; } slice_flags; } VAEncSliceParameterBuffer; @@ -1218,18 +1244,17 @@ Synchronization */ VAStatus vaSyncSurface ( VADisplay dpy, - VAContextID context, VASurfaceID render_target ); typedef enum { - VASurfaceRendering = 0, /* Rendering in progress */ - VASurfaceDisplaying = 1, /* Displaying in progress (not safe to render into it) */ + VASurfaceRendering = 1, /* Rendering in progress */ + VASurfaceDisplaying = 2, /* Displaying in progress (not safe to render into it) */ /* this status is useful if surface is used as the source */ /* of an overlay */ - VASurfaceReady = 2, /* not being rendered or displayed */ - VASurfaceSkipped = 4 /* Indicate a skipped frame during encode */ + VASurfaceReady = 4, /* not being rendered or displayed */ + VASurfaceSkipped = 8 /* Indicate a skipped frame during encode */ } VASurfaceStatus; /* @@ -1394,8 +1419,6 @@ VAStatus vaGetImage ( * Image must be in a format supported by the implementation * Returns a VA_STATUS_ERROR_SURFACE_BUSY if the surface * shouldn't be rendered into when this is called - * The source and destionation width and height are the same and - * no scaling is performed with this operation. */ VAStatus vaPutImage ( VADisplay dpy, @@ -1403,22 +1426,6 @@ VAStatus vaPutImage ( VAImageID image, int src_x, int src_y, - unsigned int width, - unsigned int height, - int dest_x, - int dest_y -); - -/* - * Similar to vaPutImage but with additional destination width - * and height arguments to enable scaling - */ -VAStatus vaPutImage2 ( - VADisplay dpy, - VASurfaceID surface, - VAImageID image, - int src_x, - int src_y, unsigned int src_width, unsigned int src_height, int dest_x, @@ -1567,28 +1574,6 @@ VAStatus vaAssociateSubpicture ( int num_surfaces, short src_x, /* upper left offset in subpicture */ short src_y, - short dest_x, /* upper left offset in surface */ - short dest_y, - unsigned short width, - unsigned short height, - /* - * whether to enable chroma-keying or global-alpha - * see VA_SUBPICTURE_XXX values - */ - unsigned int flags -); - -/* - * Similar to vaAssociateSubpicture but with additional destination width - * and height to enable scaling - */ -VAStatus vaAssociateSubpicture2 ( - VADisplay dpy, - VASubpictureID subpicture, - VASurfaceID *target_surfaces, - int num_surfaces, - short src_x, /* upper left offset in subpicture */ - short src_y, unsigned short src_width, unsigned short src_height, short dest_x, /* upper left offset in surface */ diff --git a/src/va_backend.h b/src/va_backend.h index 619dd99..6f858f5 100644 --- a/src/va_backend.h +++ b/src/va_backend.h @@ -175,7 +175,6 @@ struct VADriverVTable VAStatus (*vaSyncSurface) ( VADriverContextP ctx, - VAContextID context, VASurfaceID render_target ); @@ -254,18 +253,6 @@ struct VADriverVTable VAImageID image, int src_x, int src_y, - unsigned int width, - unsigned int height, - int dest_x, - int dest_y - ); - - VAStatus (*vaPutImage2) ( - VADriverContextP ctx, - VASurfaceID surface, - VAImageID image, - int src_x, - int src_y, unsigned int src_width, unsigned int src_height, int dest_x, @@ -319,24 +306,6 @@ struct VADriverVTable int num_surfaces, short src_x, /* upper left offset in subpicture */ short src_y, - short dest_x, /* upper left offset in surface */ - short dest_y, - unsigned short width, - unsigned short height, - /* - * whether to enable chroma-keying or global-alpha - * see VA_SUBPICTURE_XXX values - */ - unsigned int flags - ); - - VAStatus (*vaAssociateSubpicture2) ( - VADriverContextP ctx, - VASubpictureID subpicture, - VASurfaceID *target_surfaces, - int num_surfaces, - short src_x, /* upper left offset in subpicture */ - short src_y, unsigned short src_width, unsigned short src_height, short dest_x, /* upper left offset in surface */ diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c index ec0bbc8..9de904e 100644 --- a/src/x11/va_x11.c +++ b/src/x11/va_x11.c @@ -205,27 +205,6 @@ static VAStatus va_DisplayContextGetDriverName ( return vaStatus; } -int vaDisplayIsValid(VADisplay dpy) -{ - VADisplayContextP tmp=NULL; - VADisplayContextP pDisplayContext = pDisplayContexts; - - while (pDisplayContext) - { - if (pDisplayContext == (VADisplayContextP)dpy) - { - tmp = (VADisplay)pDisplayContext; - break; - } - pDisplayContext = pDisplayContext->pNext; - } - - if (!tmp) - return 0; - - return tmp->vaIsValid(pDisplayContext); -} - VADisplay vaGetDisplay ( Display *native_dpy /* implementation specific */ |