00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00506 #ifndef _VDPAU_H
00507 #define _VDPAU_H
00508
00509 #include <stdint.h>
00510
00511 #ifdef __cplusplus
00512 extern "C" {
00513 #endif
00514
00533 #define VDP_TRUE 1
00534
00535 #define VDP_FALSE 0
00536
00540 typedef int VdpBool;
00541
00560 #define VDP_INVALID_HANDLE 0xffffffffU
00561
00566 typedef uint32_t VdpChromaType;
00567
00569 #define VDP_CHROMA_TYPE_420 (VdpChromaType)0
00570
00571 #define VDP_CHROMA_TYPE_422 (VdpChromaType)1
00572
00573 #define VDP_CHROMA_TYPE_444 (VdpChromaType)2
00574
00578 typedef uint32_t VdpYCbCrFormat;
00579
00593 #define VDP_YCBCR_FORMAT_NV12 (VdpYCbCrFormat)0
00594
00605 #define VDP_YCBCR_FORMAT_YV12 (VdpYCbCrFormat)1
00606
00619 #define VDP_YCBCR_FORMAT_UYVY (VdpYCbCrFormat)2
00620
00633 #define VDP_YCBCR_FORMAT_YUYV (VdpYCbCrFormat)3
00634
00646 #define VDP_YCBCR_FORMAT_Y8U8V8A8 (VdpYCbCrFormat)4
00647
00659 #define VDP_YCBCR_FORMAT_V8U8Y8A8 (VdpYCbCrFormat)5
00660
00664 typedef uint32_t VdpRGBAFormat;
00665
00678 #define VDP_RGBA_FORMAT_B8G8R8A8 (VdpRGBAFormat)0
00679
00691 #define VDP_RGBA_FORMAT_R8G8B8A8 (VdpRGBAFormat)1
00692
00704 #define VDP_RGBA_FORMAT_R10G10B10A2 (VdpRGBAFormat)2
00705
00717 #define VDP_RGBA_FORMAT_B10G10R10A2 (VdpRGBAFormat)3
00718
00728 #define VDP_RGBA_FORMAT_A8 (VdpRGBAFormat)4
00729
00733 typedef uint32_t VdpIndexedFormat;
00734
00746 #define VDP_INDEXED_FORMAT_A4I4 (VdpIndexedFormat)0
00747
00758 #define VDP_INDEXED_FORMAT_I4A4 (VdpIndexedFormat)1
00759
00770 #define VDP_INDEXED_FORMAT_A8I8 (VdpIndexedFormat)2
00771
00782 #define VDP_INDEXED_FORMAT_I8A8 (VdpIndexedFormat)3
00783
00791 typedef struct {
00793 uint32_t x;
00795 uint32_t y;
00796 } VdpPoint;
00797
00808 typedef struct {
00810 uint32_t x0;
00812 uint32_t y0;
00814 uint32_t x1;
00816 uint32_t y1;
00817 } VdpRect;
00818
00827 typedef struct {
00828 float red;
00829 float green;
00830 float blue;
00831 float alpha;
00832 } VdpColor;
00833
00846 typedef enum {
00848 VDP_STATUS_OK = 0,
00852 VDP_STATUS_NO_IMPLEMENTATION,
00858 VDP_STATUS_DISPLAY_PREEMPTED,
00865 VDP_STATUS_INVALID_HANDLE,
00872 VDP_STATUS_INVALID_POINTER,
00876 VDP_STATUS_INVALID_CHROMA_TYPE,
00880 VDP_STATUS_INVALID_Y_CB_CR_FORMAT,
00884 VDP_STATUS_INVALID_RGBA_FORMAT,
00888 VDP_STATUS_INVALID_INDEXED_FORMAT,
00892 VDP_STATUS_INVALID_COLOR_STANDARD,
00896 VDP_STATUS_INVALID_COLOR_TABLE_FORMAT,
00901 VDP_STATUS_INVALID_BLEND_FACTOR,
00906 VDP_STATUS_INVALID_BLEND_EQUATION,
00910 VDP_STATUS_INVALID_FLAG,
00914 VDP_STATUS_INVALID_DECODER_PROFILE,
00918 VDP_STATUS_INVALID_VIDEO_MIXER_FEATURE,
00922 VDP_STATUS_INVALID_VIDEO_MIXER_PARAMETER,
00926 VDP_STATUS_INVALID_VIDEO_MIXER_ATTRIBUTE,
00931 VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE,
00935 VDP_STATUS_INVALID_FUNC_ID,
00945 VDP_STATUS_INVALID_SIZE,
00952 VDP_STATUS_INVALID_VALUE,
00958 VDP_STATUS_INVALID_STRUCT_VERSION,
00963 VDP_STATUS_RESOURCES,
00973 VDP_STATUS_HANDLE_DEVICE_MISMATCH,
00977 VDP_STATUS_ERROR,
00978 } VdpStatus;
00979
00989 typedef char const * VdpGetErrorString(
00990 VdpStatus status
00991 );
00992
01009 #define VDPAU_VERSION 0
01010
01016 typedef VdpStatus VdpGetApiVersion(
01017
01018 uint32_t * api_version
01019 );
01020
01038 typedef VdpStatus VdpGetInformationString(
01039
01040 char const * * information_string
01041 );
01042
01062 typedef uint32_t VdpDevice;
01063
01069 typedef VdpStatus VdpDeviceDestroy(
01070 VdpDevice device
01071 );
01072
01111 typedef float VdpCSCMatrix[3][4];
01112
01113 #define VDP_PROCAMP_VERSION 0
01114
01123 typedef struct {
01127 uint32_t struct_version;
01132 float brightness;
01137 float contrast;
01142 float saturation;
01147 float hue;
01148 } VdpProcamp;
01149
01156 typedef uint32_t VdpColorStandard;
01157
01159 #define VDP_COLOR_STANDARD_ITUR_BT_601 (VdpColorStandard)0
01160
01161 #define VDP_COLOR_STANDARD_ITUR_BT_709 (VdpColorStandard)1
01162
01163 #define VDP_COLOR_STANDARD_SMPTE_240M (VdpColorStandard)2
01164
01173 typedef VdpStatus VdpGenerateCSCMatrix(
01174 VdpProcamp * procamp,
01175 VdpColorStandard standard,
01176
01177 VdpCSCMatrix * csc_matrix
01178 );
01179
01224 typedef VdpStatus VdpVideoSurfaceQueryCapabilities(
01225 VdpDevice device,
01226 VdpChromaType surface_chroma_type,
01227
01228 VdpBool * is_supported,
01229 uint32_t * max_width,
01230 uint32_t * max_height
01231 );
01232
01244 typedef VdpStatus VdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(
01245 VdpDevice device,
01246 VdpChromaType surface_chroma_type,
01247 VdpYCbCrFormat bits_ycbcr_format,
01248
01249 VdpBool * is_supported
01250 );
01251
01256 typedef uint32_t VdpVideoSurface;
01257
01272 typedef VdpStatus VdpVideoSurfaceCreate(
01273 VdpDevice device,
01274 VdpChromaType chroma_type,
01275 uint32_t width,
01276 uint32_t height,
01277
01278 VdpVideoSurface * surface
01279 );
01280
01286 typedef VdpStatus VdpVideoSurfaceDestroy(
01287 VdpVideoSurface surface
01288 );
01289
01299 typedef VdpStatus VdpVideoSurfaceGetParameters(
01300 VdpVideoSurface surface,
01301
01302 VdpChromaType * chroma_type,
01303 uint32_t * width,
01304 uint32_t * height
01305 );
01306
01325 typedef VdpStatus VdpVideoSurfaceGetBitsYCbCr(
01326 VdpVideoSurface surface,
01327 VdpYCbCrFormat destination_ycbcr_format,
01328 void * const * destination_data,
01329 uint32_t const * destination_pitches
01330 );
01331
01350 typedef VdpStatus VdpVideoSurfacePutBitsYCbCr(
01351 VdpVideoSurface surface,
01352 VdpYCbCrFormat source_ycbcr_format,
01353 void const * const * source_data,
01354 uint32_t const * source_pitches
01355 );
01356
01392 typedef uint32_t VdpColorTableFormat;
01393
01405 #define VDP_COLOR_TABLE_FORMAT_B8G8R8X8 (VdpColorTableFormat)0
01406
01420 typedef VdpStatus VdpOutputSurfaceQueryCapabilities(
01421 VdpDevice device,
01422 VdpRGBAFormat surface_rgba_format,
01423
01424 VdpBool * is_supported,
01425 uint32_t * max_width,
01426 uint32_t * max_height
01427 );
01428
01439 typedef VdpStatus VdpOutputSurfaceQueryGetPutBitsNativeCapabilities(
01440 VdpDevice device,
01441 VdpRGBAFormat surface_rgba_format,
01442
01443 VdpBool * is_supported
01444 );
01445
01460 typedef VdpStatus VdpOutputSurfaceQueryPutBitsIndexedCapabilities(
01461 VdpDevice device,
01462 VdpRGBAFormat surface_rgba_format,
01463 VdpIndexedFormat bits_indexed_format,
01464 VdpColorTableFormat color_table_format,
01465
01466 VdpBool * is_supported
01467 );
01468
01481 typedef VdpStatus VdpOutputSurfaceQueryPutBitsYCbCrCapabilities(
01482 VdpDevice device,
01483 VdpRGBAFormat surface_rgba_format,
01484 VdpYCbCrFormat bits_ycbcr_format,
01485
01486 VdpBool * is_supported
01487 );
01488
01493 typedef uint32_t VdpOutputSurface;
01494
01507 typedef VdpStatus VdpOutputSurfaceCreate(
01508 VdpDevice device,
01509 VdpRGBAFormat rgba_format,
01510 uint32_t width,
01511 uint32_t height,
01512
01513 VdpOutputSurface * surface
01514 );
01515
01521 typedef VdpStatus VdpOutputSurfaceDestroy(
01522 VdpOutputSurface surface
01523 );
01524
01534 typedef VdpStatus VdpOutputSurfaceGetParameters(
01535 VdpOutputSurface surface,
01536
01537 VdpRGBAFormat * rgba_format,
01538 uint32_t * width,
01539 uint32_t * height
01540 );
01541
01561 typedef VdpStatus VdpOutputSurfaceGetBitsNative(
01562 VdpOutputSurface surface,
01563 VdpRect const * source_rect,
01564 void * const * destination_data,
01565 uint32_t const * destination_pitches
01566 );
01567
01587 typedef VdpStatus VdpOutputSurfacePutBitsNative(
01588 VdpOutputSurface surface,
01589 void const * const * source_data,
01590 uint32_t const * source_pitches,
01591 VdpRect const * destination_rect
01592 );
01593
01619 typedef VdpStatus VdpOutputSurfacePutBitsIndexed(
01620 VdpOutputSurface surface,
01621 VdpIndexedFormat source_indexed_format,
01622 void const * const * source_data,
01623 uint32_t const * source_pitch,
01624 VdpRect const * destination_rect,
01625 VdpColorTableFormat color_table_format,
01626 void const * color_table
01627 );
01628
01654 typedef VdpStatus VdpOutputSurfacePutBitsYCbCr(
01655 VdpOutputSurface surface,
01656 VdpYCbCrFormat source_ycbcr_format,
01657 void const * const * source_data,
01658 uint32_t const * source_pitches,
01659 VdpRect const * destination_rect,
01660 VdpCSCMatrix const * csc_matrix
01661 );
01662
01714 typedef VdpStatus VdpBitmapSurfaceQueryCapabilities(
01715 VdpDevice device,
01716 VdpRGBAFormat surface_rgba_format,
01717
01718 VdpBool * is_supported,
01719 uint32_t * max_width,
01720 uint32_t * max_height
01721 );
01722
01727 typedef uint32_t VdpBitmapSurface;
01728
01746 typedef VdpStatus VdpBitmapSurfaceCreate(
01747 VdpDevice device,
01748 VdpRGBAFormat rgba_format,
01749 uint32_t width,
01750 uint32_t height,
01751 VdpBool frequently_accessed,
01752
01753 VdpBitmapSurface * surface
01754 );
01755
01761 typedef VdpStatus VdpBitmapSurfaceDestroy(
01762 VdpBitmapSurface surface
01763 );
01764
01776 typedef VdpStatus VdpBitmapSurfaceGetParameters(
01777 VdpBitmapSurface surface,
01778
01779 VdpRGBAFormat * rgba_format,
01780 uint32_t * width,
01781 uint32_t * height,
01782 VdpBool * frequently_accessed
01783 );
01784
01804 typedef VdpStatus VdpBitmapSurfacePutBitsNative(
01805 VdpBitmapSurface surface,
01806 void const * const * source_data,
01807 uint32_t const * source_pitches,
01808 VdpRect const * destination_rect
01809 );
01810
01828 typedef enum {
01829 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ZERO = 0,
01830 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE = 1,
01831 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_SRC_COLOR = 2,
01832 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3,
01833 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_SRC_ALPHA = 4,
01834 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 5,
01835 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_DST_ALPHA = 6,
01836 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 7,
01837 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_DST_COLOR = 8,
01838 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 9,
01839 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_SRC_ALPHA_SATURATE = 10,
01840 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_CONSTANT_COLOR = 11,
01841 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 12,
01842 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_CONSTANT_ALPHA = 13,
01843 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 14,
01844 } VdpOutputSurfaceRenderBlendFactor;
01845
01850 typedef enum {
01851 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_SUBTRACT = 0,
01852 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_REVERSE_SUBTRACT = 1,
01853 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD = 2,
01854 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_MIN = 3,
01855 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_MAX = 4,
01856 } VdpOutputSurfaceRenderBlendEquation;
01857
01858 #define VDP_OUTPUT_SURFACE_RENDER_BLEND_STATE_VERSION 0
01859
01863 typedef struct {
01867 uint32_t struct_version;
01868 VdpOutputSurfaceRenderBlendFactor blend_factor_source_color;
01869 VdpOutputSurfaceRenderBlendFactor blend_factor_destination_color;
01870 VdpOutputSurfaceRenderBlendFactor blend_factor_source_alpha;
01871 VdpOutputSurfaceRenderBlendFactor blend_factor_destination_alpha;
01872 VdpOutputSurfaceRenderBlendEquation blend_equation_color;
01873 VdpOutputSurfaceRenderBlendEquation blend_equation_alpha;
01874 VdpColor blend_constant;
01875 } VdpOutputSurfaceRenderBlendState;
01876
01881 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_0 0
01882
01888 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_90 1
01889
01895 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_180 2
01896
01902 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_270 3
01903
01911 #define VDP_OUTPUT_SURFACE_RENDER_COLOR_PER_VERTEX (1 << 2)
01912
01990 typedef VdpStatus VdpOutputSurfaceRenderOutputSurface(
01991 VdpOutputSurface destination_surface,
01992 VdpRect const * destination_rect,
01993 VdpOutputSurface source_surface,
01994 VdpRect const * source_rect,
01995 VdpColor const * colors,
01996 VdpOutputSurfaceRenderBlendState const * blend_state,
01997 uint32_t flags
01998 );
01999
02077 typedef VdpStatus VdpOutputSurfaceRenderBitmapSurface(
02078 VdpOutputSurface destination_surface,
02079 VdpRect const * destination_rect,
02080 VdpBitmapSurface source_surface,
02081 VdpRect const * source_rect,
02082 VdpColor const * colors,
02083 VdpOutputSurfaceRenderBlendState const * blend_state,
02084 uint32_t flags
02085 );
02086
02107 typedef uint32_t VdpDecoderProfile;
02108
02110 #define VDP_DECODER_PROFILE_MPEG1 (VdpDecoderProfile)0
02111
02112 #define VDP_DECODER_PROFILE_MPEG2_SIMPLE (VdpDecoderProfile)1
02113
02114 #define VDP_DECODER_PROFILE_MPEG2_MAIN (VdpDecoderProfile)2
02115
02117 #define VDP_DECODER_PROFILE_H264_BASELINE (VdpDecoderProfile)6
02118
02119 #define VDP_DECODER_PROFILE_H264_MAIN (VdpDecoderProfile)7
02120
02121 #define VDP_DECODER_PROFILE_H264_HIGH (VdpDecoderProfile)8
02122
02123 #define VDP_DECODER_PROFILE_VC1_SIMPLE (VdpDecoderProfile)9
02124
02125 #define VDP_DECODER_PROFILE_VC1_MAIN (VdpDecoderProfile)10
02126
02127 #define VDP_DECODER_PROFILE_VC1_ADVANCED (VdpDecoderProfile)11
02128
02130 #define VDP_DECODER_LEVEL_MPEG1_NA 0
02131
02133 #define VDP_DECODER_LEVEL_MPEG2_LL 0
02134
02135 #define VDP_DECODER_LEVEL_MPEG2_ML 1
02136
02137 #define VDP_DECODER_LEVEL_MPEG2_HL14 2
02138
02139 #define VDP_DECODER_LEVEL_MPEG2_HL 3
02140
02142 #define VDP_DECODER_LEVEL_H264_1 10
02143
02144 #define VDP_DECODER_LEVEL_H264_1b 9
02145
02146 #define VDP_DECODER_LEVEL_H264_1_1 11
02147
02148 #define VDP_DECODER_LEVEL_H264_1_2 12
02149
02150 #define VDP_DECODER_LEVEL_H264_1_3 13
02151
02152 #define VDP_DECODER_LEVEL_H264_2 20
02153
02154 #define VDP_DECODER_LEVEL_H264_2_1 21
02155
02156 #define VDP_DECODER_LEVEL_H264_2_2 22
02157
02158 #define VDP_DECODER_LEVEL_H264_3 30
02159
02160 #define VDP_DECODER_LEVEL_H264_3_1 31
02161
02162 #define VDP_DECODER_LEVEL_H264_3_2 32
02163
02164 #define VDP_DECODER_LEVEL_H264_4 40
02165
02166 #define VDP_DECODER_LEVEL_H264_4_1 41
02167
02168 #define VDP_DECODER_LEVEL_H264_4_2 42
02169
02170 #define VDP_DECODER_LEVEL_H264_5 50
02171
02172 #define VDP_DECODER_LEVEL_H264_5_1 51
02173
02175 #define VDP_DECODER_LEVEL_VC1_SIMPLE_LOW 0
02176
02177 #define VDP_DECODER_LEVEL_VC1_SIMPLE_MEDIUM 1
02178
02180 #define VDP_DECODER_LEVEL_VC1_MAIN_LOW 0
02181
02182 #define VDP_DECODER_LEVEL_VC1_MAIN_MEDIUM 1
02183
02184 #define VDP_DECODER_LEVEL_VC1_MAIN_HIGH 2
02185
02187 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L0 0
02188
02189 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L1 1
02190
02191 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L2 2
02192
02193 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L3 3
02194
02195 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L4 4
02196
02216 typedef VdpStatus VdpDecoderQueryCapabilities(
02217 VdpDevice device,
02218 VdpDecoderProfile profile,
02219
02220 VdpBool * is_supported,
02221 uint32_t * max_level,
02222 uint32_t * max_references,
02223 uint32_t * max_width,
02224 uint32_t * max_height
02225 );
02226
02230 typedef uint32_t VdpDecoder;
02231
02248 typedef VdpStatus VdpDecoderCreate(
02249 VdpDevice device,
02250 VdpDecoderProfile profile,
02251 uint32_t width,
02252 uint32_t height,
02253 uint32_t max_references,
02254
02255 VdpDecoder * decoder
02256 );
02257
02263 typedef VdpStatus VdpDecoderDestroy(
02264 VdpDecoder decoder
02265 );
02266
02279 typedef VdpStatus VdpDecoderGetParameters(
02280 VdpDecoder decoder,
02281
02282 VdpDecoderProfile * profile,
02283 uint32_t * width,
02284 uint32_t * height
02285 );
02286
02287 #define VDP_BITSTREAM_BUFFER_VERSION 0
02288
02293 typedef struct {
02297 uint32_t struct_version;
02299 void const * bitstream;
02301 uint32_t bitstream_bytes;
02302 } VdpBitstreamBuffer;
02303
02314 typedef void * VdpPictureInfo;
02315
02324 typedef struct {
02329 VdpVideoSurface forward_reference;
02334 VdpVideoSurface backward_reference;
02336 uint32_t slice_count;
02337
02339 uint8_t picture_structure;
02341 uint8_t picture_coding_type;
02343 uint8_t intra_dc_precision;
02345 uint8_t frame_pred_frame_dct;
02347 uint8_t concealment_motion_vectors;
02349 uint8_t intra_vlc_format;
02351 uint8_t alternate_scan;
02353 uint8_t q_scale_type;
02355 uint8_t top_field_first;
02357 uint8_t full_pel_forward_vector;
02359 uint8_t full_pel_backward_vector;
02364 uint8_t f_code[2][2];
02366 uint8_t intra_quantizer_matrix[64];
02368 uint8_t non_intra_quantizer_matrix[64];
02369 } VdpPictureInfoMPEG1Or2;
02370
02378 typedef struct {
02383 VdpVideoSurface surface;
02385 VdpBool is_long_term;
02390 VdpBool top_is_reference;
02395 VdpBool bottom_is_reference;
02397 int32_t field_order_cnt[2];
02403 uint16_t frame_idx;
02404 } VdpReferenceFrameH264;
02405
02424 typedef struct {
02426 uint32_t slice_count;
02428 int32_t field_order_cnt[2];
02430 VdpBool is_reference;
02431
02433 uint16_t frame_num;
02435 uint8_t field_pic_flag;
02437 uint8_t bottom_field_flag;
02439 uint8_t num_ref_frames;
02441 uint8_t mb_adaptive_frame_field_flag;
02443 uint8_t constrained_intra_pred_flag;
02445 uint8_t weighted_pred_flag;
02447 uint8_t weighted_bipred_idc;
02449 uint8_t frame_mbs_only_flag;
02451 uint8_t transform_8x8_mode_flag;
02453 int8_t chroma_qp_index_offset;
02455 int8_t second_chroma_qp_index_offset;
02457 int8_t pic_init_qp_minus26;
02459 uint8_t num_ref_idx_l0_active_minus1;
02461 uint8_t num_ref_idx_l1_active_minus1;
02463 uint8_t log2_max_frame_num_minus4;
02465 uint8_t pic_order_cnt_type;
02467 uint8_t log2_max_pic_order_cnt_lsb_minus4;
02469 uint8_t delta_pic_order_always_zero_flag;
02471 uint8_t direct_8x8_inference_flag;
02473 uint8_t entropy_coding_mode_flag;
02475 uint8_t pic_order_present_flag;
02477 uint8_t deblocking_filter_control_present_flag;
02479 uint8_t redundant_pic_cnt_present_flag;
02480
02482 uint8_t scaling_lists_4x4[6][16];
02484 uint8_t scaling_lists_8x8[2][64];
02485
02487 VdpReferenceFrameH264 referenceFrames[16];
02488 } VdpPictureInfoH264;
02489
02497 typedef struct {
02502 VdpVideoSurface forward_reference;
02507 VdpVideoSurface backward_reference;
02508
02510 uint32_t slice_count;
02512 uint8_t picture_type;
02514 uint8_t frame_coding_mode;
02515
02517 uint8_t postprocflag;
02519 uint8_t pulldown;
02521 uint8_t interlace;
02523 uint8_t tfcntrflag;
02525 uint8_t finterpflag;
02527 uint8_t psf;
02529 uint8_t dquant;
02531 uint8_t panscan_flag;
02533 uint8_t refdist_flag;
02535 uint8_t quantizer;
02537 uint8_t extended_mv;
02539 uint8_t extended_dmv;
02541 uint8_t overlap;
02543 uint8_t vstransform;
02545 uint8_t loopfilter;
02547 uint8_t fastuvmc;
02549 uint8_t range_mapy_flag;
02551 uint8_t range_mapy;
02553 uint8_t range_mapuv_flag;
02555 uint8_t range_mapuv;
02556
02561 uint8_t multires;
02566 uint8_t syncmarker;
02571 uint8_t rangered;
02576 uint8_t maxbframes;
02577
02579 uint8_t deblockEnable;
02581 uint8_t pquant;
02582 } VdpPictureInfoVC1;
02583
02602 typedef VdpStatus VdpDecoderRender(
02603 VdpDecoder decoder,
02604 VdpVideoSurface target,
02605 VdpPictureInfo const * picture_info,
02606 uint32_t bitstream_buffer_count,
02607 VdpBitstreamBuffer const * bitstream_buffers
02608 );
02609
02689 typedef uint32_t VdpVideoMixerFeature;
02690
02702 #define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL (VdpVideoMixerFeature)0
02703
02715 #define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL (VdpVideoMixerFeature)1
02716
02724 #define VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE (VdpVideoMixerFeature)2
02725
02732 #define VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION (VdpVideoMixerFeature)3
02733
02740 #define VDP_VIDEO_MIXER_FEATURE_SHARPNESS (VdpVideoMixerFeature)4
02741
02753 #define VDP_VIDEO_MIXER_FEATURE_LUMA_KEY (VdpVideoMixerFeature)5
02754
02767 typedef uint32_t VdpVideoMixerParameter;
02768
02781 #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH (VdpVideoMixerParameter)0
02782
02794 #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT (VdpVideoMixerParameter)1
02795
02808 #define VDP_VIDEO_MIXER_PARAMETER_CHROMA_TYPE (VdpVideoMixerParameter)2
02809
02827 #define VDP_VIDEO_MIXER_PARAMETER_LAYERS (VdpVideoMixerParameter)3
02828
02841 typedef uint32_t VdpVideoMixerAttribute;
02842
02856 #define VDP_VIDEO_MIXER_ATTRIBUTE_BACKGROUND_COLOR (VdpVideoMixerAttribute)0
02857
02884 #define VDP_VIDEO_MIXER_ATTRIBUTE_CSC_MATRIX (VdpVideoMixerAttribute)1
02885
02897 #define VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL (VdpVideoMixerAttribute)2
02898
02913 #define VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL (VdpVideoMixerAttribute)3
02914
02925 #define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MIN_LUMA (VdpVideoMixerAttribute)4
02926
02937 #define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MAX_LUMA (VdpVideoMixerAttribute)5
02938
02948 typedef VdpStatus VdpVideoMixerQueryFeatureSupport(
02949 VdpDevice device,
02950 VdpVideoMixerFeature feature,
02951
02952 VdpBool * is_supported
02953 );
02954
02965 typedef VdpStatus VdpVideoMixerQueryParameterSupport(
02966 VdpDevice device,
02967 VdpVideoMixerParameter parameter,
02968
02969 VdpBool * is_supported
02970 );
02971
02981 typedef VdpStatus VdpVideoMixerQueryAttributeSupport(
02982 VdpDevice device,
02983 VdpVideoMixerAttribute attribute,
02984
02985 VdpBool * is_supported
02986 );
02987
02998 typedef VdpStatus VdpVideoMixerQueryParameterValueRange(
02999 VdpDevice device,
03000 VdpVideoMixerParameter parameter,
03001
03002 void * min_value,
03003 void * max_value
03004 );
03005
03016 typedef VdpStatus VdpVideoMixerQueryAttributeValueRange(
03017 VdpDevice device,
03018 VdpVideoMixerAttribute attribute,
03019
03020 void * min_value,
03021 void * max_value
03022 );
03023
03027 typedef uint32_t VdpVideoMixer;
03028
03049 typedef VdpStatus VdpVideoMixerCreate(
03050 VdpDevice device,
03051
03052 uint32_t feature_count,
03053 VdpVideoMixerFeature const * features,
03054
03055 uint32_t parameter_count,
03056 VdpVideoMixerParameter const * parameters,
03057 void const * const * parameter_values,
03058
03059 VdpVideoMixer * mixer
03060 );
03061
03072 typedef VdpStatus VdpVideoMixerSetFeatureEnables(
03073 VdpVideoMixer mixer,
03074 uint32_t feature_count,
03075 VdpVideoMixerFeature const * features,
03076 VdpBool const * feature_enables
03077 );
03078
03091 typedef VdpStatus VdpVideoMixerSetAttributeValues(
03092 VdpVideoMixer mixer,
03093 uint32_t attribute_count,
03094 VdpVideoMixerAttribute const * attributes,
03095 void const * const * attribute_values
03096 );
03097
03109 typedef VdpStatus VdpVideoMixerGetFeatureSupport(
03110 VdpVideoMixer mixer,
03111 uint32_t feature_count,
03112 VdpVideoMixerFeature const * features,
03113
03114 VdpBool * feature_supports
03115 );
03116
03126 typedef VdpStatus VdpVideoMixerGetFeatureEnables(
03127 VdpVideoMixer mixer,
03128 uint32_t feature_count,
03129 VdpVideoMixerFeature const * features,
03130
03131 VdpBool * feature_enables
03132 );
03133
03146 typedef VdpStatus VdpVideoMixerGetParameterValues(
03147 VdpVideoMixer mixer,
03148 uint32_t parameter_count,
03149 VdpVideoMixerParameter const * parameters,
03150
03151 void * const * parameter_values
03152 );
03153
03166 typedef VdpStatus VdpVideoMixerGetAttributeValues(
03167 VdpVideoMixer mixer,
03168 uint32_t attribute_count,
03169 VdpVideoMixerAttribute const * attributes,
03170
03171 void * const * attribute_values
03172 );
03173
03179 typedef VdpStatus VdpVideoMixerDestroy(
03180 VdpVideoMixer mixer
03181 );
03182
03188 typedef enum {
03192 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD,
03197 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD,
03201 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME,
03202 } VdpVideoMixerPictureStructure;
03203
03204 #define VDP_LAYER_VERSION 0
03205
03210 typedef struct {
03214 uint32_t struct_version;
03218 VdpOutputSurface source_surface;
03223 VdpRect const * source_rect;
03232 VdpRect const * destination_rect;
03233 } VdpLayer;
03234
03298 typedef VdpStatus VdpVideoMixerRender(
03299 VdpVideoMixer mixer,
03300 VdpOutputSurface background_surface,
03301 VdpRect const * background_source_rect,
03302 VdpVideoMixerPictureStructure current_picture_structure,
03303 uint32_t video_surface_past_count,
03304 VdpVideoSurface const * video_surface_past,
03305 VdpVideoSurface video_surface_current,
03306 uint32_t video_surface_future_count,
03307 VdpVideoSurface const * video_surface_future,
03308 VdpRect const * video_source_rect,
03309 VdpOutputSurface destination_surface,
03310 VdpRect const * destination_rect,
03311 VdpRect const * destination_video_rect,
03312 uint32_t layer_count,
03313 VdpLayer const * layers
03314 );
03315
03367 typedef uint64_t VdpTime;
03368
03377 typedef uint32_t VdpPresentationQueueTarget;
03378
03384 typedef VdpStatus VdpPresentationQueueTargetDestroy(
03385 VdpPresentationQueueTarget presentation_queue_target
03386 );
03387
03392 typedef uint32_t VdpPresentationQueue;
03393
03405 typedef VdpStatus VdpPresentationQueueCreate(
03406 VdpDevice device,
03407 VdpPresentationQueueTarget presentation_queue_target,
03408
03409 VdpPresentationQueue * presentation_queue
03410 );
03411
03417 typedef VdpStatus VdpPresentationQueueDestroy(
03418 VdpPresentationQueue presentation_queue
03419 );
03420
03430 typedef VdpStatus VdpPresentationQueueSetBackgroundColor(
03431 VdpPresentationQueue presentation_queue,
03432 VdpColor * const background_color
03433 );
03434
03440 typedef VdpStatus VdpPresentationQueueGetBackgroundColor(
03441 VdpPresentationQueue presentation_queue,
03442 VdpColor * background_color
03443 );
03444
03452 typedef VdpStatus VdpPresentationQueueGetTime(
03453 VdpPresentationQueue presentation_queue,
03454
03455 VdpTime * current_time
03456 );
03457
03490 typedef VdpStatus VdpPresentationQueueDisplay(
03491 VdpPresentationQueue presentation_queue,
03492 VdpOutputSurface surface,
03493 uint32_t clip_width,
03494 uint32_t clip_height,
03495 VdpTime earliest_presentation_time
03496 );
03497
03512 typedef VdpStatus VdpPresentationQueueBlockUntilSurfaceIdle(
03513 VdpPresentationQueue presentation_queue,
03514 VdpOutputSurface surface,
03515
03516 VdpTime * first_presentation_time
03517 );
03518
03523 typedef enum {
03525 VDP_PRESENTATION_QUEUE_STATUS_IDLE,
03527 VDP_PRESENTATION_QUEUE_STATUS_QUEUED,
03529 VDP_PRESENTATION_QUEUE_STATUS_VISIBLE,
03530 } VdpPresentationQueueStatus;
03531
03543 typedef VdpStatus VdpPresentationQueueQuerySurfaceStatus(
03544 VdpPresentationQueue presentation_queue,
03545 VdpOutputSurface surface,
03546
03547 VdpPresentationQueueStatus * status,
03548 VdpTime * first_presentation_time
03549 );
03550
03605 typedef void VdpPreemptionCallback(
03606 VdpDevice device,
03607 void * context
03608 );
03609
03620 typedef VdpStatus VdpPreemptionCallbackRegister(
03621 VdpDevice device,
03622 VdpPreemptionCallback callback,
03623 void * context
03624 );
03625
03643 typedef uint32_t VdpFuncId;
03644
03646 #define VDP_FUNC_ID_GET_ERROR_STRING (VdpFuncId)0
03647
03648 #define VDP_FUNC_ID_GET_PROC_ADDRESS (VdpFuncId)1
03649
03650 #define VDP_FUNC_ID_GET_API_VERSION (VdpFuncId)2
03651
03652 #define VDP_FUNC_ID_GET_INFORMATION_STRING (VdpFuncId)4
03653
03654 #define VDP_FUNC_ID_DEVICE_DESTROY (VdpFuncId)5
03655
03656 #define VDP_FUNC_ID_GENERATE_CSC_MATRIX (VdpFuncId)6
03657
03658 #define VDP_FUNC_ID_VIDEO_SURFACE_QUERY_CAPABILITIES (VdpFuncId)7
03659
03660 #define VDP_FUNC_ID_VIDEO_SURFACE_QUERY_GET_PUT_BITS_Y_CB_CR_CAPABILITIES (VdpFuncId)8
03661
03662 #define VDP_FUNC_ID_VIDEO_SURFACE_CREATE (VdpFuncId)9
03663
03664 #define VDP_FUNC_ID_VIDEO_SURFACE_DESTROY (VdpFuncId)10
03665
03666 #define VDP_FUNC_ID_VIDEO_SURFACE_GET_PARAMETERS (VdpFuncId)11
03667
03668 #define VDP_FUNC_ID_VIDEO_SURFACE_GET_BITS_Y_CB_CR (VdpFuncId)12
03669
03670 #define VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR (VdpFuncId)13
03671
03672 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_CAPABILITIES (VdpFuncId)14
03673
03674 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_GET_PUT_BITS_NATIVE_CAPABILITIES (VdpFuncId)15
03675
03676 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_INDEXED_CAPABILITIES (VdpFuncId)16
03677
03678 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_Y_CB_CR_CAPABILITIES (VdpFuncId)17
03679
03680 #define VDP_FUNC_ID_OUTPUT_SURFACE_CREATE (VdpFuncId)18
03681
03682 #define VDP_FUNC_ID_OUTPUT_SURFACE_DESTROY (VdpFuncId)19
03683
03684 #define VDP_FUNC_ID_OUTPUT_SURFACE_GET_PARAMETERS (VdpFuncId)20
03685
03686 #define VDP_FUNC_ID_OUTPUT_SURFACE_GET_BITS_NATIVE (VdpFuncId)21
03687
03688 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_NATIVE (VdpFuncId)22
03689
03690 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_INDEXED (VdpFuncId)23
03691
03692 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_Y_CB_CR (VdpFuncId)24
03693
03694 #define VDP_FUNC_ID_BITMAP_SURFACE_QUERY_CAPABILITIES (VdpFuncId)25
03695
03696 #define VDP_FUNC_ID_BITMAP_SURFACE_CREATE (VdpFuncId)26
03697
03698 #define VDP_FUNC_ID_BITMAP_SURFACE_DESTROY (VdpFuncId)27
03699
03700 #define VDP_FUNC_ID_BITMAP_SURFACE_GET_PARAMETERS (VdpFuncId)28
03701
03702 #define VDP_FUNC_ID_BITMAP_SURFACE_PUT_BITS_NATIVE (VdpFuncId)29
03703
03704 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE (VdpFuncId)33
03705
03706 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_BITMAP_SURFACE (VdpFuncId)34
03707
03708 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_VIDEO_SURFACE_LUMA (VdpFuncId)35
03709
03710 #define VDP_FUNC_ID_DECODER_QUERY_CAPABILITIES (VdpFuncId)36
03711
03712 #define VDP_FUNC_ID_DECODER_CREATE (VdpFuncId)37
03713
03714 #define VDP_FUNC_ID_DECODER_DESTROY (VdpFuncId)38
03715
03716 #define VDP_FUNC_ID_DECODER_GET_PARAMETERS (VdpFuncId)39
03717
03718 #define VDP_FUNC_ID_DECODER_RENDER (VdpFuncId)40
03719
03720 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_FEATURE_SUPPORT (VdpFuncId)41
03721
03722 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_SUPPORT (VdpFuncId)42
03723
03724 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_SUPPORT (VdpFuncId)43
03725
03726 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_VALUE_RANGE (VdpFuncId)44
03727
03728 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_VALUE_RANGE (VdpFuncId)45
03729
03730 #define VDP_FUNC_ID_VIDEO_MIXER_CREATE (VdpFuncId)46
03731
03732 #define VDP_FUNC_ID_VIDEO_MIXER_SET_FEATURE_ENABLES (VdpFuncId)47
03733
03734 #define VDP_FUNC_ID_VIDEO_MIXER_SET_ATTRIBUTE_VALUES (VdpFuncId)48
03735
03736 #define VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_SUPPORT (VdpFuncId)49
03737
03738 #define VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_ENABLES (VdpFuncId)50
03739
03740 #define VDP_FUNC_ID_VIDEO_MIXER_GET_PARAMETER_VALUES (VdpFuncId)51
03741
03742 #define VDP_FUNC_ID_VIDEO_MIXER_GET_ATTRIBUTE_VALUES (VdpFuncId)52
03743
03744 #define VDP_FUNC_ID_VIDEO_MIXER_DESTROY (VdpFuncId)53
03745
03746 #define VDP_FUNC_ID_VIDEO_MIXER_RENDER (VdpFuncId)54
03747
03748 #define VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_DESTROY (VdpFuncId)55
03749
03750 #define VDP_FUNC_ID_PRESENTATION_QUEUE_CREATE (VdpFuncId)56
03751
03752 #define VDP_FUNC_ID_PRESENTATION_QUEUE_DESTROY (VdpFuncId)57
03753
03754 #define VDP_FUNC_ID_PRESENTATION_QUEUE_SET_BACKGROUND_COLOR (VdpFuncId)58
03755
03756 #define VDP_FUNC_ID_PRESENTATION_QUEUE_GET_BACKGROUND_COLOR (VdpFuncId)59
03757
03758 #define VDP_FUNC_ID_PRESENTATION_QUEUE_GET_TIME (VdpFuncId)62
03759
03760 #define VDP_FUNC_ID_PRESENTATION_QUEUE_DISPLAY (VdpFuncId)63
03761
03762 #define VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE (VdpFuncId)64
03763
03764 #define VDP_FUNC_ID_PRESENTATION_QUEUE_QUERY_SURFACE_STATUS (VdpFuncId)65
03765
03766 #define VDP_FUNC_ID_PREEMPTION_CALLBACK_REGISTER (VdpFuncId)66
03767
03768 #define VDP_FUNC_ID_BASE_WINSYS 0x1000
03769
03779 typedef VdpStatus VdpGetProcAddress(
03780 VdpDevice device,
03781 VdpFuncId function_id,
03782
03783 void * * function_pointer
03784 );
03785
03788
03796 #ifdef __cplusplus
03797 }
03798 #endif
03799
03800 #endif
03801