VDPAU
vdpau.h
Go to the documentation of this file.
1 /*
2  * This source file is documented using Doxygen markup.
3  * See http://www.stack.nl/~dimitri/doxygen/
4  */
5 
6 /*
7  * This copyright notice applies to this header file:
8  *
9  * Copyright (c) 2008-2015 NVIDIA Corporation
10  *
11  * Permission is hereby granted, free of charge, to any person
12  * obtaining a copy of this software and associated documentation
13  * files (the "Software"), to deal in the Software without
14  * restriction, including without limitation the rights to use,
15  * copy, modify, merge, publish, distribute, sublicense, and/or sell
16  * copies of the Software, and to permit persons to whom the
17  * Software is furnished to do so, subject to the following
18  * conditions:
19  *
20  * The above copyright notice and this permission notice shall be
21  * included in all copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
25  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
27  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
28  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
30  * OTHER DEALINGS IN THE SOFTWARE.
31  */
32 
779 #ifndef _VDPAU_H
780 #define _VDPAU_H
781 
782 #include <stdint.h>
783 
784 #ifdef __cplusplus
785 extern "C" {
786 #endif
787 
806 #define VDP_TRUE 1
807 
808 #define VDP_FALSE 0
809 
813 typedef int VdpBool;
814 
833 #define VDP_INVALID_HANDLE 0xffffffffU
834 
839 typedef uint32_t VdpChromaType;
840 
842 #define VDP_CHROMA_TYPE_420 ((VdpChromaType)0)
843 
844 #define VDP_CHROMA_TYPE_422 ((VdpChromaType)1)
845 
846 #define VDP_CHROMA_TYPE_444 ((VdpChromaType)2)
847 
851 typedef uint32_t VdpYCbCrFormat;
852 
866 #define VDP_YCBCR_FORMAT_NV12 ((VdpYCbCrFormat)0)
867 
878 #define VDP_YCBCR_FORMAT_YV12 ((VdpYCbCrFormat)1)
879 
892 #define VDP_YCBCR_FORMAT_UYVY ((VdpYCbCrFormat)2)
893 
906 #define VDP_YCBCR_FORMAT_YUYV ((VdpYCbCrFormat)3)
907 
919 #define VDP_YCBCR_FORMAT_Y8U8V8A8 ((VdpYCbCrFormat)4)
920 
932 #define VDP_YCBCR_FORMAT_V8U8Y8A8 ((VdpYCbCrFormat)5)
933 
937 typedef uint32_t VdpRGBAFormat;
938 
951 #define VDP_RGBA_FORMAT_B8G8R8A8 ((VdpRGBAFormat)0)
952 
964 #define VDP_RGBA_FORMAT_R8G8B8A8 ((VdpRGBAFormat)1)
965 
977 #define VDP_RGBA_FORMAT_R10G10B10A2 ((VdpRGBAFormat)2)
978 
990 #define VDP_RGBA_FORMAT_B10G10R10A2 ((VdpRGBAFormat)3)
991 
1001 #define VDP_RGBA_FORMAT_A8 ((VdpRGBAFormat)4)
1002 
1006 typedef uint32_t VdpIndexedFormat;
1007 
1019 #define VDP_INDEXED_FORMAT_A4I4 ((VdpIndexedFormat)0)
1020 
1031 #define VDP_INDEXED_FORMAT_I4A4 ((VdpIndexedFormat)1)
1032 
1043 #define VDP_INDEXED_FORMAT_A8I8 ((VdpIndexedFormat)2)
1044 
1055 #define VDP_INDEXED_FORMAT_I8A8 ((VdpIndexedFormat)3)
1056 
1064 typedef struct {
1066  uint32_t x;
1068  uint32_t y;
1069 } VdpPoint;
1070 
1081 typedef struct {
1083  uint32_t x0;
1085  uint32_t y0;
1087  uint32_t x1;
1089  uint32_t y1;
1090 } VdpRect;
1091 
1100 typedef struct {
1101  float red;
1102  float green;
1103  float blue;
1104  float alpha;
1105 } VdpColor;
1106 
1119 typedef enum {
1251 } VdpStatus;
1252 
1262 typedef char const * VdpGetErrorString(
1263  VdpStatus status
1264 );
1265 
1290 #define VDPAU_INTERFACE_VERSION 1
1291 
1303 #define VDPAU_VERSION 1
1304 
1311  /* output parameters follow */
1312  uint32_t * api_version
1313 );
1314 
1333  /* output parameters follow */
1334  char const * * information_string
1335 );
1336 
1356 typedef uint32_t VdpDevice;
1357 
1364  VdpDevice device
1365 );
1366 
1405 typedef float VdpCSCMatrix[3][4];
1406 
1407 #define VDP_PROCAMP_VERSION 0
1408 
1417 typedef struct {
1421  uint32_t struct_version;
1426  float brightness;
1431  float contrast;
1436  float saturation;
1441  float hue;
1442 } VdpProcamp;
1443 
1450 typedef uint32_t VdpColorStandard;
1451 
1453 #define VDP_COLOR_STANDARD_ITUR_BT_601 ((VdpColorStandard)0)
1454 
1455 #define VDP_COLOR_STANDARD_ITUR_BT_709 ((VdpColorStandard)1)
1456 
1457 #define VDP_COLOR_STANDARD_SMPTE_240M ((VdpColorStandard)2)
1458 
1468  VdpProcamp * procamp,
1469  VdpColorStandard standard,
1470  /* output parameters follow */
1471  VdpCSCMatrix * csc_matrix
1472 );
1473 
1519  VdpDevice device,
1520  VdpChromaType surface_chroma_type,
1521  /* output parameters follow */
1522  VdpBool * is_supported,
1523  uint32_t * max_width,
1524  uint32_t * max_height
1525 );
1526 
1539  VdpDevice device,
1540  VdpChromaType surface_chroma_type,
1541  VdpYCbCrFormat bits_ycbcr_format,
1542  /* output parameters follow */
1543  VdpBool * is_supported
1544 );
1545 
1550 typedef uint32_t VdpVideoSurface;
1551 
1598  VdpDevice device,
1599  VdpChromaType chroma_type,
1600  uint32_t width,
1601  uint32_t height,
1602  /* output parameters follow */
1603  VdpVideoSurface * surface
1604 );
1605 
1612  VdpVideoSurface surface
1613 );
1614 
1625  VdpVideoSurface surface,
1626  /* output parameters follow */
1627  VdpChromaType * chroma_type,
1628  uint32_t * width,
1629  uint32_t * height
1630 );
1631 
1651  VdpVideoSurface surface,
1652  VdpYCbCrFormat destination_ycbcr_format,
1653  void * const * destination_data,
1654  uint32_t const * destination_pitches
1655 );
1656 
1676  VdpVideoSurface surface,
1677  VdpYCbCrFormat source_ycbcr_format,
1678  void const * const * source_data,
1679  uint32_t const * source_pitches
1680 );
1681 
1717 typedef uint32_t VdpColorTableFormat;
1718 
1730 #define VDP_COLOR_TABLE_FORMAT_B8G8R8X8 ((VdpColorTableFormat)0)
1731 
1746  VdpDevice device,
1747  VdpRGBAFormat surface_rgba_format,
1748  /* output parameters follow */
1749  VdpBool * is_supported,
1750  uint32_t * max_width,
1751  uint32_t * max_height
1752 );
1753 
1765  VdpDevice device,
1766  VdpRGBAFormat surface_rgba_format,
1767  /* output parameters follow */
1768  VdpBool * is_supported
1769 );
1770 
1786  VdpDevice device,
1787  VdpRGBAFormat surface_rgba_format,
1788  VdpIndexedFormat bits_indexed_format,
1789  VdpColorTableFormat color_table_format,
1790  /* output parameters follow */
1791  VdpBool * is_supported
1792 );
1793 
1807  VdpDevice device,
1808  VdpRGBAFormat surface_rgba_format,
1809  VdpYCbCrFormat bits_ycbcr_format,
1810  /* output parameters follow */
1811  VdpBool * is_supported
1812 );
1813 
1818 typedef uint32_t VdpOutputSurface;
1819 
1833  VdpDevice device,
1834  VdpRGBAFormat rgba_format,
1835  uint32_t width,
1836  uint32_t height,
1837  /* output parameters follow */
1838  VdpOutputSurface * surface
1839 );
1840 
1847  VdpOutputSurface surface
1848 );
1849 
1860  VdpOutputSurface surface,
1861  /* output parameters follow */
1862  VdpRGBAFormat * rgba_format,
1863  uint32_t * width,
1864  uint32_t * height
1865 );
1866 
1887  VdpOutputSurface surface,
1888  VdpRect const * source_rect,
1889  void * const * destination_data,
1890  uint32_t const * destination_pitches
1891 );
1892 
1913  VdpOutputSurface surface,
1914  void const * const * source_data,
1915  uint32_t const * source_pitches,
1916  VdpRect const * destination_rect
1917 );
1918 
1945  VdpOutputSurface surface,
1946  VdpIndexedFormat source_indexed_format,
1947  void const * const * source_data,
1948  uint32_t const * source_pitch,
1949  VdpRect const * destination_rect,
1950  VdpColorTableFormat color_table_format,
1951  void const * color_table
1952 );
1953 
1980  VdpOutputSurface surface,
1981  VdpYCbCrFormat source_ycbcr_format,
1982  void const * const * source_data,
1983  uint32_t const * source_pitches,
1984  VdpRect const * destination_rect,
1985  VdpCSCMatrix const * csc_matrix
1986 );
1987 
2040  VdpDevice device,
2041  VdpRGBAFormat surface_rgba_format,
2042  /* output parameters follow */
2043  VdpBool * is_supported,
2044  uint32_t * max_width,
2045  uint32_t * max_height
2046 );
2047 
2052 typedef uint32_t VdpBitmapSurface;
2053 
2072  VdpDevice device,
2073  VdpRGBAFormat rgba_format,
2074  uint32_t width,
2075  uint32_t height,
2076  VdpBool frequently_accessed,
2077  /* output parameters follow */
2078  VdpBitmapSurface * surface
2079 );
2080 
2087  VdpBitmapSurface surface
2088 );
2089 
2102  VdpBitmapSurface surface,
2103  /* output parameters follow */
2104  VdpRGBAFormat * rgba_format,
2105  uint32_t * width,
2106  uint32_t * height,
2107  VdpBool * frequently_accessed
2108 );
2109 
2130  VdpBitmapSurface surface,
2131  void const * const * source_data,
2132  uint32_t const * source_pitches,
2133  VdpRect const * destination_rect
2134 );
2135 
2153 typedef enum {
2170 
2175 typedef enum {
2182 
2183 #define VDP_OUTPUT_SURFACE_RENDER_BLEND_STATE_VERSION 0
2184 
2204 typedef struct {
2208  uint32_t struct_version;
2217 
2222 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_0 0
2223 
2229 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_90 1
2230 
2236 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_180 2
2237 
2243 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_270 3
2244 
2252 #define VDP_OUTPUT_SURFACE_RENDER_COLOR_PER_VERTEX (1 << 2)
2253 
2325  VdpOutputSurface destination_surface,
2326  VdpRect const * destination_rect,
2327  VdpOutputSurface source_surface,
2328  VdpRect const * source_rect,
2329  VdpColor const * colors,
2330  VdpOutputSurfaceRenderBlendState const * blend_state,
2331  uint32_t flags
2332 );
2333 
2405  VdpOutputSurface destination_surface,
2406  VdpRect const * destination_rect,
2407  VdpBitmapSurface source_surface,
2408  VdpRect const * source_rect,
2409  VdpColor const * colors,
2410  VdpOutputSurfaceRenderBlendState const * blend_state,
2411  uint32_t flags
2412 );
2413 
2434 typedef uint32_t VdpDecoderProfile;
2435 
2437 #define VDP_DECODER_PROFILE_MPEG1 ((VdpDecoderProfile)0)
2438 
2439 #define VDP_DECODER_PROFILE_MPEG2_SIMPLE ((VdpDecoderProfile)1)
2440 
2441 #define VDP_DECODER_PROFILE_MPEG2_MAIN ((VdpDecoderProfile)2)
2442 
2444 #define VDP_DECODER_PROFILE_H264_BASELINE ((VdpDecoderProfile)6)
2445 
2446 #define VDP_DECODER_PROFILE_H264_MAIN ((VdpDecoderProfile)7)
2447 
2448 #define VDP_DECODER_PROFILE_H264_HIGH ((VdpDecoderProfile)8)
2449 
2450 #define VDP_DECODER_PROFILE_VC1_SIMPLE ((VdpDecoderProfile)9)
2451 
2452 #define VDP_DECODER_PROFILE_VC1_MAIN ((VdpDecoderProfile)10)
2453 
2454 #define VDP_DECODER_PROFILE_VC1_ADVANCED ((VdpDecoderProfile)11)
2455 
2456 #define VDP_DECODER_PROFILE_MPEG4_PART2_SP ((VdpDecoderProfile)12)
2457 
2458 #define VDP_DECODER_PROFILE_MPEG4_PART2_ASP ((VdpDecoderProfile)13)
2459 
2460 #define VDP_DECODER_PROFILE_DIVX4_QMOBILE ((VdpDecoderProfile)14)
2461 
2462 #define VDP_DECODER_PROFILE_DIVX4_MOBILE ((VdpDecoderProfile)15)
2463 
2464 #define VDP_DECODER_PROFILE_DIVX4_HOME_THEATER ((VdpDecoderProfile)16)
2465 
2466 #define VDP_DECODER_PROFILE_DIVX4_HD_1080P ((VdpDecoderProfile)17)
2467 
2468 #define VDP_DECODER_PROFILE_DIVX5_QMOBILE ((VdpDecoderProfile)18)
2469 
2470 #define VDP_DECODER_PROFILE_DIVX5_MOBILE ((VdpDecoderProfile)19)
2471 
2472 #define VDP_DECODER_PROFILE_DIVX5_HOME_THEATER ((VdpDecoderProfile)20)
2473 
2474 #define VDP_DECODER_PROFILE_DIVX5_HD_1080P ((VdpDecoderProfile)21)
2475 
2476 #define VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE ((VdpDecoderProfile)22)
2477 
2478 #define VDP_DECODER_PROFILE_H264_EXTENDED ((VdpDecoderProfile)23)
2479 
2480 #define VDP_DECODER_PROFILE_H264_PROGRESSIVE_HIGH ((VdpDecoderProfile)24)
2481 
2482 #define VDP_DECODER_PROFILE_H264_CONSTRAINED_HIGH ((VdpDecoderProfile)25)
2483 
2485 #define VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE ((VdpDecoderProfile)26)
2486 
2488 #define VDP_DECODER_PROFILE_HEVC_MAIN ((VdpDecoderProfile)100)
2489 
2490 #define VDP_DECODER_PROFILE_HEVC_MAIN_10 ((VdpDecoderProfile)101)
2491 
2492 #define VDP_DECODER_PROFILE_HEVC_MAIN_STILL ((VdpDecoderProfile)102)
2493 
2494 #define VDP_DECODER_PROFILE_HEVC_MAIN_12 ((VdpDecoderProfile)103)
2495 
2496 #define VDP_DECODER_PROFILE_HEVC_MAIN_444 ((VdpDecoderProfile)104)
2497 
2499 #define VDP_DECODER_LEVEL_MPEG1_NA 0
2500 
2502 #define VDP_DECODER_LEVEL_MPEG2_LL 0
2503 
2504 #define VDP_DECODER_LEVEL_MPEG2_ML 1
2505 
2506 #define VDP_DECODER_LEVEL_MPEG2_HL14 2
2507 
2508 #define VDP_DECODER_LEVEL_MPEG2_HL 3
2509 
2511 #define VDP_DECODER_LEVEL_H264_1 10
2512 
2513 #define VDP_DECODER_LEVEL_H264_1b 9
2514 
2515 #define VDP_DECODER_LEVEL_H264_1_1 11
2516 
2517 #define VDP_DECODER_LEVEL_H264_1_2 12
2518 
2519 #define VDP_DECODER_LEVEL_H264_1_3 13
2520 
2521 #define VDP_DECODER_LEVEL_H264_2 20
2522 
2523 #define VDP_DECODER_LEVEL_H264_2_1 21
2524 
2525 #define VDP_DECODER_LEVEL_H264_2_2 22
2526 
2527 #define VDP_DECODER_LEVEL_H264_3 30
2528 
2529 #define VDP_DECODER_LEVEL_H264_3_1 31
2530 
2531 #define VDP_DECODER_LEVEL_H264_3_2 32
2532 
2533 #define VDP_DECODER_LEVEL_H264_4 40
2534 
2535 #define VDP_DECODER_LEVEL_H264_4_1 41
2536 
2537 #define VDP_DECODER_LEVEL_H264_4_2 42
2538 
2539 #define VDP_DECODER_LEVEL_H264_5 50
2540 
2541 #define VDP_DECODER_LEVEL_H264_5_1 51
2542 
2544 #define VDP_DECODER_LEVEL_VC1_SIMPLE_LOW 0
2545 
2546 #define VDP_DECODER_LEVEL_VC1_SIMPLE_MEDIUM 1
2547 
2549 #define VDP_DECODER_LEVEL_VC1_MAIN_LOW 0
2550 
2551 #define VDP_DECODER_LEVEL_VC1_MAIN_MEDIUM 1
2552 
2553 #define VDP_DECODER_LEVEL_VC1_MAIN_HIGH 2
2554 
2556 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L0 0
2557 
2558 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L1 1
2559 
2560 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L2 2
2561 
2562 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L3 3
2563 
2564 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L4 4
2565 
2567 #define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L0 0
2568 
2569 #define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L1 1
2570 
2571 #define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L2 2
2572 
2573 #define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L3 3
2574 
2576 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L0 0
2577 
2578 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L1 1
2579 
2580 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L2 2
2581 
2582 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L3 3
2583 
2584 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L4 4
2585 
2586 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L5 5
2587 
2589 #define VDP_DECODER_LEVEL_DIVX_NA 0
2590 
2597 #define VDP_DECODER_LEVEL_HEVC_1 30
2598 
2599 #define VDP_DECODER_LEVEL_HEVC_2 60
2600 
2601 #define VDP_DECODER_LEVEL_HEVC_2_1 63
2602 
2603 #define VDP_DECODER_LEVEL_HEVC_3 90
2604 
2605 #define VDP_DECODER_LEVEL_HEVC_3_1 93
2606 
2607 #define VDP_DECODER_LEVEL_HEVC_4 120
2608 
2609 #define VDP_DECODER_LEVEL_HEVC_4_1 123
2610 
2611 #define VDP_DECODER_LEVEL_HEVC_5 150
2612 
2613 #define VDP_DECODER_LEVEL_HEVC_5_1 153
2614 
2615 #define VDP_DECODER_LEVEL_HEVC_5_2 156
2616 
2617 #define VDP_DECODER_LEVEL_HEVC_6 180
2618 
2619 #define VDP_DECODER_LEVEL_HEVC_6_1 183
2620 
2621 #define VDP_DECODER_LEVEL_HEVC_6_2 186
2622 
2642  VdpDevice device,
2643  VdpDecoderProfile profile,
2644  /* output parameters follow */
2645  VdpBool * is_supported,
2646  uint32_t * max_level,
2647  uint32_t * max_macroblocks,
2648  uint32_t * max_width,
2649  uint32_t * max_height
2650 );
2651 
2655 typedef uint32_t VdpDecoder;
2656 
2674  VdpDevice device,
2675  VdpDecoderProfile profile,
2676  uint32_t width,
2677  uint32_t height,
2678  uint32_t max_references,
2679  /* output parameters follow */
2680  VdpDecoder * decoder
2681 );
2682 
2689  VdpDecoder decoder
2690 );
2691 
2705  VdpDecoder decoder,
2706  /* output parameters follow */
2707  VdpDecoderProfile * profile,
2708  uint32_t * width,
2709  uint32_t * height
2710 );
2711 
2712 #define VDP_BITSTREAM_BUFFER_VERSION 0
2713 
2718 typedef struct {
2722  uint32_t struct_version;
2724  void const * bitstream;
2728 
2739 typedef void VdpPictureInfo;
2740 
2749 typedef struct {
2754  VdpVideoSurface forward_reference;
2759  VdpVideoSurface backward_reference;
2761  uint32_t slice_count;
2762 
2774  uint8_t q_scale_type;
2781  uint8_t f_code[2][2];
2783  uint8_t intra_quantizer_matrix[64];
2785  uint8_t non_intra_quantizer_matrix[64];
2788 
2796 typedef struct {
2801  VdpVideoSurface surface;
2803  VdpBool is_long_term;
2815  int32_t field_order_cnt[2];
2821  uint16_t frame_idx;
2823 
2846 typedef struct {
2848  uint32_t slice_count;
2850  int32_t field_order_cnt[2];
2852  VdpBool is_reference;
2853 
2858  uint16_t frame_num;
2883  uint8_t scaling_lists_4x4[6][16];
2885  uint8_t scaling_lists_8x8[2][64];
2889  VdpReferenceFrameH264 referenceFrames[16];
2891 
2902 typedef struct {
2905 
2922 
2930 typedef struct {
2935  VdpVideoSurface forward_reference;
2940  VdpVideoSurface backward_reference;
2941 
2943  uint32_t slice_count;
2945  uint8_t picture_type;
2948 
2954  uint8_t postprocflag;
2956  uint8_t pulldown;
2958  uint8_t interlace;
2960  uint8_t tfcntrflag;
2962  uint8_t finterpflag;
2964  uint8_t psf;
2966  uint8_t dquant;
2968  uint8_t panscan_flag;
2970  uint8_t refdist_flag;
2972  uint8_t quantizer;
2974  uint8_t extended_mv;
2976  uint8_t extended_dmv;
2978  uint8_t overlap;
2980  uint8_t vstransform;
2982  uint8_t loopfilter;
2984  uint8_t fastuvmc;
2987  uint8_t range_mapy;
2990  uint8_t range_mapuv;
2991 
2996  uint8_t multires;
3001  uint8_t syncmarker;
3008  uint8_t rangered;
3013  uint8_t maxbframes;
3021  uint8_t deblockEnable;
3027  uint8_t pquant;
3029 
3037 typedef struct {
3042  VdpVideoSurface forward_reference;
3047  VdpVideoSurface backward_reference;
3048 
3053  int32_t trd[2];
3054  int32_t trb[2];
3060  uint8_t interlaced;
3061  uint8_t quant_type;
3068  uint8_t intra_quantizer_matrix[64];
3069  uint8_t non_intra_quantizer_matrix[64];
3072 
3080 
3088 
3106 typedef struct {
3132  uint8_t ScalingList4x4[6][16];
3135  uint8_t ScalingList8x8[6][64];
3138  uint8_t ScalingList16x16[6][64];
3141  uint8_t ScalingList32x32[2][64];
3144  uint8_t ScalingListDCCoeff16x16[6];
3147  uint8_t ScalingListDCCoeff32x32[2];
3206  uint16_t column_width_minus1[20];
3210  uint16_t row_height_minus1[22];
3231 
3239  uint8_t IDRPicFlag;
3242  uint8_t RAPPicFlag;
3244  uint8_t CurrRpsIdx;
3270 
3274  VdpVideoSurface RefPics[16];
3277  int32_t PicOrderCntVal[16];
3281  uint8_t IsLongTerm[16];
3290  uint8_t NumPocLtCurr;
3293  uint8_t RefPicSetStCurrBefore[8];
3296  uint8_t RefPicSetStCurrAfter[8];
3299  uint8_t RefPicSetLtCurr[8];
3301 
3321  VdpDecoder decoder,
3322  VdpVideoSurface target,
3323  VdpPictureInfo const * picture_info,
3324  uint32_t bitstream_buffer_count,
3325  VdpBitstreamBuffer const * bitstream_buffers
3326 );
3327 
3407 typedef uint32_t VdpVideoMixerFeature;
3408 
3420 #define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL ((VdpVideoMixerFeature)0)
3421 
3433 #define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL ((VdpVideoMixerFeature)1)
3434 
3442 #define VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE ((VdpVideoMixerFeature)2)
3443 
3450 #define VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION ((VdpVideoMixerFeature)3)
3451 
3458 #define VDP_VIDEO_MIXER_FEATURE_SHARPNESS ((VdpVideoMixerFeature)4)
3459 
3471 #define VDP_VIDEO_MIXER_FEATURE_LUMA_KEY ((VdpVideoMixerFeature)5)
3472 
3493 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 ((VdpVideoMixerFeature)11)
3494 
3500 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L2 ((VdpVideoMixerFeature)12)
3501 
3507 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L3 ((VdpVideoMixerFeature)13)
3508 
3514 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L4 ((VdpVideoMixerFeature)14)
3515 
3521 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L5 ((VdpVideoMixerFeature)15)
3522 
3528 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L6 ((VdpVideoMixerFeature)16)
3529 
3535 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L7 ((VdpVideoMixerFeature)17)
3536 
3542 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L8 ((VdpVideoMixerFeature)18)
3543 
3549 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L9 ((VdpVideoMixerFeature)19)
3550 
3563 typedef uint32_t VdpVideoMixerParameter;
3564 
3577 #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH ((VdpVideoMixerParameter)0)
3578 
3590 #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT ((VdpVideoMixerParameter)1)
3591 
3604 #define VDP_VIDEO_MIXER_PARAMETER_CHROMA_TYPE ((VdpVideoMixerParameter)2)
3605 
3623 #define VDP_VIDEO_MIXER_PARAMETER_LAYERS ((VdpVideoMixerParameter)3)
3624 
3637 typedef uint32_t VdpVideoMixerAttribute;
3638 
3652 #define VDP_VIDEO_MIXER_ATTRIBUTE_BACKGROUND_COLOR ((VdpVideoMixerAttribute)0)
3653 
3680 #define VDP_VIDEO_MIXER_ATTRIBUTE_CSC_MATRIX ((VdpVideoMixerAttribute)1)
3681 
3693 #define VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL ((VdpVideoMixerAttribute)2)
3694 
3709 #define VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL ((VdpVideoMixerAttribute)3)
3710 
3721 #define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MIN_LUMA ((VdpVideoMixerAttribute)4)
3722 
3733 #define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MAX_LUMA ((VdpVideoMixerAttribute)5)
3734 
3748 #define VDP_VIDEO_MIXER_ATTRIBUTE_SKIP_CHROMA_DEINTERLACE ((VdpVideoMixerAttribute)6)
3749 
3760  VdpDevice device,
3761  VdpVideoMixerFeature feature,
3762  /* output parameters follow */
3763  VdpBool * is_supported
3764 );
3765 
3777  VdpDevice device,
3778  VdpVideoMixerParameter parameter,
3779  /* output parameters follow */
3780  VdpBool * is_supported
3781 );
3782 
3793  VdpDevice device,
3794  VdpVideoMixerAttribute attribute,
3795  /* output parameters follow */
3796  VdpBool * is_supported
3797 );
3798 
3810  VdpDevice device,
3811  VdpVideoMixerParameter parameter,
3812  /* output parameters follow */
3813  void * min_value,
3814  void * max_value
3815 );
3816 
3828  VdpDevice device,
3829  VdpVideoMixerAttribute attribute,
3830  /* output parameters follow */
3831  void * min_value,
3832  void * max_value
3833 );
3834 
3838 typedef uint32_t VdpVideoMixer;
3839 
3861  VdpDevice device,
3862  // The set of features to request
3863  uint32_t feature_count,
3864  VdpVideoMixerFeature const * features,
3865  // The parameters used during creation
3866  uint32_t parameter_count,
3867  VdpVideoMixerParameter const * parameters,
3868  void const * const * parameter_values,
3869  /* output parameters follow */
3870  VdpVideoMixer * mixer
3871 );
3872 
3884  VdpVideoMixer mixer,
3885  uint32_t feature_count,
3886  VdpVideoMixerFeature const * features,
3887  VdpBool const * feature_enables
3888 );
3889 
3903  VdpVideoMixer mixer,
3904  uint32_t attribute_count,
3905  VdpVideoMixerAttribute const * attributes,
3906  void const * const * attribute_values
3907 );
3908 
3921  VdpVideoMixer mixer,
3922  uint32_t feature_count,
3923  VdpVideoMixerFeature const * features,
3924  /* output parameters follow */
3925  VdpBool * feature_supports
3926 );
3927 
3938  VdpVideoMixer mixer,
3939  uint32_t feature_count,
3940  VdpVideoMixerFeature const * features,
3941  /* output parameters follow */
3942  VdpBool * feature_enables
3943 );
3944 
3958  VdpVideoMixer mixer,
3959  uint32_t parameter_count,
3960  VdpVideoMixerParameter const * parameters,
3961  /* output parameters follow */
3962  void * const * parameter_values
3963 );
3964 
3978  VdpVideoMixer mixer,
3979  uint32_t attribute_count,
3980  VdpVideoMixerAttribute const * attributes,
3981  /* output parameters follow */
3982  void * const * attribute_values
3983 );
3984 
3991  VdpVideoMixer mixer
3992 );
3993 
3999 typedef enum {
4014 
4015 #define VDP_LAYER_VERSION 0
4016 
4021 typedef struct {
4025  uint32_t struct_version;
4029  VdpOutputSurface source_surface;
4044 } VdpLayer;
4045 
4113  VdpVideoMixer mixer,
4114  VdpOutputSurface background_surface,
4115  VdpRect const * background_source_rect,
4116  VdpVideoMixerPictureStructure current_picture_structure,
4117  uint32_t video_surface_past_count,
4118  VdpVideoSurface const * video_surface_past,
4119  VdpVideoSurface video_surface_current,
4120  uint32_t video_surface_future_count,
4121  VdpVideoSurface const * video_surface_future,
4122  VdpRect const * video_source_rect,
4123  VdpOutputSurface destination_surface,
4124  VdpRect const * destination_rect,
4125  VdpRect const * destination_video_rect,
4126  uint32_t layer_count,
4127  VdpLayer const * layers
4128 );
4129 
4181 typedef uint64_t VdpTime;
4182 
4192 
4199  VdpPresentationQueueTarget presentation_queue_target
4200 );
4201 
4206 typedef uint32_t VdpPresentationQueue;
4207 
4220  VdpDevice device,
4221  VdpPresentationQueueTarget presentation_queue_target,
4222  /* output parameters follow */
4223  VdpPresentationQueue * presentation_queue
4224 );
4225 
4232  VdpPresentationQueue presentation_queue
4233 );
4234 
4245  VdpPresentationQueue presentation_queue,
4246  VdpColor * const background_color
4247 );
4248 
4255  VdpPresentationQueue presentation_queue,
4256  VdpColor * background_color
4257 );
4258 
4267  VdpPresentationQueue presentation_queue,
4268  /* output parameters follow */
4269  VdpTime * current_time
4270 );
4271 
4313  VdpPresentationQueue presentation_queue,
4314  VdpOutputSurface surface,
4315  uint32_t clip_width,
4316  uint32_t clip_height,
4317  VdpTime earliest_presentation_time
4318 );
4319 
4336  VdpPresentationQueue presentation_queue,
4337  VdpOutputSurface surface,
4338  /* output parameters follow */
4339  VdpTime * first_presentation_time
4340 );
4341 
4346 typedef enum {
4354 
4367  VdpPresentationQueue presentation_queue,
4368  VdpOutputSurface surface,
4369  /* output parameters follow */
4370  VdpPresentationQueueStatus * status,
4371  VdpTime * first_presentation_time
4372 );
4373 
4429  VdpDevice device,
4430  void * context
4431 );
4432 
4444  VdpDevice device,
4445  VdpPreemptionCallback callback,
4446  void * context
4447 );
4448 
4466 typedef uint32_t VdpFuncId;
4467 
4469 #define VDP_FUNC_ID_GET_ERROR_STRING ((VdpFuncId)0)
4470 
4471 #define VDP_FUNC_ID_GET_PROC_ADDRESS ((VdpFuncId)1)
4472 
4473 #define VDP_FUNC_ID_GET_API_VERSION ((VdpFuncId)2)
4474 
4475 #define VDP_FUNC_ID_GET_INFORMATION_STRING ((VdpFuncId)4)
4476 
4477 #define VDP_FUNC_ID_DEVICE_DESTROY ((VdpFuncId)5)
4478 
4479 #define VDP_FUNC_ID_GENERATE_CSC_MATRIX ((VdpFuncId)6)
4480 
4481 #define VDP_FUNC_ID_VIDEO_SURFACE_QUERY_CAPABILITIES ((VdpFuncId)7)
4482 
4483 #define VDP_FUNC_ID_VIDEO_SURFACE_QUERY_GET_PUT_BITS_Y_CB_CR_CAPABILITIES ((VdpFuncId)8)
4484 
4485 #define VDP_FUNC_ID_VIDEO_SURFACE_CREATE ((VdpFuncId)9)
4486 
4487 #define VDP_FUNC_ID_VIDEO_SURFACE_DESTROY ((VdpFuncId)10)
4488 
4489 #define VDP_FUNC_ID_VIDEO_SURFACE_GET_PARAMETERS ((VdpFuncId)11)
4490 
4491 #define VDP_FUNC_ID_VIDEO_SURFACE_GET_BITS_Y_CB_CR ((VdpFuncId)12)
4492 
4493 #define VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR ((VdpFuncId)13)
4494 
4495 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_CAPABILITIES ((VdpFuncId)14)
4496 
4497 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_GET_PUT_BITS_NATIVE_CAPABILITIES ((VdpFuncId)15)
4498 
4499 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_INDEXED_CAPABILITIES ((VdpFuncId)16)
4500 
4501 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_Y_CB_CR_CAPABILITIES ((VdpFuncId)17)
4502 
4503 #define VDP_FUNC_ID_OUTPUT_SURFACE_CREATE ((VdpFuncId)18)
4504 
4505 #define VDP_FUNC_ID_OUTPUT_SURFACE_DESTROY ((VdpFuncId)19)
4506 
4507 #define VDP_FUNC_ID_OUTPUT_SURFACE_GET_PARAMETERS ((VdpFuncId)20)
4508 
4509 #define VDP_FUNC_ID_OUTPUT_SURFACE_GET_BITS_NATIVE ((VdpFuncId)21)
4510 
4511 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_NATIVE ((VdpFuncId)22)
4512 
4513 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_INDEXED ((VdpFuncId)23)
4514 
4515 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_Y_CB_CR ((VdpFuncId)24)
4516 
4517 #define VDP_FUNC_ID_BITMAP_SURFACE_QUERY_CAPABILITIES ((VdpFuncId)25)
4518 
4519 #define VDP_FUNC_ID_BITMAP_SURFACE_CREATE ((VdpFuncId)26)
4520 
4521 #define VDP_FUNC_ID_BITMAP_SURFACE_DESTROY ((VdpFuncId)27)
4522 
4523 #define VDP_FUNC_ID_BITMAP_SURFACE_GET_PARAMETERS ((VdpFuncId)28)
4524 
4525 #define VDP_FUNC_ID_BITMAP_SURFACE_PUT_BITS_NATIVE ((VdpFuncId)29)
4526 
4527 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE ((VdpFuncId)33)
4528 
4529 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_BITMAP_SURFACE ((VdpFuncId)34)
4530 
4531 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_VIDEO_SURFACE_LUMA ((VdpFuncId)35)
4532 
4533 #define VDP_FUNC_ID_DECODER_QUERY_CAPABILITIES ((VdpFuncId)36)
4534 
4535 #define VDP_FUNC_ID_DECODER_CREATE ((VdpFuncId)37)
4536 
4537 #define VDP_FUNC_ID_DECODER_DESTROY ((VdpFuncId)38)
4538 
4539 #define VDP_FUNC_ID_DECODER_GET_PARAMETERS ((VdpFuncId)39)
4540 
4541 #define VDP_FUNC_ID_DECODER_RENDER ((VdpFuncId)40)
4542 
4543 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_FEATURE_SUPPORT ((VdpFuncId)41)
4544 
4545 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_SUPPORT ((VdpFuncId)42)
4546 
4547 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_SUPPORT ((VdpFuncId)43)
4548 
4549 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_VALUE_RANGE ((VdpFuncId)44)
4550 
4551 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_VALUE_RANGE ((VdpFuncId)45)
4552 
4553 #define VDP_FUNC_ID_VIDEO_MIXER_CREATE ((VdpFuncId)46)
4554 
4555 #define VDP_FUNC_ID_VIDEO_MIXER_SET_FEATURE_ENABLES ((VdpFuncId)47)
4556 
4557 #define VDP_FUNC_ID_VIDEO_MIXER_SET_ATTRIBUTE_VALUES ((VdpFuncId)48)
4558 
4559 #define VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_SUPPORT ((VdpFuncId)49)
4560 
4561 #define VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_ENABLES ((VdpFuncId)50)
4562 
4563 #define VDP_FUNC_ID_VIDEO_MIXER_GET_PARAMETER_VALUES ((VdpFuncId)51)
4564 
4565 #define VDP_FUNC_ID_VIDEO_MIXER_GET_ATTRIBUTE_VALUES ((VdpFuncId)52)
4566 
4567 #define VDP_FUNC_ID_VIDEO_MIXER_DESTROY ((VdpFuncId)53)
4568 
4569 #define VDP_FUNC_ID_VIDEO_MIXER_RENDER ((VdpFuncId)54)
4570 
4571 #define VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_DESTROY ((VdpFuncId)55)
4572 
4573 #define VDP_FUNC_ID_PRESENTATION_QUEUE_CREATE ((VdpFuncId)56)
4574 
4575 #define VDP_FUNC_ID_PRESENTATION_QUEUE_DESTROY ((VdpFuncId)57)
4576 
4577 #define VDP_FUNC_ID_PRESENTATION_QUEUE_SET_BACKGROUND_COLOR ((VdpFuncId)58)
4578 
4579 #define VDP_FUNC_ID_PRESENTATION_QUEUE_GET_BACKGROUND_COLOR ((VdpFuncId)59)
4580 
4581 #define VDP_FUNC_ID_PRESENTATION_QUEUE_GET_TIME ((VdpFuncId)62)
4582 
4583 #define VDP_FUNC_ID_PRESENTATION_QUEUE_DISPLAY ((VdpFuncId)63)
4584 
4585 #define VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE ((VdpFuncId)64)
4586 
4587 #define VDP_FUNC_ID_PRESENTATION_QUEUE_QUERY_SURFACE_STATUS ((VdpFuncId)65)
4588 
4589 #define VDP_FUNC_ID_PREEMPTION_CALLBACK_REGISTER ((VdpFuncId)66)
4590 
4591 #define VDP_FUNC_ID_BASE_WINSYS 0x1000
4592 
4603  VdpDevice device,
4604  VdpFuncId function_id,
4605  /* output parameters follow */
4606  void * * function_pointer
4607 );
4608 
4611 
4619 #ifdef __cplusplus
4620 }
4621 #endif
4622 
4623 #endif
4624