VDPAU
|
00001 /* 00002 * This source file is documented using Doxygen markup. 00003 * See http://www.stack.nl/~dimitri/doxygen/ 00004 */ 00005 00006 /* 00007 * This copyright notice applies to this header file: 00008 * 00009 * Copyright (c) 2008-2015 NVIDIA Corporation 00010 * 00011 * Permission is hereby granted, free of charge, to any person 00012 * obtaining a copy of this software and associated documentation 00013 * files (the "Software"), to deal in the Software without 00014 * restriction, including without limitation the rights to use, 00015 * copy, modify, merge, publish, distribute, sublicense, and/or sell 00016 * copies of the Software, and to permit persons to whom the 00017 * Software is furnished to do so, subject to the following 00018 * conditions: 00019 * 00020 * The above copyright notice and this permission notice shall be 00021 * included in all copies or substantial portions of the Software. 00022 * 00023 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00024 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 00025 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00026 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 00027 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 00028 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00029 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00030 * OTHER DEALINGS IN THE SOFTWARE. 00031 */ 00032 00779 #ifndef _VDPAU_H 00780 #define _VDPAU_H 00781 00782 #include <stdint.h> 00783 00784 #ifdef __cplusplus 00785 extern "C" { 00786 #endif 00787 00806 #define VDP_TRUE 1 00807 00808 #define VDP_FALSE 0 00809 00813 typedef int VdpBool; 00814 00833 #define VDP_INVALID_HANDLE 0xffffffffU 00834 00839 typedef uint32_t VdpChromaType; 00840 00842 #define VDP_CHROMA_TYPE_420 ((VdpChromaType)0) 00843 00844 #define VDP_CHROMA_TYPE_422 ((VdpChromaType)1) 00845 00846 #define VDP_CHROMA_TYPE_444 ((VdpChromaType)2) 00847 00851 typedef uint32_t VdpYCbCrFormat; 00852 00866 #define VDP_YCBCR_FORMAT_NV12 ((VdpYCbCrFormat)0) 00867 00878 #define VDP_YCBCR_FORMAT_YV12 ((VdpYCbCrFormat)1) 00879 00892 #define VDP_YCBCR_FORMAT_UYVY ((VdpYCbCrFormat)2) 00893 00906 #define VDP_YCBCR_FORMAT_YUYV ((VdpYCbCrFormat)3) 00907 00919 #define VDP_YCBCR_FORMAT_Y8U8V8A8 ((VdpYCbCrFormat)4) 00920 00932 #define VDP_YCBCR_FORMAT_V8U8Y8A8 ((VdpYCbCrFormat)5) 00933 00937 typedef uint32_t VdpRGBAFormat; 00938 00951 #define VDP_RGBA_FORMAT_B8G8R8A8 ((VdpRGBAFormat)0) 00952 00964 #define VDP_RGBA_FORMAT_R8G8B8A8 ((VdpRGBAFormat)1) 00965 00977 #define VDP_RGBA_FORMAT_R10G10B10A2 ((VdpRGBAFormat)2) 00978 00990 #define VDP_RGBA_FORMAT_B10G10R10A2 ((VdpRGBAFormat)3) 00991 01001 #define VDP_RGBA_FORMAT_A8 ((VdpRGBAFormat)4) 01002 01006 typedef uint32_t VdpIndexedFormat; 01007 01019 #define VDP_INDEXED_FORMAT_A4I4 ((VdpIndexedFormat)0) 01020 01031 #define VDP_INDEXED_FORMAT_I4A4 ((VdpIndexedFormat)1) 01032 01043 #define VDP_INDEXED_FORMAT_A8I8 ((VdpIndexedFormat)2) 01044 01055 #define VDP_INDEXED_FORMAT_I8A8 ((VdpIndexedFormat)3) 01056 01064 typedef struct { 01066 uint32_t x; 01068 uint32_t y; 01069 } VdpPoint; 01070 01081 typedef struct { 01083 uint32_t x0; 01085 uint32_t y0; 01087 uint32_t x1; 01089 uint32_t y1; 01090 } VdpRect; 01091 01100 typedef struct { 01101 float red; 01102 float green; 01103 float blue; 01104 float alpha; 01105 } VdpColor; 01106 01119 typedef enum { 01121 VDP_STATUS_OK = 0, 01125 VDP_STATUS_NO_IMPLEMENTATION, 01131 VDP_STATUS_DISPLAY_PREEMPTED, 01138 VDP_STATUS_INVALID_HANDLE, 01145 VDP_STATUS_INVALID_POINTER, 01149 VDP_STATUS_INVALID_CHROMA_TYPE, 01153 VDP_STATUS_INVALID_Y_CB_CR_FORMAT, 01157 VDP_STATUS_INVALID_RGBA_FORMAT, 01161 VDP_STATUS_INVALID_INDEXED_FORMAT, 01165 VDP_STATUS_INVALID_COLOR_STANDARD, 01169 VDP_STATUS_INVALID_COLOR_TABLE_FORMAT, 01174 VDP_STATUS_INVALID_BLEND_FACTOR, 01179 VDP_STATUS_INVALID_BLEND_EQUATION, 01183 VDP_STATUS_INVALID_FLAG, 01187 VDP_STATUS_INVALID_DECODER_PROFILE, 01191 VDP_STATUS_INVALID_VIDEO_MIXER_FEATURE, 01195 VDP_STATUS_INVALID_VIDEO_MIXER_PARAMETER, 01199 VDP_STATUS_INVALID_VIDEO_MIXER_ATTRIBUTE, 01204 VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE, 01208 VDP_STATUS_INVALID_FUNC_ID, 01218 VDP_STATUS_INVALID_SIZE, 01225 VDP_STATUS_INVALID_VALUE, 01231 VDP_STATUS_INVALID_STRUCT_VERSION, 01236 VDP_STATUS_RESOURCES, 01246 VDP_STATUS_HANDLE_DEVICE_MISMATCH, 01250 VDP_STATUS_ERROR, 01251 } VdpStatus; 01252 01262 typedef char const * VdpGetErrorString( 01263 VdpStatus status 01264 ); 01265 01290 #define VDPAU_INTERFACE_VERSION 1 01291 01303 #define VDPAU_VERSION 1 01304 01310 typedef VdpStatus VdpGetApiVersion( 01311 /* output parameters follow */ 01312 uint32_t * api_version 01313 ); 01314 01332 typedef VdpStatus VdpGetInformationString( 01333 /* output parameters follow */ 01334 char const * * information_string 01335 ); 01336 01356 typedef uint32_t VdpDevice; 01357 01363 typedef VdpStatus VdpDeviceDestroy( 01364 VdpDevice device 01365 ); 01366 01405 typedef float VdpCSCMatrix[3][4]; 01406 01407 #define VDP_PROCAMP_VERSION 0 01408 01417 typedef struct { 01421 uint32_t struct_version; 01426 float brightness; 01431 float contrast; 01436 float saturation; 01441 float hue; 01442 } VdpProcamp; 01443 01450 typedef uint32_t VdpColorStandard; 01451 01453 #define VDP_COLOR_STANDARD_ITUR_BT_601 ((VdpColorStandard)0) 01454 01455 #define VDP_COLOR_STANDARD_ITUR_BT_709 ((VdpColorStandard)1) 01456 01457 #define VDP_COLOR_STANDARD_SMPTE_240M ((VdpColorStandard)2) 01458 01467 typedef VdpStatus VdpGenerateCSCMatrix( 01468 VdpProcamp * procamp, 01469 VdpColorStandard standard, 01470 /* output parameters follow */ 01471 VdpCSCMatrix * csc_matrix 01472 ); 01473 01518 typedef VdpStatus VdpVideoSurfaceQueryCapabilities( 01519 VdpDevice device, 01520 VdpChromaType surface_chroma_type, 01521 /* output parameters follow */ 01522 VdpBool * is_supported, 01523 uint32_t * max_width, 01524 uint32_t * max_height 01525 ); 01526 01538 typedef VdpStatus VdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities( 01539 VdpDevice device, 01540 VdpChromaType surface_chroma_type, 01541 VdpYCbCrFormat bits_ycbcr_format, 01542 /* output parameters follow */ 01543 VdpBool * is_supported 01544 ); 01545 01550 typedef uint32_t VdpVideoSurface; 01551 01597 typedef VdpStatus VdpVideoSurfaceCreate( 01598 VdpDevice device, 01599 VdpChromaType chroma_type, 01600 uint32_t width, 01601 uint32_t height, 01602 /* output parameters follow */ 01603 VdpVideoSurface * surface 01604 ); 01605 01611 typedef VdpStatus VdpVideoSurfaceDestroy( 01612 VdpVideoSurface surface 01613 ); 01614 01624 typedef VdpStatus VdpVideoSurfaceGetParameters( 01625 VdpVideoSurface surface, 01626 /* output parameters follow */ 01627 VdpChromaType * chroma_type, 01628 uint32_t * width, 01629 uint32_t * height 01630 ); 01631 01650 typedef VdpStatus VdpVideoSurfaceGetBitsYCbCr( 01651 VdpVideoSurface surface, 01652 VdpYCbCrFormat destination_ycbcr_format, 01653 void * const * destination_data, 01654 uint32_t const * destination_pitches 01655 ); 01656 01675 typedef VdpStatus VdpVideoSurfacePutBitsYCbCr( 01676 VdpVideoSurface surface, 01677 VdpYCbCrFormat source_ycbcr_format, 01678 void const * const * source_data, 01679 uint32_t const * source_pitches 01680 ); 01681 01717 typedef uint32_t VdpColorTableFormat; 01718 01730 #define VDP_COLOR_TABLE_FORMAT_B8G8R8X8 ((VdpColorTableFormat)0) 01731 01745 typedef VdpStatus VdpOutputSurfaceQueryCapabilities( 01746 VdpDevice device, 01747 VdpRGBAFormat surface_rgba_format, 01748 /* output parameters follow */ 01749 VdpBool * is_supported, 01750 uint32_t * max_width, 01751 uint32_t * max_height 01752 ); 01753 01764 typedef VdpStatus VdpOutputSurfaceQueryGetPutBitsNativeCapabilities( 01765 VdpDevice device, 01766 VdpRGBAFormat surface_rgba_format, 01767 /* output parameters follow */ 01768 VdpBool * is_supported 01769 ); 01770 01785 typedef VdpStatus VdpOutputSurfaceQueryPutBitsIndexedCapabilities( 01786 VdpDevice device, 01787 VdpRGBAFormat surface_rgba_format, 01788 VdpIndexedFormat bits_indexed_format, 01789 VdpColorTableFormat color_table_format, 01790 /* output parameters follow */ 01791 VdpBool * is_supported 01792 ); 01793 01806 typedef VdpStatus VdpOutputSurfaceQueryPutBitsYCbCrCapabilities( 01807 VdpDevice device, 01808 VdpRGBAFormat surface_rgba_format, 01809 VdpYCbCrFormat bits_ycbcr_format, 01810 /* output parameters follow */ 01811 VdpBool * is_supported 01812 ); 01813 01818 typedef uint32_t VdpOutputSurface; 01819 01832 typedef VdpStatus VdpOutputSurfaceCreate( 01833 VdpDevice device, 01834 VdpRGBAFormat rgba_format, 01835 uint32_t width, 01836 uint32_t height, 01837 /* output parameters follow */ 01838 VdpOutputSurface * surface 01839 ); 01840 01846 typedef VdpStatus VdpOutputSurfaceDestroy( 01847 VdpOutputSurface surface 01848 ); 01849 01859 typedef VdpStatus VdpOutputSurfaceGetParameters( 01860 VdpOutputSurface surface, 01861 /* output parameters follow */ 01862 VdpRGBAFormat * rgba_format, 01863 uint32_t * width, 01864 uint32_t * height 01865 ); 01866 01886 typedef VdpStatus VdpOutputSurfaceGetBitsNative( 01887 VdpOutputSurface surface, 01888 VdpRect const * source_rect, 01889 void * const * destination_data, 01890 uint32_t const * destination_pitches 01891 ); 01892 01912 typedef VdpStatus VdpOutputSurfacePutBitsNative( 01913 VdpOutputSurface surface, 01914 void const * const * source_data, 01915 uint32_t const * source_pitches, 01916 VdpRect const * destination_rect 01917 ); 01918 01944 typedef VdpStatus VdpOutputSurfacePutBitsIndexed( 01945 VdpOutputSurface surface, 01946 VdpIndexedFormat source_indexed_format, 01947 void const * const * source_data, 01948 uint32_t const * source_pitch, 01949 VdpRect const * destination_rect, 01950 VdpColorTableFormat color_table_format, 01951 void const * color_table 01952 ); 01953 01979 typedef VdpStatus VdpOutputSurfacePutBitsYCbCr( 01980 VdpOutputSurface surface, 01981 VdpYCbCrFormat source_ycbcr_format, 01982 void const * const * source_data, 01983 uint32_t const * source_pitches, 01984 VdpRect const * destination_rect, 01985 VdpCSCMatrix const * csc_matrix 01986 ); 01987 02039 typedef VdpStatus VdpBitmapSurfaceQueryCapabilities( 02040 VdpDevice device, 02041 VdpRGBAFormat surface_rgba_format, 02042 /* output parameters follow */ 02043 VdpBool * is_supported, 02044 uint32_t * max_width, 02045 uint32_t * max_height 02046 ); 02047 02052 typedef uint32_t VdpBitmapSurface; 02053 02071 typedef VdpStatus VdpBitmapSurfaceCreate( 02072 VdpDevice device, 02073 VdpRGBAFormat rgba_format, 02074 uint32_t width, 02075 uint32_t height, 02076 VdpBool frequently_accessed, 02077 /* output parameters follow */ 02078 VdpBitmapSurface * surface 02079 ); 02080 02086 typedef VdpStatus VdpBitmapSurfaceDestroy( 02087 VdpBitmapSurface surface 02088 ); 02089 02101 typedef VdpStatus VdpBitmapSurfaceGetParameters( 02102 VdpBitmapSurface surface, 02103 /* output parameters follow */ 02104 VdpRGBAFormat * rgba_format, 02105 uint32_t * width, 02106 uint32_t * height, 02107 VdpBool * frequently_accessed 02108 ); 02109 02129 typedef VdpStatus VdpBitmapSurfacePutBitsNative( 02130 VdpBitmapSurface surface, 02131 void const * const * source_data, 02132 uint32_t const * source_pitches, 02133 VdpRect const * destination_rect 02134 ); 02135 02153 typedef enum { 02154 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ZERO = 0, 02155 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE = 1, 02156 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_SRC_COLOR = 2, 02157 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3, 02158 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_SRC_ALPHA = 4, 02159 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 5, 02160 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_DST_ALPHA = 6, 02161 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 7, 02162 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_DST_COLOR = 8, 02163 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 9, 02164 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_SRC_ALPHA_SATURATE = 10, 02165 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_CONSTANT_COLOR = 11, 02166 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 12, 02167 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_CONSTANT_ALPHA = 13, 02168 VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 14, 02169 } VdpOutputSurfaceRenderBlendFactor; 02170 02175 typedef enum { 02176 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_SUBTRACT = 0, 02177 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_REVERSE_SUBTRACT = 1, 02178 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD = 2, 02179 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_MIN = 3, 02180 VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_MAX = 4, 02181 } VdpOutputSurfaceRenderBlendEquation; 02182 02183 #define VDP_OUTPUT_SURFACE_RENDER_BLEND_STATE_VERSION 0 02184 02204 typedef struct { 02208 uint32_t struct_version; 02209 VdpOutputSurfaceRenderBlendFactor blend_factor_source_color; 02210 VdpOutputSurfaceRenderBlendFactor blend_factor_destination_color; 02211 VdpOutputSurfaceRenderBlendFactor blend_factor_source_alpha; 02212 VdpOutputSurfaceRenderBlendFactor blend_factor_destination_alpha; 02213 VdpOutputSurfaceRenderBlendEquation blend_equation_color; 02214 VdpOutputSurfaceRenderBlendEquation blend_equation_alpha; 02215 VdpColor blend_constant; 02216 } VdpOutputSurfaceRenderBlendState; 02217 02222 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_0 0 02223 02229 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_90 1 02230 02236 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_180 2 02237 02243 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_270 3 02244 02252 #define VDP_OUTPUT_SURFACE_RENDER_COLOR_PER_VERTEX (1 << 2) 02253 02324 typedef VdpStatus VdpOutputSurfaceRenderOutputSurface( 02325 VdpOutputSurface destination_surface, 02326 VdpRect const * destination_rect, 02327 VdpOutputSurface source_surface, 02328 VdpRect const * source_rect, 02329 VdpColor const * colors, 02330 VdpOutputSurfaceRenderBlendState const * blend_state, 02331 uint32_t flags 02332 ); 02333 02404 typedef VdpStatus VdpOutputSurfaceRenderBitmapSurface( 02405 VdpOutputSurface destination_surface, 02406 VdpRect const * destination_rect, 02407 VdpBitmapSurface source_surface, 02408 VdpRect const * source_rect, 02409 VdpColor const * colors, 02410 VdpOutputSurfaceRenderBlendState const * blend_state, 02411 uint32_t flags 02412 ); 02413 02434 typedef uint32_t VdpDecoderProfile; 02435 02437 #define VDP_DECODER_PROFILE_MPEG1 ((VdpDecoderProfile)0) 02438 02439 #define VDP_DECODER_PROFILE_MPEG2_SIMPLE ((VdpDecoderProfile)1) 02440 02441 #define VDP_DECODER_PROFILE_MPEG2_MAIN ((VdpDecoderProfile)2) 02442 02444 #define VDP_DECODER_PROFILE_H264_BASELINE ((VdpDecoderProfile)6) 02445 02446 #define VDP_DECODER_PROFILE_H264_MAIN ((VdpDecoderProfile)7) 02447 02448 #define VDP_DECODER_PROFILE_H264_HIGH ((VdpDecoderProfile)8) 02449 02450 #define VDP_DECODER_PROFILE_VC1_SIMPLE ((VdpDecoderProfile)9) 02451 02452 #define VDP_DECODER_PROFILE_VC1_MAIN ((VdpDecoderProfile)10) 02453 02454 #define VDP_DECODER_PROFILE_VC1_ADVANCED ((VdpDecoderProfile)11) 02455 02456 #define VDP_DECODER_PROFILE_MPEG4_PART2_SP ((VdpDecoderProfile)12) 02457 02458 #define VDP_DECODER_PROFILE_MPEG4_PART2_ASP ((VdpDecoderProfile)13) 02459 02460 #define VDP_DECODER_PROFILE_DIVX4_QMOBILE ((VdpDecoderProfile)14) 02461 02462 #define VDP_DECODER_PROFILE_DIVX4_MOBILE ((VdpDecoderProfile)15) 02463 02464 #define VDP_DECODER_PROFILE_DIVX4_HOME_THEATER ((VdpDecoderProfile)16) 02465 02466 #define VDP_DECODER_PROFILE_DIVX4_HD_1080P ((VdpDecoderProfile)17) 02467 02468 #define VDP_DECODER_PROFILE_DIVX5_QMOBILE ((VdpDecoderProfile)18) 02469 02470 #define VDP_DECODER_PROFILE_DIVX5_MOBILE ((VdpDecoderProfile)19) 02471 02472 #define VDP_DECODER_PROFILE_DIVX5_HOME_THEATER ((VdpDecoderProfile)20) 02473 02474 #define VDP_DECODER_PROFILE_DIVX5_HD_1080P ((VdpDecoderProfile)21) 02475 02476 #define VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE ((VdpDecoderProfile)22) 02477 02478 #define VDP_DECODER_PROFILE_H264_EXTENDED ((VdpDecoderProfile)23) 02479 02480 #define VDP_DECODER_PROFILE_H264_PROGRESSIVE_HIGH ((VdpDecoderProfile)24) 02481 02482 #define VDP_DECODER_PROFILE_H264_CONSTRAINED_HIGH ((VdpDecoderProfile)25) 02483 02485 #define VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE ((VdpDecoderProfile)26) 02486 02488 #define VDP_DECODER_PROFILE_HEVC_MAIN ((VdpDecoderProfile)100) 02489 02490 #define VDP_DECODER_PROFILE_HEVC_MAIN_10 ((VdpDecoderProfile)101) 02491 02492 #define VDP_DECODER_PROFILE_HEVC_MAIN_STILL ((VdpDecoderProfile)102) 02493 02494 #define VDP_DECODER_PROFILE_HEVC_MAIN_12 ((VdpDecoderProfile)103) 02495 02496 #define VDP_DECODER_PROFILE_HEVC_MAIN_444 ((VdpDecoderProfile)104) 02497 02499 #define VDP_DECODER_LEVEL_MPEG1_NA 0 02500 02502 #define VDP_DECODER_LEVEL_MPEG2_LL 0 02503 02504 #define VDP_DECODER_LEVEL_MPEG2_ML 1 02505 02506 #define VDP_DECODER_LEVEL_MPEG2_HL14 2 02507 02508 #define VDP_DECODER_LEVEL_MPEG2_HL 3 02509 02511 #define VDP_DECODER_LEVEL_H264_1 10 02512 02513 #define VDP_DECODER_LEVEL_H264_1b 9 02514 02515 #define VDP_DECODER_LEVEL_H264_1_1 11 02516 02517 #define VDP_DECODER_LEVEL_H264_1_2 12 02518 02519 #define VDP_DECODER_LEVEL_H264_1_3 13 02520 02521 #define VDP_DECODER_LEVEL_H264_2 20 02522 02523 #define VDP_DECODER_LEVEL_H264_2_1 21 02524 02525 #define VDP_DECODER_LEVEL_H264_2_2 22 02526 02527 #define VDP_DECODER_LEVEL_H264_3 30 02528 02529 #define VDP_DECODER_LEVEL_H264_3_1 31 02530 02531 #define VDP_DECODER_LEVEL_H264_3_2 32 02532 02533 #define VDP_DECODER_LEVEL_H264_4 40 02534 02535 #define VDP_DECODER_LEVEL_H264_4_1 41 02536 02537 #define VDP_DECODER_LEVEL_H264_4_2 42 02538 02539 #define VDP_DECODER_LEVEL_H264_5 50 02540 02541 #define VDP_DECODER_LEVEL_H264_5_1 51 02542 02544 #define VDP_DECODER_LEVEL_VC1_SIMPLE_LOW 0 02545 02546 #define VDP_DECODER_LEVEL_VC1_SIMPLE_MEDIUM 1 02547 02549 #define VDP_DECODER_LEVEL_VC1_MAIN_LOW 0 02550 02551 #define VDP_DECODER_LEVEL_VC1_MAIN_MEDIUM 1 02552 02553 #define VDP_DECODER_LEVEL_VC1_MAIN_HIGH 2 02554 02556 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L0 0 02557 02558 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L1 1 02559 02560 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L2 2 02561 02562 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L3 3 02563 02564 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L4 4 02565 02567 #define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L0 0 02568 02569 #define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L1 1 02570 02571 #define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L2 2 02572 02573 #define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L3 3 02574 02576 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L0 0 02577 02578 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L1 1 02579 02580 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L2 2 02581 02582 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L3 3 02583 02584 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L4 4 02585 02586 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L5 5 02587 02589 #define VDP_DECODER_LEVEL_DIVX_NA 0 02590 02597 #define VDP_DECODER_LEVEL_HEVC_1 30 02598 02599 #define VDP_DECODER_LEVEL_HEVC_2 60 02600 02601 #define VDP_DECODER_LEVEL_HEVC_2_1 63 02602 02603 #define VDP_DECODER_LEVEL_HEVC_3 90 02604 02605 #define VDP_DECODER_LEVEL_HEVC_3_1 93 02606 02607 #define VDP_DECODER_LEVEL_HEVC_4 120 02608 02609 #define VDP_DECODER_LEVEL_HEVC_4_1 123 02610 02611 #define VDP_DECODER_LEVEL_HEVC_5 150 02612 02613 #define VDP_DECODER_LEVEL_HEVC_5_1 153 02614 02615 #define VDP_DECODER_LEVEL_HEVC_5_2 156 02616 02617 #define VDP_DECODER_LEVEL_HEVC_6 180 02618 02619 #define VDP_DECODER_LEVEL_HEVC_6_1 183 02620 02621 #define VDP_DECODER_LEVEL_HEVC_6_2 186 02622 02641 typedef VdpStatus VdpDecoderQueryCapabilities( 02642 VdpDevice device, 02643 VdpDecoderProfile profile, 02644 /* output parameters follow */ 02645 VdpBool * is_supported, 02646 uint32_t * max_level, 02647 uint32_t * max_macroblocks, 02648 uint32_t * max_width, 02649 uint32_t * max_height 02650 ); 02651 02655 typedef uint32_t VdpDecoder; 02656 02673 typedef VdpStatus VdpDecoderCreate( 02674 VdpDevice device, 02675 VdpDecoderProfile profile, 02676 uint32_t width, 02677 uint32_t height, 02678 uint32_t max_references, 02679 /* output parameters follow */ 02680 VdpDecoder * decoder 02681 ); 02682 02688 typedef VdpStatus VdpDecoderDestroy( 02689 VdpDecoder decoder 02690 ); 02691 02704 typedef VdpStatus VdpDecoderGetParameters( 02705 VdpDecoder decoder, 02706 /* output parameters follow */ 02707 VdpDecoderProfile * profile, 02708 uint32_t * width, 02709 uint32_t * height 02710 ); 02711 02712 #define VDP_BITSTREAM_BUFFER_VERSION 0 02713 02718 typedef struct { 02722 uint32_t struct_version; 02724 void const * bitstream; 02726 uint32_t bitstream_bytes; 02727 } VdpBitstreamBuffer; 02728 02739 typedef void VdpPictureInfo; 02740 02749 typedef struct { 02754 VdpVideoSurface forward_reference; 02759 VdpVideoSurface backward_reference; 02761 uint32_t slice_count; 02762 02767 uint8_t picture_structure; 02768 uint8_t picture_coding_type; 02769 uint8_t intra_dc_precision; 02770 uint8_t frame_pred_frame_dct; 02771 uint8_t concealment_motion_vectors; 02772 uint8_t intra_vlc_format; 02773 uint8_t alternate_scan; 02774 uint8_t q_scale_type; 02775 uint8_t top_field_first; 02777 uint8_t full_pel_forward_vector; 02779 uint8_t full_pel_backward_vector; 02781 uint8_t f_code[2][2]; 02783 uint8_t intra_quantizer_matrix[64]; 02785 uint8_t non_intra_quantizer_matrix[64]; 02787 } VdpPictureInfoMPEG1Or2; 02788 02796 typedef struct { 02801 VdpVideoSurface surface; 02803 VdpBool is_long_term; 02808 VdpBool top_is_reference; 02813 VdpBool bottom_is_reference; 02815 int32_t field_order_cnt[2]; 02821 uint16_t frame_idx; 02822 } VdpReferenceFrameH264; 02823 02846 typedef struct { 02848 uint32_t slice_count; 02850 int32_t field_order_cnt[2]; 02852 VdpBool is_reference; 02853 02858 uint16_t frame_num; 02859 uint8_t field_pic_flag; 02860 uint8_t bottom_field_flag; 02861 uint8_t num_ref_frames; 02862 uint8_t mb_adaptive_frame_field_flag; 02863 uint8_t constrained_intra_pred_flag; 02864 uint8_t weighted_pred_flag; 02865 uint8_t weighted_bipred_idc; 02866 uint8_t frame_mbs_only_flag; 02867 uint8_t transform_8x8_mode_flag; 02868 int8_t chroma_qp_index_offset; 02869 int8_t second_chroma_qp_index_offset; 02870 int8_t pic_init_qp_minus26; 02871 uint8_t num_ref_idx_l0_active_minus1; 02872 uint8_t num_ref_idx_l1_active_minus1; 02873 uint8_t log2_max_frame_num_minus4; 02874 uint8_t pic_order_cnt_type; 02875 uint8_t log2_max_pic_order_cnt_lsb_minus4; 02876 uint8_t delta_pic_order_always_zero_flag; 02877 uint8_t direct_8x8_inference_flag; 02878 uint8_t entropy_coding_mode_flag; 02879 uint8_t pic_order_present_flag; 02880 uint8_t deblocking_filter_control_present_flag; 02881 uint8_t redundant_pic_cnt_present_flag; 02883 uint8_t scaling_lists_4x4[6][16]; 02885 uint8_t scaling_lists_8x8[2][64]; 02889 VdpReferenceFrameH264 referenceFrames[16]; 02890 } VdpPictureInfoH264; 02891 02902 typedef struct { 02904 VdpPictureInfoH264 pictureInfo; 02905 02914 uint8_t qpprime_y_zero_transform_bypass_flag; 02919 uint8_t separate_colour_plane_flag; 02921 } VdpPictureInfoH264Predictive; 02922 02930 typedef struct { 02935 VdpVideoSurface forward_reference; 02940 VdpVideoSurface backward_reference; 02941 02943 uint32_t slice_count; 02945 uint8_t picture_type; 02947 uint8_t frame_coding_mode; 02948 02954 uint8_t postprocflag; 02956 uint8_t pulldown; 02958 uint8_t interlace; 02960 uint8_t tfcntrflag; 02962 uint8_t finterpflag; 02964 uint8_t psf; 02966 uint8_t dquant; 02968 uint8_t panscan_flag; 02970 uint8_t refdist_flag; 02972 uint8_t quantizer; 02974 uint8_t extended_mv; 02976 uint8_t extended_dmv; 02978 uint8_t overlap; 02980 uint8_t vstransform; 02982 uint8_t loopfilter; 02984 uint8_t fastuvmc; 02986 uint8_t range_mapy_flag; 02987 uint8_t range_mapy; 02989 uint8_t range_mapuv_flag; 02990 uint8_t range_mapuv; 02991 02996 uint8_t multires; 03001 uint8_t syncmarker; 03008 uint8_t rangered; 03013 uint8_t maxbframes; 03021 uint8_t deblockEnable; 03027 uint8_t pquant; 03028 } VdpPictureInfoVC1; 03029 03037 typedef struct { 03042 VdpVideoSurface forward_reference; 03047 VdpVideoSurface backward_reference; 03048 03053 int32_t trd[2]; 03054 int32_t trb[2]; 03055 uint16_t vop_time_increment_resolution; 03056 uint8_t vop_coding_type; 03057 uint8_t vop_fcode_forward; 03058 uint8_t vop_fcode_backward; 03059 uint8_t resync_marker_disable; 03060 uint8_t interlaced; 03061 uint8_t quant_type; 03062 uint8_t quarter_sample; 03063 uint8_t short_video_header; 03065 uint8_t rounding_control; 03066 uint8_t alternate_vertical_scan_flag; 03067 uint8_t top_field_first; 03068 uint8_t intra_quantizer_matrix[64]; 03069 uint8_t non_intra_quantizer_matrix[64]; 03071 } VdpPictureInfoMPEG4Part2; 03072 03079 typedef VdpPictureInfoMPEG4Part2 VdpPictureInfoDivX4; 03080 03087 typedef VdpPictureInfoMPEG4Part2 VdpPictureInfoDivX5; 03088 03106 typedef struct { 03111 uint8_t chroma_format_idc; 03113 uint8_t separate_colour_plane_flag; 03114 uint32_t pic_width_in_luma_samples; 03115 uint32_t pic_height_in_luma_samples; 03116 uint8_t bit_depth_luma_minus8; 03117 uint8_t bit_depth_chroma_minus8; 03118 uint8_t log2_max_pic_order_cnt_lsb_minus4; 03121 uint8_t sps_max_dec_pic_buffering_minus1; 03122 uint8_t log2_min_luma_coding_block_size_minus3; 03123 uint8_t log2_diff_max_min_luma_coding_block_size; 03124 uint8_t log2_min_transform_block_size_minus2; 03125 uint8_t log2_diff_max_min_transform_block_size; 03126 uint8_t max_transform_hierarchy_depth_inter; 03127 uint8_t max_transform_hierarchy_depth_intra; 03128 uint8_t scaling_list_enabled_flag; 03132 uint8_t ScalingList4x4[6][16]; 03135 uint8_t ScalingList8x8[6][64]; 03138 uint8_t ScalingList16x16[6][64]; 03141 uint8_t ScalingList32x32[2][64]; 03144 uint8_t ScalingListDCCoeff16x16[6]; 03147 uint8_t ScalingListDCCoeff32x32[2]; 03148 uint8_t amp_enabled_flag; 03149 uint8_t sample_adaptive_offset_enabled_flag; 03150 uint8_t pcm_enabled_flag; 03152 uint8_t pcm_sample_bit_depth_luma_minus1; 03154 uint8_t pcm_sample_bit_depth_chroma_minus1; 03156 uint8_t log2_min_pcm_luma_coding_block_size_minus3; 03158 uint8_t log2_diff_max_min_pcm_luma_coding_block_size; 03160 uint8_t pcm_loop_filter_disabled_flag; 03163 uint8_t num_short_term_ref_pic_sets; 03164 uint8_t long_term_ref_pics_present_flag; 03167 uint8_t num_long_term_ref_pics_sps; 03168 uint8_t sps_temporal_mvp_enabled_flag; 03169 uint8_t strong_intra_smoothing_enabled_flag; 03176 uint8_t dependent_slice_segments_enabled_flag; 03177 uint8_t output_flag_present_flag; 03178 uint8_t num_extra_slice_header_bits; 03179 uint8_t sign_data_hiding_enabled_flag; 03180 uint8_t cabac_init_present_flag; 03181 uint8_t num_ref_idx_l0_default_active_minus1; 03182 uint8_t num_ref_idx_l1_default_active_minus1; 03183 int8_t init_qp_minus26; 03184 uint8_t constrained_intra_pred_flag; 03185 uint8_t transform_skip_enabled_flag; 03186 uint8_t cu_qp_delta_enabled_flag; 03188 uint8_t diff_cu_qp_delta_depth; 03189 int8_t pps_cb_qp_offset; 03190 int8_t pps_cr_qp_offset; 03191 uint8_t pps_slice_chroma_qp_offsets_present_flag; 03192 uint8_t weighted_pred_flag; 03193 uint8_t weighted_bipred_flag; 03194 uint8_t transquant_bypass_enabled_flag; 03195 uint8_t tiles_enabled_flag; 03196 uint8_t entropy_coding_sync_enabled_flag; 03198 uint8_t num_tile_columns_minus1; 03200 uint8_t num_tile_rows_minus1; 03202 uint8_t uniform_spacing_flag; 03206 uint16_t column_width_minus1[20]; 03210 uint16_t row_height_minus1[22]; 03213 uint8_t loop_filter_across_tiles_enabled_flag; 03214 uint8_t pps_loop_filter_across_slices_enabled_flag; 03215 uint8_t deblocking_filter_control_present_flag; 03218 uint8_t deblocking_filter_override_enabled_flag; 03221 uint8_t pps_deblocking_filter_disabled_flag; 03224 int8_t pps_beta_offset_div2; 03227 int8_t pps_tc_offset_div2; 03228 uint8_t lists_modification_present_flag; 03229 uint8_t log2_parallel_merge_level_minus2; 03230 uint8_t slice_segment_header_extension_present_flag; 03231 03239 uint8_t IDRPicFlag; 03242 uint8_t RAPPicFlag; 03244 uint8_t CurrRpsIdx; 03246 uint32_t NumPocTotalCurr; 03250 uint32_t NumDeltaPocsOfRefRpsIdx; 03258 uint32_t NumShortTermPictureSliceHeaderBits; 03263 uint32_t NumLongTermPictureSliceHeaderBits; 03269 int32_t CurrPicOrderCntVal; 03270 03274 VdpVideoSurface RefPics[16]; 03277 int32_t PicOrderCntVal[16]; 03281 uint8_t IsLongTerm[16]; 03284 uint8_t NumPocStCurrBefore; 03287 uint8_t NumPocStCurrAfter; 03290 uint8_t NumPocLtCurr; 03293 uint8_t RefPicSetStCurrBefore[8]; 03296 uint8_t RefPicSetStCurrAfter[8]; 03299 uint8_t RefPicSetLtCurr[8]; 03300 } VdpPictureInfoHEVC; 03301 03320 typedef VdpStatus VdpDecoderRender( 03321 VdpDecoder decoder, 03322 VdpVideoSurface target, 03323 VdpPictureInfo const * picture_info, 03324 uint32_t bitstream_buffer_count, 03325 VdpBitstreamBuffer const * bitstream_buffers 03326 ); 03327 03407 typedef uint32_t VdpVideoMixerFeature; 03408 03420 #define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL ((VdpVideoMixerFeature)0) 03421 03433 #define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL ((VdpVideoMixerFeature)1) 03434 03442 #define VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE ((VdpVideoMixerFeature)2) 03443 03450 #define VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION ((VdpVideoMixerFeature)3) 03451 03458 #define VDP_VIDEO_MIXER_FEATURE_SHARPNESS ((VdpVideoMixerFeature)4) 03459 03471 #define VDP_VIDEO_MIXER_FEATURE_LUMA_KEY ((VdpVideoMixerFeature)5) 03472 03493 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 ((VdpVideoMixerFeature)11) 03494 03500 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L2 ((VdpVideoMixerFeature)12) 03501 03507 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L3 ((VdpVideoMixerFeature)13) 03508 03514 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L4 ((VdpVideoMixerFeature)14) 03515 03521 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L5 ((VdpVideoMixerFeature)15) 03522 03528 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L6 ((VdpVideoMixerFeature)16) 03529 03535 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L7 ((VdpVideoMixerFeature)17) 03536 03542 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L8 ((VdpVideoMixerFeature)18) 03543 03549 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L9 ((VdpVideoMixerFeature)19) 03550 03563 typedef uint32_t VdpVideoMixerParameter; 03564 03577 #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH ((VdpVideoMixerParameter)0) 03578 03590 #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT ((VdpVideoMixerParameter)1) 03591 03604 #define VDP_VIDEO_MIXER_PARAMETER_CHROMA_TYPE ((VdpVideoMixerParameter)2) 03605 03623 #define VDP_VIDEO_MIXER_PARAMETER_LAYERS ((VdpVideoMixerParameter)3) 03624 03637 typedef uint32_t VdpVideoMixerAttribute; 03638 03652 #define VDP_VIDEO_MIXER_ATTRIBUTE_BACKGROUND_COLOR ((VdpVideoMixerAttribute)0) 03653 03680 #define VDP_VIDEO_MIXER_ATTRIBUTE_CSC_MATRIX ((VdpVideoMixerAttribute)1) 03681 03693 #define VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL ((VdpVideoMixerAttribute)2) 03694 03709 #define VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL ((VdpVideoMixerAttribute)3) 03710 03721 #define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MIN_LUMA ((VdpVideoMixerAttribute)4) 03722 03733 #define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MAX_LUMA ((VdpVideoMixerAttribute)5) 03734 03748 #define VDP_VIDEO_MIXER_ATTRIBUTE_SKIP_CHROMA_DEINTERLACE ((VdpVideoMixerAttribute)6) 03749 03759 typedef VdpStatus VdpVideoMixerQueryFeatureSupport( 03760 VdpDevice device, 03761 VdpVideoMixerFeature feature, 03762 /* output parameters follow */ 03763 VdpBool * is_supported 03764 ); 03765 03776 typedef VdpStatus VdpVideoMixerQueryParameterSupport( 03777 VdpDevice device, 03778 VdpVideoMixerParameter parameter, 03779 /* output parameters follow */ 03780 VdpBool * is_supported 03781 ); 03782 03792 typedef VdpStatus VdpVideoMixerQueryAttributeSupport( 03793 VdpDevice device, 03794 VdpVideoMixerAttribute attribute, 03795 /* output parameters follow */ 03796 VdpBool * is_supported 03797 ); 03798 03809 typedef VdpStatus VdpVideoMixerQueryParameterValueRange( 03810 VdpDevice device, 03811 VdpVideoMixerParameter parameter, 03812 /* output parameters follow */ 03813 void * min_value, 03814 void * max_value 03815 ); 03816 03827 typedef VdpStatus VdpVideoMixerQueryAttributeValueRange( 03828 VdpDevice device, 03829 VdpVideoMixerAttribute attribute, 03830 /* output parameters follow */ 03831 void * min_value, 03832 void * max_value 03833 ); 03834 03838 typedef uint32_t VdpVideoMixer; 03839 03860 typedef VdpStatus VdpVideoMixerCreate( 03861 VdpDevice device, 03862 // The set of features to request 03863 uint32_t feature_count, 03864 VdpVideoMixerFeature const * features, 03865 // The parameters used during creation 03866 uint32_t parameter_count, 03867 VdpVideoMixerParameter const * parameters, 03868 void const * const * parameter_values, 03869 /* output parameters follow */ 03870 VdpVideoMixer * mixer 03871 ); 03872 03883 typedef VdpStatus VdpVideoMixerSetFeatureEnables( 03884 VdpVideoMixer mixer, 03885 uint32_t feature_count, 03886 VdpVideoMixerFeature const * features, 03887 VdpBool const * feature_enables 03888 ); 03889 03902 typedef VdpStatus VdpVideoMixerSetAttributeValues( 03903 VdpVideoMixer mixer, 03904 uint32_t attribute_count, 03905 VdpVideoMixerAttribute const * attributes, 03906 void const * const * attribute_values 03907 ); 03908 03920 typedef VdpStatus VdpVideoMixerGetFeatureSupport( 03921 VdpVideoMixer mixer, 03922 uint32_t feature_count, 03923 VdpVideoMixerFeature const * features, 03924 /* output parameters follow */ 03925 VdpBool * feature_supports 03926 ); 03927 03937 typedef VdpStatus VdpVideoMixerGetFeatureEnables( 03938 VdpVideoMixer mixer, 03939 uint32_t feature_count, 03940 VdpVideoMixerFeature const * features, 03941 /* output parameters follow */ 03942 VdpBool * feature_enables 03943 ); 03944 03957 typedef VdpStatus VdpVideoMixerGetParameterValues( 03958 VdpVideoMixer mixer, 03959 uint32_t parameter_count, 03960 VdpVideoMixerParameter const * parameters, 03961 /* output parameters follow */ 03962 void * const * parameter_values 03963 ); 03964 03977 typedef VdpStatus VdpVideoMixerGetAttributeValues( 03978 VdpVideoMixer mixer, 03979 uint32_t attribute_count, 03980 VdpVideoMixerAttribute const * attributes, 03981 /* output parameters follow */ 03982 void * const * attribute_values 03983 ); 03984 03990 typedef VdpStatus VdpVideoMixerDestroy( 03991 VdpVideoMixer mixer 03992 ); 03993 03999 typedef enum { 04003 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD, 04008 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD, 04012 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME, 04013 } VdpVideoMixerPictureStructure; 04014 04015 #define VDP_LAYER_VERSION 0 04016 04021 typedef struct { 04025 uint32_t struct_version; 04029 VdpOutputSurface source_surface; 04034 VdpRect const * source_rect; 04043 VdpRect const * destination_rect; 04044 } VdpLayer; 04045 04112 typedef VdpStatus VdpVideoMixerRender( 04113 VdpVideoMixer mixer, 04114 VdpOutputSurface background_surface, 04115 VdpRect const * background_source_rect, 04116 VdpVideoMixerPictureStructure current_picture_structure, 04117 uint32_t video_surface_past_count, 04118 VdpVideoSurface const * video_surface_past, 04119 VdpVideoSurface video_surface_current, 04120 uint32_t video_surface_future_count, 04121 VdpVideoSurface const * video_surface_future, 04122 VdpRect const * video_source_rect, 04123 VdpOutputSurface destination_surface, 04124 VdpRect const * destination_rect, 04125 VdpRect const * destination_video_rect, 04126 uint32_t layer_count, 04127 VdpLayer const * layers 04128 ); 04129 04181 typedef uint64_t VdpTime; 04182 04191 typedef uint32_t VdpPresentationQueueTarget; 04192 04198 typedef VdpStatus VdpPresentationQueueTargetDestroy( 04199 VdpPresentationQueueTarget presentation_queue_target 04200 ); 04201 04206 typedef uint32_t VdpPresentationQueue; 04207 04219 typedef VdpStatus VdpPresentationQueueCreate( 04220 VdpDevice device, 04221 VdpPresentationQueueTarget presentation_queue_target, 04222 /* output parameters follow */ 04223 VdpPresentationQueue * presentation_queue 04224 ); 04225 04231 typedef VdpStatus VdpPresentationQueueDestroy( 04232 VdpPresentationQueue presentation_queue 04233 ); 04234 04244 typedef VdpStatus VdpPresentationQueueSetBackgroundColor( 04245 VdpPresentationQueue presentation_queue, 04246 VdpColor * const background_color 04247 ); 04248 04254 typedef VdpStatus VdpPresentationQueueGetBackgroundColor( 04255 VdpPresentationQueue presentation_queue, 04256 VdpColor * background_color 04257 ); 04258 04266 typedef VdpStatus VdpPresentationQueueGetTime( 04267 VdpPresentationQueue presentation_queue, 04268 /* output parameters follow */ 04269 VdpTime * current_time 04270 ); 04271 04312 typedef VdpStatus VdpPresentationQueueDisplay( 04313 VdpPresentationQueue presentation_queue, 04314 VdpOutputSurface surface, 04315 uint32_t clip_width, 04316 uint32_t clip_height, 04317 VdpTime earliest_presentation_time 04318 ); 04319 04335 typedef VdpStatus VdpPresentationQueueBlockUntilSurfaceIdle( 04336 VdpPresentationQueue presentation_queue, 04337 VdpOutputSurface surface, 04338 /* output parameters follow */ 04339 VdpTime * first_presentation_time 04340 ); 04341 04346 typedef enum { 04348 VDP_PRESENTATION_QUEUE_STATUS_IDLE, 04350 VDP_PRESENTATION_QUEUE_STATUS_QUEUED, 04352 VDP_PRESENTATION_QUEUE_STATUS_VISIBLE, 04353 } VdpPresentationQueueStatus; 04354 04366 typedef VdpStatus VdpPresentationQueueQuerySurfaceStatus( 04367 VdpPresentationQueue presentation_queue, 04368 VdpOutputSurface surface, 04369 /* output parameters follow */ 04370 VdpPresentationQueueStatus * status, 04371 VdpTime * first_presentation_time 04372 ); 04373 04428 typedef void VdpPreemptionCallback( 04429 VdpDevice device, 04430 void * context 04431 ); 04432 04443 typedef VdpStatus VdpPreemptionCallbackRegister( 04444 VdpDevice device, 04445 VdpPreemptionCallback callback, 04446 void * context 04447 ); 04448 04466 typedef uint32_t VdpFuncId; 04467 04469 #define VDP_FUNC_ID_GET_ERROR_STRING ((VdpFuncId)0) 04470 04471 #define VDP_FUNC_ID_GET_PROC_ADDRESS ((VdpFuncId)1) 04472 04473 #define VDP_FUNC_ID_GET_API_VERSION ((VdpFuncId)2) 04474 04475 #define VDP_FUNC_ID_GET_INFORMATION_STRING ((VdpFuncId)4) 04476 04477 #define VDP_FUNC_ID_DEVICE_DESTROY ((VdpFuncId)5) 04478 04479 #define VDP_FUNC_ID_GENERATE_CSC_MATRIX ((VdpFuncId)6) 04480 04481 #define VDP_FUNC_ID_VIDEO_SURFACE_QUERY_CAPABILITIES ((VdpFuncId)7) 04482 04483 #define VDP_FUNC_ID_VIDEO_SURFACE_QUERY_GET_PUT_BITS_Y_CB_CR_CAPABILITIES ((VdpFuncId)8) 04484 04485 #define VDP_FUNC_ID_VIDEO_SURFACE_CREATE ((VdpFuncId)9) 04486 04487 #define VDP_FUNC_ID_VIDEO_SURFACE_DESTROY ((VdpFuncId)10) 04488 04489 #define VDP_FUNC_ID_VIDEO_SURFACE_GET_PARAMETERS ((VdpFuncId)11) 04490 04491 #define VDP_FUNC_ID_VIDEO_SURFACE_GET_BITS_Y_CB_CR ((VdpFuncId)12) 04492 04493 #define VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR ((VdpFuncId)13) 04494 04495 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_CAPABILITIES ((VdpFuncId)14) 04496 04497 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_GET_PUT_BITS_NATIVE_CAPABILITIES ((VdpFuncId)15) 04498 04499 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_INDEXED_CAPABILITIES ((VdpFuncId)16) 04500 04501 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_Y_CB_CR_CAPABILITIES ((VdpFuncId)17) 04502 04503 #define VDP_FUNC_ID_OUTPUT_SURFACE_CREATE ((VdpFuncId)18) 04504 04505 #define VDP_FUNC_ID_OUTPUT_SURFACE_DESTROY ((VdpFuncId)19) 04506 04507 #define VDP_FUNC_ID_OUTPUT_SURFACE_GET_PARAMETERS ((VdpFuncId)20) 04508 04509 #define VDP_FUNC_ID_OUTPUT_SURFACE_GET_BITS_NATIVE ((VdpFuncId)21) 04510 04511 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_NATIVE ((VdpFuncId)22) 04512 04513 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_INDEXED ((VdpFuncId)23) 04514 04515 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_Y_CB_CR ((VdpFuncId)24) 04516 04517 #define VDP_FUNC_ID_BITMAP_SURFACE_QUERY_CAPABILITIES ((VdpFuncId)25) 04518 04519 #define VDP_FUNC_ID_BITMAP_SURFACE_CREATE ((VdpFuncId)26) 04520 04521 #define VDP_FUNC_ID_BITMAP_SURFACE_DESTROY ((VdpFuncId)27) 04522 04523 #define VDP_FUNC_ID_BITMAP_SURFACE_GET_PARAMETERS ((VdpFuncId)28) 04524 04525 #define VDP_FUNC_ID_BITMAP_SURFACE_PUT_BITS_NATIVE ((VdpFuncId)29) 04526 04527 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE ((VdpFuncId)33) 04528 04529 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_BITMAP_SURFACE ((VdpFuncId)34) 04530 04531 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_VIDEO_SURFACE_LUMA ((VdpFuncId)35) 04532 04533 #define VDP_FUNC_ID_DECODER_QUERY_CAPABILITIES ((VdpFuncId)36) 04534 04535 #define VDP_FUNC_ID_DECODER_CREATE ((VdpFuncId)37) 04536 04537 #define VDP_FUNC_ID_DECODER_DESTROY ((VdpFuncId)38) 04538 04539 #define VDP_FUNC_ID_DECODER_GET_PARAMETERS ((VdpFuncId)39) 04540 04541 #define VDP_FUNC_ID_DECODER_RENDER ((VdpFuncId)40) 04542 04543 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_FEATURE_SUPPORT ((VdpFuncId)41) 04544 04545 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_SUPPORT ((VdpFuncId)42) 04546 04547 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_SUPPORT ((VdpFuncId)43) 04548 04549 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_VALUE_RANGE ((VdpFuncId)44) 04550 04551 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_VALUE_RANGE ((VdpFuncId)45) 04552 04553 #define VDP_FUNC_ID_VIDEO_MIXER_CREATE ((VdpFuncId)46) 04554 04555 #define VDP_FUNC_ID_VIDEO_MIXER_SET_FEATURE_ENABLES ((VdpFuncId)47) 04556 04557 #define VDP_FUNC_ID_VIDEO_MIXER_SET_ATTRIBUTE_VALUES ((VdpFuncId)48) 04558 04559 #define VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_SUPPORT ((VdpFuncId)49) 04560 04561 #define VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_ENABLES ((VdpFuncId)50) 04562 04563 #define VDP_FUNC_ID_VIDEO_MIXER_GET_PARAMETER_VALUES ((VdpFuncId)51) 04564 04565 #define VDP_FUNC_ID_VIDEO_MIXER_GET_ATTRIBUTE_VALUES ((VdpFuncId)52) 04566 04567 #define VDP_FUNC_ID_VIDEO_MIXER_DESTROY ((VdpFuncId)53) 04568 04569 #define VDP_FUNC_ID_VIDEO_MIXER_RENDER ((VdpFuncId)54) 04570 04571 #define VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_DESTROY ((VdpFuncId)55) 04572 04573 #define VDP_FUNC_ID_PRESENTATION_QUEUE_CREATE ((VdpFuncId)56) 04574 04575 #define VDP_FUNC_ID_PRESENTATION_QUEUE_DESTROY ((VdpFuncId)57) 04576 04577 #define VDP_FUNC_ID_PRESENTATION_QUEUE_SET_BACKGROUND_COLOR ((VdpFuncId)58) 04578 04579 #define VDP_FUNC_ID_PRESENTATION_QUEUE_GET_BACKGROUND_COLOR ((VdpFuncId)59) 04580 04581 #define VDP_FUNC_ID_PRESENTATION_QUEUE_GET_TIME ((VdpFuncId)62) 04582 04583 #define VDP_FUNC_ID_PRESENTATION_QUEUE_DISPLAY ((VdpFuncId)63) 04584 04585 #define VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE ((VdpFuncId)64) 04586 04587 #define VDP_FUNC_ID_PRESENTATION_QUEUE_QUERY_SURFACE_STATUS ((VdpFuncId)65) 04588 04589 #define VDP_FUNC_ID_PREEMPTION_CALLBACK_REGISTER ((VdpFuncId)66) 04590 04591 #define VDP_FUNC_ID_BASE_WINSYS 0x1000 04592 04602 typedef VdpStatus VdpGetProcAddress( 04603 VdpDevice device, 04604 VdpFuncId function_id, 04605 /* output parameters follow */ 04606 void * * function_pointer 04607 ); 04608 04611 04619 #ifdef __cplusplus 04620 } 04621 #endif 04622 04623 #endif 04624