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
00653 #ifndef _VDPAU_H
00654 #define _VDPAU_H
00655
00656 #include <stdint.h>
00657
00658 #ifdef __cplusplus
00659 extern "C" {
00660 #endif
00661
00680 #define VDP_TRUE 1
00681
00682 #define VDP_FALSE 0
00683
00687 typedef int VdpBool;
00688
00707 #define VDP_INVALID_HANDLE 0xffffffffU
00708
00713 typedef uint32_t VdpChromaType;
00714
00716 #define VDP_CHROMA_TYPE_420 (VdpChromaType)0
00717
00718 #define VDP_CHROMA_TYPE_422 (VdpChromaType)1
00719
00720 #define VDP_CHROMA_TYPE_444 (VdpChromaType)2
00721
00725 typedef uint32_t VdpYCbCrFormat;
00726
00740 #define VDP_YCBCR_FORMAT_NV12 (VdpYCbCrFormat)0
00741
00752 #define VDP_YCBCR_FORMAT_YV12 (VdpYCbCrFormat)1
00753
00766 #define VDP_YCBCR_FORMAT_UYVY (VdpYCbCrFormat)2
00767
00780 #define VDP_YCBCR_FORMAT_YUYV (VdpYCbCrFormat)3
00781
00793 #define VDP_YCBCR_FORMAT_Y8U8V8A8 (VdpYCbCrFormat)4
00794
00806 #define VDP_YCBCR_FORMAT_V8U8Y8A8 (VdpYCbCrFormat)5
00807
00811 typedef uint32_t VdpRGBAFormat;
00812
00825 #define VDP_RGBA_FORMAT_B8G8R8A8 (VdpRGBAFormat)0
00826
00838 #define VDP_RGBA_FORMAT_R8G8B8A8 (VdpRGBAFormat)1
00839
00851 #define VDP_RGBA_FORMAT_R10G10B10A2 (VdpRGBAFormat)2
00852
00864 #define VDP_RGBA_FORMAT_B10G10R10A2 (VdpRGBAFormat)3
00865
00875 #define VDP_RGBA_FORMAT_A8 (VdpRGBAFormat)4
00876
00880 typedef uint32_t VdpIndexedFormat;
00881
00893 #define VDP_INDEXED_FORMAT_A4I4 (VdpIndexedFormat)0
00894
00905 #define VDP_INDEXED_FORMAT_I4A4 (VdpIndexedFormat)1
00906
00917 #define VDP_INDEXED_FORMAT_A8I8 (VdpIndexedFormat)2
00918
00929 #define VDP_INDEXED_FORMAT_I8A8 (VdpIndexedFormat)3
00930
00938 typedef struct {
00940 uint32_t x;
00942 uint32_t y;
00943 } VdpPoint;
00944
00955 typedef struct {
00957 uint32_t x0;
00959 uint32_t y0;
00961 uint32_t x1;
00963 uint32_t y1;
00964 } VdpRect;
00965
00974 typedef struct {
00975 float red;
00976 float green;
00977 float blue;
00978 float alpha;
00979 } VdpColor;
00980
00993 typedef enum {
00995 VDP_STATUS_OK = 0,
00999 VDP_STATUS_NO_IMPLEMENTATION,
01005 VDP_STATUS_DISPLAY_PREEMPTED,
01012 VDP_STATUS_INVALID_HANDLE,
01019 VDP_STATUS_INVALID_POINTER,
01023 VDP_STATUS_INVALID_CHROMA_TYPE,
01027 VDP_STATUS_INVALID_Y_CB_CR_FORMAT,
01031 VDP_STATUS_INVALID_RGBA_FORMAT,
01035 VDP_STATUS_INVALID_INDEXED_FORMAT,
01039 VDP_STATUS_INVALID_COLOR_STANDARD,
01043 VDP_STATUS_INVALID_COLOR_TABLE_FORMAT,
01048 VDP_STATUS_INVALID_BLEND_FACTOR,
01053 VDP_STATUS_INVALID_BLEND_EQUATION,
01057 VDP_STATUS_INVALID_FLAG,
01061 VDP_STATUS_INVALID_DECODER_PROFILE,
01065 VDP_STATUS_INVALID_VIDEO_MIXER_FEATURE,
01069 VDP_STATUS_INVALID_VIDEO_MIXER_PARAMETER,
01073 VDP_STATUS_INVALID_VIDEO_MIXER_ATTRIBUTE,
01078 VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE,
01082 VDP_STATUS_INVALID_FUNC_ID,
01092 VDP_STATUS_INVALID_SIZE,
01099 VDP_STATUS_INVALID_VALUE,
01105 VDP_STATUS_INVALID_STRUCT_VERSION,
01110 VDP_STATUS_RESOURCES,
01120 VDP_STATUS_HANDLE_DEVICE_MISMATCH,
01124 VDP_STATUS_ERROR,
01125 } VdpStatus;
01126
01136 typedef char const * VdpGetErrorString(
01137 VdpStatus status
01138 );
01139
01156 #define VDPAU_VERSION 0
01157
01163 typedef VdpStatus VdpGetApiVersion(
01164
01165 uint32_t * api_version
01166 );
01167
01185 typedef VdpStatus VdpGetInformationString(
01186
01187 char const * * information_string
01188 );
01189
01209 typedef uint32_t VdpDevice;
01210
01216 typedef VdpStatus VdpDeviceDestroy(
01217 VdpDevice device
01218 );
01219
01258 typedef float VdpCSCMatrix[3][4];
01259
01260 #define VDP_PROCAMP_VERSION 0
01261
01270 typedef struct {
01274 uint32_t struct_version;
01279 float brightness;
01284 float contrast;
01289 float saturation;
01294 float hue;
01295 } VdpProcamp;
01296
01303 typedef uint32_t VdpColorStandard;
01304
01306 #define VDP_COLOR_STANDARD_ITUR_BT_601 (VdpColorStandard)0
01307
01308 #define VDP_COLOR_STANDARD_ITUR_BT_709 (VdpColorStandard)1
01309
01310 #define VDP_COLOR_STANDARD_SMPTE_240M (VdpColorStandard)2
01311
01320 typedef VdpStatus VdpGenerateCSCMatrix(
01321 VdpProcamp * procamp,
01322 VdpColorStandard standard,
01323
01324 VdpCSCMatrix * csc_matrix
01325 );
01326
01371 typedef VdpStatus VdpVideoSurfaceQueryCapabilities(
01372 VdpDevice device,
01373 VdpChromaType surface_chroma_type,
01374
01375 VdpBool * is_supported,
01376 uint32_t * max_width,
01377 uint32_t * max_height
01378 );
01379
01391 typedef VdpStatus VdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(
01392 VdpDevice device,
01393 VdpChromaType surface_chroma_type,
01394 VdpYCbCrFormat bits_ycbcr_format,
01395
01396 VdpBool * is_supported
01397 );
01398
01403 typedef uint32_t VdpVideoSurface;
01404
01419 typedef VdpStatus VdpVideoSurfaceCreate(
01420 VdpDevice device,
01421 VdpChromaType chroma_type,
01422 uint32_t width,
01423 uint32_t height,
01424
01425 VdpVideoSurface * surface
01426 );
01427
01433 typedef VdpStatus VdpVideoSurfaceDestroy(
01434 VdpVideoSurface surface
01435 );
01436
01446 typedef VdpStatus VdpVideoSurfaceGetParameters(
01447 VdpVideoSurface surface,
01448
01449 VdpChromaType * chroma_type,
01450 uint32_t * width,
01451 uint32_t * height
01452 );
01453
01472 typedef VdpStatus VdpVideoSurfaceGetBitsYCbCr(
01473 VdpVideoSurface surface,
01474 VdpYCbCrFormat destination_ycbcr_format,
01475 void * const * destination_data,
01476 uint32_t const * destination_pitches
01477 );
01478
01497 typedef VdpStatus VdpVideoSurfacePutBitsYCbCr(
01498 VdpVideoSurface surface,
01499 VdpYCbCrFormat source_ycbcr_format,
01500 void const * const * source_data,
01501 uint32_t const * source_pitches
01502 );
01503
01539 typedef uint32_t VdpColorTableFormat;
01540
01552 #define VDP_COLOR_TABLE_FORMAT_B8G8R8X8 (VdpColorTableFormat)0
01553
01567 typedef VdpStatus VdpOutputSurfaceQueryCapabilities(
01568 VdpDevice device,
01569 VdpRGBAFormat surface_rgba_format,
01570
01571 VdpBool * is_supported,
01572 uint32_t * max_width,
01573 uint32_t * max_height
01574 );
01575
01586 typedef VdpStatus VdpOutputSurfaceQueryGetPutBitsNativeCapabilities(
01587 VdpDevice device,
01588 VdpRGBAFormat surface_rgba_format,
01589
01590 VdpBool * is_supported
01591 );
01592
01607 typedef VdpStatus VdpOutputSurfaceQueryPutBitsIndexedCapabilities(
01608 VdpDevice device,
01609 VdpRGBAFormat surface_rgba_format,
01610 VdpIndexedFormat bits_indexed_format,
01611 VdpColorTableFormat color_table_format,
01612
01613 VdpBool * is_supported
01614 );
01615
01628 typedef VdpStatus VdpOutputSurfaceQueryPutBitsYCbCrCapabilities(
01629 VdpDevice device,
01630 VdpRGBAFormat surface_rgba_format,
01631 VdpYCbCrFormat bits_ycbcr_format,
01632
01633 VdpBool * is_supported
01634 );
01635
01640 typedef uint32_t VdpOutputSurface;
01641
01654 typedef VdpStatus VdpOutputSurfaceCreate(
01655 VdpDevice device,
01656 VdpRGBAFormat rgba_format,
01657 uint32_t width,
01658 uint32_t height,
01659
01660 VdpOutputSurface * surface
01661 );
01662
01668 typedef VdpStatus VdpOutputSurfaceDestroy(
01669 VdpOutputSurface surface
01670 );
01671
01681 typedef VdpStatus VdpOutputSurfaceGetParameters(
01682 VdpOutputSurface surface,
01683
01684 VdpRGBAFormat * rgba_format,
01685 uint32_t * width,
01686 uint32_t * height
01687 );
01688
01708 typedef VdpStatus VdpOutputSurfaceGetBitsNative(
01709 VdpOutputSurface surface,
01710 VdpRect const * source_rect,
01711 void * const * destination_data,
01712 uint32_t const * destination_pitches
01713 );
01714
01734 typedef VdpStatus VdpOutputSurfacePutBitsNative(
01735 VdpOutputSurface surface,
01736 void const * const * source_data,
01737 uint32_t const * source_pitches,
01738 VdpRect const * destination_rect
01739 );
01740
01766 typedef VdpStatus VdpOutputSurfacePutBitsIndexed(
01767 VdpOutputSurface surface,
01768 VdpIndexedFormat source_indexed_format,
01769 void const * const * source_data,
01770 uint32_t const * source_pitch,
01771 VdpRect const * destination_rect,
01772 VdpColorTableFormat color_table_format,
01773 void const * color_table
01774 );
01775
01801 typedef VdpStatus VdpOutputSurfacePutBitsYCbCr(
01802 VdpOutputSurface surface,
01803 VdpYCbCrFormat source_ycbcr_format,
01804 void const * const * source_data,
01805 uint32_t const * source_pitches,
01806 VdpRect const * destination_rect,
01807 VdpCSCMatrix const * csc_matrix
01808 );
01809
01861 typedef VdpStatus VdpBitmapSurfaceQueryCapabilities(
01862 VdpDevice device,
01863 VdpRGBAFormat surface_rgba_format,
01864
01865 VdpBool * is_supported,
01866 uint32_t * max_width,
01867 uint32_t * max_height
01868 );
01869
01874 typedef uint32_t VdpBitmapSurface;
01875
01893 typedef VdpStatus VdpBitmapSurfaceCreate(
01894 VdpDevice device,
01895 VdpRGBAFormat rgba_format,
01896 uint32_t width,
01897 uint32_t height,
01898 VdpBool frequently_accessed,
01899
01900 VdpBitmapSurface * surface
01901 );
01902
01908 typedef VdpStatus VdpBitmapSurfaceDestroy(
01909 VdpBitmapSurface surface
01910 );
01911
01923 typedef VdpStatus VdpBitmapSurfaceGetParameters(
01924 VdpBitmapSurface surface,
01925
01926 VdpRGBAFormat * rgba_format,
01927 uint32_t * width,
01928 uint32_t * height,
01929 VdpBool * frequently_accessed
01930 );
01931
01951 typedef VdpStatus VdpBitmapSurfacePutBitsNative(
01952 VdpBitmapSurface surface,
01953 void const * const * source_data,
01954 uint32_t const * source_pitches,
01955 VdpRect const * destination_rect
01956 );
01957
01975 typedef enum {
01976 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ZERO = 0,
01977 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE = 1,
01978 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_SRC_COLOR = 2,
01979 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3,
01980 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_SRC_ALPHA = 4,
01981 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 5,
01982 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_DST_ALPHA = 6,
01983 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 7,
01984 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_DST_COLOR = 8,
01985 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 9,
01986 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_SRC_ALPHA_SATURATE = 10,
01987 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_CONSTANT_COLOR = 11,
01988 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 12,
01989 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_CONSTANT_ALPHA = 13,
01990 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 14,
01991 } VdpOutputSurfaceRenderBlendFactor;
01992
01997 typedef enum {
01998 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_SUBTRACT = 0,
01999 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_REVERSE_SUBTRACT = 1,
02000 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD = 2,
02001 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_MIN = 3,
02002 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_MAX = 4,
02003 } VdpOutputSurfaceRenderBlendEquation;
02004
02005 #define VDP_OUTPUT_SURFACE_RENDER_BLEND_STATE_VERSION 0
02006
02010 typedef struct {
02014 uint32_t struct_version;
02015 VdpOutputSurfaceRenderBlendFactor blend_factor_source_color;
02016 VdpOutputSurfaceRenderBlendFactor blend_factor_destination_color;
02017 VdpOutputSurfaceRenderBlendFactor blend_factor_source_alpha;
02018 VdpOutputSurfaceRenderBlendFactor blend_factor_destination_alpha;
02019 VdpOutputSurfaceRenderBlendEquation blend_equation_color;
02020 VdpOutputSurfaceRenderBlendEquation blend_equation_alpha;
02021 VdpColor blend_constant;
02022 } VdpOutputSurfaceRenderBlendState;
02023
02028 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_0 0
02029
02035 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_90 1
02036
02042 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_180 2
02043
02049 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_270 3
02050
02058 #define VDP_OUTPUT_SURFACE_RENDER_COLOR_PER_VERTEX (1 << 2)
02059
02137 typedef VdpStatus VdpOutputSurfaceRenderOutputSurface(
02138 VdpOutputSurface destination_surface,
02139 VdpRect const * destination_rect,
02140 VdpOutputSurface source_surface,
02141 VdpRect const * source_rect,
02142 VdpColor const * colors,
02143 VdpOutputSurfaceRenderBlendState const * blend_state,
02144 uint32_t flags
02145 );
02146
02224 typedef VdpStatus VdpOutputSurfaceRenderBitmapSurface(
02225 VdpOutputSurface destination_surface,
02226 VdpRect const * destination_rect,
02227 VdpBitmapSurface source_surface,
02228 VdpRect const * source_rect,
02229 VdpColor const * colors,
02230 VdpOutputSurfaceRenderBlendState const * blend_state,
02231 uint32_t flags
02232 );
02233
02254 typedef uint32_t VdpDecoderProfile;
02255
02257 #define VDP_DECODER_PROFILE_MPEG1 (VdpDecoderProfile)0
02258
02259 #define VDP_DECODER_PROFILE_MPEG2_SIMPLE (VdpDecoderProfile)1
02260
02261 #define VDP_DECODER_PROFILE_MPEG2_MAIN (VdpDecoderProfile)2
02262
02264 #define VDP_DECODER_PROFILE_H264_BASELINE (VdpDecoderProfile)6
02265
02266 #define VDP_DECODER_PROFILE_H264_MAIN (VdpDecoderProfile)7
02267
02268 #define VDP_DECODER_PROFILE_H264_HIGH (VdpDecoderProfile)8
02269
02270 #define VDP_DECODER_PROFILE_VC1_SIMPLE (VdpDecoderProfile)9
02271
02272 #define VDP_DECODER_PROFILE_VC1_MAIN (VdpDecoderProfile)10
02273
02274 #define VDP_DECODER_PROFILE_VC1_ADVANCED (VdpDecoderProfile)11
02275
02277 #define VDP_DECODER_LEVEL_MPEG1_NA 0
02278
02280 #define VDP_DECODER_LEVEL_MPEG2_LL 0
02281
02282 #define VDP_DECODER_LEVEL_MPEG2_ML 1
02283
02284 #define VDP_DECODER_LEVEL_MPEG2_HL14 2
02285
02286 #define VDP_DECODER_LEVEL_MPEG2_HL 3
02287
02289 #define VDP_DECODER_LEVEL_H264_1 10
02290
02291 #define VDP_DECODER_LEVEL_H264_1b 9
02292
02293 #define VDP_DECODER_LEVEL_H264_1_1 11
02294
02295 #define VDP_DECODER_LEVEL_H264_1_2 12
02296
02297 #define VDP_DECODER_LEVEL_H264_1_3 13
02298
02299 #define VDP_DECODER_LEVEL_H264_2 20
02300
02301 #define VDP_DECODER_LEVEL_H264_2_1 21
02302
02303 #define VDP_DECODER_LEVEL_H264_2_2 22
02304
02305 #define VDP_DECODER_LEVEL_H264_3 30
02306
02307 #define VDP_DECODER_LEVEL_H264_3_1 31
02308
02309 #define VDP_DECODER_LEVEL_H264_3_2 32
02310
02311 #define VDP_DECODER_LEVEL_H264_4 40
02312
02313 #define VDP_DECODER_LEVEL_H264_4_1 41
02314
02315 #define VDP_DECODER_LEVEL_H264_4_2 42
02316
02317 #define VDP_DECODER_LEVEL_H264_5 50
02318
02319 #define VDP_DECODER_LEVEL_H264_5_1 51
02320
02322 #define VDP_DECODER_LEVEL_VC1_SIMPLE_LOW 0
02323
02324 #define VDP_DECODER_LEVEL_VC1_SIMPLE_MEDIUM 1
02325
02327 #define VDP_DECODER_LEVEL_VC1_MAIN_LOW 0
02328
02329 #define VDP_DECODER_LEVEL_VC1_MAIN_MEDIUM 1
02330
02331 #define VDP_DECODER_LEVEL_VC1_MAIN_HIGH 2
02332
02334 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L0 0
02335
02336 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L1 1
02337
02338 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L2 2
02339
02340 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L3 3
02341
02342 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L4 4
02343
02362 typedef VdpStatus VdpDecoderQueryCapabilities(
02363 VdpDevice device,
02364 VdpDecoderProfile profile,
02365
02366 VdpBool * is_supported,
02367 uint32_t * max_level,
02368 uint32_t * max_macroblocks,
02369 uint32_t * max_width,
02370 uint32_t * max_height
02371 );
02372
02376 typedef uint32_t VdpDecoder;
02377
02394 typedef VdpStatus VdpDecoderCreate(
02395 VdpDevice device,
02396 VdpDecoderProfile profile,
02397 uint32_t width,
02398 uint32_t height,
02399 uint32_t max_references,
02400
02401 VdpDecoder * decoder
02402 );
02403
02409 typedef VdpStatus VdpDecoderDestroy(
02410 VdpDecoder decoder
02411 );
02412
02425 typedef VdpStatus VdpDecoderGetParameters(
02426 VdpDecoder decoder,
02427
02428 VdpDecoderProfile * profile,
02429 uint32_t * width,
02430 uint32_t * height
02431 );
02432
02433 #define VDP_BITSTREAM_BUFFER_VERSION 0
02434
02439 typedef struct {
02443 uint32_t struct_version;
02445 void const * bitstream;
02447 uint32_t bitstream_bytes;
02448 } VdpBitstreamBuffer;
02449
02460 typedef void * VdpPictureInfo;
02461
02470 typedef struct {
02475 VdpVideoSurface forward_reference;
02480 VdpVideoSurface backward_reference;
02482 uint32_t slice_count;
02483
02485 uint8_t picture_structure;
02487 uint8_t picture_coding_type;
02489 uint8_t intra_dc_precision;
02491 uint8_t frame_pred_frame_dct;
02493 uint8_t concealment_motion_vectors;
02495 uint8_t intra_vlc_format;
02497 uint8_t alternate_scan;
02499 uint8_t q_scale_type;
02501 uint8_t top_field_first;
02503 uint8_t full_pel_forward_vector;
02505 uint8_t full_pel_backward_vector;
02510 uint8_t f_code[2][2];
02512 uint8_t intra_quantizer_matrix[64];
02514 uint8_t non_intra_quantizer_matrix[64];
02515 } VdpPictureInfoMPEG1Or2;
02516
02524 typedef struct {
02529 VdpVideoSurface surface;
02531 VdpBool is_long_term;
02536 VdpBool top_is_reference;
02541 VdpBool bottom_is_reference;
02543 int32_t field_order_cnt[2];
02549 uint16_t frame_idx;
02550 } VdpReferenceFrameH264;
02551
02570 typedef struct {
02572 uint32_t slice_count;
02574 int32_t field_order_cnt[2];
02576 VdpBool is_reference;
02577
02579 uint16_t frame_num;
02581 uint8_t field_pic_flag;
02583 uint8_t bottom_field_flag;
02585 uint8_t num_ref_frames;
02587 uint8_t mb_adaptive_frame_field_flag;
02589 uint8_t constrained_intra_pred_flag;
02591 uint8_t weighted_pred_flag;
02593 uint8_t weighted_bipred_idc;
02595 uint8_t frame_mbs_only_flag;
02597 uint8_t transform_8x8_mode_flag;
02599 int8_t chroma_qp_index_offset;
02601 int8_t second_chroma_qp_index_offset;
02603 int8_t pic_init_qp_minus26;
02605 uint8_t num_ref_idx_l0_active_minus1;
02607 uint8_t num_ref_idx_l1_active_minus1;
02609 uint8_t log2_max_frame_num_minus4;
02611 uint8_t pic_order_cnt_type;
02613 uint8_t log2_max_pic_order_cnt_lsb_minus4;
02615 uint8_t delta_pic_order_always_zero_flag;
02617 uint8_t direct_8x8_inference_flag;
02619 uint8_t entropy_coding_mode_flag;
02621 uint8_t pic_order_present_flag;
02623 uint8_t deblocking_filter_control_present_flag;
02625 uint8_t redundant_pic_cnt_present_flag;
02626
02628 uint8_t scaling_lists_4x4[6][16];
02630 uint8_t scaling_lists_8x8[2][64];
02631
02633 VdpReferenceFrameH264 referenceFrames[16];
02634 } VdpPictureInfoH264;
02635
02643 typedef struct {
02648 VdpVideoSurface forward_reference;
02653 VdpVideoSurface backward_reference;
02654
02656 uint32_t slice_count;
02658 uint8_t picture_type;
02660 uint8_t frame_coding_mode;
02661
02663 uint8_t postprocflag;
02665 uint8_t pulldown;
02667 uint8_t interlace;
02669 uint8_t tfcntrflag;
02671 uint8_t finterpflag;
02673 uint8_t psf;
02675 uint8_t dquant;
02677 uint8_t panscan_flag;
02679 uint8_t refdist_flag;
02681 uint8_t quantizer;
02683 uint8_t extended_mv;
02685 uint8_t extended_dmv;
02687 uint8_t overlap;
02689 uint8_t vstransform;
02691 uint8_t loopfilter;
02693 uint8_t fastuvmc;
02695 uint8_t range_mapy_flag;
02697 uint8_t range_mapy;
02699 uint8_t range_mapuv_flag;
02701 uint8_t range_mapuv;
02702
02707 uint8_t multires;
02712 uint8_t syncmarker;
02719 uint8_t rangered;
02724 uint8_t maxbframes;
02725
02731 uint8_t deblockEnable;
02737 uint8_t pquant;
02738 } VdpPictureInfoVC1;
02739
02758 typedef VdpStatus VdpDecoderRender(
02759 VdpDecoder decoder,
02760 VdpVideoSurface target,
02761 VdpPictureInfo const * picture_info,
02762 uint32_t bitstream_buffer_count,
02763 VdpBitstreamBuffer const * bitstream_buffers
02764 );
02765
02845 typedef uint32_t VdpVideoMixerFeature;
02846
02858 #define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL (VdpVideoMixerFeature)0
02859
02871 #define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL (VdpVideoMixerFeature)1
02872
02880 #define VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE (VdpVideoMixerFeature)2
02881
02888 #define VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION (VdpVideoMixerFeature)3
02889
02896 #define VDP_VIDEO_MIXER_FEATURE_SHARPNESS (VdpVideoMixerFeature)4
02897
02909 #define VDP_VIDEO_MIXER_FEATURE_LUMA_KEY (VdpVideoMixerFeature)5
02910
02923 typedef uint32_t VdpVideoMixerParameter;
02924
02937 #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH (VdpVideoMixerParameter)0
02938
02950 #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT (VdpVideoMixerParameter)1
02951
02964 #define VDP_VIDEO_MIXER_PARAMETER_CHROMA_TYPE (VdpVideoMixerParameter)2
02965
02983 #define VDP_VIDEO_MIXER_PARAMETER_LAYERS (VdpVideoMixerParameter)3
02984
02997 typedef uint32_t VdpVideoMixerAttribute;
02998
03012 #define VDP_VIDEO_MIXER_ATTRIBUTE_BACKGROUND_COLOR (VdpVideoMixerAttribute)0
03013
03040 #define VDP_VIDEO_MIXER_ATTRIBUTE_CSC_MATRIX (VdpVideoMixerAttribute)1
03041
03053 #define VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL (VdpVideoMixerAttribute)2
03054
03069 #define VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL (VdpVideoMixerAttribute)3
03070
03081 #define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MIN_LUMA (VdpVideoMixerAttribute)4
03082
03093 #define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MAX_LUMA (VdpVideoMixerAttribute)5
03094
03108 #define VDP_VIDEO_MIXER_ATTRIBUTE_SKIP_CHROMA_DEINTERLACE (VdpVideoMixerAttribute)6
03109
03119 typedef VdpStatus VdpVideoMixerQueryFeatureSupport(
03120 VdpDevice device,
03121 VdpVideoMixerFeature feature,
03122
03123 VdpBool * is_supported
03124 );
03125
03136 typedef VdpStatus VdpVideoMixerQueryParameterSupport(
03137 VdpDevice device,
03138 VdpVideoMixerParameter parameter,
03139
03140 VdpBool * is_supported
03141 );
03142
03152 typedef VdpStatus VdpVideoMixerQueryAttributeSupport(
03153 VdpDevice device,
03154 VdpVideoMixerAttribute attribute,
03155
03156 VdpBool * is_supported
03157 );
03158
03169 typedef VdpStatus VdpVideoMixerQueryParameterValueRange(
03170 VdpDevice device,
03171 VdpVideoMixerParameter parameter,
03172
03173 void * min_value,
03174 void * max_value
03175 );
03176
03187 typedef VdpStatus VdpVideoMixerQueryAttributeValueRange(
03188 VdpDevice device,
03189 VdpVideoMixerAttribute attribute,
03190
03191 void * min_value,
03192 void * max_value
03193 );
03194
03198 typedef uint32_t VdpVideoMixer;
03199
03220 typedef VdpStatus VdpVideoMixerCreate(
03221 VdpDevice device,
03222
03223 uint32_t feature_count,
03224 VdpVideoMixerFeature const * features,
03225
03226 uint32_t parameter_count,
03227 VdpVideoMixerParameter const * parameters,
03228 void const * const * parameter_values,
03229
03230 VdpVideoMixer * mixer
03231 );
03232
03243 typedef VdpStatus VdpVideoMixerSetFeatureEnables(
03244 VdpVideoMixer mixer,
03245 uint32_t feature_count,
03246 VdpVideoMixerFeature const * features,
03247 VdpBool const * feature_enables
03248 );
03249
03262 typedef VdpStatus VdpVideoMixerSetAttributeValues(
03263 VdpVideoMixer mixer,
03264 uint32_t attribute_count,
03265 VdpVideoMixerAttribute const * attributes,
03266 void const * const * attribute_values
03267 );
03268
03280 typedef VdpStatus VdpVideoMixerGetFeatureSupport(
03281 VdpVideoMixer mixer,
03282 uint32_t feature_count,
03283 VdpVideoMixerFeature const * features,
03284
03285 VdpBool * feature_supports
03286 );
03287
03297 typedef VdpStatus VdpVideoMixerGetFeatureEnables(
03298 VdpVideoMixer mixer,
03299 uint32_t feature_count,
03300 VdpVideoMixerFeature const * features,
03301
03302 VdpBool * feature_enables
03303 );
03304
03317 typedef VdpStatus VdpVideoMixerGetParameterValues(
03318 VdpVideoMixer mixer,
03319 uint32_t parameter_count,
03320 VdpVideoMixerParameter const * parameters,
03321
03322 void * const * parameter_values
03323 );
03324
03337 typedef VdpStatus VdpVideoMixerGetAttributeValues(
03338 VdpVideoMixer mixer,
03339 uint32_t attribute_count,
03340 VdpVideoMixerAttribute const * attributes,
03341
03342 void * const * attribute_values
03343 );
03344
03350 typedef VdpStatus VdpVideoMixerDestroy(
03351 VdpVideoMixer mixer
03352 );
03353
03359 typedef enum {
03363 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD,
03368 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD,
03372 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME,
03373 } VdpVideoMixerPictureStructure;
03374
03375 #define VDP_LAYER_VERSION 0
03376
03381 typedef struct {
03385 uint32_t struct_version;
03389 VdpOutputSurface source_surface;
03394 VdpRect const * source_rect;
03403 VdpRect const * destination_rect;
03404 } VdpLayer;
03405
03469 typedef VdpStatus VdpVideoMixerRender(
03470 VdpVideoMixer mixer,
03471 VdpOutputSurface background_surface,
03472 VdpRect const * background_source_rect,
03473 VdpVideoMixerPictureStructure current_picture_structure,
03474 uint32_t video_surface_past_count,
03475 VdpVideoSurface const * video_surface_past,
03476 VdpVideoSurface video_surface_current,
03477 uint32_t video_surface_future_count,
03478 VdpVideoSurface const * video_surface_future,
03479 VdpRect const * video_source_rect,
03480 VdpOutputSurface destination_surface,
03481 VdpRect const * destination_rect,
03482 VdpRect const * destination_video_rect,
03483 uint32_t layer_count,
03484 VdpLayer const * layers
03485 );
03486
03538 typedef uint64_t VdpTime;
03539
03548 typedef uint32_t VdpPresentationQueueTarget;
03549
03555 typedef VdpStatus VdpPresentationQueueTargetDestroy(
03556 VdpPresentationQueueTarget presentation_queue_target
03557 );
03558
03563 typedef uint32_t VdpPresentationQueue;
03564
03576 typedef VdpStatus VdpPresentationQueueCreate(
03577 VdpDevice device,
03578 VdpPresentationQueueTarget presentation_queue_target,
03579
03580 VdpPresentationQueue * presentation_queue
03581 );
03582
03588 typedef VdpStatus VdpPresentationQueueDestroy(
03589 VdpPresentationQueue presentation_queue
03590 );
03591
03601 typedef VdpStatus VdpPresentationQueueSetBackgroundColor(
03602 VdpPresentationQueue presentation_queue,
03603 VdpColor * const background_color
03604 );
03605
03611 typedef VdpStatus VdpPresentationQueueGetBackgroundColor(
03612 VdpPresentationQueue presentation_queue,
03613 VdpColor * background_color
03614 );
03615
03623 typedef VdpStatus VdpPresentationQueueGetTime(
03624 VdpPresentationQueue presentation_queue,
03625
03626 VdpTime * current_time
03627 );
03628
03661 typedef VdpStatus VdpPresentationQueueDisplay(
03662 VdpPresentationQueue presentation_queue,
03663 VdpOutputSurface surface,
03664 uint32_t clip_width,
03665 uint32_t clip_height,
03666 VdpTime earliest_presentation_time
03667 );
03668
03683 typedef VdpStatus VdpPresentationQueueBlockUntilSurfaceIdle(
03684 VdpPresentationQueue presentation_queue,
03685 VdpOutputSurface surface,
03686
03687 VdpTime * first_presentation_time
03688 );
03689
03694 typedef enum {
03696 VDP_PRESENTATION_QUEUE_STATUS_IDLE,
03698 VDP_PRESENTATION_QUEUE_STATUS_QUEUED,
03700 VDP_PRESENTATION_QUEUE_STATUS_VISIBLE,
03701 } VdpPresentationQueueStatus;
03702
03714 typedef VdpStatus VdpPresentationQueueQuerySurfaceStatus(
03715 VdpPresentationQueue presentation_queue,
03716 VdpOutputSurface surface,
03717
03718 VdpPresentationQueueStatus * status,
03719 VdpTime * first_presentation_time
03720 );
03721
03776 typedef void VdpPreemptionCallback(
03777 VdpDevice device,
03778 void * context
03779 );
03780
03791 typedef VdpStatus VdpPreemptionCallbackRegister(
03792 VdpDevice device,
03793 VdpPreemptionCallback callback,
03794 void * context
03795 );
03796
03814 typedef uint32_t VdpFuncId;
03815
03817 #define VDP_FUNC_ID_GET_ERROR_STRING (VdpFuncId)0
03818
03819 #define VDP_FUNC_ID_GET_PROC_ADDRESS (VdpFuncId)1
03820
03821 #define VDP_FUNC_ID_GET_API_VERSION (VdpFuncId)2
03822
03823 #define VDP_FUNC_ID_GET_INFORMATION_STRING (VdpFuncId)4
03824
03825 #define VDP_FUNC_ID_DEVICE_DESTROY (VdpFuncId)5
03826
03827 #define VDP_FUNC_ID_GENERATE_CSC_MATRIX (VdpFuncId)6
03828
03829 #define VDP_FUNC_ID_VIDEO_SURFACE_QUERY_CAPABILITIES (VdpFuncId)7
03830
03831 #define VDP_FUNC_ID_VIDEO_SURFACE_QUERY_GET_PUT_BITS_Y_CB_CR_CAPABILITIES (VdpFuncId)8
03832
03833 #define VDP_FUNC_ID_VIDEO_SURFACE_CREATE (VdpFuncId)9
03834
03835 #define VDP_FUNC_ID_VIDEO_SURFACE_DESTROY (VdpFuncId)10
03836
03837 #define VDP_FUNC_ID_VIDEO_SURFACE_GET_PARAMETERS (VdpFuncId)11
03838
03839 #define VDP_FUNC_ID_VIDEO_SURFACE_GET_BITS_Y_CB_CR (VdpFuncId)12
03840
03841 #define VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR (VdpFuncId)13
03842
03843 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_CAPABILITIES (VdpFuncId)14
03844
03845 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_GET_PUT_BITS_NATIVE_CAPABILITIES (VdpFuncId)15
03846
03847 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_INDEXED_CAPABILITIES (VdpFuncId)16
03848
03849 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_Y_CB_CR_CAPABILITIES (VdpFuncId)17
03850
03851 #define VDP_FUNC_ID_OUTPUT_SURFACE_CREATE (VdpFuncId)18
03852
03853 #define VDP_FUNC_ID_OUTPUT_SURFACE_DESTROY (VdpFuncId)19
03854
03855 #define VDP_FUNC_ID_OUTPUT_SURFACE_GET_PARAMETERS (VdpFuncId)20
03856
03857 #define VDP_FUNC_ID_OUTPUT_SURFACE_GET_BITS_NATIVE (VdpFuncId)21
03858
03859 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_NATIVE (VdpFuncId)22
03860
03861 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_INDEXED (VdpFuncId)23
03862
03863 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_Y_CB_CR (VdpFuncId)24
03864
03865 #define VDP_FUNC_ID_BITMAP_SURFACE_QUERY_CAPABILITIES (VdpFuncId)25
03866
03867 #define VDP_FUNC_ID_BITMAP_SURFACE_CREATE (VdpFuncId)26
03868
03869 #define VDP_FUNC_ID_BITMAP_SURFACE_DESTROY (VdpFuncId)27
03870
03871 #define VDP_FUNC_ID_BITMAP_SURFACE_GET_PARAMETERS (VdpFuncId)28
03872
03873 #define VDP_FUNC_ID_BITMAP_SURFACE_PUT_BITS_NATIVE (VdpFuncId)29
03874
03875 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE (VdpFuncId)33
03876
03877 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_BITMAP_SURFACE (VdpFuncId)34
03878
03879 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_VIDEO_SURFACE_LUMA (VdpFuncId)35
03880
03881 #define VDP_FUNC_ID_DECODER_QUERY_CAPABILITIES (VdpFuncId)36
03882
03883 #define VDP_FUNC_ID_DECODER_CREATE (VdpFuncId)37
03884
03885 #define VDP_FUNC_ID_DECODER_DESTROY (VdpFuncId)38
03886
03887 #define VDP_FUNC_ID_DECODER_GET_PARAMETERS (VdpFuncId)39
03888
03889 #define VDP_FUNC_ID_DECODER_RENDER (VdpFuncId)40
03890
03891 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_FEATURE_SUPPORT (VdpFuncId)41
03892
03893 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_SUPPORT (VdpFuncId)42
03894
03895 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_SUPPORT (VdpFuncId)43
03896
03897 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_VALUE_RANGE (VdpFuncId)44
03898
03899 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_VALUE_RANGE (VdpFuncId)45
03900
03901 #define VDP_FUNC_ID_VIDEO_MIXER_CREATE (VdpFuncId)46
03902
03903 #define VDP_FUNC_ID_VIDEO_MIXER_SET_FEATURE_ENABLES (VdpFuncId)47
03904
03905 #define VDP_FUNC_ID_VIDEO_MIXER_SET_ATTRIBUTE_VALUES (VdpFuncId)48
03906
03907 #define VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_SUPPORT (VdpFuncId)49
03908
03909 #define VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_ENABLES (VdpFuncId)50
03910
03911 #define VDP_FUNC_ID_VIDEO_MIXER_GET_PARAMETER_VALUES (VdpFuncId)51
03912
03913 #define VDP_FUNC_ID_VIDEO_MIXER_GET_ATTRIBUTE_VALUES (VdpFuncId)52
03914
03915 #define VDP_FUNC_ID_VIDEO_MIXER_DESTROY (VdpFuncId)53
03916
03917 #define VDP_FUNC_ID_VIDEO_MIXER_RENDER (VdpFuncId)54
03918
03919 #define VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_DESTROY (VdpFuncId)55
03920
03921 #define VDP_FUNC_ID_PRESENTATION_QUEUE_CREATE (VdpFuncId)56
03922
03923 #define VDP_FUNC_ID_PRESENTATION_QUEUE_DESTROY (VdpFuncId)57
03924
03925 #define VDP_FUNC_ID_PRESENTATION_QUEUE_SET_BACKGROUND_COLOR (VdpFuncId)58
03926
03927 #define VDP_FUNC_ID_PRESENTATION_QUEUE_GET_BACKGROUND_COLOR (VdpFuncId)59
03928
03929 #define VDP_FUNC_ID_PRESENTATION_QUEUE_GET_TIME (VdpFuncId)62
03930
03931 #define VDP_FUNC_ID_PRESENTATION_QUEUE_DISPLAY (VdpFuncId)63
03932
03933 #define VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE (VdpFuncId)64
03934
03935 #define VDP_FUNC_ID_PRESENTATION_QUEUE_QUERY_SURFACE_STATUS (VdpFuncId)65
03936
03937 #define VDP_FUNC_ID_PREEMPTION_CALLBACK_REGISTER (VdpFuncId)66
03938
03939 #define VDP_FUNC_ID_BASE_WINSYS 0x1000
03940
03950 typedef VdpStatus VdpGetProcAddress(
03951 VdpDevice device,
03952 VdpFuncId function_id,
03953
03954 void * * function_pointer
03955 );
03956
03959
03967 #ifdef __cplusplus
03968 }
03969 #endif
03970
03971 #endif
03972