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 
849 #define VDP_CHROMA_TYPE_420 ((VdpChromaType)0)
850 
858 #define VDP_CHROMA_TYPE_422 ((VdpChromaType)1)
859 
867 #define VDP_CHROMA_TYPE_444 ((VdpChromaType)2)
868 
873 #define VDP_CHROMA_TYPE_420_FIELD ((VdpChromaType)3)
874 
878 #define VDP_CHROMA_TYPE_422_FIELD ((VdpChromaType)4)
879 
883 #define VDP_CHROMA_TYPE_444_FIELD ((VdpChromaType)5)
884 
889 #define VDP_CHROMA_TYPE_420_FRAME ((VdpChromaType)6)
890 
894 #define VDP_CHROMA_TYPE_422_FRAME ((VdpChromaType)7)
895 
899 #define VDP_CHROMA_TYPE_444_FRAME ((VdpChromaType)8)
900 
904 typedef uint32_t VdpYCbCrFormat;
905 
919 #define VDP_YCBCR_FORMAT_NV12 ((VdpYCbCrFormat)0)
920 
931 #define VDP_YCBCR_FORMAT_YV12 ((VdpYCbCrFormat)1)
932 
945 #define VDP_YCBCR_FORMAT_UYVY ((VdpYCbCrFormat)2)
946 
959 #define VDP_YCBCR_FORMAT_YUYV ((VdpYCbCrFormat)3)
960 
972 #define VDP_YCBCR_FORMAT_Y8U8V8A8 ((VdpYCbCrFormat)4)
973 
985 #define VDP_YCBCR_FORMAT_V8U8Y8A8 ((VdpYCbCrFormat)5)
986 
999 #define VDP_YCBCR_FORMAT_Y_UV_444 ((VdpYCbCrFormat)6)
1000 
1011 #define VDP_YCBCR_FORMAT_Y_U_V_444 ((VdpYCbCrFormat)7)
1012 
1016 typedef uint32_t VdpRGBAFormat;
1017 
1030 #define VDP_RGBA_FORMAT_B8G8R8A8 ((VdpRGBAFormat)0)
1031 
1043 #define VDP_RGBA_FORMAT_R8G8B8A8 ((VdpRGBAFormat)1)
1044 
1056 #define VDP_RGBA_FORMAT_R10G10B10A2 ((VdpRGBAFormat)2)
1057 
1069 #define VDP_RGBA_FORMAT_B10G10R10A2 ((VdpRGBAFormat)3)
1070 
1080 #define VDP_RGBA_FORMAT_A8 ((VdpRGBAFormat)4)
1081 
1085 typedef uint32_t VdpIndexedFormat;
1086 
1098 #define VDP_INDEXED_FORMAT_A4I4 ((VdpIndexedFormat)0)
1099 
1110 #define VDP_INDEXED_FORMAT_I4A4 ((VdpIndexedFormat)1)
1111 
1122 #define VDP_INDEXED_FORMAT_A8I8 ((VdpIndexedFormat)2)
1123 
1134 #define VDP_INDEXED_FORMAT_I8A8 ((VdpIndexedFormat)3)
1135 
1143 typedef struct {
1145  uint32_t x;
1147  uint32_t y;
1148 } VdpPoint;
1149 
1160 typedef struct {
1162  uint32_t x0;
1164  uint32_t y0;
1166  uint32_t x1;
1168  uint32_t y1;
1169 } VdpRect;
1170 
1179 typedef struct {
1180  float red;
1181  float green;
1182  float blue;
1183  float alpha;
1184 } VdpColor;
1185 
1198 typedef enum {
1330 } VdpStatus;
1331 
1341 typedef char const * VdpGetErrorString(
1342  VdpStatus status
1343 );
1344 
1369 #define VDPAU_INTERFACE_VERSION 1
1370 
1382 #define VDPAU_VERSION 1
1383 
1390  /* output parameters follow */
1391  uint32_t * api_version
1392 );
1393 
1412  /* output parameters follow */
1413  char const * * information_string
1414 );
1415 
1435 typedef uint32_t VdpDevice;
1436 
1443  VdpDevice device
1444 );
1445 
1484 typedef float VdpCSCMatrix[3][4];
1485 
1486 #define VDP_PROCAMP_VERSION 0
1487 
1496 typedef struct {
1500  uint32_t struct_version;
1505  float brightness;
1510  float contrast;
1515  float saturation;
1520  float hue;
1521 } VdpProcamp;
1522 
1529 typedef uint32_t VdpColorStandard;
1530 
1532 #define VDP_COLOR_STANDARD_ITUR_BT_601 ((VdpColorStandard)0)
1533 
1534 #define VDP_COLOR_STANDARD_ITUR_BT_709 ((VdpColorStandard)1)
1535 
1536 #define VDP_COLOR_STANDARD_SMPTE_240M ((VdpColorStandard)2)
1537 
1547  VdpProcamp * procamp,
1548  VdpColorStandard standard,
1549  /* output parameters follow */
1550  VdpCSCMatrix * csc_matrix
1551 );
1552 
1598  VdpDevice device,
1599  VdpChromaType surface_chroma_type,
1600  /* output parameters follow */
1601  VdpBool * is_supported,
1602  uint32_t * max_width,
1603  uint32_t * max_height
1604 );
1605 
1618  VdpDevice device,
1619  VdpChromaType surface_chroma_type,
1620  VdpYCbCrFormat bits_ycbcr_format,
1621  /* output parameters follow */
1622  VdpBool * is_supported
1623 );
1624 
1629 typedef uint32_t VdpVideoSurface;
1630 
1677  VdpDevice device,
1678  VdpChromaType chroma_type,
1679  uint32_t width,
1680  uint32_t height,
1681  /* output parameters follow */
1682  VdpVideoSurface * surface
1683 );
1684 
1691  VdpVideoSurface surface
1692 );
1693 
1704  VdpVideoSurface surface,
1705  /* output parameters follow */
1706  VdpChromaType * chroma_type,
1707  uint32_t * width,
1708  uint32_t * height
1709 );
1710 
1730  VdpVideoSurface surface,
1731  VdpYCbCrFormat destination_ycbcr_format,
1732  void * const * destination_data,
1733  uint32_t const * destination_pitches
1734 );
1735 
1755  VdpVideoSurface surface,
1756  VdpYCbCrFormat source_ycbcr_format,
1757  void const * const * source_data,
1758  uint32_t const * source_pitches
1759 );
1760 
1795 typedef uint32_t VdpColorTableFormat;
1796 
1808 #define VDP_COLOR_TABLE_FORMAT_B8G8R8X8 ((VdpColorTableFormat)0)
1809 
1824  VdpDevice device,
1825  VdpRGBAFormat surface_rgba_format,
1826  /* output parameters follow */
1827  VdpBool * is_supported,
1828  uint32_t * max_width,
1829  uint32_t * max_height
1830 );
1831 
1843  VdpDevice device,
1844  VdpRGBAFormat surface_rgba_format,
1845  /* output parameters follow */
1846  VdpBool * is_supported
1847 );
1848 
1864  VdpDevice device,
1865  VdpRGBAFormat surface_rgba_format,
1866  VdpIndexedFormat bits_indexed_format,
1867  VdpColorTableFormat color_table_format,
1868  /* output parameters follow */
1869  VdpBool * is_supported
1870 );
1871 
1885  VdpDevice device,
1886  VdpRGBAFormat surface_rgba_format,
1887  VdpYCbCrFormat bits_ycbcr_format,
1888  /* output parameters follow */
1889  VdpBool * is_supported
1890 );
1891 
1896 typedef uint32_t VdpOutputSurface;
1897 
1911  VdpDevice device,
1912  VdpRGBAFormat rgba_format,
1913  uint32_t width,
1914  uint32_t height,
1915  /* output parameters follow */
1916  VdpOutputSurface * surface
1917 );
1918 
1925  VdpOutputSurface surface
1926 );
1927 
1938  VdpOutputSurface surface,
1939  /* output parameters follow */
1940  VdpRGBAFormat * rgba_format,
1941  uint32_t * width,
1942  uint32_t * height
1943 );
1944 
1965  VdpOutputSurface surface,
1966  VdpRect const * source_rect,
1967  void * const * destination_data,
1968  uint32_t const * destination_pitches
1969 );
1970 
1991  VdpOutputSurface surface,
1992  void const * const * source_data,
1993  uint32_t const * source_pitches,
1994  VdpRect const * destination_rect
1995 );
1996 
2023  VdpOutputSurface surface,
2024  VdpIndexedFormat source_indexed_format,
2025  void const * const * source_data,
2026  uint32_t const * source_pitch,
2027  VdpRect const * destination_rect,
2028  VdpColorTableFormat color_table_format,
2029  void const * color_table
2030 );
2031 
2058  VdpOutputSurface surface,
2059  VdpYCbCrFormat source_ycbcr_format,
2060  void const * const * source_data,
2061  uint32_t const * source_pitches,
2062  VdpRect const * destination_rect,
2063  VdpCSCMatrix const * csc_matrix
2064 );
2065 
2117  VdpDevice device,
2118  VdpRGBAFormat surface_rgba_format,
2119  /* output parameters follow */
2120  VdpBool * is_supported,
2121  uint32_t * max_width,
2122  uint32_t * max_height
2123 );
2124 
2129 typedef uint32_t VdpBitmapSurface;
2130 
2149  VdpDevice device,
2150  VdpRGBAFormat rgba_format,
2151  uint32_t width,
2152  uint32_t height,
2153  VdpBool frequently_accessed,
2154  /* output parameters follow */
2155  VdpBitmapSurface * surface
2156 );
2157 
2164  VdpBitmapSurface surface
2165 );
2166 
2179  VdpBitmapSurface surface,
2180  /* output parameters follow */
2181  VdpRGBAFormat * rgba_format,
2182  uint32_t * width,
2183  uint32_t * height,
2184  VdpBool * frequently_accessed
2185 );
2186 
2207  VdpBitmapSurface surface,
2208  void const * const * source_data,
2209  uint32_t const * source_pitches,
2210  VdpRect const * destination_rect
2211 );
2212 
2229 typedef enum {
2246 
2251 typedef enum {
2258 
2259 #define VDP_OUTPUT_SURFACE_RENDER_BLEND_STATE_VERSION 0
2260 
2280 typedef struct {
2284  uint32_t struct_version;
2293 
2298 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_0 0
2299 
2305 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_90 1
2306 
2312 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_180 2
2313 
2319 #define VDP_OUTPUT_SURFACE_RENDER_ROTATE_270 3
2320 
2328 #define VDP_OUTPUT_SURFACE_RENDER_COLOR_PER_VERTEX (1 << 2)
2329 
2401  VdpOutputSurface destination_surface,
2402  VdpRect const * destination_rect,
2403  VdpOutputSurface source_surface,
2404  VdpRect const * source_rect,
2405  VdpColor const * colors,
2406  VdpOutputSurfaceRenderBlendState const * blend_state,
2407  uint32_t flags
2408 );
2409 
2481  VdpOutputSurface destination_surface,
2482  VdpRect const * destination_rect,
2483  VdpBitmapSurface source_surface,
2484  VdpRect const * source_rect,
2485  VdpColor const * colors,
2486  VdpOutputSurfaceRenderBlendState const * blend_state,
2487  uint32_t flags
2488 );
2489 
2510 typedef uint32_t VdpDecoderProfile;
2511 
2513 #define VDP_DECODER_PROFILE_MPEG1 ((VdpDecoderProfile)0)
2514 
2515 #define VDP_DECODER_PROFILE_MPEG2_SIMPLE ((VdpDecoderProfile)1)
2516 
2517 #define VDP_DECODER_PROFILE_MPEG2_MAIN ((VdpDecoderProfile)2)
2518 
2520 #define VDP_DECODER_PROFILE_H264_BASELINE ((VdpDecoderProfile)6)
2521 
2522 #define VDP_DECODER_PROFILE_H264_MAIN ((VdpDecoderProfile)7)
2523 
2524 #define VDP_DECODER_PROFILE_H264_HIGH ((VdpDecoderProfile)8)
2525 
2526 #define VDP_DECODER_PROFILE_VC1_SIMPLE ((VdpDecoderProfile)9)
2527 
2528 #define VDP_DECODER_PROFILE_VC1_MAIN ((VdpDecoderProfile)10)
2529 
2530 #define VDP_DECODER_PROFILE_VC1_ADVANCED ((VdpDecoderProfile)11)
2531 
2532 #define VDP_DECODER_PROFILE_MPEG4_PART2_SP ((VdpDecoderProfile)12)
2533 
2534 #define VDP_DECODER_PROFILE_MPEG4_PART2_ASP ((VdpDecoderProfile)13)
2535 
2536 #define VDP_DECODER_PROFILE_DIVX4_QMOBILE ((VdpDecoderProfile)14)
2537 
2538 #define VDP_DECODER_PROFILE_DIVX4_MOBILE ((VdpDecoderProfile)15)
2539 
2540 #define VDP_DECODER_PROFILE_DIVX4_HOME_THEATER ((VdpDecoderProfile)16)
2541 
2542 #define VDP_DECODER_PROFILE_DIVX4_HD_1080P ((VdpDecoderProfile)17)
2543 
2544 #define VDP_DECODER_PROFILE_DIVX5_QMOBILE ((VdpDecoderProfile)18)
2545 
2546 #define VDP_DECODER_PROFILE_DIVX5_MOBILE ((VdpDecoderProfile)19)
2547 
2548 #define VDP_DECODER_PROFILE_DIVX5_HOME_THEATER ((VdpDecoderProfile)20)
2549 
2550 #define VDP_DECODER_PROFILE_DIVX5_HD_1080P ((VdpDecoderProfile)21)
2551 
2552 #define VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE ((VdpDecoderProfile)22)
2553 
2554 #define VDP_DECODER_PROFILE_H264_EXTENDED ((VdpDecoderProfile)23)
2555 
2556 #define VDP_DECODER_PROFILE_H264_PROGRESSIVE_HIGH ((VdpDecoderProfile)24)
2557 
2558 #define VDP_DECODER_PROFILE_H264_CONSTRAINED_HIGH ((VdpDecoderProfile)25)
2559 
2561 #define VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE ((VdpDecoderProfile)26)
2562 
2563 #define VDP_DECODER_PROFILE_VP9_PROFILE_0 ((VdpDecoderProfile)27)
2564 
2565 #define VDP_DECODER_PROFILE_VP9_PROFILE_1 ((VdpDecoderProfile)28)
2566 
2567 #define VDP_DECODER_PROFILE_VP9_PROFILE_2 ((VdpDecoderProfile)29)
2568 
2569 #define VDP_DECODER_PROFILE_VP9_PROFILE_3 ((VdpDecoderProfile)30)
2570 
2572 #define VDP_DECODER_PROFILE_HEVC_MAIN ((VdpDecoderProfile)100)
2573 
2574 #define VDP_DECODER_PROFILE_HEVC_MAIN_10 ((VdpDecoderProfile)101)
2575 
2576 #define VDP_DECODER_PROFILE_HEVC_MAIN_STILL ((VdpDecoderProfile)102)
2577 
2578 #define VDP_DECODER_PROFILE_HEVC_MAIN_12 ((VdpDecoderProfile)103)
2579 
2580 #define VDP_DECODER_PROFILE_HEVC_MAIN_444 ((VdpDecoderProfile)104)
2581 
2583 #define VDP_DECODER_LEVEL_MPEG1_NA 0
2584 
2586 #define VDP_DECODER_LEVEL_MPEG2_LL 0
2587 
2588 #define VDP_DECODER_LEVEL_MPEG2_ML 1
2589 
2590 #define VDP_DECODER_LEVEL_MPEG2_HL14 2
2591 
2592 #define VDP_DECODER_LEVEL_MPEG2_HL 3
2593 
2595 #define VDP_DECODER_LEVEL_H264_1 10
2596 
2597 #define VDP_DECODER_LEVEL_H264_1b 9
2598 
2599 #define VDP_DECODER_LEVEL_H264_1_1 11
2600 
2601 #define VDP_DECODER_LEVEL_H264_1_2 12
2602 
2603 #define VDP_DECODER_LEVEL_H264_1_3 13
2604 
2605 #define VDP_DECODER_LEVEL_H264_2 20
2606 
2607 #define VDP_DECODER_LEVEL_H264_2_1 21
2608 
2609 #define VDP_DECODER_LEVEL_H264_2_2 22
2610 
2611 #define VDP_DECODER_LEVEL_H264_3 30
2612 
2613 #define VDP_DECODER_LEVEL_H264_3_1 31
2614 
2615 #define VDP_DECODER_LEVEL_H264_3_2 32
2616 
2617 #define VDP_DECODER_LEVEL_H264_4 40
2618 
2619 #define VDP_DECODER_LEVEL_H264_4_1 41
2620 
2621 #define VDP_DECODER_LEVEL_H264_4_2 42
2622 
2623 #define VDP_DECODER_LEVEL_H264_5 50
2624 
2625 #define VDP_DECODER_LEVEL_H264_5_1 51
2626 
2628 #define VDP_DECODER_LEVEL_VC1_SIMPLE_LOW 0
2629 
2630 #define VDP_DECODER_LEVEL_VC1_SIMPLE_MEDIUM 1
2631 
2633 #define VDP_DECODER_LEVEL_VC1_MAIN_LOW 0
2634 
2635 #define VDP_DECODER_LEVEL_VC1_MAIN_MEDIUM 1
2636 
2637 #define VDP_DECODER_LEVEL_VC1_MAIN_HIGH 2
2638 
2640 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L0 0
2641 
2642 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L1 1
2643 
2644 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L2 2
2645 
2646 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L3 3
2647 
2648 #define VDP_DECODER_LEVEL_VC1_ADVANCED_L4 4
2649 
2651 #define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L0 0
2652 
2653 #define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L1 1
2654 
2655 #define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L2 2
2656 
2657 #define VDP_DECODER_LEVEL_MPEG4_PART2_SP_L3 3
2658 
2660 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L0 0
2661 
2662 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L1 1
2663 
2664 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L2 2
2665 
2666 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L3 3
2667 
2668 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L4 4
2669 
2670 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L5 5
2671 
2673 #define VDP_DECODER_LEVEL_DIVX_NA 0
2674 
2676 #define VDP_DECODER_LEVEL_VP9_L1 1
2677 
2684 #define VDP_DECODER_LEVEL_HEVC_1 30
2685 
2686 #define VDP_DECODER_LEVEL_HEVC_2 60
2687 
2688 #define VDP_DECODER_LEVEL_HEVC_2_1 63
2689 
2690 #define VDP_DECODER_LEVEL_HEVC_3 90
2691 
2692 #define VDP_DECODER_LEVEL_HEVC_3_1 93
2693 
2694 #define VDP_DECODER_LEVEL_HEVC_4 120
2695 
2696 #define VDP_DECODER_LEVEL_HEVC_4_1 123
2697 
2698 #define VDP_DECODER_LEVEL_HEVC_5 150
2699 
2700 #define VDP_DECODER_LEVEL_HEVC_5_1 153
2701 
2702 #define VDP_DECODER_LEVEL_HEVC_5_2 156
2703 
2704 #define VDP_DECODER_LEVEL_HEVC_6 180
2705 
2706 #define VDP_DECODER_LEVEL_HEVC_6_1 183
2707 
2708 #define VDP_DECODER_LEVEL_HEVC_6_2 186
2709 
2710 typedef enum {
2714 
2715 typedef enum {
2730 
2743  VdpDevice device,
2744  VdpDecoderProfile profile,
2745  /* output parameters follow */
2746  VdpDecoderCapability capability,
2747  void * capability_value
2748 );
2749 
2769  VdpDevice device,
2770  VdpDecoderProfile profile,
2771  /* output parameters follow */
2772  VdpBool * is_supported,
2773  uint32_t * max_level,
2774  uint32_t * max_macroblocks,
2775  uint32_t * max_width,
2776  uint32_t * max_height
2777 );
2778 
2782 typedef uint32_t VdpDecoder;
2783 
2801  VdpDevice device,
2802  VdpDecoderProfile profile,
2803  uint32_t width,
2804  uint32_t height,
2805  uint32_t max_references,
2806  /* output parameters follow */
2807  VdpDecoder * decoder
2808 );
2809 
2816  VdpDecoder decoder
2817 );
2818 
2832  VdpDecoder decoder,
2833  /* output parameters follow */
2834  VdpDecoderProfile * profile,
2835  uint32_t * width,
2836  uint32_t * height
2837 );
2838 
2839 #define VDP_BITSTREAM_BUFFER_VERSION 0
2840 
2845 typedef struct {
2849  uint32_t struct_version;
2851  void const * bitstream;
2855 
2866 typedef void VdpPictureInfo;
2867 
2876 typedef struct {
2881  VdpVideoSurface forward_reference;
2886  VdpVideoSurface backward_reference;
2888  uint32_t slice_count;
2889 
2901  uint8_t q_scale_type;
2908  uint8_t f_code[2][2];
2910  uint8_t intra_quantizer_matrix[64];
2912  uint8_t non_intra_quantizer_matrix[64];
2915 
2923 typedef struct {
2928  VdpVideoSurface surface;
2930  VdpBool is_long_term;
2942  int32_t field_order_cnt[2];
2948  uint16_t frame_idx;
2950 
2973 typedef struct {
2975  uint32_t slice_count;
2977  int32_t field_order_cnt[2];
2979  VdpBool is_reference;
2980 
2985  uint16_t frame_num;
3010  uint8_t scaling_lists_4x4[6][16];
3012  uint8_t scaling_lists_8x8[2][64];
3016  VdpReferenceFrameH264 referenceFrames[16];
3018 
3029 typedef struct {
3032 
3049 
3057 typedef struct {
3062  VdpVideoSurface forward_reference;
3067  VdpVideoSurface backward_reference;
3068 
3070  uint32_t slice_count;
3072  uint8_t picture_type;
3075 
3081  uint8_t postprocflag;
3083  uint8_t pulldown;
3085  uint8_t interlace;
3087  uint8_t tfcntrflag;
3089  uint8_t finterpflag;
3091  uint8_t psf;
3093  uint8_t dquant;
3095  uint8_t panscan_flag;
3097  uint8_t refdist_flag;
3099  uint8_t quantizer;
3101  uint8_t extended_mv;
3103  uint8_t extended_dmv;
3105  uint8_t overlap;
3107  uint8_t vstransform;
3109  uint8_t loopfilter;
3111  uint8_t fastuvmc;
3114  uint8_t range_mapy;
3117  uint8_t range_mapuv;
3118 
3123  uint8_t multires;
3128  uint8_t syncmarker;
3135  uint8_t rangered;
3140  uint8_t maxbframes;
3148  uint8_t deblockEnable;
3154  uint8_t pquant;
3156 
3164 typedef struct {
3169  VdpVideoSurface forward_reference;
3174  VdpVideoSurface backward_reference;
3175 
3180  int32_t trd[2];
3181  int32_t trb[2];
3187  uint8_t interlaced;
3188  uint8_t quant_type;
3195  uint8_t intra_quantizer_matrix[64];
3196  uint8_t non_intra_quantizer_matrix[64];
3199 
3207 
3215 
3216 typedef struct
3217 {
3218  unsigned int width;
3219  unsigned int height;
3220 
3221  //Frame Indices
3222  VdpVideoSurface lastReference;
3223  VdpVideoSurface goldenReference;
3224  VdpVideoSurface altReference;
3225 
3226  unsigned char colorSpace;
3227 
3228  unsigned short profile;
3229  unsigned short frameContextIdx;
3230  unsigned short keyFrame;
3231  unsigned short showFrame;
3232  unsigned short errorResilient;
3233  unsigned short frameParallelDecoding;
3234  unsigned short subSamplingX;
3235  unsigned short subSamplingY;
3236  unsigned short intraOnly;
3237  unsigned short allowHighPrecisionMv;
3238  unsigned short refreshEntropyProbs;
3239 
3240  unsigned char refFrameSignBias[4];
3241 
3242  unsigned char bitDepthMinus8Luma;
3243  unsigned char bitDepthMinus8Chroma;
3244  unsigned char loopFilterLevel;
3245  unsigned char loopFilterSharpness;
3246 
3247  unsigned char modeRefLfEnabled;
3248  unsigned char log2TileColumns;
3249  unsigned char log2TileRows;
3250 
3251  unsigned char segmentEnabled;
3252  unsigned char segmentMapUpdate;
3254  unsigned char segmentFeatureMode;
3255 
3256  unsigned char segmentFeatureEnable[8][4];
3257  short segmentFeatureData[8][4];
3258  unsigned char mbSegmentTreeProbs[7];
3259  unsigned char segmentPredProbs[3];
3260  unsigned char reservedSegment16Bits[2];
3261 
3262  int qpYAc;
3263  int qpYDc;
3264  int qpChDc;
3265  int qpChAc;
3266 
3267  unsigned int activeRefIdx[3];
3268  unsigned int resetFrameContext;
3269  unsigned int mcompFilterType;
3270  unsigned int mbRefLfDelta[4];
3271  unsigned int mbModeLfDelta[2];
3273  unsigned int compressedHeaderSize;
3275 
3293 typedef struct {
3319  uint8_t ScalingList4x4[6][16];
3322  uint8_t ScalingList8x8[6][64];
3325  uint8_t ScalingList16x16[6][64];
3328  uint8_t ScalingList32x32[2][64];
3331  uint8_t ScalingListDCCoeff16x16[6];
3334  uint8_t ScalingListDCCoeff32x32[2];
3393  uint16_t column_width_minus1[20];
3397  uint16_t row_height_minus1[22];
3418 
3426  uint8_t IDRPicFlag;
3429  uint8_t RAPPicFlag;
3431  uint8_t CurrRpsIdx;
3457 
3461  VdpVideoSurface RefPics[16];
3464  int32_t PicOrderCntVal[16];
3468  uint8_t IsLongTerm[16];
3477  uint8_t NumPocLtCurr;
3480  uint8_t RefPicSetStCurrBefore[8];
3483  uint8_t RefPicSetStCurrAfter[8];
3486  uint8_t RefPicSetLtCurr[8];
3488 
3496 typedef struct {
3499 
3500  /* SPS Range Extensions for Main 444, Main 10, etc. */
3502  /* sps extension for transform_skip_rotation_enabled_flag */
3504  /* sps extension for transform_skip_context_enabled_flag */
3506  /* sps implicit_rdpcm_enabled_flag */
3508  /* sps explicit_rdpcm_enabled_flag */
3510  /* sps extended_precision_processing_flag,always 0 in current profile */
3512  /* sps intra_smoothing_disabled_flag */
3514  /* sps high_precision_offsets_enabled_flag */
3516  /* sps persistent_rice_adaptation_enabled_flag */
3518  /* sps cabac_bypass_alignment_enabled_flag, always 0 in current profile */
3520  /* sps intraBlockCopyEnableFlag, always 0 not used by the spec as of now */
3522 
3523  /* PPS Range Extensions for Main 444, Main 10, etc. */
3525  /* pps extension log2_max_transform_skip_block_size_minus2, 0...5 */
3527  /* pps cross_component_prediction_enabled_flag */
3529  /* pps chroma_qp_adjustment_enabled_flag */
3531  /* pps diff_cu_chroma_qp_adjustment_depth, 0...3 */
3533  /* pps chroma_qp_adjustment_table_size_minus1+1, 1...6 */
3535  /* pps log2_sao_offset_scale_luma, max(0,bitdepth-10), */
3536  /* maxBitdepth 16 for future. */
3538  /* pps log2_sao_offset_scale_chroma */
3540  /* -[12,+12] */
3541  int8_t cb_qp_adjustment[6];
3542  /* -[12,+12] */
3543  int8_t cr_qp_adjustment[6];
3544 
3546 
3566  VdpDecoder decoder,
3567  VdpVideoSurface target,
3568  VdpPictureInfo const * picture_info,
3569  uint32_t bitstream_buffer_count,
3570  VdpBitstreamBuffer const * bitstream_buffers
3571 );
3572 
3651 typedef uint32_t VdpVideoMixerFeature;
3652 
3664 #define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL ((VdpVideoMixerFeature)0)
3665 
3677 #define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL ((VdpVideoMixerFeature)1)
3678 
3686 #define VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE ((VdpVideoMixerFeature)2)
3687 
3694 #define VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION ((VdpVideoMixerFeature)3)
3695 
3702 #define VDP_VIDEO_MIXER_FEATURE_SHARPNESS ((VdpVideoMixerFeature)4)
3703 
3715 #define VDP_VIDEO_MIXER_FEATURE_LUMA_KEY ((VdpVideoMixerFeature)5)
3716 
3737 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 ((VdpVideoMixerFeature)11)
3738 
3744 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L2 ((VdpVideoMixerFeature)12)
3745 
3751 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L3 ((VdpVideoMixerFeature)13)
3752 
3758 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L4 ((VdpVideoMixerFeature)14)
3759 
3765 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L5 ((VdpVideoMixerFeature)15)
3766 
3772 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L6 ((VdpVideoMixerFeature)16)
3773 
3779 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L7 ((VdpVideoMixerFeature)17)
3780 
3786 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L8 ((VdpVideoMixerFeature)18)
3787 
3793 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L9 ((VdpVideoMixerFeature)19)
3794 
3807 typedef uint32_t VdpVideoMixerParameter;
3808 
3821 #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH ((VdpVideoMixerParameter)0)
3822 
3834 #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT ((VdpVideoMixerParameter)1)
3835 
3848 #define VDP_VIDEO_MIXER_PARAMETER_CHROMA_TYPE ((VdpVideoMixerParameter)2)
3849 
3867 #define VDP_VIDEO_MIXER_PARAMETER_LAYERS ((VdpVideoMixerParameter)3)
3868 
3881 typedef uint32_t VdpVideoMixerAttribute;
3882 
3896 #define VDP_VIDEO_MIXER_ATTRIBUTE_BACKGROUND_COLOR ((VdpVideoMixerAttribute)0)
3897 
3924 #define VDP_VIDEO_MIXER_ATTRIBUTE_CSC_MATRIX ((VdpVideoMixerAttribute)1)
3925 
3937 #define VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL ((VdpVideoMixerAttribute)2)
3938 
3953 #define VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL ((VdpVideoMixerAttribute)3)
3954 
3965 #define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MIN_LUMA ((VdpVideoMixerAttribute)4)
3966 
3977 #define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MAX_LUMA ((VdpVideoMixerAttribute)5)
3978 
3992 #define VDP_VIDEO_MIXER_ATTRIBUTE_SKIP_CHROMA_DEINTERLACE ((VdpVideoMixerAttribute)6)
3993 
4004  VdpDevice device,
4005  VdpVideoMixerFeature feature,
4006  /* output parameters follow */
4007  VdpBool * is_supported
4008 );
4009 
4021  VdpDevice device,
4022  VdpVideoMixerParameter parameter,
4023  /* output parameters follow */
4024  VdpBool * is_supported
4025 );
4026 
4037  VdpDevice device,
4038  VdpVideoMixerAttribute attribute,
4039  /* output parameters follow */
4040  VdpBool * is_supported
4041 );
4042 
4054  VdpDevice device,
4055  VdpVideoMixerParameter parameter,
4056  /* output parameters follow */
4057  void * min_value,
4058  void * max_value
4059 );
4060 
4072  VdpDevice device,
4073  VdpVideoMixerAttribute attribute,
4074  /* output parameters follow */
4075  void * min_value,
4076  void * max_value
4077 );
4078 
4082 typedef uint32_t VdpVideoMixer;
4083 
4105  VdpDevice device,
4106  // The set of features to request
4107  uint32_t feature_count,
4108  VdpVideoMixerFeature const * features,
4109  // The parameters used during creation
4110  uint32_t parameter_count,
4111  VdpVideoMixerParameter const * parameters,
4112  void const * const * parameter_values,
4113  /* output parameters follow */
4114  VdpVideoMixer * mixer
4115 );
4116 
4128  VdpVideoMixer mixer,
4129  uint32_t feature_count,
4130  VdpVideoMixerFeature const * features,
4131  VdpBool const * feature_enables
4132 );
4133 
4147  VdpVideoMixer mixer,
4148  uint32_t attribute_count,
4149  VdpVideoMixerAttribute const * attributes,
4150  void const * const * attribute_values
4151 );
4152 
4165  VdpVideoMixer mixer,
4166  uint32_t feature_count,
4167  VdpVideoMixerFeature const * features,
4168  /* output parameters follow */
4169  VdpBool * feature_supports
4170 );
4171 
4182  VdpVideoMixer mixer,
4183  uint32_t feature_count,
4184  VdpVideoMixerFeature const * features,
4185  /* output parameters follow */
4186  VdpBool * feature_enables
4187 );
4188 
4202  VdpVideoMixer mixer,
4203  uint32_t parameter_count,
4204  VdpVideoMixerParameter const * parameters,
4205  /* output parameters follow */
4206  void * const * parameter_values
4207 );
4208 
4222  VdpVideoMixer mixer,
4223  uint32_t attribute_count,
4224  VdpVideoMixerAttribute const * attributes,
4225  /* output parameters follow */
4226  void * const * attribute_values
4227 );
4228 
4235  VdpVideoMixer mixer
4236 );
4237 
4243 typedef enum {
4258 
4259 #define VDP_LAYER_VERSION 0
4260 
4265 typedef struct {
4269  uint32_t struct_version;
4273  VdpOutputSurface source_surface;
4288 } VdpLayer;
4289 
4357  VdpVideoMixer mixer,
4358  VdpOutputSurface background_surface,
4359  VdpRect const * background_source_rect,
4360  VdpVideoMixerPictureStructure current_picture_structure,
4361  uint32_t video_surface_past_count,
4362  VdpVideoSurface const * video_surface_past,
4363  VdpVideoSurface video_surface_current,
4364  uint32_t video_surface_future_count,
4365  VdpVideoSurface const * video_surface_future,
4366  VdpRect const * video_source_rect,
4367  VdpOutputSurface destination_surface,
4368  VdpRect const * destination_rect,
4369  VdpRect const * destination_video_rect,
4370  uint32_t layer_count,
4371  VdpLayer const * layers
4372 );
4373 
4424 typedef uint64_t VdpTime;
4425 
4435 
4442  VdpPresentationQueueTarget presentation_queue_target
4443 );
4444 
4449 typedef uint32_t VdpPresentationQueue;
4450 
4463  VdpDevice device,
4464  VdpPresentationQueueTarget presentation_queue_target,
4465  /* output parameters follow */
4466  VdpPresentationQueue * presentation_queue
4467 );
4468 
4475  VdpPresentationQueue presentation_queue
4476 );
4477 
4488  VdpPresentationQueue presentation_queue,
4489  VdpColor * const background_color
4490 );
4491 
4498  VdpPresentationQueue presentation_queue,
4499  VdpColor * background_color
4500 );
4501 
4510  VdpPresentationQueue presentation_queue,
4511  /* output parameters follow */
4512  VdpTime * current_time
4513 );
4514 
4556  VdpPresentationQueue presentation_queue,
4557  VdpOutputSurface surface,
4558  uint32_t clip_width,
4559  uint32_t clip_height,
4560  VdpTime earliest_presentation_time
4561 );
4562 
4579  VdpPresentationQueue presentation_queue,
4580  VdpOutputSurface surface,
4581  /* output parameters follow */
4582  VdpTime * first_presentation_time
4583 );
4584 
4589 typedef enum {
4597 
4610  VdpPresentationQueue presentation_queue,
4611  VdpOutputSurface surface,
4612  /* output parameters follow */
4613  VdpPresentationQueueStatus * status,
4614  VdpTime * first_presentation_time
4615 );
4616 
4672  VdpDevice device,
4673  void * context
4674 );
4675 
4687  VdpDevice device,
4688  VdpPreemptionCallback callback,
4689  void * context
4690 );
4691 
4709 typedef uint32_t VdpFuncId;
4710 
4712 #define VDP_FUNC_ID_GET_ERROR_STRING ((VdpFuncId)0)
4713 
4714 #define VDP_FUNC_ID_GET_PROC_ADDRESS ((VdpFuncId)1)
4715 
4716 #define VDP_FUNC_ID_GET_API_VERSION ((VdpFuncId)2)
4717 
4718 #define VDP_FUNC_ID_GET_INFORMATION_STRING ((VdpFuncId)4)
4719 
4720 #define VDP_FUNC_ID_DEVICE_DESTROY ((VdpFuncId)5)
4721 
4722 #define VDP_FUNC_ID_GENERATE_CSC_MATRIX ((VdpFuncId)6)
4723 
4724 #define VDP_FUNC_ID_VIDEO_SURFACE_QUERY_CAPABILITIES ((VdpFuncId)7)
4725 
4726 #define VDP_FUNC_ID_VIDEO_SURFACE_QUERY_GET_PUT_BITS_Y_CB_CR_CAPABILITIES ((VdpFuncId)8)
4727 
4728 #define VDP_FUNC_ID_VIDEO_SURFACE_CREATE ((VdpFuncId)9)
4729 
4730 #define VDP_FUNC_ID_VIDEO_SURFACE_DESTROY ((VdpFuncId)10)
4731 
4732 #define VDP_FUNC_ID_VIDEO_SURFACE_GET_PARAMETERS ((VdpFuncId)11)
4733 
4734 #define VDP_FUNC_ID_VIDEO_SURFACE_GET_BITS_Y_CB_CR ((VdpFuncId)12)
4735 
4736 #define VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR ((VdpFuncId)13)
4737 
4738 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_CAPABILITIES ((VdpFuncId)14)
4739 
4740 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_GET_PUT_BITS_NATIVE_CAPABILITIES ((VdpFuncId)15)
4741 
4742 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_INDEXED_CAPABILITIES ((VdpFuncId)16)
4743 
4744 #define VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_Y_CB_CR_CAPABILITIES ((VdpFuncId)17)
4745 
4746 #define VDP_FUNC_ID_OUTPUT_SURFACE_CREATE ((VdpFuncId)18)
4747 
4748 #define VDP_FUNC_ID_OUTPUT_SURFACE_DESTROY ((VdpFuncId)19)
4749 
4750 #define VDP_FUNC_ID_OUTPUT_SURFACE_GET_PARAMETERS ((VdpFuncId)20)
4751 
4752 #define VDP_FUNC_ID_OUTPUT_SURFACE_GET_BITS_NATIVE ((VdpFuncId)21)
4753 
4754 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_NATIVE ((VdpFuncId)22)
4755 
4756 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_INDEXED ((VdpFuncId)23)
4757 
4758 #define VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_Y_CB_CR ((VdpFuncId)24)
4759 
4760 #define VDP_FUNC_ID_BITMAP_SURFACE_QUERY_CAPABILITIES ((VdpFuncId)25)
4761 
4762 #define VDP_FUNC_ID_BITMAP_SURFACE_CREATE ((VdpFuncId)26)
4763 
4764 #define VDP_FUNC_ID_BITMAP_SURFACE_DESTROY ((VdpFuncId)27)
4765 
4766 #define VDP_FUNC_ID_BITMAP_SURFACE_GET_PARAMETERS ((VdpFuncId)28)
4767 
4768 #define VDP_FUNC_ID_BITMAP_SURFACE_PUT_BITS_NATIVE ((VdpFuncId)29)
4769 
4770 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE ((VdpFuncId)33)
4771 
4772 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_BITMAP_SURFACE ((VdpFuncId)34)
4773 
4774 #define VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_VIDEO_SURFACE_LUMA ((VdpFuncId)35)
4775 
4776 #define VDP_FUNC_ID_DECODER_QUERY_CAPABILITIES ((VdpFuncId)36)
4777 
4778 #define VDP_FUNC_ID_DECODER_CREATE ((VdpFuncId)37)
4779 
4780 #define VDP_FUNC_ID_DECODER_DESTROY ((VdpFuncId)38)
4781 
4782 #define VDP_FUNC_ID_DECODER_GET_PARAMETERS ((VdpFuncId)39)
4783 
4784 #define VDP_FUNC_ID_DECODER_RENDER ((VdpFuncId)40)
4785 
4786 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_FEATURE_SUPPORT ((VdpFuncId)41)
4787 
4788 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_SUPPORT ((VdpFuncId)42)
4789 
4790 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_SUPPORT ((VdpFuncId)43)
4791 
4792 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_VALUE_RANGE ((VdpFuncId)44)
4793 
4794 #define VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_VALUE_RANGE ((VdpFuncId)45)
4795 
4796 #define VDP_FUNC_ID_VIDEO_MIXER_CREATE ((VdpFuncId)46)
4797 
4798 #define VDP_FUNC_ID_VIDEO_MIXER_SET_FEATURE_ENABLES ((VdpFuncId)47)
4799 
4800 #define VDP_FUNC_ID_VIDEO_MIXER_SET_ATTRIBUTE_VALUES ((VdpFuncId)48)
4801 
4802 #define VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_SUPPORT ((VdpFuncId)49)
4803 
4804 #define VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_ENABLES ((VdpFuncId)50)
4805 
4806 #define VDP_FUNC_ID_VIDEO_MIXER_GET_PARAMETER_VALUES ((VdpFuncId)51)
4807 
4808 #define VDP_FUNC_ID_VIDEO_MIXER_GET_ATTRIBUTE_VALUES ((VdpFuncId)52)
4809 
4810 #define VDP_FUNC_ID_VIDEO_MIXER_DESTROY ((VdpFuncId)53)
4811 
4812 #define VDP_FUNC_ID_VIDEO_MIXER_RENDER ((VdpFuncId)54)
4813 
4814 #define VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_DESTROY ((VdpFuncId)55)
4815 
4816 #define VDP_FUNC_ID_PRESENTATION_QUEUE_CREATE ((VdpFuncId)56)
4817 
4818 #define VDP_FUNC_ID_PRESENTATION_QUEUE_DESTROY ((VdpFuncId)57)
4819 
4820 #define VDP_FUNC_ID_PRESENTATION_QUEUE_SET_BACKGROUND_COLOR ((VdpFuncId)58)
4821 
4822 #define VDP_FUNC_ID_PRESENTATION_QUEUE_GET_BACKGROUND_COLOR ((VdpFuncId)59)
4823 
4824 #define VDP_FUNC_ID_PRESENTATION_QUEUE_GET_TIME ((VdpFuncId)62)
4825 
4826 #define VDP_FUNC_ID_PRESENTATION_QUEUE_DISPLAY ((VdpFuncId)63)
4827 
4828 #define VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE ((VdpFuncId)64)
4829 
4830 #define VDP_FUNC_ID_PRESENTATION_QUEUE_QUERY_SURFACE_STATUS ((VdpFuncId)65)
4831 
4832 #define VDP_FUNC_ID_PREEMPTION_CALLBACK_REGISTER ((VdpFuncId)66)
4833 
4834 #define VDP_FUNC_ID_DECODER_QUERY_CAPABILITY ((VdpFuncId)67)
4835 
4836 #define VDP_FUNC_ID_BASE_WINSYS 0x1000
4837 
4848  VdpDevice device,
4849  VdpFuncId function_id,
4850  /* output parameters follow */
4851  void * * function_pointer
4852 );
4853 
4856 
4864 #ifdef __cplusplus
4865 }
4866 #endif
4867 
4868 #endif
4869