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
02241 typedef VdpStatus VdpDecoderCreate(
02242 VdpDevice device,
02243 VdpDecoderProfile profile,
02244 uint32_t width,
02245 uint32_t height,
02246
02247 VdpDecoder * decoder
02248 );
02249
02255 typedef VdpStatus VdpDecoderDestroy(
02256 VdpDecoder decoder
02257 );
02258
02271 typedef VdpStatus VdpDecoderGetParameters(
02272 VdpDecoder decoder,
02273
02274 VdpDecoderProfile * profile,
02275 uint32_t * width,
02276 uint32_t * height
02277 );
02278
02279 #define VDP_BITSTREAM_BUFFER_VERSION 0
02280
02285 typedef struct {
02289 uint32_t struct_version;
02291 void const * bitstream;
02293 uint32_t bitstream_bytes;
02294 } VdpBitstreamBuffer;
02295
02306 typedef void * VdpPictureInfo;
02307
02312 typedef struct {
02313 VdpVideoSurface forward_reference;
02314 VdpVideoSurface backward_reference;
02315 uint32_t slice_count;
02316
02317
02318 uint8_t picture_structure;
02319 uint8_t picture_coding_type;
02320 uint8_t intra_dc_precision;
02321 uint8_t frame_pred_frame_dct;
02322 uint8_t concealment_motion_vectors;
02323 uint8_t intra_vlc_format;
02324 uint8_t alternate_scan;
02325 uint8_t q_scale_type;
02326 uint8_t top_field_first;
02327 uint8_t full_pel_forward_vector;
02328 uint8_t full_pel_backward_vector;
02329 uint8_t f_code[2][2];
02330 uint8_t intra_quantizer_matrix[64];
02331 uint8_t non_intra_quantizer_matrix[64];
02332 } VdpPictureInfoMPEG1Or2;
02333
02337 typedef struct {
02338 VdpVideoSurface surface;
02339 VdpBool is_long_term;
02340 VdpBool top_is_reference;
02341 VdpBool bottom_is_reference;
02342 int32_t field_order_cnt[2];
02343 uint16_t frame_idx;
02344 } VdpReferenceFrameH264;
02345
02360 typedef struct {
02361
02362 uint32_t slice_count;
02363 int32_t field_order_cnt[2];
02364 VdpBool is_reference;
02365
02366
02367 uint16_t frame_num;
02368 uint8_t field_pic_flag;
02369 uint8_t bottom_field_flag;
02370 uint8_t num_ref_frames;
02371 uint8_t mb_adaptive_frame_field_flag;
02372 uint8_t constrained_intra_pred_flag;
02373 uint8_t weighted_pred_flag;
02374 uint8_t weighted_bipred_idc;
02375 uint8_t frame_mbs_only_flag;
02376 uint8_t transform_8x8_mode_flag;
02377 int8_t chroma_qp_index_offset;
02378 int8_t second_chroma_qp_index_offset;
02379 int8_t pic_init_qp_minus26;
02380 uint8_t num_ref_idx_l0_active_minus1;
02381 uint8_t num_ref_idx_l1_active_minus1;
02382 uint8_t log2_max_frame_num_minus4;
02383 uint8_t pic_order_cnt_type;
02384 uint8_t log2_max_pic_order_cnt_lsb_minus4;
02385 uint8_t delta_pic_order_always_zero_flag;
02386 uint8_t direct_8x8_inference_flag;
02387 uint8_t entropy_coding_mode_flag;
02388 uint8_t pic_order_present_flag;
02389 uint8_t deblocking_filter_control_present_flag;
02390 uint8_t redundant_pic_cnt_present_flag;
02391
02392
02393 uint8_t scaling_lists_4x4[6][16];
02394 uint8_t scaling_lists_8x8[2][64];
02395
02397 VdpReferenceFrameH264 referenceFrames[16];
02398 } VdpPictureInfoH264;
02399
02403 typedef struct {
02404 VdpVideoSurface forward_reference;
02405 VdpVideoSurface backward_reference;
02406
02407 uint32_t slice_count;
02408
02409 uint8_t picture_type;
02410
02411
02412
02413 uint8_t frame_coding_mode;
02414
02415
02416 uint8_t postprocflag;
02417 uint8_t pulldown;
02418 uint8_t interlace;
02419 uint8_t tfcntrflag;
02420 uint8_t finterpflag;
02421 uint8_t psf;
02422 uint8_t dquant;
02423 uint8_t panscan_flag;
02424 uint8_t refdist_flag;
02425 uint8_t quantizer;
02426 uint8_t extended_mv;
02427 uint8_t extended_dmv;
02428 uint8_t overlap;
02429 uint8_t vstransform;
02430 uint8_t loopfilter;
02431 uint8_t fastuvmc;
02432 uint8_t range_mapy_flag;
02433 uint8_t range_mapy;
02434 uint8_t range_mapuv_flag;
02435 uint8_t range_mapuv;
02436
02437
02438 uint8_t multires;
02439 uint8_t syncmarker;
02440 uint8_t rangered;
02441 uint8_t maxbframes;
02442
02443
02444 uint8_t deblockEnable;
02445 uint8_t pquant;
02446 } VdpPictureInfoVC1;
02447
02466 typedef VdpStatus VdpDecoderRender(
02467 VdpDecoder decoder,
02468 VdpVideoSurface target,
02469 VdpPictureInfo const * picture_info,
02470 uint32_t bitstream_buffer_count,
02471 VdpBitstreamBuffer const * bitstream_buffers
02472 );
02473
02553 typedef uint32_t VdpVideoMixerFeature;
02554
02566 #define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL (VdpVideoMixerFeature)0
02567
02579 #define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL (VdpVideoMixerFeature)1
02580
02588 #define VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE (VdpVideoMixerFeature)2
02589
02596 #define VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION (VdpVideoMixerFeature)3
02597
02604 #define VDP_VIDEO_MIXER_FEATURE_SHARPNESS (VdpVideoMixerFeature)4
02605
02617 #define VDP_VIDEO_MIXER_FEATURE_LUMA_KEY (VdpVideoMixerFeature)5
02618
02631 typedef uint32_t VdpVideoMixerParameter;
02632
02645 #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH (VdpVideoMixerParameter)0
02646
02658 #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT (VdpVideoMixerParameter)1
02659
02672 #define VDP_VIDEO_MIXER_PARAMETER_CHROMA_TYPE (VdpVideoMixerParameter)2
02673
02691 #define VDP_VIDEO_MIXER_PARAMETER_LAYERS (VdpVideoMixerParameter)3
02692
02705 typedef uint32_t VdpVideoMixerAttribute;
02706
02720 #define VDP_VIDEO_MIXER_ATTRIBUTE_BACKGROUND_COLOR (VdpVideoMixerAttribute)0
02721
02748 #define VDP_VIDEO_MIXER_ATTRIBUTE_CSC_MATRIX (VdpVideoMixerAttribute)1
02749
02761 #define VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL (VdpVideoMixerAttribute)2
02762
02777 #define VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL (VdpVideoMixerAttribute)3
02778
02789 #define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MIN_LUMA (VdpVideoMixerAttribute)4
02790
02801 #define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MAX_LUMA (VdpVideoMixerAttribute)5
02802
02812 typedef VdpStatus VdpVideoMixerQueryFeatureSupport(
02813 VdpDevice device,
02814 VdpVideoMixerFeature feature,
02815
02816 VdpBool * is_supported
02817 );
02818
02829 typedef VdpStatus VdpVideoMixerQueryParameterSupport(
02830 VdpDevice device,
02831 VdpVideoMixerParameter parameter,
02832
02833 VdpBool * is_supported
02834 );
02835
02845 typedef VdpStatus VdpVideoMixerQueryAttributeSupport(
02846 VdpDevice device,
02847 VdpVideoMixerAttribute attribute,
02848
02849 VdpBool * is_supported
02850 );
02851
02862 typedef VdpStatus VdpVideoMixerQueryParameterValueRange(
02863 VdpDevice device,
02864 VdpVideoMixerParameter parameter,
02865
02866 void * min_value,
02867 void * max_value
02868 );
02869
02880 typedef VdpStatus VdpVideoMixerQueryAttributeValueRange(
02881 VdpDevice device,
02882 VdpVideoMixerAttribute attribute,
02883
02884 void * min_value,
02885 void * max_value
02886 );
02887
02891 typedef uint32_t VdpVideoMixer;
02892
02913 typedef VdpStatus VdpVideoMixerCreate(
02914 VdpDevice device,
02915
02916 uint32_t feature_count,
02917 VdpVideoMixerFeature const * features,
02918
02919 uint32_t parameter_count,
02920 VdpVideoMixerParameter const * parameters,
02921 void const * const * parameter_values,
02922
02923 VdpVideoMixer * mixer
02924 );
02925
02936 typedef VdpStatus VdpVideoMixerSetFeatureEnables(
02937 VdpVideoMixer mixer,
02938 uint32_t feature_count,
02939 VdpVideoMixerFeature const * features,
02940 VdpBool const * feature_enables
02941 );
02942
02955 typedef VdpStatus VdpVideoMixerSetAttributeValues(
02956 VdpVideoMixer mixer,
02957 uint32_t attribute_count,
02958 VdpVideoMixerAttribute const * attributes,
02959 void const * const * attribute_values
02960 );
02961
02973 typedef VdpStatus VdpVideoMixerGetFeatureSupport(
02974 VdpVideoMixer mixer,
02975 uint32_t feature_count,
02976 VdpVideoMixerFeature const * features,
02977
02978 VdpBool * feature_supports
02979 );
02980
02990 typedef VdpStatus VdpVideoMixerGetFeatureEnables(
02991 VdpVideoMixer mixer,
02992 uint32_t feature_count,
02993 VdpVideoMixerFeature const * features,
02994
02995 VdpBool * feature_enables
02996 );
02997
03010 typedef VdpStatus VdpVideoMixerGetParameterValues(
03011 VdpVideoMixer mixer,
03012 uint32_t parameter_count,
03013 VdpVideoMixerParameter const * parameters,
03014
03015 void * const * parameter_values
03016 );
03017
03030 typedef VdpStatus VdpVideoMixerGetAttributeValues(
03031 VdpVideoMixer mixer,
03032 uint32_t attribute_count,
03033 VdpVideoMixerAttribute const * attributes,
03034
03035 void * const * attribute_values
03036 );
03037
03043 typedef VdpStatus VdpVideoMixerDestroy(
03044 VdpVideoMixer mixer
03045 );
03046
03052 typedef enum {
03056 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD,
03061 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD,
03065 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME,
03066 } VdpVideoMixerPictureStructure;
03067
03068 #define VDP_LAYER_VERSION 0
03069
03074 typedef struct {
03078 uint32_t struct_version;
03082 VdpOutputSurface source_surface;
03087 VdpRect const * source_rect;
03096 VdpRect const * destination_rect;
03097 } VdpLayer;
03098
03162 typedef VdpStatus VdpVideoMixerRender(
03163 VdpVideoMixer mixer,
03164 VdpOutputSurface background_surface,
03165 VdpRect const * background_source_rect,
03166 VdpVideoMixerPictureStructure current_picture_structure,
03167 uint32_t video_surface_past_count,
03168 VdpVideoSurface const * video_surface_past,
03169 VdpVideoSurface video_surface_current,
03170 uint32_t video_surface_future_count,
03171 VdpVideoSurface const * video_surface_future,
03172 VdpRect const * video_source_rect,
03173 VdpOutputSurface destination_surface,
03174 VdpRect const * destination_rect,
03175 VdpRect const * destination_video_rect,
03176 uint32_t layer_count,
03177 VdpLayer const * layers
03178 );
03179
03231 typedef uint64_t VdpTime;
03232
03241 typedef uint32_t VdpPresentationQueueTarget;
03242
03248 typedef VdpStatus VdpPresentationQueueTargetDestroy(
03249 VdpPresentationQueueTarget presentation_queue_target
03250 );
03251
03256 typedef uint32_t VdpPresentationQueue;
03257
03269 typedef VdpStatus VdpPresentationQueueCreate(
03270 VdpDevice device,
03271 VdpPresentationQueueTarget presentation_queue_target,
03272
03273 VdpPresentationQueue * presentation_queue
03274 );
03275
03281 typedef VdpStatus VdpPresentationQueueDestroy(
03282 VdpPresentationQueue presentation_queue
03283 );
03284
03294 typedef VdpStatus VdpPresentationQueueSetBackgroundColor(
03295 VdpPresentationQueue presentation_queue,
03296 VdpColor * const background_color
03297 );
03298
03304 typedef VdpStatus VdpPresentationQueueGetBackgroundColor(
03305 VdpPresentationQueue presentation_queue,
03306 VdpColor * background_color
03307 );
03308
03316 typedef VdpStatus VdpPresentationQueueGetTime(
03317 VdpPresentationQueue presentation_queue,
03318
03319 VdpTime * current_time
03320 );
03321
03354 typedef VdpStatus VdpPresentationQueueDisplay(
03355 VdpPresentationQueue presentation_queue,
03356 VdpOutputSurface surface,
03357 uint32_t clip_width,
03358 uint32_t clip_height,
03359 VdpTime earliest_presentation_time
03360 );
03361
03376 typedef VdpStatus VdpPresentationQueueBlockUntilSurfaceIdle(
03377 VdpPresentationQueue presentation_queue,
03378 VdpOutputSurface surface,
03379
03380 VdpTime * first_presentation_time
03381 );
03382
03387 typedef enum {
03389 VDP_PRESENTATION_QUEUE_STATUS_IDLE,
03391 VDP_PRESENTATION_QUEUE_STATUS_QUEUED,
03393 VDP_PRESENTATION_QUEUE_STATUS_VISIBLE,
03394 } VdpPresentationQueueStatus;
03395
03407 typedef VdpStatus VdpPresentationQueueQuerySurfaceStatus(
03408 VdpPresentationQueue presentation_queue,
03409 VdpOutputSurface surface,
03410
03411 VdpPresentationQueueStatus * status,
03412 VdpTime * first_presentation_time
03413 );
03414
03469 typedef void VdpPreemptionCallback(
03470 VdpDevice device,
03471 void * context
03472 );
03473
03484 typedef VdpStatus VdpPreemptionCallbackRegister(
03485 VdpDevice device,
03486 VdpPreemptionCallback callback,
03487 void * context
03488 );
03489
03507 typedef uint32_t VdpFuncId;
03508
03510 #define VDP_FUNC_ID_GET_ERROR_STRING (VdpFuncId)0
03511
03512 #define VDP_FUNC_ID_GET_PROC_ADDRESS (VdpFuncId)1
03513
03514 #define VDP_FUNC_ID_GET_API_VERSION (VdpFuncId)2
03515
03516 #define VDP_FUNC_ID_GET_INFORMATION_STRING (VdpFuncId)4
03517
03518 #define VDP_FUNC_ID_DEVICE_DESTROY (VdpFuncId)5
03519
03520 #define VDP_FUNC_ID_GENERATE_CSC_MATRIX (VdpFuncId)6
03521
03522 #define VDP_FUNC_ID_VIDEO_SURFACE_QUERY_CAPABILITIES (VdpFuncId)7
03523
03524 #define VDP_FUNC_ID_VIDEO_SURFACE_QUERY_GET_PUT_BITS_Y_CB_CR_CAPABILITIES (VdpFuncId)8
03525
03526 #define VDP_FUNC_ID_VIDEO_SURFACE_CREATE (VdpFuncId)9
03527
03528 #define VDP_FUNC_ID_VIDEO_SURFACE_DESTROY (VdpFuncId)10
03529
03530 #define VDP_FUNC_ID_VIDEO_SURFACE_GET_PARAMETERS (VdpFuncId)11
03531
03532 #define VDP_FUNC_ID_VIDEO_SURFACE_GET_BITS_Y_CB_CR (VdpFuncId)12
03533
03534 #define VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR (VdpFuncId)13
03535
03536 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_CAPABILITIES (VdpFuncId)14
03537
03538 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_GET_PUT_BITS_NATIVE_CAPABILITIES (VdpFuncId)15
03539
03540 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_INDEXED_CAPABILITIES (VdpFuncId)16
03541
03542 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_Y_CB_CR_CAPABILITIES (VdpFuncId)17
03543
03544 #define VDP_FUNC_ID_OUTPUT_SURFACE_CREATE (VdpFuncId)18
03545
03546 #define VDP_FUNC_ID_OUTPUT_SURFACE_DESTROY (VdpFuncId)19
03547
03548 #define VDP_FUNC_ID_OUTPUT_SURFACE_GET_PARAMETERS (VdpFuncId)20
03549
03550 #define VDP_FUNC_ID_OUTPUT_SURFACE_GET_BITS_NATIVE (VdpFuncId)21
03551
03552 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_NATIVE (VdpFuncId)22
03553
03554 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_INDEXED (VdpFuncId)23
03555
03556 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_Y_CB_CR (VdpFuncId)24
03557
03558 #define VDP_FUNC_ID_BITMAP_SURFACE_QUERY_CAPABILITIES (VdpFuncId)25
03559
03560 #define VDP_FUNC_ID_BITMAP_SURFACE_CREATE (VdpFuncId)26
03561
03562 #define VDP_FUNC_ID_BITMAP_SURFACE_DESTROY (VdpFuncId)27
03563
03564 #define VDP_FUNC_ID_BITMAP_SURFACE_GET_PARAMETERS (VdpFuncId)28
03565
03566 #define VDP_FUNC_ID_BITMAP_SURFACE_PUT_BITS_NATIVE (VdpFuncId)29
03567
03568 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE (VdpFuncId)33
03569
03570 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_BITMAP_SURFACE (VdpFuncId)34
03571
03572 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_VIDEO_SURFACE_LUMA (VdpFuncId)35
03573
03574 #define VDP_FUNC_ID_DECODER_QUERY_CAPABILITIES (VdpFuncId)36
03575
03576 #define VDP_FUNC_ID_DECODER_CREATE (VdpFuncId)37
03577
03578 #define VDP_FUNC_ID_DECODER_DESTROY (VdpFuncId)38
03579
03580 #define VDP_FUNC_ID_DECODER_GET_PARAMETERS (VdpFuncId)39
03581
03582 #define VDP_FUNC_ID_DECODER_RENDER (VdpFuncId)40
03583
03584 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_FEATURE_SUPPORT (VdpFuncId)41
03585
03586 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_SUPPORT (VdpFuncId)42
03587
03588 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_SUPPORT (VdpFuncId)43
03589
03590 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_VALUE_RANGE (VdpFuncId)44
03591
03592 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_VALUE_RANGE (VdpFuncId)45
03593
03594 #define VDP_FUNC_ID_VIDEO_MIXER_CREATE (VdpFuncId)46
03595
03596 #define VDP_FUNC_ID_VIDEO_MIXER_SET_FEATURE_ENABLES (VdpFuncId)47
03597
03598 #define VDP_FUNC_ID_VIDEO_MIXER_SET_ATTRIBUTE_VALUES (VdpFuncId)48
03599
03600 #define VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_SUPPORT (VdpFuncId)49
03601
03602 #define VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_ENABLES (VdpFuncId)50
03603
03604 #define VDP_FUNC_ID_VIDEO_MIXER_GET_PARAMETER_VALUES (VdpFuncId)51
03605
03606 #define VDP_FUNC_ID_VIDEO_MIXER_GET_ATTRIBUTE_VALUES (VdpFuncId)52
03607
03608 #define VDP_FUNC_ID_VIDEO_MIXER_DESTROY (VdpFuncId)53
03609
03610 #define VDP_FUNC_ID_VIDEO_MIXER_RENDER (VdpFuncId)54
03611
03612 #define VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_DESTROY (VdpFuncId)55
03613
03614 #define VDP_FUNC_ID_PRESENTATION_QUEUE_CREATE (VdpFuncId)56
03615
03616 #define VDP_FUNC_ID_PRESENTATION_QUEUE_DESTROY (VdpFuncId)57
03617
03618 #define VDP_FUNC_ID_PRESENTATION_QUEUE_SET_BACKGROUND_COLOR (VdpFuncId)58
03619
03620 #define VDP_FUNC_ID_PRESENTATION_QUEUE_GET_BACKGROUND_COLOR (VdpFuncId)59
03621
03622 #define VDP_FUNC_ID_PRESENTATION_QUEUE_GET_TIME (VdpFuncId)62
03623
03624 #define VDP_FUNC_ID_PRESENTATION_QUEUE_DISPLAY (VdpFuncId)63
03625
03626 #define VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE (VdpFuncId)64
03627
03628 #define VDP_FUNC_ID_PRESENTATION_QUEUE_QUERY_SURFACE_STATUS (VdpFuncId)65
03629
03630 #define VDP_FUNC_ID_PREEMPTION_CALLBACK_REGISTER (VdpFuncId)66
03631
03632 #define VDP_FUNC_ID_BASE_WINSYS 0x1000
03633
03643 typedef VdpStatus VdpGetProcAddress(
03644 VdpDevice device,
03645 VdpFuncId function_id,
03646
03647 void * * function_pointer
03648 );
03649
03652
03660 #ifdef __cplusplus
03661 }
03662 #endif
03663
03664 #endif
03665