diff mbox

[FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD GPUs based on AMF SDK

Message ID b7de327b-c34b-4299-80a5-8253803bb79e@mmironov-dev.local
State Superseded
Headers show

Commit Message

mmironov Nov. 5, 2017, 3:49 a.m. UTC
From fc6a3f63eb9c3734f4101cee2a2f5707e063ab62 Mon Sep 17 00:00:00 2001
From: mmironov <mikhail.mironov@amd.com>
Date: Fri, 27 Oct 2017 13:03:15 -0400
Subject: [PATCH] Added: HW accelerated H.264 and HEVC encoding for AMD GPUs
 based on AMF SDK

Signed-off-by: mmironov <mikhail.mironov@amd.com>
---
 Changelog                |    3 +-
 compat/amd/amfsdkenc.h   | 1753 ++++++++++++++++++++++++++++++++++++++++++++++
 configure                |   25 +
 libavcodec/Makefile      |    4 +
 libavcodec/allcodecs.c   |    2 +
 libavcodec/amfenc.c      |  515 ++++++++++++++
 libavcodec/amfenc.h      |  137 ++++
 libavcodec/amfenc_h264.c |  366 ++++++++++
 libavcodec/amfenc_hevc.c |  294 ++++++++
 libavcodec/version.h     |    4 +-
 10 files changed, 3100 insertions(+), 3 deletions(-)
 create mode 100644 compat/amd/amfsdkenc.h
 create mode 100644 libavcodec/amfenc.c
 create mode 100644 libavcodec/amfenc.h
 create mode 100644 libavcodec/amfenc_h264.c
 create mode 100644 libavcodec/amfenc_hevc.c

Comments

Michael Niedermayer Nov. 6, 2017, 10:46 p.m. UTC | #1
On Sat, Nov 04, 2017 at 10:49:44PM -0500, Mikhail Mironov wrote:
> From fc6a3f63eb9c3734f4101cee2a2f5707e063ab62 Mon Sep 17 00:00:00 2001
> From: mmironov <mikhail.mironov@amd.com>
> Date: Fri, 27 Oct 2017 13:03:15 -0400
> Subject: [PATCH] Added: HW accelerated H.264 and HEVC encoding for AMD GPUs
>  based on AMF SDK
> 
> Signed-off-by: mmironov <mikhail.mironov@amd.com>
> ---
>  Changelog                |    3 +-
>  compat/amd/amfsdkenc.h   | 1753 ++++++++++++++++++++++++++++++++++++++++++++++
>  configure                |   25 +
>  libavcodec/Makefile      |    4 +
>  libavcodec/allcodecs.c   |    2 +
>  libavcodec/amfenc.c      |  515 ++++++++++++++
>  libavcodec/amfenc.h      |  137 ++++
>  libavcodec/amfenc_h264.c |  366 ++++++++++
>  libavcodec/amfenc_hevc.c |  294 ++++++++
>  libavcodec/version.h     |    4 +-
>  10 files changed, 3100 insertions(+), 3 deletions(-)
>  create mode 100644 compat/amd/amfsdkenc.h
>  create mode 100644 libavcodec/amfenc.c
>  create mode 100644 libavcodec/amfenc.h
>  create mode 100644 libavcodec/amfenc_h264.c
>  create mode 100644 libavcodec/amfenc_hevc.c

This seems to fail building in mingw64

make
CC      libavcodec/amfenc.o
In file included from src/libavcodec/amfenc.c:22:0:
src/libavutil/hwcontext_d3d11va.h:71:5: error: unknown type name ‘ID3D11VideoDevice’
     ID3D11VideoDevice   *video_device;
     ^
src/libavutil/hwcontext_d3d11va.h:79:5: error: unknown type name ‘ID3D11VideoContext’
     ID3D11VideoContext  *video_context;
     ^
In file included from src/libavcodec/amfenc.h:24:0,
                 from src/libavcodec/amfenc.c:27:
src/compat/amd/amfsdkenc.h:191:23: error: no previous prototype for ‘AMFConstructRect’ [-Werror=missing-prototypes]
 AMF_INLINE struct AMFRect AMFConstructRect(amf_int32 left, amf_int32 top, amf_int32 right, amf_int32 bottom)
                       ^
src/compat/amd/amfsdkenc.h:203:23: error: no previous prototype for ‘AMFConstructSize’ [-Werror=missing-prototypes]
 AMF_INLINE struct AMFSize AMFConstructSize(amf_int32 width, amf_int32 height)
                       ^
src/compat/amd/amfsdkenc.h:215:24: error: no previous prototype for ‘AMFConstructPoint’ [-Werror=missing-prototypes]
 AMF_INLINE struct AMFPoint AMFConstructPoint(amf_int32 x, amf_int32 y)
                        ^
src/compat/amd/amfsdkenc.h:227:23: error: no previous prototype for ‘AMFConstructRate’ [-Werror=missing-prototypes]
 AMF_INLINE struct AMFRate AMFConstructRate(amf_uint32 num, amf_uint32 den)
                       ^
src/compat/amd/amfsdkenc.h:239:24: error: no previous prototype for ‘AMFConstructRatio’ [-Werror=missing-prototypes]
 AMF_INLINE struct AMFRatio AMFConstructRatio(amf_uint32 num, amf_uint32 den)
                        ^
In file included from src/libavcodec/amfenc.h:24:0,
                 from src/libavcodec/amfenc.c:27:
src/compat/amd/amfsdkenc.h:275:24: error: no previous prototype for ‘AMFConstructColor’ [-Werror=missing-prototypes]
 AMF_INLINE struct AMFColor AMFConstructColor(amf_uint8 r, amf_uint8 g, amf_uint8 b, amf_uint8 a)
                        ^
In file included from src/libavcodec/amfenc.h:24:0,
                 from src/libavcodec/amfenc.c:27:
src/compat/amd/amfsdkenc.h:293:45: error: no previous prototype for ‘amf_variant_alloc’ [-Werror=missing-prototypes]
     AMF_INLINE void* AMF_CDECL_CALL amf_variant_alloc(amf_size count)
                                             ^
src/compat/amd/amfsdkenc.h:297:44: error: no previous prototype for ‘amf_variant_free’ [-Werror=missing-prototypes]
     AMF_INLINE void AMF_CDECL_CALL amf_variant_free(void* ptr)
                                            ^
cc1: some warnings being treated as errors
make: *** [libavcodec/amfenc.o] Error 1


[...]
mmironov Nov. 6, 2017, 11:28 p.m. UTC | #2
> -----Original Message-----

> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf

> Of Michael Niedermayer

> Sent: November 6, 2017 5:47 PM

> To: FFmpeg development discussions and patches <ffmpeg-

> devel@ffmpeg.org>

> Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD

> GPUs based on AMF SDK

> 

> On Sat, Nov 04, 2017 at 10:49:44PM -0500, Mikhail Mironov wrote:

> > From fc6a3f63eb9c3734f4101cee2a2f5707e063ab62 Mon Sep 17 00:00:00

> 2001

> > From: mmironov <mikhail.mironov@amd.com>

> > Date: Fri, 27 Oct 2017 13:03:15 -0400

> > Subject: [PATCH] Added: HW accelerated H.264 and HEVC encoding for

> AMD

> > GPUs  based on AMF SDK

> >

> > Signed-off-by: mmironov <mikhail.mironov@amd.com>

> > ---

> >  Changelog                |    3 +-

> >  compat/amd/amfsdkenc.h   | 1753

> ++++++++++++++++++++++++++++++++++++++++++++++

> >  configure                |   25 +

> >  libavcodec/Makefile      |    4 +

> >  libavcodec/allcodecs.c   |    2 +

> >  libavcodec/amfenc.c      |  515 ++++++++++++++

> >  libavcodec/amfenc.h      |  137 ++++

> >  libavcodec/amfenc_h264.c |  366 ++++++++++  libavcodec/amfenc_hevc.c

> > |  294 ++++++++

> >  libavcodec/version.h     |    4 +-

> >  10 files changed, 3100 insertions(+), 3 deletions(-)  create mode

> > 100644 compat/amd/amfsdkenc.h  create mode 100644

> libavcodec/amfenc.c

> > create mode 100644 libavcodec/amfenc.h  create mode 100644

> > libavcodec/amfenc_h264.c  create mode 100644 libavcodec/amfenc_hevc.c

> 

> This seems to fail building in mingw64


This is strange. Just in case: my build setup is described here:
https://github.com/Xaymar/ffmpeg-amf/blob/master/Build.txt

I also attached full amfsdkenc.h header file in case I made a mistake with git integration.


> 

> make

> CC      libavcodec/amfenc.o

> In file included from src/libavcodec/amfenc.c:22:0:

> src/libavutil/hwcontext_d3d11va.h:71:5: error: unknown type name

> ‘ID3D11VideoDevice’

>      ID3D11VideoDevice   *video_device;

>      ^

> src/libavutil/hwcontext_d3d11va.h:79:5: error: unknown type name

> ‘ID3D11VideoContext’

>      ID3D11VideoContext  *video_context;

>      ^


This is declared in d3d11.h and came with mingw64. Mine version has it:
msys64new\mingw64\x86_64-w64-mingw32\include\d3d11.h  - attached.
Is it possible that we use different versions of mingw? Do you have it declared?

> In file included from src/libavcodec/amfenc.h:24:0,

>                  from src/libavcodec/amfenc.c:27:

> src/compat/amd/amfsdkenc.h:191:23: error: no previous prototype for

> ‘AMFConstructRect’ [-Werror=missing-prototypes]  AMF_INLINE struct

> AMFRect AMFConstructRect(amf_int32 left, amf_int32 top, amf_int32 right,

> amf_int32 bottom)

>                        ^


Compiled for me. Corrupted H file? I don’t have declare inline functions, don’t I?


> src/compat/amd/amfsdkenc.h:203:23: error: no previous prototype for

> ‘AMFConstructSize’ [-Werror=missing-prototypes]  AMF_INLINE struct

> AMFSize AMFConstructSize(amf_int32 width, amf_int32 height)

>                        ^

> src/compat/amd/amfsdkenc.h:215:24: error: no previous prototype for

> ‘AMFConstructPoint’ [-Werror=missing-prototypes]  AMF_INLINE struct

> AMFPoint AMFConstructPoint(amf_int32 x, amf_int32 y)

>                         ^

> src/compat/amd/amfsdkenc.h:227:23: error: no previous prototype for

> ‘AMFConstructRate’ [-Werror=missing-prototypes]  AMF_INLINE struct

> AMFRate AMFConstructRate(amf_uint32 num, amf_uint32 den)

>                        ^

> src/compat/amd/amfsdkenc.h:239:24: error: no previous prototype for

> ‘AMFConstructRatio’ [-Werror=missing-prototypes]  AMF_INLINE struct

> AMFRatio AMFConstructRatio(amf_uint32 num, amf_uint32 den)

>                         ^

> In file included from src/libavcodec/amfenc.h:24:0,

>                  from src/libavcodec/amfenc.c:27:

> src/compat/amd/amfsdkenc.h:275:24: error: no previous prototype for

> ‘AMFConstructColor’ [-Werror=missing-prototypes]  AMF_INLINE struct

> AMFColor AMFConstructColor(amf_uint8 r, amf_uint8 g, amf_uint8 b,

> amf_uint8 a)

>                         ^

> In file included from src/libavcodec/amfenc.h:24:0,

>                  from src/libavcodec/amfenc.c:27:

> src/compat/amd/amfsdkenc.h:293:45: error: no previous prototype for

> ‘amf_variant_alloc’ [-Werror=missing-prototypes]

>      AMF_INLINE void* AMF_CDECL_CALL amf_variant_alloc(amf_size count)

>                                              ^

> src/compat/amd/amfsdkenc.h:297:44: error: no previous prototype for

> ‘amf_variant_free’ [-Werror=missing-prototypes]

>      AMF_INLINE void AMF_CDECL_CALL amf_variant_free(void* ptr)

>                                             ^

> cc1: some warnings being treated as errors

> make: *** [libavcodec/amfenc.o] Error 1

> 

> 

> [...]

> --

> Michael     GnuPG fingerprint:

> 9FF2128B147EF6730BADF133611EC787040B0FAB

> 

> Those who would give up essential Liberty, to purchase a little temporary

> Safety, deserve neither Liberty nor Safety -- Benjamin Franklin


Thanks,
Mikhail
// 
// MIT license 
// 
// Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

// Reduced AMF API
//
// Full version of AMF SDK and the latest version of this file 
// can be found at https://github.com/GPUOpen-LibrariesAndSDKs/AMF

#ifndef __AMF_SDK_Enc_h__
#define __AMF_SDK_Enc_h__
#pragma once

//-----------------------------------------------------------------------------
// Platform.h
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------
// export declaration
//----------------------------------------------------------------------------------------------
#ifdef _WIN32
#if defined(AMF_CORE_STATIC)
#define AMF_CORE_LINK
#else
#if defined(AMF_CORE_EXPORTS)
#define AMF_CORE_LINK __declspec(dllexport)
#else
#define AMF_CORE_LINK __declspec(dllimport)
#endif
#endif
#else // #ifdef _WIN32
#define AMF_CORE_LINK
#endif // #ifdef _WIN32

#define AMF_MACRO_STRING2(x) #x
#define AMF_MACRO_STRING(x) AMF_MACRO_STRING2(x)

#define AMF_TODO(_todo) (__FILE__ "(" AMF_MACRO_STRING(__LINE__) "): TODO: "_todo)


#if defined(__GNUC__) || defined(__clang__)
#define AMF_ALIGN(n) __attribute__((aligned(n)))
#elif defined(_MSC_VER) || defined(__INTEL_COMPILER)
#define AMF_ALIGN(n) __declspec(align(n))
#else
#define AMF_ALIGN(n)
//     #error Need to define AMF_ALIGN
#endif

#include <stdio.h>
#include <stdint.h>

#if defined(_WIN32)


#ifndef NOMINMAX
#define NOMINMAX
#endif
#define AMF_STD_CALL            __stdcall
#define AMF_CDECL_CALL          __cdecl
#define AMF_FAST_CALL           __fastcall
#if defined(__GNUC__) || defined(__clang__)
#define AMF_INLINE              inline
#define AMF_FORCEINLINE         inline
#else
#define AMF_INLINE              __inline
#define AMF_FORCEINLINE         __forceinline
#endif
#define AMF_NO_VTABLE           __declspec(novtable)

#define AMFPRId64   "I64d"
#define LPRId64    L"I64d"

#define AMFPRIud64   "Iu64d"
#define LPRIud64    L"Iu64d"

#define AMFPRIx64   "I64x"
#define LPRIx64    L"I64x"

#else // !WIN32 - Linux and Mac

#define AMF_STD_CALL
#define AMF_CDECL_CALL
#define AMF_FAST_CALL
#if defined(__GNUC__) || defined(__clang__)
#define AMF_INLINE              inline
#define AMF_FORCEINLINE         inline
#else
#define AMF_INLINE              __inline__
#define AMF_FORCEINLINE         __inline__
#endif
#define AMF_NO_VTABLE           

#if !defined(AMFPRId64)
#define AMFPRId64    "lld"
#define LPRId64     L"lld"

#define AMFPRIud64    "ulld"
#define LPRIud64     L"ulld"

#define AMFPRIx64    "llx"
#define LPRIx64     L"llx"
#endif

#endif // WIN32


#if defined(_MSC_VER)
#define AMF_WEAK __declspec( selectany ) 
#elif defined (__GCC__) || defined(__clang__)//GCC or CLANG
#define AMF_WEAK __attribute__((weak))
#endif

#define amf_countof(x) (sizeof(x) / sizeof(x[0]))

//-------------------------------------------------------------------------------------------------
// basic data types
//-------------------------------------------------------------------------------------------------
typedef     int64_t             amf_int64;
typedef     int32_t             amf_int32;
typedef     int16_t             amf_int16;
typedef     int8_t              amf_int8;

typedef     uint64_t            amf_uint64;
typedef     uint32_t            amf_uint32;
typedef     uint16_t            amf_uint16;
typedef     uint8_t             amf_uint8;
typedef     size_t              amf_size;

typedef     void*               amf_handle;
typedef     double              amf_double;
typedef     float               amf_float;

typedef     void                amf_void;

#if defined(__cplusplus)
typedef     bool                amf_bool;
#else
typedef     amf_uint16          amf_bool;
#define     true                1 
#define     false               0 
#endif

typedef     long                amf_long;
typedef     int                 amf_int;
typedef     unsigned long       amf_ulong;
typedef     unsigned int        amf_uint;

typedef     amf_int64           amf_pts;     // in 100 nanosecs

#define AMF_SECOND          10000000L    // 1 second in 100 nanoseconds

#define AMF_MIN(a, b) ((a) < (b) ? (a) : (b))
#define AMF_MAX(a, b) ((a) > (b) ? (a) : (b))

#if defined(_WIN32)
#define PATH_SEPARATOR_WSTR         L"\\"
#define PATH_SEPARATOR_WCHAR        L'\\'
#elif defined(__linux) // Linux
#define PATH_SEPARATOR_WSTR          L"/"
#define PATH_SEPARATOR_WCHAR         L'/'
#endif

typedef struct AMFRect
{
    amf_int32 left;
    amf_int32 top;
    amf_int32 right;
    amf_int32 bottom;
} AMFRect;

AMF_INLINE struct AMFRect AMFConstructRect(amf_int32 left, amf_int32 top, amf_int32 right, amf_int32 bottom)
{
    struct AMFRect object = { left, top, right, bottom };
    return object;
}

typedef struct AMFSize
{
    amf_int32 width;
    amf_int32 height;
} AMFSize;

AMF_INLINE struct AMFSize AMFConstructSize(amf_int32 width, amf_int32 height)
{
    struct AMFSize object = { width, height };
    return object;
}

typedef struct AMFPoint
{
    amf_int32 x;
    amf_int32 y;
} AMFPoint;

AMF_INLINE struct AMFPoint AMFConstructPoint(amf_int32 x, amf_int32 y)
{
    struct AMFPoint object = { x, y };
    return object;
}

typedef struct AMFRate
{
    amf_uint32 num;
    amf_uint32 den;
} AMFRate;

AMF_INLINE struct AMFRate AMFConstructRate(amf_uint32 num, amf_uint32 den)
{
    struct AMFRate object = { num, den };
    return object;
}

typedef struct AMFRatio
{
    amf_uint32 num;
    amf_uint32 den;
} AMFRatio;

AMF_INLINE struct AMFRatio AMFConstructRatio(amf_uint32 num, amf_uint32 den)
{
    struct AMFRatio object = { num, den };
    return object;
}

#pragma pack(push, 1)
#if defined(_MSC_VER)
#pragma warning( push )
#endif
#if defined(WIN32)
#if defined(_MSC_VER)
#pragma warning(disable : 4200)
#pragma warning(disable : 4201)
#endif
#endif
typedef struct AMFColor
{
    union
    {
        struct
        {
            amf_uint8 r;
            amf_uint8 g;
            amf_uint8 b;
            amf_uint8 a;
        };
        amf_uint32 rgba;
    };
} AMFColor;
#if defined(_MSC_VER)
#pragma warning( pop )
#endif
#pragma pack(pop)


AMF_INLINE struct AMFColor AMFConstructColor(amf_uint8 r, amf_uint8 g, amf_uint8 b, amf_uint8 a)
{
    struct AMFColor object;
    object.r = r;
    object.g = g;
    object.b = b;
    object.a = a;
    return object;
}

#if defined(_WIN32)
#include <combaseapi.h>

#if defined(__cplusplus)
extern "C"
{
#endif
    // allocator
    AMF_INLINE void* AMF_CDECL_CALL amf_variant_alloc(amf_size count)
    {
        return CoTaskMemAlloc(count);
    }
    AMF_INLINE void AMF_CDECL_CALL amf_variant_free(void* ptr)
    {
        CoTaskMemFree(ptr);
    }
#if defined(__cplusplus)
}
#endif

#else // defined(_WIN32)
#include <stdlib.h>
#if defined(__cplusplus)
extern "C"
{
#endif
    // allocator
    AMF_INLINE void* AMF_CDECL_CALL amf_variant_alloc(amf_size count)
    {
        return malloc(count);
    }
    AMF_INLINE void AMF_CDECL_CALL amf_variant_free(void* ptr)
    {
        free(ptr);
    }
#if defined(__cplusplus)
}
#endif
#endif // defined(_WIN32)


typedef struct AMFGuid
{
    amf_uint32 data1;
    amf_uint16 data2;
    amf_uint16 data3;
    amf_uint8 data41;
    amf_uint8 data42;
    amf_uint8 data43;
    amf_uint8 data44;
    amf_uint8 data45;
    amf_uint8 data46;
    amf_uint8 data47;
    amf_uint8 data48;
} AMFGuid;

//-----------------------------------------------------------------------------
// Version.h
//-----------------------------------------------------------------------------
#define AMF_MAKE_FULL_VERSION(VERSION_MAJOR, VERSION_MINOR, VERSION_RELEASE, VERSION_BUILD_NUM)    ( ((amf_uint64)(VERSION_MAJOR) << 48ull) | ((amf_uint64)(VERSION_MINOR) << 32ull) | ((amf_uint64)(VERSION_RELEASE) << 16ull)  | (amf_uint64)(VERSION_BUILD_NUM))

#define AMF_GET_MAJOR_VERSION(x)      ((x >> 48ull) & 0xFFFF)
#define AMF_GET_MINOR_VERSION(x)      ((x >> 32ull) & 0xFFFF)
#define AMF_GET_SUBMINOR_VERSION(x)   ((x >> 16ull) & 0xFFFF)
#define AMF_GET_BUILD_VERSION(x)      ((x >>  0ull) & 0xFFFF)

#define AMF_VERSION_MAJOR       1
#define AMF_VERSION_MINOR       4
#define AMF_VERSION_RELEASE     4
#define AMF_VERSION_BUILD_NUM   0

#define AMF_FULL_VERSION AMF_MAKE_FULL_VERSION(AMF_VERSION_MAJOR, AMF_VERSION_MINOR, AMF_VERSION_RELEASE, AMF_VERSION_BUILD_NUM)

//-----------------------------------------------------------------------------
// Result.h
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------
// result codes
//----------------------------------------------------------------------------------------------

typedef enum AMF_RESULT
{
    AMF_OK                                   = 0,
    AMF_FAIL                                    ,

// common errors
    AMF_UNEXPECTED                              ,

    AMF_ACCESS_DENIED                           ,
    AMF_INVALID_ARG                             ,
    AMF_OUT_OF_RANGE                            ,

    AMF_OUT_OF_MEMORY                           ,
    AMF_INVALID_POINTER                         ,

    AMF_NO_INTERFACE                            ,
    AMF_NOT_IMPLEMENTED                         ,
    AMF_NOT_SUPPORTED                           ,
    AMF_NOT_FOUND                               ,

    AMF_ALREADY_INITIALIZED                     ,
    AMF_NOT_INITIALIZED                         ,

    AMF_INVALID_FORMAT                          ,// invalid data format

    AMF_WRONG_STATE                             ,
    AMF_FILE_NOT_OPEN                           ,// cannot open file

// device common codes
    AMF_NO_DEVICE                               ,

// device directx
    AMF_DIRECTX_FAILED                          ,
// device opencl 
    AMF_OPENCL_FAILED                           ,
// device opengl 
    AMF_GLX_FAILED                              ,//failed to use GLX
// device XV 
    AMF_XV_FAILED                               , //failed to use Xv extension
// device alsa
    AMF_ALSA_FAILED                             ,//failed to use ALSA

// component common codes

    //result codes
    AMF_EOF                                     ,
    AMF_REPEAT                                  ,
    AMF_INPUT_FULL                              ,//returned by AMFComponent::SubmitInput if input queue is full
    AMF_RESOLUTION_CHANGED                      ,//resolution changed client needs to Drain/Terminate/Init
    AMF_RESOLUTION_UPDATED                      ,//resolution changed in adaptive mode. New ROI will be set on output on newly decoded frames

    //error codes
    AMF_INVALID_DATA_TYPE                       ,//invalid data type
    AMF_INVALID_RESOLUTION                      ,//invalid resolution (width or height)
    AMF_CODEC_NOT_SUPPORTED                     ,//codec not supported
    AMF_SURFACE_FORMAT_NOT_SUPPORTED            ,//surface format not supported
    AMF_SURFACE_MUST_BE_SHARED                  ,//surface should be shared (DX11: (MiscFlags & D3D11_RESOURCE_MISC_SHARED) == 0, DX9: No shared handle found)

// component video decoder
    AMF_DECODER_NOT_PRESENT                     ,//failed to create the decoder
    AMF_DECODER_SURFACE_ALLOCATION_FAILED       ,//failed to create the surface for decoding
    AMF_DECODER_NO_FREE_SURFACES                ,

// component video encoder
    AMF_ENCODER_NOT_PRESENT                     ,//failed to create the encoder

// component video processor

// component video conveter

// component dem
    AMF_DEM_ERROR                               ,
    AMF_DEM_PROPERTY_READONLY                   ,
    AMF_DEM_REMOTE_DISPLAY_CREATE_FAILED        ,
    AMF_DEM_START_ENCODING_FAILED               ,
    AMF_DEM_QUERY_OUTPUT_FAILED                 ,

// component TAN
    AMF_TAN_CLIPPING_WAS_REQUIRED               , // Resulting data was truncated to meet output type's value limits.
    AMF_TAN_UNSUPPORTED_VERSION                 , // Not supported version requested, solely for TANCreateContext().

    AMF_NEED_MORE_INPUT                         ,//returned by AMFComponent::SubmitInput did not produce buffer
} AMF_RESULT;


//-----------------------------------------------------------------------------
// Interface.h
//-----------------------------------------------------------------------------
#define AMF_DECLARE_IID(name, _data1, _data2, _data3, _data41, _data42, _data43, _data44, _data45, _data46, _data47, _data48) \
        AMF_INLINE static const AMFGuid IID_##name(void) \
        { \
            AMFGuid uid = {_data1, _data2, _data3, _data41, _data42, _data43, _data44, _data45, _data46, _data47, _data48}; \
            return uid; \
        }
AMF_DECLARE_IID(AMFInterface, 0x9d872f34, 0x90dc, 0x4b93, 0xb6, 0xb2, 0x6c, 0xa3, 0x7c, 0x85, 0x25, 0xdb)
typedef struct AMFInterface AMFInterface;

typedef struct AMFInterfaceVtbl
{
    // AMFInterface interface
    amf_long(AMF_STD_CALL *Acquire)(AMFInterface* pThis);
    amf_long(AMF_STD_CALL *Release)(AMFInterface* pThis);
    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFInterface* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
} AMFInterfaceVtbl;

struct AMFInterface
{
    const AMFInterfaceVtbl *pVtbl;
};

//-----------------------------------------------------------------------------
// Variant.h
//-----------------------------------------------------------------------------

//----------------------------------------------------------------------------------------------
// variant types
//----------------------------------------------------------------------------------------------
typedef enum AMF_VARIANT_TYPE
{
    AMF_VARIANT_EMPTY = 0,

    AMF_VARIANT_BOOL = 1,
    AMF_VARIANT_INT64 = 2,
    AMF_VARIANT_DOUBLE = 3,

    AMF_VARIANT_RECT = 4,
    AMF_VARIANT_SIZE = 5,
    AMF_VARIANT_POINT = 6,
    AMF_VARIANT_RATE = 7,
    AMF_VARIANT_RATIO = 8,
    AMF_VARIANT_COLOR = 9,

    AMF_VARIANT_STRING = 10,  // value is char*
    AMF_VARIANT_WSTRING = 11,  // value is wchar_t*
    AMF_VARIANT_INTERFACE = 12,  // value is AMFInterface*
} AMF_VARIANT_TYPE;
//----------------------------------------------------------------------------------------------
// variant struct
//----------------------------------------------------------------------------------------------
typedef struct AMFVariantStruct
{
    AMF_VARIANT_TYPE            type;
    union
    {
        amf_bool                boolValue;
        amf_int64               int64Value;
        amf_double              doubleValue;
        char*                   stringValue;
        wchar_t*                wstringValue;
        AMFInterface*           pInterface;
        struct AMFRect          rectValue;
        struct AMFSize          sizeValue;
        struct AMFPoint         pointValue;
        struct AMFRate          rateValue;
        struct AMFRatio         ratioValue;
        struct AMFColor         colorValue;
    };
} AMFVariantStruct;

#define AMF_VARIANT_RETURN_IF_INVALID_POINTER(p) \
       { \
            if(p == NULL) \
                    { \
                 return AMF_INVALID_POINTER; \
            } \
       }

static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantInit(AMFVariantStruct* pVariant)
{
    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pVariant);
    pVariant->type = AMF_VARIANT_EMPTY;
    return AMF_OK;
}

static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantClear(AMFVariantStruct* pVariant)
{
    AMF_RESULT errRet = AMF_OK;
    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pVariant);

    switch (pVariant->type)
    {
    case AMF_VARIANT_STRING:
        amf_variant_free(pVariant->stringValue);
        pVariant->type = AMF_VARIANT_EMPTY;
        break;

    case AMF_VARIANT_WSTRING:
        amf_variant_free(pVariant->wstringValue);
        pVariant->type = AMF_VARIANT_EMPTY;
        break;

    case AMF_VARIANT_INTERFACE:
        if (pVariant->pInterface != NULL)
        {
#if defined(__cplusplus)
            pVariant->pInterface->Release();
#else
            pVariant->pInterface->pVtbl->Release(pVariant->pInterface);
#endif
            pVariant->pInterface = NULL;
        }
        pVariant->type = AMF_VARIANT_EMPTY;
        break;

    default:
        pVariant->type = AMF_VARIANT_EMPTY;
        break;
    }
    return errRet;
}
//-------------------------------------------------------------------------------------------------
static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignBool(AMFVariantStruct* pDest, amf_bool value)
{
    AMF_RESULT errRet = AMF_OK;
    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);

    errRet = AMFVariantClear(pDest);
    if (errRet == AMF_OK)
    {
        pDest->type = AMF_VARIANT_BOOL;
        pDest->boolValue = value;
    }
    return errRet;
}
//-------------------------------------------------------------------------------------------------
static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignInt64(AMFVariantStruct* pDest, amf_int64 value)
{
    AMF_RESULT errRet = AMF_OK;
    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);

    errRet = AMFVariantClear(pDest);
    if (errRet == AMF_OK)
    {
        pDest->type = AMF_VARIANT_INT64;
        pDest->int64Value = value;
    }
    return errRet;
}
//-------------------------------------------------------------------------------------------------
static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignDouble(AMFVariantStruct* pDest, amf_double value)
{
    AMF_RESULT errRet = AMF_OK;
    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);

    errRet = AMFVariantClear(pDest);
    if (errRet == AMF_OK)
    {
        pDest->type = AMF_VARIANT_DOUBLE;
        pDest->doubleValue = value;
    }
    return errRet;
}
//-------------------------------------------------------------------------------------------------
static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignSize(AMFVariantStruct* pDest, const AMFSize* value)
{
    AMF_RESULT errRet = AMF_OK;
    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);

    errRet = AMFVariantClear(pDest);
    if (errRet == AMF_OK)
    {
        pDest->type = AMF_VARIANT_SIZE;
        pDest->sizeValue = *value;
    }
    return errRet;
}
//-------------------------------------------------------------------------------------------------
static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignPoint(AMFVariantStruct* pDest, const AMFPoint* value)
{
    AMF_RESULT errRet = AMF_OK;
    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);

    errRet = AMFVariantClear(pDest);
    if (errRet == AMF_OK)
    {
        pDest->type = AMF_VARIANT_POINT;
        pDest->pointValue = *value;
    }
    return errRet;
}
//-------------------------------------------------------------------------------------------------
static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignRate(AMFVariantStruct* pDest, const AMFRate* value)
{
    AMF_RESULT errRet = AMF_OK;
    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);

    errRet = AMFVariantClear(pDest);
    if (errRet == AMF_OK)
    {
        pDest->type = AMF_VARIANT_RATE;
        pDest->rateValue = *value;
    }
    return errRet;
}
//-------------------------------------------------------------------------------------------------
static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignRatio(AMFVariantStruct* pDest, const AMFRatio* value)
{
    AMF_RESULT errRet = AMF_OK;
    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);

    errRet = AMFVariantClear(pDest);
    if (errRet == AMF_OK)
    {
        pDest->type = AMF_VARIANT_RATIO;
        pDest->ratioValue = *value;
    }
    return errRet;
}
//-------------------------------------------------------------------------------------------------
static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignColor(AMFVariantStruct* pDest, const AMFColor* value)
{
    AMF_RESULT errRet = AMF_OK;
    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);

    errRet = AMFVariantClear(pDest);
    if (errRet == AMF_OK)
    {
        pDest->type = AMF_VARIANT_COLOR;
        pDest->colorValue = *value;
    }
    return errRet;
}

//-----------------------------------------------------------------------------
// PropertyStorage.h
//-----------------------------------------------------------------------------
typedef struct AMFPropertyStorageObserver AMFPropertyStorageObserver;
typedef struct AMFPropertyStorage AMFPropertyStorage;

#define AMF_ASSIGN_PROPERTY_DATA(res, varType, pThis, name, val ) \
    { \
        AMFVariantStruct var = {0}; \
        AMFVariantAssign##varType(&var, val); \
        res = pThis->pVtbl->SetProperty(pThis, name, var ); \
    }
#define AMF_ASSIGN_PROPERTY_TYPE(res, varType, dataType , pThis, name, val )  AMF_ASSIGN_PROPERTY_DATA(res, varType, pThis, name, (dataType)val)

#define AMF_ASSIGN_PROPERTY_INT64(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_TYPE(res, Int64, amf_int64, pThis, name, val)
#define AMF_ASSIGN_PROPERTY_DOUBLE(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_TYPE(res, Double, amf_double, pThis, name, val)
#define AMF_ASSIGN_PROPERTY_BOOL(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_TYPE(res, Bool, amf_bool, pThis, name, val)
#define AMF_ASSIGN_PROPERTY_RECT(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_DATA(res, Rect, pThis, name, &val)
#define AMF_ASSIGN_PROPERTY_SIZE(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_DATA(res, Size, pThis, name, &val)
#define AMF_ASSIGN_PROPERTY_POINT(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_DATA(res, Point, pThis, name, &val)
#define AMF_ASSIGN_PROPERTY_RATE(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_DATA(res, Rate, pThis, name, &val)
#define AMF_ASSIGN_PROPERTY_RATIO(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_DATA(res, Ratio, pThis, name, &val)
#define AMF_ASSIGN_PROPERTY_COLOR(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_DATA(res, Color, pThis, name, &val)

//-----------------------------------------------------------------------------
// PropertyStorageEx.h
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------
typedef enum AMF_PROPERTY_CONTENT_ENUM
{
    AMF_PROPERTY_CONTENT_DEFAULT = 0,
    AMF_PROPERTY_CONTENT_XML,               // m_eType is AMF_VARIANT_STRING

    AMF_PROPERTY_CONTENT_FILE_OPEN_PATH,    // m_eType AMF_VARIANT_WSTRING
    AMF_PROPERTY_CONTENT_FILE_SAVE_PATH     // m_eType AMF_VARIANT_WSTRING
} AMF_PROPERTY_CONTENT_ENUM;
//----------------------------------------------------------------------------------------------
typedef enum AMF_PROPERTY_ACCESS_TYPE
{
    AMF_PROPERTY_ACCESS_PRIVATE = 0,
    AMF_PROPERTY_ACCESS_READ = 0x1,
    AMF_PROPERTY_ACCESS_WRITE = 0x2,
    AMF_PROPERTY_ACCESS_READ_WRITE = (AMF_PROPERTY_ACCESS_READ | AMF_PROPERTY_ACCESS_WRITE),
    AMF_PROPERTY_ACCESS_WRITE_RUNTIME = 0x4,
    AMF_PROPERTY_ACCESS_FULL = 0xFF,
} AMF_PROPERTY_ACCESS_TYPE;
//----------------------------------------------------------------------------------------------
typedef struct AMFEnumDescriptionEntry
{
    amf_int             value;
    const wchar_t*      name;
} AMFEnumDescriptionEntry;
//----------------------------------------------------------------------------------------------
typedef amf_uint32 AMF_PROPERTY_CONTENT_TYPE;

typedef struct AMFPropertyInfo
{
    const wchar_t*                  name;
    const wchar_t*                  desc;
    AMF_VARIANT_TYPE                type;
    AMF_PROPERTY_CONTENT_TYPE       contentType;

    AMFVariantStruct                defaultValue;
    AMFVariantStruct                minValue;
    AMFVariantStruct                maxValue;
    AMF_PROPERTY_ACCESS_TYPE        accessType;
    const AMFEnumDescriptionEntry*  pEnumDescription;
} AMFPropertyInfo;
//-----------------------------------------------------------------------------
// Data.h
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------
typedef enum AMF_DATA_TYPE
{
    AMF_DATA_BUFFER = 0,
    AMF_DATA_SURFACE = 1,
    AMF_DATA_AUDIO_BUFFER = 2,
    AMF_DATA_USER = 1000,
    // all extensions will be AMF_DATA_USER+i
} AMF_DATA_TYPE;
//----------------------------------------------------------------------------------------------
typedef enum AMF_MEMORY_TYPE
{
    AMF_MEMORY_UNKNOWN = 0,
    AMF_MEMORY_HOST = 1,
    AMF_MEMORY_DX9 = 2,
    AMF_MEMORY_DX11 = 3,
    AMF_MEMORY_OPENCL = 4,
    AMF_MEMORY_OPENGL = 5,
    AMF_MEMORY_XV = 6,
    AMF_MEMORY_GRALLOC = 7,
    AMF_MEMORY_COMPUTE_FOR_DX9 = 8,
    AMF_MEMORY_COMPUTE_FOR_DX11 = 9,
} AMF_MEMORY_TYPE;

//----------------------------------------------------------------------------------------------
typedef enum AMF_DX_VERSION
{
    AMF_DX9 = 90,
    AMF_DX9_EX = 91,
    AMF_DX11_0 = 110,
    AMF_DX11_1 = 111
} AMF_DX_VERSION;

typedef struct AMFData AMFData;
AMF_DECLARE_IID(AMFData, 0xa1159bf6, 0x9104, 0x4107, 0x8e, 0xaa, 0xc5, 0x3d, 0x5d, 0xba, 0xc5, 0x11)

typedef struct AMFDataVtbl
{
    // AMFInterface interface
    amf_long(AMF_STD_CALL *Acquire)(AMFData* pThis);
    amf_long(AMF_STD_CALL *Release)(AMFData* pThis);
    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFData* pThis, const struct AMFGuid *interfaceID, void** ppInterface);

    // AMFPropertyStorage interface
    AMF_RESULT(AMF_STD_CALL *SetProperty)(AMFData* pThis, const wchar_t* name, AMFVariantStruct value);
    AMF_RESULT(AMF_STD_CALL *GetProperty)(AMFData* pThis, const wchar_t* name, AMFVariantStruct* pValue);
    amf_bool(AMF_STD_CALL *HasProperty)(AMFData* pThis, const wchar_t* name);
    amf_size(AMF_STD_CALL *GetPropertyCount)(AMFData* pThis);
    AMF_RESULT(AMF_STD_CALL *GetPropertyAt)(AMFData* pThis, amf_size index, wchar_t* name, amf_size nameSize, AMFVariantStruct* pValue);
    AMF_RESULT(AMF_STD_CALL *Clear)(AMFData* pThis);
    AMF_RESULT(AMF_STD_CALL *AddTo)(AMFData* pThis, AMFPropertyStorage* pDest, amf_bool overwrite, amf_bool deep);
    AMF_RESULT(AMF_STD_CALL *CopyTo)(AMFData* pThis, AMFPropertyStorage* pDest, amf_bool deep);
    void                (AMF_STD_CALL *AddObserver)(AMFData* pThis, AMFPropertyStorageObserver* pObserver);
    void                (AMF_STD_CALL *RemoveObserver)(AMFData* pThis, AMFPropertyStorageObserver* pObserver);

    // AMFData interface

    AMF_MEMORY_TYPE(AMF_STD_CALL *GetMemoryType)(AMFData* pThis);

    AMF_RESULT(AMF_STD_CALL *Duplicate)(AMFData* pThis, AMF_MEMORY_TYPE type, AMFData** ppData);
    AMF_RESULT(AMF_STD_CALL *Convert)(AMFData* pThis, AMF_MEMORY_TYPE type); // optimal interop if possilble. Copy through host memory if needed
    AMF_RESULT(AMF_STD_CALL *Interop)(AMFData* pThis, AMF_MEMORY_TYPE type); // only optimal interop if possilble. No copy through host memory for GPU objects

    AMF_DATA_TYPE(AMF_STD_CALL *GetDataType)(AMFData* pThis);

    amf_bool(AMF_STD_CALL *IsReusable)(AMFData* pThis);

    void                (AMF_STD_CALL *SetPts)(AMFData* pThis, amf_pts pts);
    amf_pts(AMF_STD_CALL *GetPts)(AMFData* pThis);
    void                (AMF_STD_CALL *SetDuration)(AMFData* pThis, amf_pts duration);
    amf_pts(AMF_STD_CALL *GetDuration)(AMFData* pThis);

} AMFDataVtbl;

struct AMFData
{
    const AMFDataVtbl *pVtbl;
};
//-----------------------------------------------------------------------------
// Plane.h
//-----------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------
typedef enum AMF_PLANE_TYPE
{
    AMF_PLANE_UNKNOWN = 0,
    AMF_PLANE_PACKED = 1,             // for all packed formats: BGRA, YUY2, etc
    AMF_PLANE_Y = 2,
    AMF_PLANE_UV = 3,
    AMF_PLANE_U = 4,
    AMF_PLANE_V = 5,
} AMF_PLANE_TYPE;

//---------------------------------------------------------------------------------------------
// AMFPlane interface
//---------------------------------------------------------------------------------------------
AMF_DECLARE_IID(AMFPlane, 0xbede1aa6, 0xd8fa, 0x4625, 0x94, 0x65, 0x6c, 0x82, 0xc4, 0x37, 0x71, 0x2e)
typedef struct AMFPlane AMFPlane;
typedef struct AMFPlaneVtbl
{
    // AMFInterface interface
    amf_long(AMF_STD_CALL *Acquire)(AMFPlane* pThis);
    amf_long(AMF_STD_CALL *Release)(AMFPlane* pThis);
    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFPlane* pThis, const struct AMFGuid *interfaceID, void** ppInterface);

    // AMFPlane interface
    AMF_PLANE_TYPE(AMF_STD_CALL *GetType)(AMFPlane* pThis);
    void*               (AMF_STD_CALL *GetNative)(AMFPlane* pThis);
    amf_int32(AMF_STD_CALL *GetPixelSizeInBytes)(AMFPlane* pThis);
    amf_int32(AMF_STD_CALL *GetOffsetX)(AMFPlane* pThis);
    amf_int32(AMF_STD_CALL *GetOffsetY)(AMFPlane* pThis);
    amf_int32(AMF_STD_CALL *GetWidth)(AMFPlane* pThis);
    amf_int32(AMF_STD_CALL *GetHeight)(AMFPlane* pThis);
    amf_int32(AMF_STD_CALL *GetHPitch)(AMFPlane* pThis);
    amf_int32(AMF_STD_CALL *GetVPitch)(AMFPlane* pThis);
    amf_bool(AMF_STD_CALL *IsTiled)(AMFPlane* pThis);

} AMFPlaneVtbl;

struct AMFPlane
{
    const AMFPlaneVtbl *pVtbl;
};
//-----------------------------------------------------------------------------
// Buffer.h
//-----------------------------------------------------------------------------
#if defined(_MSC_VER)
#pragma warning( push )
#pragma warning(disable : 4263)
#pragma warning(disable : 4264)
#endif

typedef struct AMFBuffer AMFBuffer;
typedef struct AMFBufferObserver AMFBufferObserver;

AMF_DECLARE_IID(AMFBuffer, 0xb04b7248, 0xb6f0, 0x4321, 0xb6, 0x91, 0xba, 0xa4, 0x74, 0xf, 0x9f, 0xcb)

typedef struct AMFBufferVtbl
{
    // AMFInterface interface
    amf_long(AMF_STD_CALL *Acquire)(AMFBuffer* pThis);
    amf_long(AMF_STD_CALL *Release)(AMFBuffer* pThis);
    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFBuffer* pThis, const struct AMFGuid *interfaceID, void** ppInterface);

    // AMFPropertyStorage interface
    AMF_RESULT(AMF_STD_CALL *SetProperty)(AMFBuffer* pThis, const wchar_t* name, AMFVariantStruct value);
    AMF_RESULT(AMF_STD_CALL *GetProperty)(AMFBuffer* pThis, const wchar_t* name, AMFVariantStruct* pValue);
    amf_bool(AMF_STD_CALL *HasProperty)(AMFBuffer* pThis, const wchar_t* name);
    amf_size(AMF_STD_CALL *GetPropertyCount)(AMFBuffer* pThis);
    AMF_RESULT(AMF_STD_CALL *GetPropertyAt)(AMFBuffer* pThis, amf_size index, wchar_t* name, amf_size nameSize, AMFVariantStruct* pValue);
    AMF_RESULT(AMF_STD_CALL *Clear)(AMFBuffer* pThis);
    AMF_RESULT(AMF_STD_CALL *AddTo)(AMFBuffer* pThis, AMFPropertyStorage* pDest, amf_bool overwrite, amf_bool deep);
    AMF_RESULT(AMF_STD_CALL *CopyTo)(AMFBuffer* pThis, AMFPropertyStorage* pDest, amf_bool deep);
    void                (AMF_STD_CALL *AddObserver)(AMFBuffer* pThis, AMFPropertyStorageObserver* pObserver);
    void                (AMF_STD_CALL *RemoveObserver)(AMFBuffer* pThis, AMFPropertyStorageObserver* pObserver);

    // AMFData interface

    AMF_MEMORY_TYPE(AMF_STD_CALL *GetMemoryType)(AMFBuffer* pThis);

    AMF_RESULT(AMF_STD_CALL *Duplicate)(AMFBuffer* pThis, AMF_MEMORY_TYPE type, AMFData** ppData);
    AMF_RESULT(AMF_STD_CALL *Convert)(AMFBuffer* pThis, AMF_MEMORY_TYPE type); // optimal interop if possilble. Copy through host memory if needed
    AMF_RESULT(AMF_STD_CALL *Interop)(AMFBuffer* pThis, AMF_MEMORY_TYPE type); // only optimal interop if possilble. No copy through host memory for GPU objects

    AMF_DATA_TYPE(AMF_STD_CALL *GetDataType)(AMFBuffer* pThis);

    amf_bool(AMF_STD_CALL *IsReusable)(AMFBuffer* pThis);

    void                (AMF_STD_CALL *SetPts)(AMFBuffer* pThis, amf_pts pts);
    amf_pts(AMF_STD_CALL *GetPts)(AMFBuffer* pThis);
    void                (AMF_STD_CALL *SetDuration)(AMFBuffer* pThis, amf_pts duration);
    amf_pts(AMF_STD_CALL *GetDuration)(AMFBuffer* pThis);

    // AMFBuffer interface

    AMF_RESULT(AMF_STD_CALL *SetSize)(AMFBuffer* pThis, amf_size newSize);
    amf_size(AMF_STD_CALL *GetSize)(AMFBuffer* pThis);
    void*               (AMF_STD_CALL *GetNative)(AMFBuffer* pThis);

    // Observer management
    void                (AMF_STD_CALL *AddObserver_Buffer)(AMFBuffer* pThis, AMFBufferObserver* pObserver);
    void                (AMF_STD_CALL *RemoveObserver_Buffer)(AMFBuffer* pThis, AMFBufferObserver* pObserver);

} AMFBufferVtbl;

struct AMFBuffer
{
    const AMFBufferVtbl *pVtbl;
};

//-----------------------------------------------------------------------------
// AudioBuffer.h
//-----------------------------------------------------------------------------
typedef enum AMF_AUDIO_FORMAT
{
    AMFAF_UNKNOWN = -1,
    AMFAF_U8 = 0,               // amf_uint8
    AMFAF_S16 = 1,               // amf_int16
    AMFAF_S32 = 2,               // amf_int32
    AMFAF_FLT = 3,               // amf_float
    AMFAF_DBL = 4,               // amf_double

    AMFAF_U8P = 5,               // amf_uint8
    AMFAF_S16P = 6,               // amf_int16
    AMFAF_S32P = 7,               // amf_int32
    AMFAF_FLTP = 8,               // amf_float
    AMFAF_DBLP = 9,               // amf_double
    AMFAF_FIRST = AMFAF_U8,
    AMFAF_LAST = AMFAF_DBLP,
} AMF_AUDIO_FORMAT;

typedef struct AMFAudioBuffer AMFAudioBuffer;
typedef struct AMFAudioBufferObserver AMFAudioBufferObserver;
//-----------------------------------------------------------------------------
// Surface.h
//-----------------------------------------------------------------------------

typedef enum AMF_SURFACE_FORMAT
{
    AMF_SURFACE_UNKNOWN = 0,
    AMF_SURFACE_NV12,               ///< 1 - planar Y width x height + packed UV width/2 x height/2 - 8 bit per component
    AMF_SURFACE_YV12,               ///< 2 - planar Y width x height + V width/2 x height/2 + U width/2 x height/2 - 8 bit per component
    AMF_SURFACE_BGRA,               ///< 3 - packed - 8 bit per component
    AMF_SURFACE_ARGB,               ///< 4 - packed - 8 bit per component
    AMF_SURFACE_RGBA,               ///< 5 - packed - 8 bit per component
    AMF_SURFACE_GRAY8,              ///< 6 - single component - 8 bit
    AMF_SURFACE_YUV420P,            ///< 7 - planar Y width x height + U width/2 x height/2 + V width/2 x height/2 - 8 bit per component
    AMF_SURFACE_U8V8,               ///< 8 - double component - 8 bit per component
    AMF_SURFACE_YUY2,               ///< 9 - YUY2: Byte 0=8-bit Y'0; Byte 1=8-bit Cb; Byte 2=8-bit Y'1; Byte 3=8-bit Cr
    AMF_SURFACE_P010,               ///< 10- planar Y width x height + packed UV width/2 x height/2 - 10 bit per component (16 allocated, upper 10 bits are used)
    AMF_SURFACE_RGBA_F16,           ///< 11 - packed - 16 bit per component float

    AMF_SURFACE_FIRST = AMF_SURFACE_NV12,
    AMF_SURFACE_LAST = AMF_SURFACE_RGBA_F16
} AMF_SURFACE_FORMAT;

//----------------------------------------------------------------------------------------------
// frame type
//----------------------------------------------------------------------------------------------
typedef enum AMF_FRAME_TYPE
{
    // flags
    AMF_FRAME_STEREO_FLAG = 0x10000000,
    AMF_FRAME_LEFT_FLAG = AMF_FRAME_STEREO_FLAG | 0x20000000,
    AMF_FRAME_RIGHT_FLAG = AMF_FRAME_STEREO_FLAG | 0x40000000,
    AMF_FRAME_BOTH_FLAG = AMF_FRAME_LEFT_FLAG | AMF_FRAME_RIGHT_FLAG,
    AMF_FRAME_INTERLEAVED_FLAG = 0x01000000,
    AMF_FRAME_FIELD_FLAG = 0x02000000,
    AMF_FRAME_EVEN_FLAG = 0x04000000,
    AMF_FRAME_ODD_FLAG = 0x08000000,

    // values
    AMF_FRAME_UNKNOWN = -1,
    AMF_FRAME_PROGRESSIVE = 0,

    AMF_FRAME_INTERLEAVED_EVEN_FIRST = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_EVEN_FLAG,
    AMF_FRAME_INTERLEAVED_ODD_FIRST = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_ODD_FLAG,
    AMF_FRAME_FIELD_SINGLE_EVEN = AMF_FRAME_FIELD_FLAG | AMF_FRAME_EVEN_FLAG,
    AMF_FRAME_FIELD_SINGLE_ODD = AMF_FRAME_FIELD_FLAG | AMF_FRAME_ODD_FLAG,

    AMF_FRAME_STEREO_LEFT = AMF_FRAME_LEFT_FLAG,
    AMF_FRAME_STEREO_RIGHT = AMF_FRAME_RIGHT_FLAG,
    AMF_FRAME_STEREO_BOTH = AMF_FRAME_BOTH_FLAG,

    AMF_FRAME_INTERLEAVED_EVEN_FIRST_STEREO_LEFT = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_EVEN_FLAG | AMF_FRAME_LEFT_FLAG,
    AMF_FRAME_INTERLEAVED_EVEN_FIRST_STEREO_RIGHT = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_EVEN_FLAG | AMF_FRAME_RIGHT_FLAG,
    AMF_FRAME_INTERLEAVED_EVEN_FIRST_STEREO_BOTH = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_EVEN_FLAG | AMF_FRAME_BOTH_FLAG,

    AMF_FRAME_INTERLEAVED_ODD_FIRST_STEREO_LEFT = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_ODD_FLAG | AMF_FRAME_LEFT_FLAG,
    AMF_FRAME_INTERLEAVED_ODD_FIRST_STEREO_RIGHT = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_ODD_FLAG | AMF_FRAME_RIGHT_FLAG,
    AMF_FRAME_INTERLEAVED_ODD_FIRST_STEREO_BOTH = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_ODD_FLAG | AMF_FRAME_BOTH_FLAG,
} AMF_FRAME_TYPE;

typedef struct AMFSurface AMFSurface;
typedef struct AMFSurfaceObserver AMFSurfaceObserver;

typedef struct AMFSurfaceObserverVtbl
{
    void                (AMF_STD_CALL *OnSurfaceDataRelease)(AMFSurfaceObserver* pThis, AMFSurface* pSurface);
} AMFSurfaceObserverVtbl;

struct AMFSurfaceObserver
{
    const AMFSurfaceObserverVtbl *pVtbl;
};

AMF_DECLARE_IID(AMFSurface, 0x3075dbe3, 0x8718, 0x4cfa, 0x86, 0xfb, 0x21, 0x14, 0xc0, 0xa5, 0xa4, 0x51)
typedef struct AMFSurfaceVtbl
{
    // AMFInterface interface
    amf_long(AMF_STD_CALL *Acquire)(AMFSurface* pThis);
    amf_long(AMF_STD_CALL *Release)(AMFSurface* pThis);
    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFSurface* pThis, const struct AMFGuid *interfaceID, void** ppInterface);

    // AMFPropertyStorage interface
    AMF_RESULT(AMF_STD_CALL *SetProperty)(AMFSurface* pThis, const wchar_t* name, AMFVariantStruct value);
    AMF_RESULT(AMF_STD_CALL *GetProperty)(AMFSurface* pThis, const wchar_t* name, AMFVariantStruct* pValue);
    amf_bool(AMF_STD_CALL *HasProperty)(AMFSurface* pThis, const wchar_t* name);
    amf_size(AMF_STD_CALL *GetPropertyCount)(AMFSurface* pThis);
    AMF_RESULT(AMF_STD_CALL *GetPropertyAt)(AMFSurface* pThis, amf_size index, wchar_t* name, amf_size nameSize, AMFVariantStruct* pValue);
    AMF_RESULT(AMF_STD_CALL *Clear)(AMFSurface* pThis);
    AMF_RESULT(AMF_STD_CALL *AddTo)(AMFSurface* pThis, AMFPropertyStorage* pDest, amf_bool overwrite, amf_bool deep);
    AMF_RESULT(AMF_STD_CALL *CopyTo)(AMFSurface* pThis, AMFPropertyStorage* pDest, amf_bool deep);
    void                (AMF_STD_CALL *AddObserver)(AMFSurface* pThis, AMFPropertyStorageObserver* pObserver);
    void                (AMF_STD_CALL *RemoveObserver)(AMFSurface* pThis, AMFPropertyStorageObserver* pObserver);

    // AMFData interface

    AMF_MEMORY_TYPE(AMF_STD_CALL *GetMemoryType)(AMFSurface* pThis);

    AMF_RESULT(AMF_STD_CALL *Duplicate)(AMFSurface* pThis, AMF_MEMORY_TYPE type, AMFData** ppData);
    AMF_RESULT(AMF_STD_CALL *Convert)(AMFSurface* pThis, AMF_MEMORY_TYPE type); // optimal interop if possilble. Copy through host memory if needed
    AMF_RESULT(AMF_STD_CALL *Interop)(AMFSurface* pThis, AMF_MEMORY_TYPE type); // only optimal interop if possilble. No copy through host memory for GPU objects

    AMF_DATA_TYPE(AMF_STD_CALL *GetDataType)(AMFSurface* pThis);

    amf_bool(AMF_STD_CALL *IsReusable)(AMFSurface* pThis);

    void                (AMF_STD_CALL *SetPts)(AMFSurface* pThis, amf_pts pts);
    amf_pts(AMF_STD_CALL *GetPts)(AMFSurface* pThis);
    void                (AMF_STD_CALL *SetDuration)(AMFSurface* pThis, amf_pts duration);
    amf_pts(AMF_STD_CALL *GetDuration)(AMFSurface* pThis);

    // AMFSurface interface

    AMF_SURFACE_FORMAT(AMF_STD_CALL *GetFormat)(AMFSurface* pThis);

    // do not store planes outside. should be used together with Surface
    amf_size(AMF_STD_CALL *GetPlanesCount)(AMFSurface* pThis);
    AMFPlane*           (AMF_STD_CALL *GetPlaneAt)(AMFSurface* pThis, amf_size index);
    AMFPlane*           (AMF_STD_CALL *GetPlane)(AMFSurface* pThis, AMF_PLANE_TYPE type);

    AMF_FRAME_TYPE(AMF_STD_CALL *GetFrameType)(AMFSurface* pThis);
    void                (AMF_STD_CALL *SetFrameType)(AMFSurface* pThis, AMF_FRAME_TYPE type);

    AMF_RESULT(AMF_STD_CALL *SetCrop)(AMFSurface* pThis, amf_int32 x, amf_int32 y, amf_int32 width, amf_int32 height);
    AMF_RESULT(AMF_STD_CALL *CopySurfaceRegion)(AMFSurface* pThis, AMFSurface* pDest, amf_int32 dstX, amf_int32 dstY, amf_int32 srcX, amf_int32 srcY, amf_int32 width, amf_int32 height);


    // Observer management
    void                (AMF_STD_CALL *AddObserver_Surface)(AMFSurface* pThis, AMFSurfaceObserver* pObserver);
    void                (AMF_STD_CALL *RemoveObserver_Surface)(AMFSurface* pThis, AMFSurfaceObserver* pObserver);

} AMFSurfaceVtbl;

struct AMFSurface
{
    const AMFSurfaceVtbl *pVtbl;
};

#define   AMFTextureArrayIndexGUIDDef { 0x28115527, 0xe7c3, 0x4b66,{ 0x99, 0xd3, 0x4f, 0x2a, 0xe6, 0xb4, 0x7f, 0xaf } }

//-----------------------------------------------------------------------------
// Component.h
//-----------------------------------------------------------------------------
AMF_DECLARE_IID(AMFComponent, 0x8b51e5e4, 0x455d, 0x4034, 0xa7, 0x46, 0xde, 0x1b, 0xed, 0xc3, 0xc4, 0x6)
typedef struct AMFComponent AMFComponent;
typedef struct AMFContext AMFContext;
typedef struct AMFIOCaps AMFIOCaps;
typedef struct AMFCaps AMFCaps;

typedef struct AMFDataAllocatorCB AMFDataAllocatorCB;
typedef struct AMFComponentOptimizationCallback AMFComponentOptimizationCallback;

typedef struct AMFComponentVtbl
{
    // AMFInterface interface
    amf_long(AMF_STD_CALL *Acquire)(AMFComponent* pThis);
    amf_long(AMF_STD_CALL *Release)(AMFComponent* pThis);
    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFComponent* pThis, const struct AMFGuid *interfaceID, void** ppInterface);

    // AMFPropertyStorage interface
    AMF_RESULT(AMF_STD_CALL *SetProperty)(AMFComponent* pThis, const wchar_t* name, AMFVariantStruct value);
    AMF_RESULT(AMF_STD_CALL *GetProperty)(AMFComponent* pThis, const wchar_t* name, AMFVariantStruct* pValue);
    amf_bool(AMF_STD_CALL *HasProperty)(AMFComponent* pThis, const wchar_t* name);
    amf_size(AMF_STD_CALL *GetPropertyCount)(AMFComponent* pThis);
    AMF_RESULT(AMF_STD_CALL *GetPropertyAt)(AMFComponent* pThis, amf_size index, wchar_t* name, amf_size nameSize, AMFVariantStruct* pValue);
    AMF_RESULT(AMF_STD_CALL *Clear)(AMFComponent* pThis);
    AMF_RESULT(AMF_STD_CALL *AddTo)(AMFComponent* pThis, AMFPropertyStorage* pDest, amf_bool overwrite, amf_bool deep);
    AMF_RESULT(AMF_STD_CALL *CopyTo)(AMFComponent* pThis, AMFPropertyStorage* pDest, amf_bool deep);
    void                (AMF_STD_CALL *AddObserver)(AMFComponent* pThis, AMFPropertyStorageObserver* pObserver);
    void                (AMF_STD_CALL *RemoveObserver)(AMFComponent* pThis, AMFPropertyStorageObserver* pObserver);

    // AMFPropertyStorageEx interface

    amf_size(AMF_STD_CALL *GetPropertiesInfoCount)(AMFComponent* pThis);
    AMF_RESULT(AMF_STD_CALL *GetPropertyInfoAt)(AMFComponent* pThis, amf_size index, const AMFPropertyInfo** ppInfo);
    AMF_RESULT(AMF_STD_CALL *GetPropertyInfo)(AMFComponent* pThis, const wchar_t* name, const AMFPropertyInfo** ppInfo);
    AMF_RESULT(AMF_STD_CALL *ValidateProperty)(AMFComponent* pThis, const wchar_t* name, AMFVariantStruct value, AMFVariantStruct* pOutValidated);

    // AMFComponent interface

    AMF_RESULT(AMF_STD_CALL *Init)(AMFComponent* pThis, AMF_SURFACE_FORMAT format, amf_int32 width, amf_int32 height);
    AMF_RESULT(AMF_STD_CALL *ReInit)(AMFComponent* pThis, amf_int32 width, amf_int32 height);
    AMF_RESULT(AMF_STD_CALL *Terminate)(AMFComponent* pThis);
    AMF_RESULT(AMF_STD_CALL *Drain)(AMFComponent* pThis);
    AMF_RESULT(AMF_STD_CALL *Flush)(AMFComponent* pThis);

    AMF_RESULT(AMF_STD_CALL *SubmitInput)(AMFComponent* pThis, AMFData* pData);
    AMF_RESULT(AMF_STD_CALL *QueryOutput)(AMFComponent* pThis, AMFData** ppData);
    AMFContext* (AMF_STD_CALL *GetContext)(AMFComponent* pThis);
    AMF_RESULT(AMF_STD_CALL *SetOutputDataAllocatorCB)(AMFComponent* pThis, AMFDataAllocatorCB* callback);

    AMF_RESULT(AMF_STD_CALL *GetCaps)(AMFComponent* pThis, AMFCaps** ppCaps);
    AMF_RESULT(AMF_STD_CALL *Optimize)(AMFComponent* pThis, AMFComponentOptimizationCallback* pCallback);
} AMFComponentVtbl;

struct AMFComponent
{
    const AMFComponentVtbl *pVtbl;
};

//-----------------------------------------------------------------------------
// Context.h
//-----------------------------------------------------------------------------
typedef struct AMFCompute AMFCompute;
typedef struct AMFComputeFactory AMFComputeFactory;
typedef struct AMFComputeDevice AMFComputeDevice;
typedef struct AMFContext AMFContext;
AMF_DECLARE_IID(AMFContext, 0xa76a13f0, 0xd80e, 0x4fcc, 0xb5, 0x8, 0x65, 0xd0, 0xb5, 0x2e, 0xd9, 0xee)

typedef struct AMFContextVtbl
{
    // AMFInterface interface
    amf_long(AMF_STD_CALL *Acquire)(AMFContext* pThis);
    amf_long(AMF_STD_CALL *Release)(AMFContext* pThis);
    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFContext* pThis, const struct AMFGuid *interfaceID, void** ppInterface);

    // AMFInterface AMFPropertyStorage

    AMF_RESULT(AMF_STD_CALL *SetProperty)(AMFContext* pThis, const wchar_t* name, AMFVariantStruct value);
    AMF_RESULT(AMF_STD_CALL *GetProperty)(AMFContext* pThis, const wchar_t* name, AMFVariantStruct* pValue);
    amf_bool(AMF_STD_CALL *HasProperty)(AMFContext* pThis, const wchar_t* name);
    amf_size(AMF_STD_CALL *GetPropertyCount)(AMFContext* pThis);
    AMF_RESULT(AMF_STD_CALL *GetPropertyAt)(AMFContext* pThis, amf_size index, wchar_t* name, amf_size nameSize, AMFVariantStruct* pValue);
    AMF_RESULT(AMF_STD_CALL *Clear)(AMFContext* pThis);
    AMF_RESULT(AMF_STD_CALL *AddTo)(AMFContext* pThis, AMFPropertyStorage* pDest, amf_bool overwrite, amf_bool deep);
    AMF_RESULT(AMF_STD_CALL *CopyTo)(AMFContext* pThis, AMFPropertyStorage* pDest, amf_bool deep);
    void                (AMF_STD_CALL *AddObserver)(AMFContext* pThis, AMFPropertyStorageObserver* pObserver);
    void                (AMF_STD_CALL *RemoveObserver)(AMFContext* pThis, AMFPropertyStorageObserver* pObserver);

    // AMFContext interface

    // Cleanup
    AMF_RESULT(AMF_STD_CALL *Terminate)(AMFContext* pThis);

    // DX9
    AMF_RESULT(AMF_STD_CALL *InitDX9)(AMFContext* pThis, void* pDX9Device);
    void*               (AMF_STD_CALL *GetDX9Device)(AMFContext* pThis, AMF_DX_VERSION dxVersionRequired);
    AMF_RESULT(AMF_STD_CALL *LockDX9)(AMFContext* pThis);
    AMF_RESULT(AMF_STD_CALL *UnlockDX9)(AMFContext* pThis);
    // DX11
    AMF_RESULT(AMF_STD_CALL *InitDX11)(AMFContext* pThis, void* pDX11Device, AMF_DX_VERSION dxVersionRequired);
    void*               (AMF_STD_CALL *GetDX11Device)(AMFContext* pThis, AMF_DX_VERSION dxVersionRequired);
    AMF_RESULT(AMF_STD_CALL *LockDX11)(AMFContext* pThis);
    AMF_RESULT(AMF_STD_CALL *UnlockDX11)(AMFContext* pThis);

    // OpenCL
    AMF_RESULT(AMF_STD_CALL *InitOpenCL)(AMFContext* pThis, void* pCommandQueue);
    void*               (AMF_STD_CALL *GetOpenCLContext)(AMFContext* pThis);
    void*               (AMF_STD_CALL *GetOpenCLCommandQueue)(AMFContext* pThis);
    void*               (AMF_STD_CALL *GetOpenCLDeviceID)(AMFContext* pThis);
    AMF_RESULT(AMF_STD_CALL *GetOpenCLComputeFactory)(AMFContext* pThis, AMFComputeFactory **ppFactory); // advanced compute - multiple queries
    AMF_RESULT(AMF_STD_CALL *InitOpenCLEx)(AMFContext* pThis, AMFComputeDevice *pDevice);
    AMF_RESULT(AMF_STD_CALL *LockOpenCL)(AMFContext* pThis);
    AMF_RESULT(AMF_STD_CALL *UnlockOpenCL)(AMFContext* pThis);

    // OpenGL
    AMF_RESULT(AMF_STD_CALL *InitOpenGL)(AMFContext* pThis, amf_handle hOpenGLContext, amf_handle hWindow, amf_handle hDC);
    amf_handle(AMF_STD_CALL *GetOpenGLContext)(AMFContext* pThis);
    amf_handle(AMF_STD_CALL *GetOpenGLDrawable)(AMFContext* pThis);
    AMF_RESULT(AMF_STD_CALL *LockOpenGL)(AMFContext* pThis);
    AMF_RESULT(AMF_STD_CALL *UnlockOpenGL)(AMFContext* pThis);
    // XV - Linux
    AMF_RESULT(AMF_STD_CALL *InitXV)(AMFContext* pThis, void* pXVDevice);
    void*               (AMF_STD_CALL *GetXVDevice)(AMFContext* pThis);
    AMF_RESULT(AMF_STD_CALL *LockXV)(AMFContext* pThis);
    AMF_RESULT(AMF_STD_CALL *UnlockXV)(AMFContext* pThis);

    // Gralloc - Android
    AMF_RESULT(AMF_STD_CALL *InitGralloc)(AMFContext* pThis, void* pGrallocDevice);
    void*               (AMF_STD_CALL *GetGrallocDevice)(AMFContext* pThis);
    AMF_RESULT(AMF_STD_CALL *LockGralloc)(AMFContext* pThis);
    AMF_RESULT(AMF_STD_CALL *UnlockGralloc)(AMFContext* pThis);
    // Allocation
    AMF_RESULT(AMF_STD_CALL *AllocBuffer)(AMFContext* pThis, AMF_MEMORY_TYPE type, amf_size size, AMFBuffer** ppBuffer);
    AMF_RESULT(AMF_STD_CALL *AllocSurface)(AMFContext* pThis, AMF_MEMORY_TYPE type, AMF_SURFACE_FORMAT format, amf_int32 width, amf_int32 height, AMFSurface** ppSurface);
    AMF_RESULT(AMF_STD_CALL *AllocAudioBuffer)(AMFContext* pThis, AMF_MEMORY_TYPE type, AMF_AUDIO_FORMAT format, amf_int32 samples, amf_int32 sampleRate, amf_int32 channels,
        AMFAudioBuffer** ppAudioBuffer);

    // Wrap existing objects
    AMF_RESULT(AMF_STD_CALL *CreateBufferFromHostNative)(AMFContext* pThis, void* pHostBuffer, amf_size size, AMFBuffer** ppBuffer, AMFBufferObserver* pObserver);
    AMF_RESULT(AMF_STD_CALL *CreateSurfaceFromHostNative)(AMFContext* pThis, AMF_SURFACE_FORMAT format, amf_int32 width, amf_int32 height, amf_int32 hPitch, amf_int32 vPitch, void* pData,
        AMFSurface** ppSurface, AMFSurfaceObserver* pObserver);
    AMF_RESULT(AMF_STD_CALL *CreateSurfaceFromDX9Native)(AMFContext* pThis, void* pDX9Surface, AMFSurface** ppSurface, AMFSurfaceObserver* pObserver);
    AMF_RESULT(AMF_STD_CALL *CreateSurfaceFromDX11Native)(AMFContext* pThis, void* pDX11Surface, AMFSurface** ppSurface, AMFSurfaceObserver* pObserver);
    AMF_RESULT(AMF_STD_CALL *CreateSurfaceFromOpenGLNative)(AMFContext* pThis, AMF_SURFACE_FORMAT format, amf_handle hGLTextureID, AMFSurface** ppSurface, AMFSurfaceObserver* pObserver);
    AMF_RESULT(AMF_STD_CALL *CreateSurfaceFromGrallocNative)(AMFContext* pThis, amf_handle hGrallocSurface, AMFSurface** ppSurface, AMFSurfaceObserver* pObserver);
    AMF_RESULT(AMF_STD_CALL *CreateSurfaceFromOpenCLNative)(AMFContext* pThis, AMF_SURFACE_FORMAT format, amf_int32 width, amf_int32 height, void** pClPlanes,
        AMFSurface** ppSurface, AMFSurfaceObserver* pObserver);
    AMF_RESULT(AMF_STD_CALL *CreateBufferFromOpenCLNative)(AMFContext* pThis, void* pCLBuffer, amf_size size, AMFBuffer** ppBuffer);

    // Access to AMFCompute interface - AMF_MEMORY_OPENCL, AMF_MEMORY_COMPUTE_FOR_DX9, AMF_MEMORY_COMPUTE_FOR_DX11 are currently supported
    AMF_RESULT(AMF_STD_CALL *GetCompute)(AMFContext* pThis, AMF_MEMORY_TYPE eMemType, AMFCompute** ppCompute);

} AMFContextVtbl;

struct AMFContext
{
    const AMFContextVtbl *pVtbl;
};

//-----------------------------------------------------------------------------
// Debug.h 
//-----------------------------------------------------------------------------

typedef struct AMFDebug AMFDebug;
typedef struct AMFDebugVtbl
{
    // AMFDebug interface
    void               (AMF_STD_CALL *EnablePerformanceMonitor)(AMFDebug* pThis, amf_bool enable);
    amf_bool(AMF_STD_CALL *PerformanceMonitorEnabled)(AMFDebug* pThis);
    void               (AMF_STD_CALL *AssertsEnable)(AMFDebug* pThis, amf_bool enable);
    amf_bool(AMF_STD_CALL *AssertsEnabled)(AMFDebug* pThis);
} AMFDebugVtbl;

struct AMFDebug
{
    const AMFDebugVtbl *pVtbl;
};

//-----------------------------------------------------------------------------
// Trace.h 
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------
// trace levels
//----------------------------------------------------------------------------------------------
#define AMF_TRACE_ERROR     0
#define AMF_TRACE_WARNING   1
#define AMF_TRACE_INFO      2 // default in sdk
#define AMF_TRACE_DEBUG     3
#define AMF_TRACE_TRACE     4

#define AMF_TRACE_TEST      5
#define AMF_TRACE_NOLOG     100

//----------------------------------------------------------------------------------------------
// available trace writers
//----------------------------------------------------------------------------------------------
#define AMF_TRACE_WRITER_CONSOLE            L"Console"
#define AMF_TRACE_WRITER_DEBUG_OUTPUT       L"DebugOutput"
#define AMF_TRACE_WRITER_FILE               L"File"


typedef struct AMFTraceWriter AMFTraceWriter;

typedef struct AMFTraceWriterVtbl
{
    // AMFTraceWriter interface
    void (AMF_CDECL_CALL *Write)(AMFTraceWriter* pThis, const wchar_t* scope, const wchar_t* message);
    void (AMF_CDECL_CALL *Flush)(AMFTraceWriter* pThis);
} AMFTraceWriterVtbl;

struct AMFTraceWriter
{
    const AMFTraceWriterVtbl *pVtbl;
};
typedef struct AMFTrace AMFTrace;

typedef struct AMFTraceVtbl
{
    // AMFTrace interface
    void               (AMF_STD_CALL *TraceW)(AMFTrace* pThis, const wchar_t* src_path, amf_int32 line, amf_int32 level, const wchar_t* scope, amf_int32 countArgs, const wchar_t* format, ...);
    void               (AMF_STD_CALL *Trace)(AMFTrace* pThis, const wchar_t* src_path, amf_int32 line, amf_int32 level, const wchar_t* scope, const wchar_t* message, va_list* pArglist);

    amf_int32(AMF_STD_CALL *SetGlobalLevel)(AMFTrace* pThis, amf_int32 level);
    amf_int32(AMF_STD_CALL *GetGlobalLevel)(AMFTrace* pThis);

    amf_bool(AMF_STD_CALL *EnableWriter)(AMFTrace* pThis, const wchar_t* writerID, amf_bool enable);
    amf_bool(AMF_STD_CALL *WriterEnabled)(AMFTrace* pThis, const wchar_t* writerID);
    AMF_RESULT(AMF_STD_CALL *TraceEnableAsync)(AMFTrace* pThis, amf_bool enable);
    AMF_RESULT(AMF_STD_CALL *TraceFlush)(AMFTrace* pThis);
    AMF_RESULT(AMF_STD_CALL *SetPath)(AMFTrace* pThis, const wchar_t* path);
    AMF_RESULT(AMF_STD_CALL *GetPath)(AMFTrace* pThis, wchar_t* path, amf_size* pSize);
    amf_int32(AMF_STD_CALL *SetWriterLevel)(AMFTrace* pThis, const wchar_t* writerID, amf_int32 level);
    amf_int32(AMF_STD_CALL *GetWriterLevel)(AMFTrace* pThis, const wchar_t* writerID);
    amf_int32(AMF_STD_CALL *SetWriterLevelForScope)(AMFTrace* pThis, const wchar_t* writerID, const wchar_t* scope, amf_int32 level);
    amf_int32(AMF_STD_CALL *GetWriterLevelForScope)(AMFTrace* pThis, const wchar_t* writerID, const wchar_t* scope);

    amf_int32(AMF_STD_CALL *GetIndentation)(AMFTrace* pThis);
    void                (AMF_STD_CALL *Indent)(AMFTrace* pThis, amf_int32 addIndent);

    void                (AMF_STD_CALL *RegisterWriter)(AMFTrace* pThis, const wchar_t* writerID, AMFTraceWriter* pWriter, amf_bool enable);
    void                (AMF_STD_CALL *UnregisterWriter)(AMFTrace* pThis, const wchar_t* writerID);

    const wchar_t*      (AMF_STD_CALL *GetResultText)(AMFTrace* pThis, AMF_RESULT res);
    const wchar_t*      (AMF_STD_CALL *SurfaceGetFormatName)(AMFTrace* pThis, const AMF_SURFACE_FORMAT eSurfaceFormat);
    AMF_SURFACE_FORMAT(AMF_STD_CALL *SurfaceGetFormatByName)(AMFTrace* pThis, const wchar_t* name);

    const wchar_t* const (AMF_STD_CALL *GetMemoryTypeName)(AMFTrace* pThis, const AMF_MEMORY_TYPE memoryType);
    AMF_MEMORY_TYPE(AMF_STD_CALL *GetMemoryTypeByName)(AMFTrace* pThis, const wchar_t* name);

    const wchar_t* const (AMF_STD_CALL *GetSampleFormatName)(AMFTrace* pThis, const AMF_AUDIO_FORMAT eFormat);
    AMF_AUDIO_FORMAT(AMF_STD_CALL *GetSampleFormatByName)(AMFTrace* pThis, const wchar_t* name);
} AMFTraceVtbl;

struct AMFTrace
{
    const AMFTraceVtbl *pVtbl;
};
//-----------------------------------------------------------------------------
// Factory.h
//-----------------------------------------------------------------------------
typedef struct AMFPrograms AMFPrograms;

typedef struct AMFFactory AMFFactory;

typedef struct AMFFactoryVtbl
{
    AMF_RESULT(AMF_STD_CALL *CreateContext)(AMFFactory* pThis, AMFContext** ppContext);
    AMF_RESULT(AMF_STD_CALL *CreateComponent)(AMFFactory* pThis, AMFContext* pContext, const wchar_t* id, AMFComponent** ppComponent);
    AMF_RESULT(AMF_STD_CALL *SetCacheFolder)(AMFFactory* pThis, const wchar_t* path);
    const wchar_t*      (AMF_STD_CALL *GetCacheFolder)(AMFFactory* pThis);
    AMF_RESULT(AMF_STD_CALL *GetDebug)(AMFFactory* pThis, AMFDebug** ppDebug);
    AMF_RESULT(AMF_STD_CALL *GetTrace)(AMFFactory* pThis, AMFTrace** ppTrace);
    AMF_RESULT(AMF_STD_CALL *GetPrograms)(AMFFactory* pThis, AMFPrograms** ppPrograms);
} AMFFactoryVtbl;

struct AMFFactory
{
    const AMFFactoryVtbl *pVtbl;
};

#define AMF_INIT_FUNCTION_NAME             "AMFInit"
#define AMF_QUERY_VERSION_FUNCTION_NAME    "AMFQueryVersion"

typedef AMF_RESULT(AMF_CDECL_CALL *AMFInit_Fn)(amf_uint64 version, AMFFactory **ppFactory);
typedef AMF_RESULT(AMF_CDECL_CALL *AMFQueryVersion_Fn)(amf_uint64 *pVersion);

#if defined(_M_AMD64)
#define AMF_DLL_NAME    L"amfrt64.dll"
#define AMF_DLL_NAMEA   "amfrt64.dll"
#else
#define AMF_DLL_NAME    L"amfrt32.dll"
#define AMF_DLL_NAMEA   "amfrt32.dll"
#endif


//-----------------------------------------------------------------------------
// VideoEncoderVCE.h
//-----------------------------------------------------------------------------
#define AMFVideoEncoderVCE_AVC L"AMFVideoEncoderVCE_AVC"
#define AMFVideoEncoderVCE_SVC L"AMFVideoEncoderVCE_SVC"

enum AMF_VIDEO_ENCODER_USAGE_ENUM
{
    AMF_VIDEO_ENCODER_USAGE_TRANSCONDING = 0,
    AMF_VIDEO_ENCODER_USAGE_ULTRA_LOW_LATENCY,
    AMF_VIDEO_ENCODER_USAGE_LOW_LATENCY,
    AMF_VIDEO_ENCODER_USAGE_WEBCAM
};

enum AMF_VIDEO_ENCODER_PROFILE_ENUM
{
    AMF_VIDEO_ENCODER_PROFILE_UNKNOWN = 0,
    AMF_VIDEO_ENCODER_PROFILE_BASELINE = 66,
    AMF_VIDEO_ENCODER_PROFILE_MAIN = 77,
    AMF_VIDEO_ENCODER_PROFILE_HIGH = 100,
    AMF_VIDEO_ENCODER_PROFILE_CONSTRAINED_BASELINE = 256,
    AMF_VIDEO_ENCODER_PROFILE_CONSTRAINED_HIGH = 257,
};

enum AMF_VIDEO_ENCODER_SCANTYPE_ENUM
{
    AMF_VIDEO_ENCODER_SCANTYPE_PROGRESSIVE = 0,
    AMF_VIDEO_ENCODER_SCANTYPE_INTERLACED
};

enum AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_ENUM
{
    AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP = 0,
    AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR,
    AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR,
    AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR
};

enum AMF_VIDEO_ENCODER_QUALITY_PRESET_ENUM
{
    AMF_VIDEO_ENCODER_QUALITY_PRESET_BALANCED = 0,
    AMF_VIDEO_ENCODER_QUALITY_PRESET_SPEED,
    AMF_VIDEO_ENCODER_QUALITY_PRESET_QUALITY
};

enum AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_ENUM
{
    AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_NONE = 0,
    AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_FRAME,
    AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_TOP_FIELD,
    AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_BOTTOM_FIELD
};

enum AMF_VIDEO_ENCODER_PICTURE_TYPE_ENUM
{
    AMF_VIDEO_ENCODER_PICTURE_TYPE_NONE = 0,
    AMF_VIDEO_ENCODER_PICTURE_TYPE_SKIP,
    AMF_VIDEO_ENCODER_PICTURE_TYPE_IDR,
    AMF_VIDEO_ENCODER_PICTURE_TYPE_I,
    AMF_VIDEO_ENCODER_PICTURE_TYPE_P,
    AMF_VIDEO_ENCODER_PICTURE_TYPE_B
};

enum AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_ENUM
{
    AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_IDR,
    AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_I,
    AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_P,
    AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_B
};

enum AMF_VIDEO_ENCODER_PREENCODE_MODE_ENUM
{
    AMF_VIDEO_ENCODER_PREENCODE_DISABLED = 0,
    AMF_VIDEO_ENCODER_PREENCODE_ENABLED = 1,
};

enum AMF_VIDEO_ENCODER_CODING_ENUM
{
    AMF_VIDEO_ENCODER_UNDEFINED = 0, // BASELINE = CALV; MAIN, HIGH = CABAC
    AMF_VIDEO_ENCODER_CABAC,
    AMF_VIDEO_ENCODER_CALV,

};


// Static properties - can be set before Init()

#define AMF_VIDEO_ENCODER_FRAMESIZE                             L"FrameSize"                // AMFSize; default = 0,0; Frame size
#define AMF_VIDEO_ENCODER_FRAMERATE                             L"FrameRate"                // AMFRate; default = depends on usage; Frame Rate 

#define AMF_VIDEO_ENCODER_EXTRADATA                             L"ExtraData"                // AMFInterface* - > AMFBuffer*; SPS/PPS buffer in Annex B format - read-only
#define AMF_VIDEO_ENCODER_USAGE                                 L"Usage"                    // amf_int64(AMF_VIDEO_ENCODER_USAGE_ENUM); default = N/A; Encoder usage type. fully configures parameter set. 
#define AMF_VIDEO_ENCODER_PROFILE                               L"Profile"                  // amf_int64(AMF_VIDEO_ENCODER_PROFILE_ENUM) ; default = AMF_VIDEO_ENCODER_PROFILE_MAIN;  H264 profile
#define AMF_VIDEO_ENCODER_PROFILE_LEVEL                         L"ProfileLevel"             // amf_int64; default = 42; H264 profile level
#define AMF_VIDEO_ENCODER_MAX_LTR_FRAMES                        L"MaxOfLTRFrames"           // amf_int64; default = 0; Max number of LTR frames
#define AMF_VIDEO_ENCODER_SCANTYPE                              L"ScanType"                 // amf_int64(AMF_VIDEO_ENCODER_SCANTYPE_ENUM); default = AMF_VIDEO_ENCODER_SCANTYPE_PROGRESSIVE; indicates input stream type
#define AMF_VIDEO_ENCODER_MAX_NUM_REFRAMES                      L"MaxNumRefFrames"          // amf_int64; Maximum number of reference frames
#define AMF_VIDEO_ENCODER_ASPECT_RATIO                          L"AspectRatio"              // AMFRatio; default = 1, 1
#define AMF_VIDEO_ENCODER_FULL_RANGE_COLOR                      L"FullRangeColor"           // bool; default = false; inidicates that YUV input is (0,255) 
#define AMF_VIDEO_ENCODER_RATE_CONTROL_PREANALYSIS_ENABLE       L"RateControlPreanalysisEnable"     // amf_int64(AMF_VIDEO_ENCODER_PREENCODE_MODE_ENUM); default =  AMF_VIDEO_ENCODER_PREENCODE_DISABLED; controls Pre-analysis assisted rate control 

// Quality preset property
#define AMF_VIDEO_ENCODER_QUALITY_PRESET                        L"QualityPreset"            // amf_int64(AMF_VIDEO_ENCODER_QUALITY_PRESET_ENUM); default = depends on USAGE; Quality Preset 


// Dynamic properties - can be set at any time

// Rate control properties
#define AMF_VIDEO_ENCODER_B_PIC_DELTA_QP                        L"BPicturesDeltaQP"         // amf_int64; default = depends on USAGE; B-picture Delta
#define AMF_VIDEO_ENCODER_REF_B_PIC_DELTA_QP                    L"ReferenceBPicturesDeltaQP"// amf_int64; default = depends on USAGE; Reference B-picture Delta

#define AMF_VIDEO_ENCODER_ENFORCE_HRD                           L"EnforceHRD"               // bool; default = depends on USAGE; Enforce HRD
#define AMF_VIDEO_ENCODER_FILLER_DATA_ENABLE                    L"FillerDataEnable"         // bool; default = false; Filler Data Enable
#define AMF_VIDEO_ENCODER_ENABLE_VBAQ                           L"EnableVBAQ"               // bool; default = depends on USAGE; Enable VBAQ


#define AMF_VIDEO_ENCODER_VBV_BUFFER_SIZE                       L"VBVBufferSize"            // amf_int64; default = depends on USAGE; VBV Buffer Size in bits
#define AMF_VIDEO_ENCODER_INITIAL_VBV_BUFFER_FULLNESS           L"InitialVBVBufferFullness" // amf_int64; default =  64; Initial VBV Buffer Fullness 0=0% 64=100%

#define AMF_VIDEO_ENCODER_MAX_AU_SIZE                           L"MaxAUSize"                // amf_int64; default = 60; Max AU Size in bits

#define AMF_VIDEO_ENCODER_MIN_QP                                L"MinQP"                    // amf_int64; default = depends on USAGE; Min QP; range = 0-51
#define AMF_VIDEO_ENCODER_MAX_QP                                L"MaxQP"                    // amf_int64; default = depends on USAGE; Max QP; range = 0-51
#define AMF_VIDEO_ENCODER_QP_I                                  L"QPI"                      // amf_int64; default = 22; I-frame QP; range = 0-51
#define AMF_VIDEO_ENCODER_QP_P                                  L"QPP"                      // amf_int64; default = 22; P-frame QP; range = 0-51
#define AMF_VIDEO_ENCODER_QP_B                                  L"QPB"                      // amf_int64; default = 22; B-frame QP; range = 0-51
#define AMF_VIDEO_ENCODER_TARGET_BITRATE                        L"TargetBitrate"            // amf_int64; default = depends on USAGE; Target bit rate in bits
#define AMF_VIDEO_ENCODER_PEAK_BITRATE                          L"PeakBitrate"              // amf_int64; default = depends on USAGE; Peak bit rate in bits
#define AMF_VIDEO_ENCODER_RATE_CONTROL_SKIP_FRAME_ENABLE        L"RateControlSkipFrameEnable"   // bool; default =  depends on USAGE; Rate Control Based Frame Skip 
#define AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD                   L"RateControlMethod"        // amf_int64(AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_ENUM); default = depends on USAGE; Rate Control Method 

// Picture control properties
#define AMF_VIDEO_ENCODER_HEADER_INSERTION_SPACING              L"HeaderInsertionSpacing"   // amf_int64; default = depends on USAGE; Header Insertion Spacing; range 0-1000
#define AMF_VIDEO_ENCODER_B_PIC_PATTERN                         L"BPicturesPattern"         // amf_int64; default = 3; B-picture Pattern (number of B-Frames)
#define AMF_VIDEO_ENCODER_DE_BLOCKING_FILTER                    L"DeBlockingFilter"         // bool; default = depends on USAGE; De-blocking Filter
#define AMF_VIDEO_ENCODER_B_REFERENCE_ENABLE                    L"BReferenceEnable"         // bool; default = true; Enable Refrence to B-frames
#define AMF_VIDEO_ENCODER_IDR_PERIOD                            L"IDRPeriod"                // amf_int64; default = depends on USAGE; IDR Period in frames
#define AMF_VIDEO_ENCODER_INTRA_REFRESH_NUM_MBS_PER_SLOT        L"IntraRefreshMBsNumberPerSlot" // amf_int64; default = depends on USAGE; Intra Refresh MBs Number Per Slot in Macroblocks
#define AMF_VIDEO_ENCODER_SLICES_PER_FRAME                      L"SlicesPerFrame"           // amf_int64; default = 1; Number of slices Per Frame 
#define AMF_VIDEO_ENCODER_CABAC_ENABLE                          L"CABACEnable"              // amf_int64(AMF_VIDEO_ENCODER_CODING_ENUM) default = AMF_VIDEO_ENCODER_UNDEFINED

// Motion estimation
#define AMF_VIDEO_ENCODER_MOTION_HALF_PIXEL                     L"HalfPixel"                // bool; default= true; Half Pixel 
#define AMF_VIDEO_ENCODER_MOTION_QUARTERPIXEL                   L"QuarterPixel"             // bool; default= true; Quarter Pixel

// SVC
#define AMF_VIDEO_ENCODER_NUM_TEMPORAL_ENHANCMENT_LAYERS        L"NumOfTemporalEnhancmentLayers" // amf_int64; default = 0; range = 0, min(2, caps->GetMaxNumOfTemporalLayers()) number of temporal enhancment Layers (SVC)

// Per-submittion properties - can be set on input surface interface
#define AMF_VIDEO_ENCODER_END_OF_SEQUENCE                       L"EndOfSequence"            // bool; default = false; generate end of sequence
#define AMF_VIDEO_ENCODER_END_OF_STREAM                         L"EndOfStream"              // bool; default = false; generate end of stream
#define AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE                    L"ForcePictureType"         // amf_int64(AMF_VIDEO_ENCODER_PICTURE_TYPE_ENUM); default = AMF_VIDEO_ENCODER_PICTURE_TYPE_NONE; generate particular picture type
#define AMF_VIDEO_ENCODER_INSERT_AUD                            L"InsertAUD"                // bool; default = false; insert AUD
#define AMF_VIDEO_ENCODER_INSERT_SPS                            L"InsertSPS"                // bool; default = false; insert SPS
#define AMF_VIDEO_ENCODER_INSERT_PPS                            L"InsertPPS"                // bool; default = false; insert PPS
#define AMF_VIDEO_ENCODER_PICTURE_STRUCTURE                     L"PictureStructure"         // amf_int64(AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_ENUM); default = AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_FRAME; indicate picture type
#define AMF_VIDEO_ENCODER_MARK_CURRENT_WITH_LTR_INDEX           L"MarkCurrentWithLTRIndex"  // //amf_int64; default = N/A; Mark current frame with LTR index
#define AMF_VIDEO_ENCODER_FORCE_LTR_REFERENCE_BITFIELD          L"ForceLTRReferenceBitfield"// amf_int64; default = 0; force LTR bit-field 

// properties set by encoder on output buffer interface
#define AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE                      L"OutputDataType"           // amf_int64(AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_ENUM); default = N/A
#define AMF_VIDEO_ENCODER_OUTPUT_MARKED_LTR_INDEX               L"MarkedLTRIndex"           //amf_int64; default = -1; Marked LTR index
#define AMF_VIDEO_ENCODER_OUTPUT_REFERENCED_LTR_INDEX_BITFIELD  L"ReferencedLTRIndexBitfield" // amf_int64; default = 0; referenced LTR bit-field 


#define AMF_VIDEO_ENCODER_HDCP_COUNTER                          L"HDCPCounter"              //  const void*

// Properties for multi-instance cloud gaming
#define AMF_VIDEO_ENCODER_MAX_INSTANCES                         L"EncoderMaxInstances"      //  amf_uint32; default = 1; max number of encoder instances
#define AMF_VIDEO_ENCODER_MULTI_INSTANCE_MODE                   L"MultiInstanceMode"        //  bool; default = false;
#define AMF_VIDEO_ENCODER_CURRENT_QUEUE                         L"MultiInstanceCurrentQueue"//  amf_uin32; default = 0; 

// VCE Encoder capabilities - exposed in AMFCaps interface
#define AMF_VIDEO_ENCODER_CAP_MAX_BITRATE                       L"MaxBitrate"               // amf_int64; Maximum bit rate in bits
#define AMF_VIDEO_ENCODER_CAP_NUM_OF_STREAMS                    L"NumOfStreams"             // amf_int64; maximum number of encode streams supported 
#define AMF_VIDEO_ENCODER_CAP_MAX_PROFILE                       L"MaxProfile"               // AMF_VIDEO_ENCODER_PROFILE_ENUM
#define AMF_VIDEO_ENCODER_CAP_MAX_LEVEL                         L"MaxLevel"                 // amf_int64 maximum profile level
#define AMF_VIDEO_ENCODER_CAP_BFRAMES                           L"BFrames"                  // bool  is B-Frames supported
#define AMF_VIDEO_ENCODER_CAP_MIN_REFERENCE_FRAMES              L"MinReferenceFrames"       // amf_int64 minimum number of reference frames
#define AMF_VIDEO_ENCODER_CAP_MAX_REFERENCE_FRAMES              L"MaxReferenceFrames"       // amf_int64 maximum number of reference frames
#define AMF_VIDEO_ENCODER_CAP_MAX_TEMPORAL_LAYERS               L"MaxTemporalLayers"        // amf_int64 maximum number of temporal layers
#define AMF_VIDEO_ENCODER_CAP_FIXED_SLICE_MODE                  L"FixedSliceMode"           // bool  is fixed slice mode supported
#define AMF_VIDEO_ENCODER_CAP_NUM_OF_HW_INSTANCES               L"NumOfHwInstances"         // amf_int64 number of HW encoder instances

//-----------------------------------------------------------------------------
// VideoEncoderHEVC.h
//-----------------------------------------------------------------------------
#define AMFVideoEncoder_HEVC L"AMFVideoEncoderHW_HEVC"

enum AMF_VIDEO_ENCODER_HEVC_USAGE_ENUM
{
    AMF_VIDEO_ENCODER_HEVC_USAGE_TRANSCONDING = 0,
    AMF_VIDEO_ENCODER_HEVC_USAGE_ULTRA_LOW_LATENCY,
    AMF_VIDEO_ENCODER_HEVC_USAGE_LOW_LATENCY,
    AMF_VIDEO_ENCODER_HEVC_USAGE_WEBCAM
};

enum AMF_VIDEO_ENCODER_HEVC_PROFILE_ENUM
{
    AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN = 1
};

enum AMF_VIDEO_ENCODER_HEVC_TIER_ENUM
{
    AMF_VIDEO_ENCODER_HEVC_TIER_MAIN = 0,
    AMF_VIDEO_ENCODER_HEVC_TIER_HIGH = 1
};

enum AMF_VIDEO_ENCODER_LEVEL_ENUM
{
    AMF_LEVEL_1 = 30,
    AMF_LEVEL_2 = 60,
    AMF_LEVEL_2_1 = 63,
    AMF_LEVEL_3 = 90,
    AMF_LEVEL_3_1 = 93,
    AMF_LEVEL_4 = 120,
    AMF_LEVEL_4_1 = 123,
    AMF_LEVEL_5 = 150,
    AMF_LEVEL_5_1 = 153,
    AMF_LEVEL_5_2 = 156,
    AMF_LEVEL_6 = 180,
    AMF_LEVEL_6_1 = 183,
    AMF_LEVEL_6_2 = 186
};

enum AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_ENUM
{
    AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CONSTANT_QP = 0,
    AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR,
    AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR,
    AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CBR
};

enum AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_ENUM
{
    AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_NONE = 0,
    AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_SKIP,
    AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_IDR,
    AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_I,
    AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_P
};

enum AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE_ENUM
{
    AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE_IDR,
    AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE_I,
    AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE_P
};

enum AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_ENUM
{
    AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_QUALITY = 0,
    AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_BALANCED = 5,
    AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED = 10
};

enum AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE_ENUM
{
    AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE_NONE = 0,
    AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE_GOP_ALIGNED,
    AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE_IDR_ALIGNED
};



// Static properties - can be set before Init()
#define AMF_VIDEO_ENCODER_HEVC_FRAMESIZE                            L"HevcFrameSize"                // AMFSize; default = 0,0; Frame size

#define AMF_VIDEO_ENCODER_HEVC_USAGE                                L"HevcUsage"                    // amf_int64(AMF_VIDEO_ENCODER_HEVC_USAGE_ENUM); default = N/A; Encoder usage type. fully configures parameter set. 
#define AMF_VIDEO_ENCODER_HEVC_PROFILE                              L"HevcProfile"                  // amf_int64(AMF_VIDEO_ENCODER_HEVC_PROFILE_ENUM) ; default = AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN;
#define AMF_VIDEO_ENCODER_HEVC_TIER                                 L"HevcTier"                     // amf_int64(AMF_VIDEO_ENCODER_HEVC_TIER_ENUM) ; default = AMF_VIDEO_ENCODER_HEVC_TIER_MAIN;
#define AMF_VIDEO_ENCODER_HEVC_PROFILE_LEVEL                        L"HevcProfileLevel"             // amf_int64 (AMF_VIDEO_ENCODER_LEVEL_ENUM, default depends on HW capabilities); 
#define AMF_VIDEO_ENCODER_HEVC_MAX_LTR_FRAMES                       L"HevcMaxOfLTRFrames"           // amf_int64; default = 0; Max number of LTR frames
#define AMF_VIDEO_ENCODER_HEVC_MAX_NUM_REFRAMES                     L"HevcMaxNumRefFrames"          // amf_int64; default = 1; Maximum number of reference frames
#define AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET                       L"HevcQualityPreset"            // amf_int64(AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_ENUM); default = depends on USAGE; Quality Preset 
#define AMF_VIDEO_ENCODER_HEVC_EXTRADATA                            L"HevcExtraData"                // AMFInterface* - > AMFBuffer*; SPS/PPS buffer - read-only
#define AMF_VIDEO_ENCODER_HEVC_ASPECT_RATIO                         L"HevcAspectRatio"              // AMFRatio; default = 1, 1

// Picture control properties
#define AMF_VIDEO_ENCODER_HEVC_NUM_GOPS_PER_IDR                     L"HevcGOPSPerIDR"               // amf_int64; default = 60; The frequency to insert IDR as start of a GOP. 0 means no IDR will be inserted.
#define AMF_VIDEO_ENCODER_HEVC_GOP_SIZE                             L"HevcGOPSize"                  // amf_int64; default = 60; GOP Size, in frames
#define AMF_VIDEO_ENCODER_HEVC_DE_BLOCKING_FILTER_DISABLE           L"HevcDeBlockingFilter"         // bool; default = depends on USAGE; De-blocking Filter
#define AMF_VIDEO_ENCODER_HEVC_SLICES_PER_FRAME                     L"HevcSlicesPerFrame"           // amf_int64; default = 1; Number of slices Per Frame 
#define AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE                L"HevcHeaderInsertionMode"      // amf_int64(AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE_ENUM); default = NONE

// Rate control properties
#define AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD                  L"HevcRateControlMethod"        // amf_int64(AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_MODE_ENUM); default = depends on USAGE; Rate Control Method 
#define AMF_VIDEO_ENCODER_HEVC_FRAMERATE                            L"HevcFrameRate"                // AMFRate; default = depends on usage; Frame Rate 
#define AMF_VIDEO_ENCODER_HEVC_VBV_BUFFER_SIZE                      L"HevcVBVBufferSize"            // amf_int64; default = depends on USAGE; VBV Buffer Size in bits
#define AMF_VIDEO_ENCODER_HEVC_INITIAL_VBV_BUFFER_FULLNESS          L"HevcInitialVBVBufferFullness" // amf_int64; default =  64; Initial VBV Buffer Fullness 0=0% 64=100%
#define AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_PREANALYSIS_ENABLE      L"HevcRateControlPreAnalysisEnable"  // bool; default =  depends on USAGE; enable Pre-analysis assisted rate control 
#define AMF_VIDEO_ENCODER_HEVC_ENABLE_VBAQ                          L"HevcEnableVBAQ"               // // bool; default = depends on USAGE; Enable auto VBAQ

// Motion estimation
#define AMF_VIDEO_ENCODER_HEVC_MOTION_HALF_PIXEL                    L"HevcHalfPixel"                // bool; default= true; Half Pixel 
#define AMF_VIDEO_ENCODER_HEVC_MOTION_QUARTERPIXEL                  L"HevcQuarterPixel"             // bool; default= true; Quarter Pixel

// Dynamic properties - can be set at any time

// Rate control properties
#define AMF_VIDEO_ENCODER_HEVC_ENFORCE_HRD                          L"HevcEnforceHRD"               // bool; default = depends on USAGE; Enforce HRD
#define AMF_VIDEO_ENCODER_HEVC_FILLER_DATA_ENABLE                   L"HevcFillerDataEnable"         // bool; default = depends on USAGE; Enforce HRD
#define AMF_VIDEO_ENCODER_HEVC_TARGET_BITRATE                       L"HevcTargetBitrate"            // amf_int64; default = depends on USAGE; Target bit rate in bits
#define AMF_VIDEO_ENCODER_HEVC_PEAK_BITRATE                         L"HevcPeakBitrate"              // amf_int64; default = depends on USAGE; Peak bit rate in bits

#define AMF_VIDEO_ENCODER_HEVC_MAX_AU_SIZE                          L"HevcMaxAUSize"                // amf_int64; default = 60; Max AU Size in bits

#define AMF_VIDEO_ENCODER_HEVC_MIN_QP_I                             L"HevcMinQP_I"                  // amf_int64; default = depends on USAGE; Min QP; range = 
#define AMF_VIDEO_ENCODER_HEVC_MAX_QP_I                             L"HevcMaxQP_I"                  // amf_int64; default = depends on USAGE; Max QP; range = 
#define AMF_VIDEO_ENCODER_HEVC_MIN_QP_P                             L"HevcMinQP_P"                  // amf_int64; default = depends on USAGE; Min QP; range = 
#define AMF_VIDEO_ENCODER_HEVC_MAX_QP_P                             L"HevcMaxQP_P"                  // amf_int64; default = depends on USAGE; Max QP; range = 

#define AMF_VIDEO_ENCODER_HEVC_QP_I                                 L"HevcQP_I"                     // amf_int64; default = 26; P-frame QP; range = 0-51
#define AMF_VIDEO_ENCODER_HEVC_QP_P                                 L"HevcQP_P"                     // amf_int64; default = 26; P-frame QP; range = 0-51

#define AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_SKIP_FRAME_ENABLE       L"HevcRateControlSkipFrameEnable" // bool; default =  depends on USAGE; Rate Control Based Frame Skip 



// Per-submittion properties - can be set on input surface interface
#define AMF_VIDEO_ENCODER_HEVC_END_OF_SEQUENCE                      L"HevcEndOfSequence"            // bool; default = false; generate end of sequence
#define AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE                   L"HevcForcePictureType"         // amf_int64(AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_ENUM); default = AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_NONE; generate particular picture type
#define AMF_VIDEO_ENCODER_HEVC_INSERT_AUD                           L"HevcInsertAUD"                // bool; default = false; insert AUD
#define AMF_VIDEO_ENCODER_HEVC_INSERT_HEADER                        L"HevcInsertHeader"             // bool; default = false; insert header(SPS, PPS, VPS)

#define AMF_VIDEO_ENCODER_HEVC_MARK_CURRENT_WITH_LTR_INDEX          L"HevcMarkCurrentWithLTRIndex"  // amf_int64; default = N/A; Mark current frame with LTR index
#define AMF_VIDEO_ENCODER_HEVC_FORCE_LTR_REFERENCE_BITFIELD         L"HevcForceLTRReferenceBitfield"// amf_int64; default = 0; force LTR bit-field 

// Properties set by encoder on output buffer interface
#define AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE                     L"HevcOutputDataType"           // amf_int64(AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE_ENUM); default = N/A
#define AMF_VIDEO_ENCODER_HEVC_OUTPUT_MARKED_LTR_INDEX              L"HevcMarkedLTRIndex"           // amf_int64; default = -1; Marked LTR index
#define AMF_VIDEO_ENCODER_HEVC_OUTPUT_REFERENCED_LTR_INDEX_BITFIELD L"HevcReferencedLTRIndexBitfield"// amf_int64; default = 0; referenced LTR bit-field 

// HEVC Encoder capabilities - exposed in AMFCaps interface
#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_BITRATE                      L"HevcMaxBitrate"               // amf_int64; Maximum bit rate in bits
#define AMF_VIDEO_ENCODER_HEVC_CAP_NUM_OF_STREAMS                   L"HevcNumOfStreams"             // amf_int64; maximum number of encode streams supported 
#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_PROFILE                      L"HevcMaxProfile"               // amf_int64(AMF_VIDEO_ENCODER_HEVC_PROFILE_ENUM)
#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_TIER                         L"HevcMaxTier"                  // amf_int64(AMF_VIDEO_ENCODER_HEVC_TIER_ENUM) maximum profile tier 
#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_LEVEL                        L"HevcMaxLevel"                 // amf_int64 maximum profile level
#define AMF_VIDEO_ENCODER_HEVC_CAP_MIN_REFERENCE_FRAMES             L"HevcMinReferenceFrames"       // amf_int64 minimum number of reference frames
#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_REFERENCE_FRAMES             L"HevcMaxReferenceFrames"       // amf_int64 maximum number of reference frames


//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------

#endif // __AMF_SDK_Enc_h__
/*** Autogenerated by WIDL 1.6 from direct-x/include/d3d11.idl - Do not edit ***/

#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif

#include <rpc.h>
#include <rpcndr.h>

#ifndef COM_NO_WINDOWS_H
#include <windows.h>
#include <ole2.h>
#endif

#ifndef __d3d11_h__
#define __d3d11_h__

/* Forward declarations */

#ifndef __ID3D11DeviceChild_FWD_DEFINED__
#define __ID3D11DeviceChild_FWD_DEFINED__
typedef interface ID3D11DeviceChild ID3D11DeviceChild;
#endif

#ifndef __ID3D11Asynchronous_FWD_DEFINED__
#define __ID3D11Asynchronous_FWD_DEFINED__
typedef interface ID3D11Asynchronous ID3D11Asynchronous;
#endif

#ifndef __ID3D11Query_FWD_DEFINED__
#define __ID3D11Query_FWD_DEFINED__
typedef interface ID3D11Query ID3D11Query;
#endif

#ifndef __ID3D11Resource_FWD_DEFINED__
#define __ID3D11Resource_FWD_DEFINED__
typedef interface ID3D11Resource ID3D11Resource;
#endif

#ifndef __ID3D11View_FWD_DEFINED__
#define __ID3D11View_FWD_DEFINED__
typedef interface ID3D11View ID3D11View;
#endif

#ifndef __ID3D11BlendState_FWD_DEFINED__
#define __ID3D11BlendState_FWD_DEFINED__
typedef interface ID3D11BlendState ID3D11BlendState;
#endif

#ifndef __ID3D11Buffer_FWD_DEFINED__
#define __ID3D11Buffer_FWD_DEFINED__
typedef interface ID3D11Buffer ID3D11Buffer;
#endif

#ifndef __ID3D11ClassInstance_FWD_DEFINED__
#define __ID3D11ClassInstance_FWD_DEFINED__
typedef interface ID3D11ClassInstance ID3D11ClassInstance;
#endif

#ifndef __ID3D11ClassLinkage_FWD_DEFINED__
#define __ID3D11ClassLinkage_FWD_DEFINED__
typedef interface ID3D11ClassLinkage ID3D11ClassLinkage;
#endif

#ifndef __ID3D11CommandList_FWD_DEFINED__
#define __ID3D11CommandList_FWD_DEFINED__
typedef interface ID3D11CommandList ID3D11CommandList;
#endif

#ifndef __ID3D11ComputeShader_FWD_DEFINED__
#define __ID3D11ComputeShader_FWD_DEFINED__
typedef interface ID3D11ComputeShader ID3D11ComputeShader;
#endif

#ifndef __ID3D11Counter_FWD_DEFINED__
#define __ID3D11Counter_FWD_DEFINED__
typedef interface ID3D11Counter ID3D11Counter;
#endif

#ifndef __ID3D11DepthStencilState_FWD_DEFINED__
#define __ID3D11DepthStencilState_FWD_DEFINED__
typedef interface ID3D11DepthStencilState ID3D11DepthStencilState;
#endif

#ifndef __ID3D11DepthStencilView_FWD_DEFINED__
#define __ID3D11DepthStencilView_FWD_DEFINED__
typedef interface ID3D11DepthStencilView ID3D11DepthStencilView;
#endif

#ifndef __ID3D11DomainShader_FWD_DEFINED__
#define __ID3D11DomainShader_FWD_DEFINED__
typedef interface ID3D11DomainShader ID3D11DomainShader;
#endif

#ifndef __ID3D11GeometryShader_FWD_DEFINED__
#define __ID3D11GeometryShader_FWD_DEFINED__
typedef interface ID3D11GeometryShader ID3D11GeometryShader;
#endif

#ifndef __ID3D11HullShader_FWD_DEFINED__
#define __ID3D11HullShader_FWD_DEFINED__
typedef interface ID3D11HullShader ID3D11HullShader;
#endif

#ifndef __ID3D11InputLayout_FWD_DEFINED__
#define __ID3D11InputLayout_FWD_DEFINED__
typedef interface ID3D11InputLayout ID3D11InputLayout;
#endif

#ifndef __ID3D11PixelShader_FWD_DEFINED__
#define __ID3D11PixelShader_FWD_DEFINED__
typedef interface ID3D11PixelShader ID3D11PixelShader;
#endif

#ifndef __ID3D11Predicate_FWD_DEFINED__
#define __ID3D11Predicate_FWD_DEFINED__
typedef interface ID3D11Predicate ID3D11Predicate;
#endif

#ifndef __ID3D11RasterizerState_FWD_DEFINED__
#define __ID3D11RasterizerState_FWD_DEFINED__
typedef interface ID3D11RasterizerState ID3D11RasterizerState;
#endif

#ifndef __ID3D11RenderTargetView_FWD_DEFINED__
#define __ID3D11RenderTargetView_FWD_DEFINED__
typedef interface ID3D11RenderTargetView ID3D11RenderTargetView;
#endif

#ifndef __ID3D11SamplerState_FWD_DEFINED__
#define __ID3D11SamplerState_FWD_DEFINED__
typedef interface ID3D11SamplerState ID3D11SamplerState;
#endif

#ifndef __ID3D11ShaderResourceView_FWD_DEFINED__
#define __ID3D11ShaderResourceView_FWD_DEFINED__
typedef interface ID3D11ShaderResourceView ID3D11ShaderResourceView;
#endif

#ifndef __ID3D11Texture1D_FWD_DEFINED__
#define __ID3D11Texture1D_FWD_DEFINED__
typedef interface ID3D11Texture1D ID3D11Texture1D;
#endif

#ifndef __ID3D11Texture2D_FWD_DEFINED__
#define __ID3D11Texture2D_FWD_DEFINED__
typedef interface ID3D11Texture2D ID3D11Texture2D;
#endif

#ifndef __ID3D11Texture3D_FWD_DEFINED__
#define __ID3D11Texture3D_FWD_DEFINED__
typedef interface ID3D11Texture3D ID3D11Texture3D;
#endif

#ifndef __ID3D11UnorderedAccessView_FWD_DEFINED__
#define __ID3D11UnorderedAccessView_FWD_DEFINED__
typedef interface ID3D11UnorderedAccessView ID3D11UnorderedAccessView;
#endif

#ifndef __ID3D11VertexShader_FWD_DEFINED__
#define __ID3D11VertexShader_FWD_DEFINED__
typedef interface ID3D11VertexShader ID3D11VertexShader;
#endif

#ifndef __ID3D11DeviceContext_FWD_DEFINED__
#define __ID3D11DeviceContext_FWD_DEFINED__
typedef interface ID3D11DeviceContext ID3D11DeviceContext;
#endif

#ifndef __ID3D11AuthenticatedChannel_FWD_DEFINED__
#define __ID3D11AuthenticatedChannel_FWD_DEFINED__
typedef interface ID3D11AuthenticatedChannel ID3D11AuthenticatedChannel;
#endif

#ifndef __ID3D11CryptoSession_FWD_DEFINED__
#define __ID3D11CryptoSession_FWD_DEFINED__
typedef interface ID3D11CryptoSession ID3D11CryptoSession;
#endif

#ifndef __ID3D11VideoDecoder_FWD_DEFINED__
#define __ID3D11VideoDecoder_FWD_DEFINED__
typedef interface ID3D11VideoDecoder ID3D11VideoDecoder;
#endif

#ifndef __ID3D11VideoProcessorEnumerator_FWD_DEFINED__
#define __ID3D11VideoProcessorEnumerator_FWD_DEFINED__
typedef interface ID3D11VideoProcessorEnumerator ID3D11VideoProcessorEnumerator;
#endif

#ifndef __ID3D11VideoProcessor_FWD_DEFINED__
#define __ID3D11VideoProcessor_FWD_DEFINED__
typedef interface ID3D11VideoProcessor ID3D11VideoProcessor;
#endif

#ifndef __ID3D11VideoDecoderOutputView_FWD_DEFINED__
#define __ID3D11VideoDecoderOutputView_FWD_DEFINED__
typedef interface ID3D11VideoDecoderOutputView ID3D11VideoDecoderOutputView;
#endif

#ifndef __ID3D11VideoProcessorInputView_FWD_DEFINED__
#define __ID3D11VideoProcessorInputView_FWD_DEFINED__
typedef interface ID3D11VideoProcessorInputView ID3D11VideoProcessorInputView;
#endif

#ifndef __ID3D11VideoProcessorOutputView_FWD_DEFINED__
#define __ID3D11VideoProcessorOutputView_FWD_DEFINED__
typedef interface ID3D11VideoProcessorOutputView ID3D11VideoProcessorOutputView;
#endif

#ifndef __ID3D11VideoDevice_FWD_DEFINED__
#define __ID3D11VideoDevice_FWD_DEFINED__
typedef interface ID3D11VideoDevice ID3D11VideoDevice;
#endif

#ifndef __ID3D11VideoContext_FWD_DEFINED__
#define __ID3D11VideoContext_FWD_DEFINED__
typedef interface ID3D11VideoContext ID3D11VideoContext;
#endif

#ifndef __ID3D11Device_FWD_DEFINED__
#define __ID3D11Device_FWD_DEFINED__
typedef interface ID3D11Device ID3D11Device;
#endif

/* Headers for imported files */

#include <oaidl.h>
#include <ocidl.h>
#include <dxgi.h>
#include <d3dcommon.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef D3D_PRIMITIVE D3D11_PRIMITIVE;
typedef D3D_PRIMITIVE_TOPOLOGY D3D11_PRIMITIVE_TOPOLOGY;
typedef D3D_SRV_DIMENSION D3D11_SRV_DIMENSION;
typedef RECT D3D11_RECT;
#ifndef __ID3D11Device_FWD_DEFINED__
#define __ID3D11Device_FWD_DEFINED__
typedef interface ID3D11Device ID3D11Device;
#endif

#ifndef __ID3D11ClassLinkage_FWD_DEFINED__
#define __ID3D11ClassLinkage_FWD_DEFINED__
typedef interface ID3D11ClassLinkage ID3D11ClassLinkage;
#endif

#ifndef __ID3D11Resource_FWD_DEFINED__
#define __ID3D11Resource_FWD_DEFINED__
typedef interface ID3D11Resource ID3D11Resource;
#endif

#ifndef __ID3D11VideoProcessorInputView_FWD_DEFINED__
#define __ID3D11VideoProcessorInputView_FWD_DEFINED__
typedef interface ID3D11VideoProcessorInputView ID3D11VideoProcessorInputView;
#endif

#define D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT (14)

#define D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS (4)

#define D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT (32)

#define D3D11_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT (15)

#define D3D11_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT (16)

#define D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS (4)

#define D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT (15)

#define D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST (1)

#define D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS (1)

#define D3D11_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT (64)

#define D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS (4)

#define D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT (1)

#define D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST (1)

#define D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS (1)

#define D3D11_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT (32)

#define D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS (1)

#define D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT (128)

#define D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST (1)

#define D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS (1)

#define D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT (128)

#define D3D11_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS (1)

#define D3D11_COMMONSHADER_SAMPLER_REGISTER_COUNT (16)

#define D3D11_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST (1)

#define D3D11_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS (1)

#define D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT (16)

#define D3D11_COMMONSHADER_SUBROUTINE_NESTING_LIMIT (32)

#define D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENTS (4)

#define D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT (32)

#define D3D11_COMMONSHADER_TEMP_REGISTER_COUNT (4096)

#define D3D11_COMMONSHADER_TEMP_REGISTER_READS_PER_INST (3)

#define D3D11_COMMONSHADER_TEMP_REGISTER_READ_PORTS (3)

#define D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX (10)

#define D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN (-10)

#define D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE (-8)

#define D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE (7)

#define D3D11_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (256)

#define D3D11_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP (64)

#define D3D11_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (240)

#define D3D11_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP (68)

#define D3D11_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (224)

#define D3D11_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP (72)

#define D3D11_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (208)

#define D3D11_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP (76)

#define D3D11_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (192)

#define D3D11_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP (84)

#define D3D11_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (176)

#define D3D11_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP (92)

#define D3D11_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (160)

#define D3D11_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP (100)

#define D3D11_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (144)

#define D3D11_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP (112)

#define D3D11_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (128)

#define D3D11_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP (128)

#define D3D11_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (112)

#define D3D11_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP (144)

#define D3D11_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (96)

#define D3D11_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP (168)

#define D3D11_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (80)

#define D3D11_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP (204)

#define D3D11_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (64)

#define D3D11_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP (256)

#define D3D11_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (48)

#define D3D11_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP (340)

#define D3D11_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (32)

#define D3D11_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP (512)

#define D3D11_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD (16)

#define D3D11_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP (768)

#define D3D11_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION (1)

#define D3D11_CS_4_X_RAW_UAV_BYTE_ALIGNMENT (256)

#define D3D11_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP (768)

#define D3D11_CS_4_X_THREAD_GROUP_MAX_X (768)

#define D3D11_CS_4_X_THREAD_GROUP_MAX_Y (768)

#define D3D11_CS_4_X_UAV_REGISTER_COUNT (1)

#define D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION (65535)

#define D3D11_CS_TGSM_REGISTER_COUNT (8192)

#define D3D11_CS_TGSM_REGISTER_READS_PER_INST (1)

#define D3D11_CS_TGSM_RESOURCE_REGISTER_COMPONENTS (1)

#define D3D11_CS_TGSM_RESOURCE_REGISTER_READ_PORTS (1)

#define D3D11_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP (1024)

#define D3D11_CS_THREAD_GROUP_MAX_X (1024)

#define D3D11_CS_THREAD_GROUP_MAX_Y (1024)

#define D3D11_CS_THREAD_GROUP_MAX_Z (64)

#define D3D11_CS_THREAD_GROUP_MIN_X (1)

#define D3D11_CS_THREAD_GROUP_MIN_Y (1)

#define D3D11_CS_THREAD_GROUP_MIN_Z (1)

#define D3D11_CS_THREAD_LOCAL_TEMP_REGISTER_POOL (16384)

#define D3D11_DEFAULT_DEPTH_BIAS (0)

#define D3D11_DEFAULT_DEPTH_BIAS_CLAMP 0.0f
#define D3D11_DEFAULT_MAX_ANISOTROPY (16)

#define D3D11_DEFAULT_MIP_LOD_BIAS 0.0f
#define D3D11_DEFAULT_RENDER_TARGET_ARRAY_INDEX (0)

#define D3D11_DEFAULT_SAMPLE_MASK (0xffffffff)

#define D3D11_DEFAULT_SCISSOR_ENDX (0)

#define D3D11_DEFAULT_SCISSOR_ENDY (0)

#define D3D11_DEFAULT_SCISSOR_STARTX (0)

#define D3D11_DEFAULT_SCISSOR_STARTY (0)

#define D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS 0.0f
#define D3D11_DEFAULT_STENCIL_READ_MASK (0xff)

#define D3D11_DEFAULT_STENCIL_REFERENCE (0)

#define D3D11_DEFAULT_STENCIL_WRITE_MASK (0xff)

#define D3D11_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX (0)

#define D3D11_DEFAULT_VIEWPORT_HEIGHT (0)

#define D3D11_DEFAULT_VIEWPORT_MAX_DEPTH 0.0f
#define D3D11_DEFAULT_VIEWPORT_MIN_DEPTH 0.0f
#define D3D11_DEFAULT_VIEWPORT_TOPLEFTX (0)

#define D3D11_DEFAULT_VIEWPORT_TOPLEFTY (0)

#define D3D11_DEFAULT_VIEWPORT_WIDTH (0)

#define D3D11_FLOAT32_MAX         (3.402823466e+38f)
#define D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT (32)

#define D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT (8)

#define D3D11_MAX_MAXANISOTROPY (16)

#define D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT (32)

#define D3D11_VIEWPORT_BOUNDS_MAX (32767)

#define D3D11_VIEWPORT_BOUNDS_MIN (-32768)

#define D3D11_VIEWPORT_AND_SCISSORRECT_MAX_INDEX (15)

#define D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE (16)

#define D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL (0xffffffff)

#define D3D11_KEEP_UNORDERED_ACCESS_VIEWS (0xffffffff)

#define D3D11_SHADER_MAJOR_VERSION (5)

#define D3D11_SHADER_MAX_INSTANCES (65535)

#define D3D11_SHADER_MAX_INTERFACES (253)

#define D3D11_SHADER_MAX_INTERFACE_CALL_SITES (4096)

#define D3D11_SHADER_MAX_TYPES (65535)

#define D3D11_SHADER_MINOR_VERSION (0)

#define D3D11_VS_OUTPUT_REGISTER_COUNT (32)

#define D3D11_OMAC_SIZE (16)

#define D3D11_PS_CS_UAV_REGISTER_COMPONENTS (1)

#define D3D11_PS_CS_UAV_REGISTER_COUNT (8)

#define D3D11_PS_CS_UAV_REGISTER_READS_PER_INST (1)

#define D3D11_PS_CS_UAV_REGISTER_READ_PORTS (1)

#define D3D11_PS_FRONTFACING_DEFAULT_VALUE (0xffffffff)

#define D3D11_PS_FRONTFACING_FALSE_VALUE (0)

#define D3D11_PS_FRONTFACING_TRUE_VALUE (0xffffffff)

#define D3D11_PS_INPUT_REGISTER_COMPONENTS (4)

#define D3D11_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT (32)

#define D3D11_PS_INPUT_REGISTER_COUNT (32)

#define D3D11_PS_INPUT_REGISTER_READS_PER_INST (2)

#define D3D11_PS_INPUT_REGISTER_READ_PORTS (1)

#define D3D11_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT (0.0f)
#define D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS (1)

#define D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT (32)

#define D3D11_PS_OUTPUT_DEPTH_REGISTER_COUNT (1)

#define D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENTS (1)

#define D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT (32)

#define D3D11_PS_OUTPUT_MASK_REGISTER_COUNT (1)

#define D3D11_PS_OUTPUT_REGISTER_COMPONENTS (4)

#define D3D11_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT (32)

#define D3D11_PS_OUTPUT_REGISTER_COUNT (8)

#define D3D11_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT (0.5f)
#define D3D11_RAW_UAV_SRV_BYTE_ALIGNMENT (16)

#define D3D11_REQ_BLEND_OBJECT_COUNT_PER_DEVICE (4096)

#define D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP (27)

#define D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT (4096)

#define D3D11_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE (4096)

#define D3D11_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP (32)

#define D3D11_REQ_DRAW_VERTEX_COUNT_2_TO_EXP (32)

#define D3D11_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION (16384)

#define D3D11_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT (1024)

#define D3D11_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT (4096)

#define D3D11_REQ_MAXANISOTROPY (16)

#define D3D11_REQ_MIP_LEVELS (15)

#define D3D11_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES (2048)

#define D3D11_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE (4096)

#define D3D11_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH (16384)

#define D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM (128)

#define D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM (0.25f)
#define D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM (2048)

#define D3D11_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP (20)

#define D3D11_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE (4096)

#define D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION (2048)

#define D3D11_REQ_TEXTURE1D_U_DIMENSION (16384)

#define D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION (2048)

#define D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION (16384)

#define D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION (2048)

#define D3D11_REQ_TEXTURECUBE_DIMENSION (16384)

#define D3D11_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL (0)

#define D3D11_SHIFT_INSTRUCTION_PAD_VALUE (0)

#define D3D11_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT (5)

#define D3D11_SO_BUFFER_MAX_STRIDE_IN_BYTES (2048)

#define D3D11_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES (512)

#define D3D11_SO_BUFFER_SLOT_COUNT (4)

#define D3D11_SO_DDI_REGISTER_INDEX_DENOTING_GAP (0xffffffff)

#define D3D11_SO_NO_RASTERIZED_STREAM (0xffffffff)

#define D3D11_SO_OUTPUT_COMPONENT_COUNT (128)

#define D3D11_SO_STREAM_COUNT (4)

#define D3D11_SPEC_DATE_DAY (16)

#define D3D11_SPEC_DATE_MONTH (5)

#define D3D11_SPEC_DATE_YEAR (2011)

#define D3D11_SPEC_VERSION                   (1.07)
#define D3D11_SRGB_GAMMA                     (2.2f)
#define D3D11_SRGB_TO_FLOAT_DENOMINATOR_1    (12.92f)
#define D3D11_SRGB_TO_FLOAT_DENOMINATOR_2    (1.055f)
#define D3D11_SRGB_TO_FLOAT_EXPONENT         (2.4f)
#define D3D11_SRGB_TO_FLOAT_OFFSET           (0.055f)
#define D3D11_SRGB_TO_FLOAT_THRESHOLD        (0.04045f)
#define D3D11_SRGB_TO_FLOAT_TOLERANCE_IN_ULP (0.5f)
#define D3D11_STANDARD_COMPONENT_BIT_COUNT (32)

#define D3D11_STANDARD_COMPONENT_BIT_COUNT_DOUBLED (64)

#define D3D11_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE (4)

#define D3D11_STANDARD_PIXEL_COMPONENT_COUNT (128)

#define D3D11_STANDARD_PIXEL_ELEMENT_COUNT (32)

#define D3D11_STANDARD_VECTOR_SIZE (4)

#define D3D11_STANDARD_VERTEX_ELEMENT_COUNT (32)

#define D3D11_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT (64)

#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)
struct CD3D11_DEFAULT {};
extern const DECLSPEC_SELECTANY CD3D11_DEFAULT D3D11_DEFAULT;
#endif
typedef enum D3D11_BLEND {
    D3D11_BLEND_ZERO = 1,
    D3D11_BLEND_ONE = 2,
    D3D11_BLEND_SRC_COLOR = 3,
    D3D11_BLEND_INV_SRC_COLOR = 4,
    D3D11_BLEND_SRC_ALPHA = 5,
    D3D11_BLEND_INV_SRC_ALPHA = 6,
    D3D11_BLEND_DEST_ALPHA = 7,
    D3D11_BLEND_INV_DEST_ALPHA = 8,
    D3D11_BLEND_DEST_COLOR = 9,
    D3D11_BLEND_INV_DEST_COLOR = 10,
    D3D11_BLEND_SRC_ALPHA_SAT = 11,
    D3D11_BLEND_BLEND_FACTOR = 14,
    D3D11_BLEND_INV_BLEND_FACTOR = 15,
    D3D11_BLEND_SRC1_COLOR = 16,
    D3D11_BLEND_INV_SRC1_COLOR = 17,
    D3D11_BLEND_SRC1_ALPHA = 18,
    D3D11_BLEND_INV_SRC1_ALPHA = 19
} D3D11_BLEND;
typedef enum D3D11_BLEND_OP {
    D3D11_BLEND_OP_ADD = 1,
    D3D11_BLEND_OP_SUBTRACT = 2,
    D3D11_BLEND_OP_REV_SUBTRACT = 3,
    D3D11_BLEND_OP_MIN = 4,
    D3D11_BLEND_OP_MAX = 5
} D3D11_BLEND_OP;
typedef enum D3D11_VIDEO_DECODER_BUFFER_TYPE {
    D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS = 0,
    D3D11_VIDEO_DECODER_BUFFER_MACROBLOCK_CONTROL = 1,
    D3D11_VIDEO_DECODER_BUFFER_RESIDUAL_DIFFERENCE = 2,
    D3D11_VIDEO_DECODER_BUFFER_DEBLOCKING_CONTROL = 3,
    D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX = 4,
    D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL = 5,
    D3D11_VIDEO_DECODER_BUFFER_BITSTREAM = 6,
    D3D11_VIDEO_DECODER_BUFFER_MOTION_VECTOR = 7,
    D3D11_VIDEO_DECODER_BUFFER_FILM_GRAIN = 8
} D3D11_VIDEO_DECODER_BUFFER_TYPE;
typedef enum D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE {
    D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_OPAQUE = 0,
    D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_BACKGROUND = 1,
    D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_DESTINATION = 2,
    D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_SOURCE_STREAM = 3
} D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE;
typedef enum D3D11_VIDEO_PROCESSOR_OUTPUT_RATE {
    D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_NORMAL = 0,
    D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_HALF = 1,
    D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_CUSTOM = 2
} D3D11_VIDEO_PROCESSOR_OUTPUT_RATE;
typedef enum D3D11_VIDEO_PROCESSOR_STEREO_FORMAT {
    D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO = 0,
    D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_HORIZONTAL = 1,
    D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_VERTICAL = 2,
    D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE = 3,
    D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET = 4,
    D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_ROW_INTERLEAVED = 5,
    D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_COLUMN_INTERLEAVED = 6,
    D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_CHECKERBOARD = 7
} D3D11_VIDEO_PROCESSOR_STEREO_FORMAT;
typedef enum D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE {
    D3D11_VIDEO_PROCESSOR_STEREO_FLIP_NONE = 0,
    D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME0 = 1,
    D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME1 = 2
} D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE;
typedef enum D3D11_VIDEO_PROCESSOR_ROTATION {
    D3D11_VIDEO_PROCESSOR_ROTATION_IDENTITY = 0,
    D3D11_VIDEO_PROCESSOR_ROTATION_90 = 1,
    D3D11_VIDEO_PROCESSOR_ROTATION_180 = 2,
    D3D11_VIDEO_PROCESSOR_ROTATION_270 = 3
} D3D11_VIDEO_PROCESSOR_ROTATION;
typedef struct D3D11_BOX {
    UINT left;
    UINT top;
    UINT front;
    UINT right;
    UINT bottom;
    UINT back;
} D3D11_BOX;
typedef struct D3D11_BUFFER_RTV {
    __C89_NAMELESS union {
        UINT FirstElement;
        UINT ElementOffset;
    } __C89_NAMELESSUNIONNAME1;
    __C89_NAMELESS union {
        UINT NumElements;
        UINT ElementWidth;
    } __C89_NAMELESSUNIONNAME2;
} D3D11_BUFFER_RTV;
typedef struct D3D11_BUFFER_SRV {
    __C89_NAMELESS union {
        UINT FirstElement;
        UINT ElementOffset;
    } __C89_NAMELESSUNIONNAME1;
    __C89_NAMELESS union {
        UINT NumElements;
        UINT ElementWidth;
    } __C89_NAMELESSUNIONNAME2;
} D3D11_BUFFER_SRV;
typedef struct D3D11_BUFFER_UAV {
    UINT FirstElement;
    UINT NumElements;
    UINT Flags;
} D3D11_BUFFER_UAV;
typedef struct D3D11_BUFFEREX_SRV {
    UINT FirstElement;
    UINT NumElements;
    UINT Flags;
} D3D11_BUFFEREX_SRV;
typedef struct D3D11_CLASS_INSTANCE_DESC {
    UINT InstanceId;
    UINT InstanceIndex;
    UINT TypeId;
    UINT ConstantBuffer;
    UINT BaseConstantBufferOffset;
    UINT BaseTexture;
    UINT BaseSampler;
    WINBOOL Created;
} D3D11_CLASS_INSTANCE_DESC;
typedef enum D3D11_COMPARISON_FUNC {
    D3D11_COMPARISON_NEVER = 1,
    D3D11_COMPARISON_LESS = 2,
    D3D11_COMPARISON_EQUAL = 3,
    D3D11_COMPARISON_LESS_EQUAL = 4,
    D3D11_COMPARISON_GREATER = 5,
    D3D11_COMPARISON_NOT_EQUAL = 6,
    D3D11_COMPARISON_GREATER_EQUAL = 7,
    D3D11_COMPARISON_ALWAYS = 8
} D3D11_COMPARISON_FUNC;
typedef enum D3D11_COUNTER {
    D3D11_COUNTER_DEVICE_DEPENDENT_0 = 0x40000000
} D3D11_COUNTER;
typedef struct D3D11_COUNTER_DESC {
    D3D11_COUNTER Counter;
    UINT MiscFlags;
} D3D11_COUNTER_DESC;
typedef struct D3D11_COUNTER_INFO {
    D3D11_COUNTER LastDeviceDependentCounter;
    UINT NumSimultaneousCounters;
    UINT8 NumDetectableParallelUnits;
} D3D11_COUNTER_INFO;
typedef enum D3D11_COUNTER_TYPE {
    D3D11_COUNTER_TYPE_FLOAT32 = 0,
    D3D11_COUNTER_TYPE_UINT16 = 1,
    D3D11_COUNTER_TYPE_UINT32 = 2,
    D3D11_COUNTER_TYPE_UINT64 = 3
} D3D11_COUNTER_TYPE;
typedef enum D3D11_CULL_MODE {
    D3D11_CULL_NONE = 1,
    D3D11_CULL_FRONT = 2,
    D3D11_CULL_BACK = 3
} D3D11_CULL_MODE;
typedef enum D3D11_DEPTH_WRITE_MASK {
    D3D11_DEPTH_WRITE_MASK_ZERO = 0,
    D3D11_DEPTH_WRITE_MASK_ALL = 1
} D3D11_DEPTH_WRITE_MASK;
typedef enum D3D11_DEVICE_CONTEXT_TYPE {
    D3D11_DEVICE_CONTEXT_IMMEDIATE = 0,
    D3D11_DEVICE_CONTEXT_DEFERRED = 1
} D3D11_DEVICE_CONTEXT_TYPE;
typedef enum D3D11_DSV_DIMENSION {
    D3D11_DSV_DIMENSION_UNKNOWN = 0,
    D3D11_DSV_DIMENSION_TEXTURE1D = 1,
    D3D11_DSV_DIMENSION_TEXTURE1DARRAY = 2,
    D3D11_DSV_DIMENSION_TEXTURE2D = 3,
    D3D11_DSV_DIMENSION_TEXTURE2DARRAY = 4,
    D3D11_DSV_DIMENSION_TEXTURE2DMS = 5,
    D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY = 6
} D3D11_DSV_DIMENSION;
typedef enum D3D11_FEATURE {
    D3D11_FEATURE_THREADING = 0,
    D3D11_FEATURE_DOUBLES = 1,
    D3D11_FEATURE_FORMAT_SUPPORT = 2,
    D3D11_FEATURE_FORMAT_SUPPORT2 = 3,
    D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS = 4,
    D3D11_FEATURE_D3D11_OPTIONS = 5,
    D3D11_FEATURE_ARCHITECTURE_INFO = 6,
    D3D11_FEATURE_D3D9_OPTIONS = 7,
    D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT = 8,
    D3D11_FEATURE_D3D9_SHADOW_SUPPORT = 9
} D3D11_FEATURE;
typedef struct D3D11_FEATURE_DATA_THREADING {
    WINBOOL DriverConcurrentCreates;
    WINBOOL DriverCommandLists;
} D3D11_FEATURE_DATA_THREADING;
typedef struct D3D11_FEATURE_DATA_DOUBLES {
    WINBOOL DoublePrecisionFloatShaderOps;
} D3D11_FEATURE_DATA_DOUBLES;
typedef struct D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS {
    WINBOOL ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x;
} D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS;
typedef struct D3D11_FEATURE_DATA_D3D11_OPTIONS {
    WINBOOL OutputMergerLogicOp;
    WINBOOL UAVOnlyRenderingForcedSampleCount;
    WINBOOL DiscardAPIsSeenByDriver;
    WINBOOL FlagsForUpdateAndCopySeenByDriver;
    WINBOOL ClearView;
    WINBOOL CopyWithOverlap;
    WINBOOL ConstantBufferPartialUpdate;
    WINBOOL ConstantBufferOffsetting;
    WINBOOL MapNoOverwriteOnDynamicConstantBuffer;
    WINBOOL MapNoOverwriteOnDynamicBufferSRV;
    WINBOOL MultisampleRTVWithForcedSampleCountOne;
    WINBOOL SAD4ShaderInstructions;
    WINBOOL ExtendedDoublesShaderInstructions;
    WINBOOL ExtendedResourceSharing;
} D3D11_FEATURE_DATA_D3D11_OPTIONS;
typedef enum D3D11_FILL_MODE {
    D3D11_FILL_WIREFRAME = 2,
    D3D11_FILL_SOLID = 3
} D3D11_FILL_MODE;
typedef enum D3D11_FILTER_TYPE {
    D3D11_FILTER_TYPE_POINT = 0,
    D3D11_FILTER_TYPE_LINEAR = 1
} D3D11_FILTER_TYPE;
#define D3D11_MIN_FILTER_SHIFT (4)

#define D3D11_MAG_FILTER_SHIFT (2)

#define D3D11_MIP_FILTER_SHIFT (0)

#define D3D11_FILTER_TYPE_MASK (0x3)

#define D3D11_COMPARISON_FILTERING_BIT (0x80)

#define D3D11_ANISOTROPIC_FILTERING_BIT (0x40)

#define D3D11_ENCODE_BASIC_FILTER(min, mag, mip, bComparison) \
    ((D3D11_FILTER)(((bComparison) ? D3D11_COMPARISON_FILTERING_BIT : 0 ) | \
                    (((min)&D3D11_FILTER_TYPE_MASK) << D3D11_MIN_FILTER_SHIFT) | \
                    (((mag)&D3D11_FILTER_TYPE_MASK) << D3D11_MAG_FILTER_SHIFT) | \
                    (((mip)&D3D11_FILTER_TYPE_MASK) << D3D11_MIP_FILTER_SHIFT)))
#define D3D11_ENCODE_ANISOTROPIC_FILTER(bComparison) \
    ((D3D11_FILTER)(D3D11_ANISOTROPIC_FILTERING_BIT | \
                    D3D11_ENCODE_BASIC_FILTER(D3D11_FILTER_TYPE_LINEAR,D3D11_FILTER_TYPE_LINEAR, \
                                              D3D11_FILTER_TYPE_LINEAR,bComparison)))
#define D3D11_DECODE_MIN_FILTER(d3d11Filter) \
    ((D3D11_FILTER_TYPE)(((d3d11Filter) >> D3D11_MIN_FILTER_SHIFT) & D3D11_FILTER_TYPE_MASK))
#define D3D11_DECODE_MAG_FILTER(d3d11Filter) \
    ((D3D11_FILTER_TYPE)(((d3d11Filter) >> D3D11_MAG_FILTER_SHIFT) & D3D11_FILTER_TYPE_MASK))
#define D3D11_DECODE_MIP_FILTER(d3d11Filter) \
    ((D3D11_FILTER_TYPE)(((d3d11Filter) >> D3D11_MIP_FILTER_SHIFT) & D3D11_FILTER_TYPE_MASK))
#define D3D11_DECODE_IS_COMPARISON_FILTER(d3d11Filter) ((d3d11Filter) & D3D11_COMPARISON_FILTERING_BIT)
#define D3D11_DECODE_IS_ANISOTROPIC_FILTER(d3d11Filter) \
    (((d3d11Filter) & D3D11_ANISOTROPIC_FILTERING_BIT ) \
     && (D3D11_FILTER_TYPE_LINEAR == D3D11_DECODE_MIN_FILTER(d3d11Filter)) \
     && (D3D11_FILTER_TYPE_LINEAR == D3D11_DECODE_MAG_FILTER(d3d11Filter)) \
     && (D3D11_FILTER_TYPE_LINEAR == D3D11_DECODE_MIP_FILTER(d3d11Filter)))
typedef enum D3D11_FILTER {
    D3D11_FILTER_MIN_MAG_MIP_POINT = 0x0,
    D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x1,
    D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x4,
    D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x5,
    D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10,
    D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11,
    D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14,
    D3D11_FILTER_MIN_MAG_MIP_LINEAR = 0x15,
    D3D11_FILTER_ANISOTROPIC = 0x55,
    D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80,
    D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81,
    D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84,
    D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85,
    D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90,
    D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91,
    D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94,
    D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95,
    D3D11_FILTER_COMPARISON_ANISOTROPIC = 0xd5
} D3D11_FILTER;
typedef enum D3D11_DSV_FLAG {
    D3D11_DSV_READ_ONLY_DEPTH = 0x1,
    D3D11_DSV_READ_ONLY_STENCIL = 0x2
} D3D11_DSV_FLAG;
typedef enum D3D11_BUFFEREX_SRV_FLAG {
    D3D11_BUFFEREX_SRV_FLAG_RAW = 0x1
} D3D11_BUFFEREX_SRV_FLAG;
typedef enum D3D11_UAV_FLAG {
    D3D11_BUFFER_UAV_FLAG_RAW = 0x1,
    D3D11_BUFFER_UAV_FLAG_APPEND = 0x2,
    D3D11_BUFFER_UAV_FLAG_COUNTER = 0x4
} D3D11_UAV_FLAG;
typedef enum D3D11_INPUT_CLASSIFICATION {
    D3D11_INPUT_PER_VERTEX_DATA = 0,
    D3D11_INPUT_PER_INSTANCE_DATA = 1
} D3D11_INPUT_CLASSIFICATION;
#define D3D11_APPEND_ALIGNED_ELEMENT (0xffffffff)

typedef struct D3D11_INPUT_ELEMENT_DESC {
    LPCSTR SemanticName;
    UINT SemanticIndex;
    DXGI_FORMAT Format;
    UINT InputSlot;
    UINT AlignedByteOffset;
    D3D11_INPUT_CLASSIFICATION InputSlotClass;
    UINT InstanceDataStepRate;
} D3D11_INPUT_ELEMENT_DESC;
typedef enum D3D11_MAP {
    D3D11_MAP_READ = 1,
    D3D11_MAP_WRITE = 2,
    D3D11_MAP_READ_WRITE = 3,
    D3D11_MAP_WRITE_DISCARD = 4,
    D3D11_MAP_WRITE_NO_OVERWRITE = 5
} D3D11_MAP;
typedef enum D3D11_MAP_FLAG {
    D3D11_MAP_FLAG_DO_NOT_WAIT = 0x100000
} D3D11_MAP_FLAG;
typedef struct D3D11_QUERY_DATA_SO_STATISTICS {
    UINT64 NumPrimitivesWritten;
    UINT64 PrimitivesStorageNeeded;
} D3D11_QUERY_DATA_SO_STATISTICS;
typedef struct D3D11_MAPPED_SUBRESOURCE {
    void *pData;
    UINT RowPitch;
    UINT DepthPitch;
} D3D11_MAPPED_SUBRESOURCE;
typedef enum D3D11_QUERY {
    D3D11_QUERY_EVENT = 0,
    D3D11_QUERY_OCCLUSION = 1,
    D3D11_QUERY_TIMESTAMP = 2,
    D3D11_QUERY_TIMESTAMP_DISJOINT = 3,
    D3D11_QUERY_PIPELINE_STATISTICS = 4,
    D3D11_QUERY_OCCLUSION_PREDICATE = 5,
    D3D11_QUERY_SO_STATISTICS = 6,
    D3D11_QUERY_SO_OVERFLOW_PREDICATE = 7,
    D3D11_QUERY_SO_STATISTICS_STREAM0 = 8,
    D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0 = 9,
    D3D11_QUERY_SO_STATISTICS_STREAM1 = 10,
    D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1 = 11,
    D3D11_QUERY_SO_STATISTICS_STREAM2 = 12,
    D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2 = 13,
    D3D11_QUERY_SO_STATISTICS_STREAM3 = 14,
    D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3 = 15
} D3D11_QUERY;
typedef enum D3D11_QUERY_MISC_FLAG {
    D3D11_QUERY_MISC_PREDICATEHINT = 0x1
} D3D11_QUERY_MISC_FLAG;
typedef enum D3D11_ASYNC_GETDATA_FLAG {
    D3D11_ASYNC_GETDATA_DONOTFLUSH = 0x1
} D3D11_ASYNC_GETDATA_FLAG;
typedef enum D3D11_RESOURCE_MISC_FLAG {
    D3D11_RESOURCE_MISC_GENERATE_MIPS = 0x1,
    D3D11_RESOURCE_MISC_SHARED = 0x2,
    D3D11_RESOURCE_MISC_TEXTURECUBE = 0x4,
    D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS = 0x10,
    D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS = 0x20,
    D3D11_RESOURCE_MISC_BUFFER_STRUCTURED = 0x40,
    D3D11_RESOURCE_MISC_RESOURCE_CLAMP = 0x80,
    D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x100,
    D3D11_RESOURCE_MISC_GDI_COMPATIBLE = 0x200,
    D3D11_RESOURCE_MISC_SHARED_NTHANDLE = 0x800,
    D3D11_RESOURCE_MISC_RESTRICTED_CONTENT = 0x1000,
    D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE = 0x2000,
    D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER = 0x4000,
    D3D11_RESOURCE_MISC_GUARDED = 0x8000
} D3D11_RESOURCE_MISC_FLAG;
typedef struct D3D11_QUERY_DESC {
    D3D11_QUERY Query;
    UINT MiscFlags;
} D3D11_QUERY_DESC;
#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)
struct CD3D11_QUERY_DESC : public D3D11_QUERY_DESC {
    CD3D11_QUERY_DESC() {}
    ~CD3D11_QUERY_DESC() {}
    explicit CD3D11_QUERY_DESC(const D3D11_QUERY_DESC &other) : D3D11_QUERY_DESC(other) {}
    explicit CD3D11_QUERY_DESC(D3D11_QUERY query, UINT misc_flags = 0) {
        Query = query;
        MiscFlags = misc_flags;
    }
    operator const D3D11_QUERY_DESC&() const {
        return *this;
    }
};
#endif
typedef struct D3D11_RASTERIZER_DESC {
    D3D11_FILL_MODE FillMode;
    D3D11_CULL_MODE CullMode;
    WINBOOL FrontCounterClockwise;
    INT DepthBias;
    FLOAT DepthBiasClamp;
    FLOAT SlopeScaledDepthBias;
    WINBOOL DepthClipEnable;
    WINBOOL ScissorEnable;
    WINBOOL MultisampleEnable;
    WINBOOL AntialiasedLineEnable;
} D3D11_RASTERIZER_DESC;
#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)
struct CD3D11_RASTERIZER_DESC : public D3D11_RASTERIZER_DESC {
    CD3D11_RASTERIZER_DESC() {}
    explicit CD3D11_RASTERIZER_DESC(const D3D11_RASTERIZER_DESC &o) : D3D11_RASTERIZER_DESC(o) {}
    explicit CD3D11_RASTERIZER_DESC(CD3D11_DEFAULT) {
        FillMode = D3D11_FILL_SOLID;
        CullMode = D3D11_CULL_BACK;
        FrontCounterClockwise = FALSE;
        DepthBias = D3D11_DEFAULT_DEPTH_BIAS;
        DepthBiasClamp = D3D11_DEFAULT_DEPTH_BIAS_CLAMP;
        SlopeScaledDepthBias = D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
        DepthClipEnable = TRUE;
        ScissorEnable = FALSE;
        MultisampleEnable = FALSE;
        AntialiasedLineEnable = FALSE;
    }
    explicit CD3D11_RASTERIZER_DESC(D3D11_FILL_MODE fillMode, D3D11_CULL_MODE cullMode,
            WINBOOL frontCounterClockwise, INT depthBias, FLOAT depthBiasClamp, FLOAT slopeScaledDepthBias,
            BOOL depthClipEnable, WINBOOL scissorEnable, WINBOOL multisampleEnable, WINBOOL antialiasedLineEnable) {
        FillMode = fillMode;
        CullMode = cullMode;
        FrontCounterClockwise = frontCounterClockwise;
        DepthBias = depthBias;
        DepthBiasClamp = depthBiasClamp;
        SlopeScaledDepthBias = slopeScaledDepthBias;
        DepthClipEnable = depthClipEnable;
        ScissorEnable = scissorEnable;
        MultisampleEnable = multisampleEnable;
        AntialiasedLineEnable = antialiasedLineEnable;
    }
    ~CD3D11_RASTERIZER_DESC() {}
    operator const D3D11_RASTERIZER_DESC&() const { return *this; }
};
#endif
typedef enum D3D11_RESOURCE_DIMENSION {
    D3D11_RESOURCE_DIMENSION_UNKNOWN = 0,
    D3D11_RESOURCE_DIMENSION_BUFFER = 1,
    D3D11_RESOURCE_DIMENSION_TEXTURE1D = 2,
    D3D11_RESOURCE_DIMENSION_TEXTURE2D = 3,
    D3D11_RESOURCE_DIMENSION_TEXTURE3D = 4
} D3D11_RESOURCE_DIMENSION;
typedef enum D3D11_RTV_DIMENSION {
    D3D11_RTV_DIMENSION_UNKNOWN = 0,
    D3D11_RTV_DIMENSION_BUFFER = 1,
    D3D11_RTV_DIMENSION_TEXTURE1D = 2,
    D3D11_RTV_DIMENSION_TEXTURE1DARRAY = 3,
    D3D11_RTV_DIMENSION_TEXTURE2D = 4,
    D3D11_RTV_DIMENSION_TEXTURE2DARRAY = 5,
    D3D11_RTV_DIMENSION_TEXTURE2DMS = 6,
    D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY = 7,
    D3D11_RTV_DIMENSION_TEXTURE3D = 8
} D3D11_RTV_DIMENSION;
typedef struct D3D11_SO_DECLARATION_ENTRY {
    UINT Stream;
    LPCSTR SemanticName;
    UINT SemanticIndex;
    BYTE StartComponent;
    BYTE ComponentCount;
    BYTE OutputSlot;
} D3D11_SO_DECLARATION_ENTRY;
typedef enum D3D11_STENCIL_OP {
    D3D11_STENCIL_OP_KEEP = 1,
    D3D11_STENCIL_OP_ZERO = 2,
    D3D11_STENCIL_OP_REPLACE = 3,
    D3D11_STENCIL_OP_INCR_SAT = 4,
    D3D11_STENCIL_OP_DECR_SAT = 5,
    D3D11_STENCIL_OP_INVERT = 6,
    D3D11_STENCIL_OP_INCR = 7,
    D3D11_STENCIL_OP_DECR = 8
} D3D11_STENCIL_OP;
#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)
}
inline UINT D3D11CalcSubresource(UINT MipSlice, UINT ArraySlice, UINT MipLevels) {
    return MipSlice + ArraySlice * MipLevels;
}
extern "C"{
#endif
typedef struct D3D11_SUBRESOURCE_DATA {
    const void *pSysMem;
    UINT SysMemPitch;
    UINT SysMemSlicePitch;
} D3D11_SUBRESOURCE_DATA;
typedef struct D3D11_TEX1D_ARRAY_DSV {
    UINT MipSlice;
    UINT FirstArraySlice;
    UINT ArraySize;
} D3D11_TEX1D_ARRAY_DSV;
typedef struct D3D11_TEX1D_ARRAY_RTV {
    UINT MipSlice;
    UINT FirstArraySlice;
    UINT ArraySize;
} D3D11_TEX1D_ARRAY_RTV;
typedef struct D3D11_TEX1D_ARRAY_SRV {
    UINT MostDetailedMip;
    UINT MipLevels;
    UINT FirstArraySlice;
    UINT ArraySize;
} D3D11_TEX1D_ARRAY_SRV;
typedef struct D3D11_TEX1D_ARRAY_UAV {
    UINT MipSlice;
    UINT FirstArraySlice;
    UINT ArraySize;
} D3D11_TEX1D_ARRAY_UAV;
typedef struct D3D11_TEX1D_DSV {
    UINT MipSlice;
} D3D11_TEX1D_DSV;
typedef struct D3D11_TEX1D_RTV {
    UINT MipSlice;
} D3D11_TEX1D_RTV;
typedef struct D3D11_TEX1D_SRV {
    UINT MostDetailedMip;
    UINT MipLevels;
} D3D11_TEX1D_SRV;
typedef struct D3D11_TEX1D_UAV {
    UINT MipSlice;
} D3D11_TEX1D_UAV;
typedef struct D3D11_TEX2D_ARRAY_DSV {
    UINT MipSlice;
    UINT FirstArraySlice;
    UINT ArraySize;
} D3D11_TEX2D_ARRAY_DSV;
typedef struct D3D11_TEX2D_ARRAY_RTV {
    UINT MipSlice;
    UINT FirstArraySlice;
    UINT ArraySize;
} D3D11_TEX2D_ARRAY_RTV;
typedef struct D3D11_TEX2D_ARRAY_SRV {
    UINT MostDetailedMip;
    UINT MipLevels;
    UINT FirstArraySlice;
    UINT ArraySize;
} D3D11_TEX2D_ARRAY_SRV;
typedef struct D3D11_TEX2D_ARRAY_UAV {
    UINT MipSlice;
    UINT FirstArraySlice;
    UINT ArraySize;
} D3D11_TEX2D_ARRAY_UAV;
typedef struct D3D11_TEX2D_DSV {
    UINT MipSlice;
} D3D11_TEX2D_DSV;
typedef struct D3D11_TEX2D_RTV {
    UINT MipSlice;
} D3D11_TEX2D_RTV;
typedef struct D3D11_TEX2D_SRV {
    UINT MostDetailedMip;
    UINT MipLevels;
} D3D11_TEX2D_SRV;
typedef struct D3D11_TEX2D_UAV {
    UINT MipSlice;
} D3D11_TEX2D_UAV;
typedef struct D3D11_TEX2DMS_ARRAY_DSV {
    UINT FirstArraySlice;
    UINT ArraySize;
} D3D11_TEX2DMS_ARRAY_DSV;
typedef struct D3D11_TEX2DMS_ARRAY_RTV {
    UINT FirstArraySlice;
    UINT ArraySize;
} D3D11_TEX2DMS_ARRAY_RTV;
typedef struct D3D11_TEX2DMS_ARRAY_SRV {
    UINT FirstArraySlice;
    UINT ArraySize;
} D3D11_TEX2DMS_ARRAY_SRV;
typedef struct D3D11_TEX2DMS_DSV {
    UINT UnusedField_NothingToDefine;
} D3D11_TEX2DMS_DSV;
typedef struct D3D11_TEX2DMS_RTV {
    UINT UnusedField_NothingToDefine;
} D3D11_TEX2DMS_RTV;
typedef struct D3D11_TEX2DMS_SRV {
    UINT UnusedField_NothingToDefine;
} D3D11_TEX2DMS_SRV;
typedef struct D3D11_TEX3D_RTV {
    UINT MipSlice;
    UINT FirstWSlice;
    UINT WSize;
} D3D11_TEX3D_RTV;
typedef struct D3D11_TEX3D_SRV {
    UINT MostDetailedMip;
    UINT MipLevels;
} D3D11_TEX3D_SRV;
typedef struct D3D11_TEX3D_UAV {
    UINT MipSlice;
    UINT FirstWSlice;
    UINT WSize;
} D3D11_TEX3D_UAV;
typedef struct D3D11_TEXCUBE_ARRAY_SRV {
    UINT MostDetailedMip;
    UINT MipLevels;
    UINT First2DArrayFace;
    UINT NumCubes;
} D3D11_TEXCUBE_ARRAY_SRV;
typedef struct D3D11_TEXCUBE_SRV {
    UINT MostDetailedMip;
    UINT MipLevels;
} D3D11_TEXCUBE_SRV;
typedef enum D3D11_TEXTURE_ADDRESS_MODE {
    D3D11_TEXTURE_ADDRESS_WRAP = 1,
    D3D11_TEXTURE_ADDRESS_MIRROR = 2,
    D3D11_TEXTURE_ADDRESS_CLAMP = 3,
    D3D11_TEXTURE_ADDRESS_BORDER = 4,
    D3D11_TEXTURE_ADDRESS_MIRROR_ONCE = 5
} D3D11_TEXTURE_ADDRESS_MODE;
typedef enum D3D11_UAV_DIMENSION {
    D3D11_UAV_DIMENSION_UNKNOWN = 0,
    D3D11_UAV_DIMENSION_BUFFER = 1,
    D3D11_UAV_DIMENSION_TEXTURE1D = 2,
    D3D11_UAV_DIMENSION_TEXTURE1DARRAY = 3,
    D3D11_UAV_DIMENSION_TEXTURE2D = 4,
    D3D11_UAV_DIMENSION_TEXTURE2DARRAY = 5,
    D3D11_UAV_DIMENSION_TEXTURE3D = 8
} D3D11_UAV_DIMENSION;
typedef struct D3D11_UNORDERED_ACCESS_VIEW_DESC {
    DXGI_FORMAT Format;
    D3D11_UAV_DIMENSION ViewDimension;
    __C89_NAMELESS union {
        D3D11_BUFFER_UAV Buffer;
        D3D11_TEX1D_UAV Texture1D;
        D3D11_TEX1D_ARRAY_UAV Texture1DArray;
        D3D11_TEX2D_UAV Texture2D;
        D3D11_TEX2D_ARRAY_UAV Texture2DArray;
        D3D11_TEX3D_UAV Texture3D;
    } __C89_NAMELESSUNIONNAME;
} D3D11_UNORDERED_ACCESS_VIEW_DESC;
typedef enum D3D11_USAGE {
    D3D11_USAGE_DEFAULT = 0,
    D3D11_USAGE_IMMUTABLE = 1,
    D3D11_USAGE_DYNAMIC = 2,
    D3D11_USAGE_STAGING = 3
} D3D11_USAGE;
typedef enum D3D11_BIND_FLAG {
    D3D11_BIND_VERTEX_BUFFER = 0x1,
    D3D11_BIND_INDEX_BUFFER = 0x2,
    D3D11_BIND_CONSTANT_BUFFER = 0x4,
    D3D11_BIND_SHADER_RESOURCE = 0x8,
    D3D11_BIND_STREAM_OUTPUT = 0x10,
    D3D11_BIND_RENDER_TARGET = 0x20,
    D3D11_BIND_DEPTH_STENCIL = 0x40,
    D3D11_BIND_UNORDERED_ACCESS = 0x80,
    D3D11_BIND_DECODER = 0x200,
    D3D11_BIND_VIDEO_ENCODER = 0x400
} D3D11_BIND_FLAG;
typedef enum D3D11_CPU_ACCESS_FLAG {
    D3D11_CPU_ACCESS_WRITE = 0x10000,
    D3D11_CPU_ACCESS_READ = 0x20000
} D3D11_CPU_ACCESS_FLAG;
typedef struct D3D11_VIEWPORT {
    FLOAT TopLeftX;
    FLOAT TopLeftY;
    FLOAT Width;
    FLOAT Height;
    FLOAT MinDepth;
    FLOAT MaxDepth;
} D3D11_VIEWPORT;
typedef enum D3D11_COLOR_WRITE_ENABLE {
    D3D11_COLOR_WRITE_ENABLE_RED = 1,
    D3D11_COLOR_WRITE_ENABLE_GREEN = 2,
    D3D11_COLOR_WRITE_ENABLE_BLUE = 4,
    D3D11_COLOR_WRITE_ENABLE_ALPHA = 8,
    D3D11_COLOR_WRITE_ENABLE_ALL = ((D3D11_COLOR_WRITE_ENABLE_RED | D3D11_COLOR_WRITE_ENABLE_GREEN) | D3D11_COLOR_WRITE_ENABLE_BLUE) | D3D11_COLOR_WRITE_ENABLE_ALPHA
} D3D11_COLOR_WRITE_ENABLE;
typedef enum D3D11_FORMAT_SUPPORT {
    D3D11_FORMAT_SUPPORT_BUFFER = 0x1,
    D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER = 0x2,
    D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER = 0x4,
    D3D11_FORMAT_SUPPORT_SO_BUFFER = 0x8,
    D3D11_FORMAT_SUPPORT_TEXTURE1D = 0x10,
    D3D11_FORMAT_SUPPORT_TEXTURE2D = 0x20,
    D3D11_FORMAT_SUPPORT_TEXTURE3D = 0x40,
    D3D11_FORMAT_SUPPORT_TEXTURECUBE = 0x80,
    D3D11_FORMAT_SUPPORT_SHADER_LOAD = 0x100,
    D3D11_FORMAT_SUPPORT_SHADER_SAMPLE = 0x200,
    D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON = 0x400,
    D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT = 0x800,
    D3D11_FORMAT_SUPPORT_MIP = 0x1000,
    D3D11_FORMAT_SUPPORT_MIP_AUTOGEN = 0x2000,
    D3D11_FORMAT_SUPPORT_RENDER_TARGET = 0x4000,
    D3D11_FORMAT_SUPPORT_BLENDABLE = 0x8000,
    D3D11_FORMAT_SUPPORT_DEPTH_STENCIL = 0x10000,
    D3D11_FORMAT_SUPPORT_CPU_LOCKABLE = 0x20000,
    D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE = 0x40000,
    D3D11_FORMAT_SUPPORT_DISPLAY = 0x80000,
    D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT = 0x100000,
    D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET = 0x200000,
    D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD = 0x400000,
    D3D11_FORMAT_SUPPORT_SHADER_GATHER = 0x800000,
    D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST = 0x1000000,
    D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW = 0x2000000,
    D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON = 0x4000000,
    D3D11_FORMAT_SUPPORT_DECODER_OUTPUT = 0x8000000,
    D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_OUTPUT = 0x10000000,
    D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_INPUT = 0x20000000,
    D3D11_FORMAT_SUPPORT_VIDEO_ENCODER = 0x40000000
} D3D11_FORMAT_SUPPORT;
typedef enum D3D11_CLEAR_FLAG {
    D3D11_CLEAR_DEPTH = 0x1,
    D3D11_CLEAR_STENCIL = 0x2
} D3D11_CLEAR_FLAG;
typedef struct D3D11_RENDER_TARGET_BLEND_DESC {
    WINBOOL BlendEnable;
    D3D11_BLEND SrcBlend;
    D3D11_BLEND DestBlend;
    D3D11_BLEND_OP BlendOp;
    D3D11_BLEND SrcBlendAlpha;
    D3D11_BLEND DestBlendAlpha;
    D3D11_BLEND_OP BlendOpAlpha;
    UINT8 RenderTargetWriteMask;
} D3D11_RENDER_TARGET_BLEND_DESC;
typedef struct D3D11_BLEND_DESC {
    WINBOOL AlphaToCoverageEnable;
    WINBOOL IndependentBlendEnable;
    D3D11_RENDER_TARGET_BLEND_DESC RenderTarget[8];
} D3D11_BLEND_DESC;
#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)
struct CD3D11_BLEND_DESC : public D3D11_BLEND_DESC {
    CD3D11_BLEND_DESC() {}
    explicit CD3D11_BLEND_DESC(const D3D11_BLEND_DESC &o) : D3D11_BLEND_DESC(o) {}
    explicit CD3D11_BLEND_DESC(CD3D11_DEFAULT) {
        AlphaToCoverageEnable = FALSE;
        IndependentBlendEnable = FALSE;
        for(D3D11_RENDER_TARGET_BLEND_DESC *target; target < RenderTarget+D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; target++) {
            target->BlendEnable = FALSE;
            target->SrcBlend = target->SrcBlendAlpha = D3D11_BLEND_ONE;
            target->DestBlend = target->DestBlendAlpha = D3D11_BLEND_ZERO;
            target->BlendOp = target->BlendOpAlpha = D3D11_BLEND_OP_ADD;
            target->RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
        }
    }
    ~CD3D11_BLEND_DESC() {}
    operator const D3D11_BLEND_DESC&() const { return *this; }
};
#endif
typedef struct D3D11_BUFFER_DESC {
    UINT ByteWidth;
    D3D11_USAGE Usage;
    UINT BindFlags;
    UINT CPUAccessFlags;
    UINT MiscFlags;
    UINT StructureByteStride;
} D3D11_BUFFER_DESC;
#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)
struct CD3D11_BUFFER_DESC : public D3D11_BUFFER_DESC {
    CD3D11_BUFFER_DESC() {}
    explicit CD3D11_BUFFER_DESC(const D3D11_BUFFER_DESC &o) : D3D11_BUFFER_DESC(o) {}
    explicit CD3D11_BUFFER_DESC(UINT byteWidth,UINT bindFlags,
            D3D11_USAGE usage = D3D11_USAGE_DEFAULT, UINT cpuaccessFlags = 0,
            UINT miscFlags = 0, UINT structureByteStride = 0 ) {
        ByteWidth = byteWidth;
        Usage = usage;
        BindFlags = bindFlags;
        CPUAccessFlags = cpuaccessFlags;
        MiscFlags = miscFlags;
        StructureByteStride = structureByteStride;
    }
    ~CD3D11_BUFFER_DESC() {}
    operator const D3D11_BUFFER_DESC&() const { return *this; }
};
#endif
typedef struct D3D11_DEPTH_STENCIL_VIEW_DESC {
    DXGI_FORMAT Format;
    D3D11_DSV_DIMENSION ViewDimension;
    UINT Flags;
    __C89_NAMELESS union {
        D3D11_TEX1D_DSV Texture1D;
        D3D11_TEX1D_ARRAY_DSV Texture1DArray;
        D3D11_TEX2D_DSV Texture2D;
        D3D11_TEX2D_ARRAY_DSV Texture2DArray;
        D3D11_TEX2DMS_DSV Texture2DMS;
        D3D11_TEX2DMS_ARRAY_DSV Texture2DMSArray;
    } __C89_NAMELESSUNIONNAME;
} D3D11_DEPTH_STENCIL_VIEW_DESC;
typedef struct D3D11_DEPTH_STENCILOP_DESC {
    D3D11_STENCIL_OP StencilFailOp;
    D3D11_STENCIL_OP StencilDepthFailOp;
    D3D11_STENCIL_OP StencilPassOp;
    D3D11_COMPARISON_FUNC StencilFunc;
} D3D11_DEPTH_STENCILOP_DESC;
typedef struct D3D11_DEPTH_STENCIL_DESC {
    WINBOOL DepthEnable;
    D3D11_DEPTH_WRITE_MASK DepthWriteMask;
    D3D11_COMPARISON_FUNC DepthFunc;
    WINBOOL StencilEnable;
    UINT8 StencilReadMask;
    UINT8 StencilWriteMask;
    D3D11_DEPTH_STENCILOP_DESC FrontFace;
    D3D11_DEPTH_STENCILOP_DESC BackFace;
} D3D11_DEPTH_STENCIL_DESC;
#if !defined( D3D11_NO_HELPERS ) && defined( __cplusplus )
struct CD3D11_DEPTH_STENCIL_DESC : public D3D11_DEPTH_STENCIL_DESC {
    CD3D11_DEPTH_STENCIL_DESC() {}
    explicit CD3D11_DEPTH_STENCIL_DESC(const D3D11_DEPTH_STENCIL_DESC &other) : D3D11_DEPTH_STENCIL_DESC(other) {}
    explicit CD3D11_DEPTH_STENCIL_DESC(CD3D11_DEFAULT) {
        const D3D11_DEPTH_STENCILOP_DESC default_op =
            {D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_COMPARISON_ALWAYS};
        DepthEnable = TRUE;
        DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
        DepthFunc = D3D11_COMPARISON_LESS;
        StencilEnable = FALSE;
        StencilReadMask = D3D11_DEFAULT_STENCIL_READ_MASK;
        StencilWriteMask = D3D11_DEFAULT_STENCIL_WRITE_MASK;
        FrontFace = default_op;
        BackFace = default_op;
    }
    explicit CD3D11_DEPTH_STENCIL_DESC(
            WINBOOL depth_enable,
            D3D11_DEPTH_WRITE_MASK depth_write_mask,
            D3D11_COMPARISON_FUNC depth_func,
            WINBOOL stencil_enable,
            UINT8 stencil_read_mask,
            UINT8 stencil_write_mask,
            D3D11_STENCIL_OP front_stencil_fail_op,
            D3D11_STENCIL_OP front_stencil_depth_fail_op,
            D3D11_STENCIL_OP front_stencil_pass_op,
            D3D11_COMPARISON_FUNC front_stencil_func,
            D3D11_STENCIL_OP back_stencil_fail_op,
            D3D11_STENCIL_OP back_stencil_depth_fail_op,
            D3D11_STENCIL_OP back_stencil_pass_op,
            D3D11_COMPARISON_FUNC back_stencil_func) {
        DepthEnable = depth_enable;
        DepthWriteMask = depth_write_mask;
        DepthFunc = depth_func;
        StencilEnable = stencil_enable;
        StencilReadMask = stencil_read_mask;
        StencilWriteMask = stencil_write_mask;
        FrontFace.StencilFailOp = front_stencil_fail_op;
        FrontFace.StencilDepthFailOp = front_stencil_depth_fail_op;
        FrontFace.StencilPassOp = front_stencil_pass_op;
        FrontFace.StencilFunc = front_stencil_func;
        BackFace.StencilFailOp = back_stencil_fail_op;
        BackFace.StencilDepthFailOp = back_stencil_depth_fail_op;
        BackFace.StencilPassOp = back_stencil_pass_op;
        BackFace.StencilFunc = back_stencil_func;
    }
    ~CD3D11_DEPTH_STENCIL_DESC() {}
    operator const D3D11_DEPTH_STENCIL_DESC&() const { return *this; }
};
#endif
typedef struct D3D11_RENDER_TARGET_VIEW_DESC {
    DXGI_FORMAT Format;
    D3D11_RTV_DIMENSION ViewDimension;
    __C89_NAMELESS union {
        D3D11_BUFFER_RTV Buffer;
        D3D11_TEX1D_RTV Texture1D;
        D3D11_TEX1D_ARRAY_RTV Texture1DArray;
        D3D11_TEX2D_RTV Texture2D;
        D3D11_TEX2D_ARRAY_RTV Texture2DArray;
        D3D11_TEX2DMS_RTV Texture2DMS;
        D3D11_TEX2DMS_ARRAY_RTV Texture2DMSArray;
        D3D11_TEX3D_RTV Texture3D;
    } __C89_NAMELESSUNIONNAME;
} D3D11_RENDER_TARGET_VIEW_DESC;
#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)
struct CD3D11_RENDER_TARGET_VIEW_DESC : public D3D11_RENDER_TARGET_VIEW_DESC {
    CD3D11_RENDER_TARGET_VIEW_DESC() {}
    explicit CD3D11_RENDER_TARGET_VIEW_DESC(D3D11_RTV_DIMENSION dim, DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
            UINT mip_slice = 0, UINT first_slice = 0, UINT array_size = -1) {
        Format = format;
        ViewDimension = dim;
        switch(dim) {
        case D3D11_RTV_DIMENSION_BUFFER:
            Buffer.FirstElement = mip_slice;
            Buffer.NumElements = first_slice;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE1D:
            Texture1D.MipSlice = mip_slice;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE1DARRAY:
            Texture1DArray.MipSlice = mip_slice;
            Texture1DArray.FirstArraySlice = first_slice;
            Texture1DArray.ArraySize = array_size;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE2D:
            Texture2D.MipSlice = mip_slice;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE2DARRAY:
            Texture2DArray.MipSlice = mip_slice;
            Texture2DArray.FirstArraySlice = first_slice;
            Texture2DArray.ArraySize = array_size;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY:
            Texture2DMSArray.FirstArraySlice = first_slice;
            Texture2DMSArray.ArraySize = array_size;
            break;
        case D3D11_RTV_DIMENSION_TEXTURE3D:
            Texture3D.MipSlice = mip_slice;
            Texture3D.FirstWSlice = first_slice;
            Texture3D.WSize = array_size;
            break;
        default:
            break;
        }
    }
    explicit CD3D11_RENDER_TARGET_VIEW_DESC(ID3D11Buffer*, DXGI_FORMAT format, UINT first_elem,
            UINT elem_cnt) {
        Format = format;
        ViewDimension = D3D11_RTV_DIMENSION_BUFFER;
        Buffer.FirstElement = first_elem;
        Buffer.NumElements = elem_cnt;
    }
    explicit CD3D11_RENDER_TARGET_VIEW_DESC(ID3D11Texture1D *texture, D3D11_RTV_DIMENSION dim,
            DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, UINT mip_slice = 0, UINT first_slice = 0,
            UINT array_size = -1);
    explicit CD3D11_RENDER_TARGET_VIEW_DESC(ID3D11Texture2D *texture, D3D11_RTV_DIMENSION dim,
            DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, UINT mip_slice = 0, UINT first_slice = 0,
            UINT array_size = -1);
    explicit CD3D11_RENDER_TARGET_VIEW_DESC(ID3D11Texture3D *texture, DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
            UINT mip_slice = 0, UINT first_w_slice = 0, UINT w_slice = -1 );
    ~CD3D11_RENDER_TARGET_VIEW_DESC() {}
    explicit CD3D11_RENDER_TARGET_VIEW_DESC(const D3D11_RENDER_TARGET_VIEW_DESC &other)
        : D3D11_RENDER_TARGET_VIEW_DESC(other) {}
    operator const D3D11_RENDER_TARGET_VIEW_DESC&() const {
        return *this;
    }
};
#endif
typedef struct D3D11_SAMPLER_DESC {
    D3D11_FILTER Filter;
    D3D11_TEXTURE_ADDRESS_MODE AddressU;
    D3D11_TEXTURE_ADDRESS_MODE AddressV;
    D3D11_TEXTURE_ADDRESS_MODE AddressW;
    FLOAT MipLODBias;
    UINT MaxAnisotropy;
    D3D11_COMPARISON_FUNC ComparisonFunc;
    FLOAT BorderColor[4];
    FLOAT MinLOD;
    FLOAT MaxLOD;
} D3D11_SAMPLER_DESC;
#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)
struct CD3D11_SAMPLER_DESC : public D3D11_SAMPLER_DESC {
    CD3D11_SAMPLER_DESC() {}
    explicit CD3D11_SAMPLER_DESC(const D3D11_SAMPLER_DESC &o) : D3D11_SAMPLER_DESC(o) {}
    explicit CD3D11_SAMPLER_DESC(CD3D11_DEFAULT) {
        Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
        AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
        AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;
        AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
        MipLODBias = 0;
        MaxAnisotropy = 1;
        ComparisonFunc = D3D11_COMPARISON_NEVER;
        BorderColor[0] = BorderColor[1] = BorderColor[2] = BorderColor[3] = 1.0f;
        MinLOD = -3.402823466e+38f;
        MaxLOD = 3.402823466e+38f;
    }
    explicit CD3D11_SAMPLER_DESC(D3D11_FILTER filter, D3D11_TEXTURE_ADDRESS_MODE addressU,
            D3D11_TEXTURE_ADDRESS_MODE addressV, D3D11_TEXTURE_ADDRESS_MODE addressW,
            FLOAT mipLODBias, UINT maxAnisotropy, D3D11_COMPARISON_FUNC comparisonFunc,
            const FLOAT *borderColor, FLOAT minLOD, FLOAT maxLOD) {
        Filter = filter;
        AddressU = addressU;
        AddressV = addressV;
        AddressW = addressW;
        MipLODBias = mipLODBias;
        MaxAnisotropy = maxAnisotropy;
        ComparisonFunc = comparisonFunc;
        if(borderColor) {
            BorderColor[0] = borderColor[0];
            BorderColor[1] = borderColor[1];
            BorderColor[2] = borderColor[2];
            BorderColor[3] = borderColor[3];
        }else {
            BorderColor[0] = BorderColor[1] = BorderColor[2] = BorderColor[3] = 1.0f;
        }
        MinLOD = minLOD;
        MaxLOD = maxLOD;
    }
    ~CD3D11_SAMPLER_DESC() {}
    operator const D3D11_SAMPLER_DESC&() const { return *this; }
};
#endif
typedef struct D3D11_SHADER_RESOURCE_VIEW_DESC {
    DXGI_FORMAT Format;
    D3D11_SRV_DIMENSION ViewDimension;
    __C89_NAMELESS union {
        D3D11_BUFFER_SRV Buffer;
        D3D11_TEX1D_SRV Texture1D;
        D3D11_TEX1D_ARRAY_SRV Texture1DArray;
        D3D11_TEX2D_SRV Texture2D;
        D3D11_TEX2D_ARRAY_SRV Texture2DArray;
        D3D11_TEX2DMS_SRV Texture2DMS;
        D3D11_TEX2DMS_ARRAY_SRV Texture2DMSArray;
        D3D11_TEX3D_SRV Texture3D;
        D3D11_TEXCUBE_SRV TextureCube;
        D3D11_TEXCUBE_ARRAY_SRV TextureCubeArray;
        D3D11_BUFFEREX_SRV BufferEx;
    } __C89_NAMELESSUNIONNAME;
} D3D11_SHADER_RESOURCE_VIEW_DESC;
#if !defined(D3D11_NO_HELPERS) && defined( __cplusplus )
struct CD3D11_SHADER_RESOURCE_VIEW_DESC : public D3D11_SHADER_RESOURCE_VIEW_DESC {
    CD3D11_SHADER_RESOURCE_VIEW_DESC() {}
    explicit CD3D11_SHADER_RESOURCE_VIEW_DESC(D3D11_SRV_DIMENSION dim,
            DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, UINT most_detailed_mip = 0,
            UINT mip_levels = -1, UINT first_slice = 0, UINT array_size = -1, UINT flags = 0) {
        Format = format;
        ViewDimension = dim;
        switch(ViewDimension) {
        case D3D11_SRV_DIMENSION_BUFFER:
            Buffer.FirstElement = most_detailed_mip;
            Buffer.NumElements = mip_levels;
            break;
        case D3D11_SRV_DIMENSION_TEXTURE1D:
            Texture1D.MostDetailedMip = most_detailed_mip;
            Texture1D.MipLevels = mip_levels;
            break;
        case D3D11_SRV_DIMENSION_TEXTURE1DARRAY:
            Texture1DArray.MostDetailedMip = most_detailed_mip;
            Texture1DArray.MipLevels = mip_levels;
            Texture1DArray.FirstArraySlice = first_slice;
            Texture1DArray.ArraySize = array_size;
            break;
        case D3D11_SRV_DIMENSION_TEXTURE2D:
            Texture2D.MostDetailedMip = most_detailed_mip;
            Texture2D.MipLevels = mip_levels;
            break;
        case D3D11_SRV_DIMENSION_TEXTURE2DARRAY:
            Texture2DArray.MostDetailedMip = most_detailed_mip;
            Texture2DArray.MipLevels = mip_levels;
            Texture2DArray.FirstArraySlice = first_slice;
            Texture2DArray.ArraySize = array_size;
            break;
        case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY:
            Texture2DMSArray.FirstArraySlice = first_slice;
            Texture2DMSArray.ArraySize = array_size;
            break;
        case D3D11_SRV_DIMENSION_TEXTURE3D:
            Texture3D.MostDetailedMip = most_detailed_mip;
            Texture3D.MipLevels = mip_levels;
            break;
        case D3D11_SRV_DIMENSION_TEXTURECUBE:
            TextureCube.MostDetailedMip = most_detailed_mip;
            TextureCube.MipLevels = mip_levels;
            break;
        case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY:
            TextureCubeArray.MostDetailedMip = most_detailed_mip;
            TextureCubeArray.MipLevels = mip_levels;
            TextureCubeArray.First2DArrayFace = first_slice;
            TextureCubeArray.NumCubes = array_size;
            break;
        case D3D11_SRV_DIMENSION_BUFFEREX:
            BufferEx.FirstElement = most_detailed_mip;
            BufferEx.NumElements = mip_levels;
            BufferEx.Flags = flags;
            break;
        default:
            break;
        }
    }
    explicit CD3D11_SHADER_RESOURCE_VIEW_DESC(ID3D11Buffer*, DXGI_FORMAT format, UINT first_elem,
            UINT elem_cnt, UINT flags = 0);
    explicit CD3D11_SHADER_RESOURCE_VIEW_DESC(ID3D11Texture1D *texture, D3D11_SRV_DIMENSION dim,
            DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, UINT most_detailed_mip = 0, UINT mip_levels = -1,
            UINT first_slice = 0, UINT array_size = -1 );
    explicit CD3D11_SHADER_RESOURCE_VIEW_DESC(ID3D11Texture2D *texture, D3D11_SRV_DIMENSION dim,
            DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, UINT most_detailed_mip = 0, UINT mip_levels = -1,
            UINT first_slice = 0, UINT array_size = -1 );
    explicit CD3D11_SHADER_RESOURCE_VIEW_DESC(ID3D11Texture3D *texture, DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
            UINT most_detailed_mip = 0, UINT mip_levels = -1 );
    ~CD3D11_SHADER_RESOURCE_VIEW_DESC() {}
    explicit CD3D11_SHADER_RESOURCE_VIEW_DESC(const D3D11_SHADER_RESOURCE_VIEW_DESC &other)
        : D3D11_SHADER_RESOURCE_VIEW_DESC(other) {}
    operator const D3D11_SHADER_RESOURCE_VIEW_DESC&() const {
        return *this;
    }
};
#endif
typedef struct D3D11_TEXTURE1D_DESC {
    UINT Width;
    UINT MipLevels;
    UINT ArraySize;
    DXGI_FORMAT Format;
    D3D11_USAGE Usage;
    UINT BindFlags;
    UINT CPUAccessFlags;
    UINT MiscFlags;
} D3D11_TEXTURE1D_DESC;
typedef struct D3D11_TEXTURE2D_DESC {
    UINT Width;
    UINT Height;
    UINT MipLevels;
    UINT ArraySize;
    DXGI_FORMAT Format;
    DXGI_SAMPLE_DESC SampleDesc;
    D3D11_USAGE Usage;
    UINT BindFlags;
    UINT CPUAccessFlags;
    UINT MiscFlags;
} D3D11_TEXTURE2D_DESC;
#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)
struct CD3D11_TEXTURE2D_DESC : public D3D11_TEXTURE2D_DESC {
    CD3D11_TEXTURE2D_DESC() {}
    explicit CD3D11_TEXTURE2D_DESC(const D3D11_TEXTURE2D_DESC &o) : D3D11_TEXTURE2D_DESC(o) {}
    explicit CD3D11_TEXTURE2D_DESC(DXGI_FORMAT format, UINT width, UINT height, UINT arraySize = 1,
            UINT mipLevels = 0, UINT bindFlags = D3D11_BIND_SHADER_RESOURCE,
            D3D11_USAGE usage = D3D11_USAGE_DEFAULT, UINT cpuaccessFlags = 0, UINT sampleCount = 1,
            UINT sampleQuality = 0, UINT miscFlags = 0) {
        Width = width;
        Height = height;
        MipLevels = mipLevels;
        ArraySize = arraySize;
        Format = format;
        SampleDesc.Count = sampleCount;
        SampleDesc.Quality = sampleQuality;
        Usage = usage;
        BindFlags = bindFlags;
        CPUAccessFlags = cpuaccessFlags;
        MiscFlags = miscFlags;
    }
    ~CD3D11_TEXTURE2D_DESC() {}
    operator const D3D11_TEXTURE2D_DESC&() const { return *this; }
};
#endif
typedef struct D3D11_TEXTURE3D_DESC {
    UINT Width;
    UINT Height;
    UINT Depth;
    UINT MipLevels;
    DXGI_FORMAT Format;
    D3D11_USAGE Usage;
    UINT BindFlags;
    UINT CPUAccessFlags;
    UINT MiscFlags;
} D3D11_TEXTURE3D_DESC;
typedef struct D3D11_VIDEO_DECODER_DESC {
    GUID Guid;
    UINT SampleWidth;
    UINT SampleHeight;
    DXGI_FORMAT OutputFormat;
} D3D11_VIDEO_DECODER_DESC;
typedef struct D3D11_VIDEO_DECODER_CONFIG {
    GUID guidConfigBitstreamEncryption;
    GUID guidConfigMBcontrolEncryption;
    GUID guidConfigResidDiffEncryption;
    UINT ConfigBitstreamRaw;
    UINT ConfigMBcontrolRasterOrder;
    UINT ConfigResidDiffHost;
    UINT ConfigSpatialResid8;
    UINT ConfigResid8Subtraction;
    UINT ConfigSpatialHost8or9Clipping;
    UINT ConfigSpatialResidInterleaved;
    UINT ConfigIntraResidUnsigned;
    UINT ConfigResidDiffAccelerator;
    UINT ConfigHostInverseScan;
    UINT ConfigSpecificIDCT;
    UINT Config4GroupedCoefs;
    USHORT ConfigMinRenderTargetBuffCount;
    USHORT ConfigDecoderSpecific;
} D3D11_VIDEO_DECODER_CONFIG;
typedef enum D3D11_VIDEO_FRAME_FORMAT {
    D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE = 0,
    D3D11_VIDEO_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST = 1,
    D3D11_VIDEO_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST = 2
} D3D11_VIDEO_FRAME_FORMAT;
typedef enum D3D11_VIDEO_USAGE {
    D3D11_VIDEO_USAGE_PLAYBACK_NORMAL = 0,
    D3D11_VIDEO_USAGE_OPTIMAL_SPEED = 1,
    D3D11_VIDEO_USAGE_OPTIMAL_QUALITY = 2
} D3D11_VIDEO_USAGE;
typedef struct D3D11_VIDEO_PROCESSOR_CONTENT_DESC {
    D3D11_VIDEO_FRAME_FORMAT InputFrameFormat;
    DXGI_RATIONAL InputFrameRate;
    UINT InputWidth;
    UINT InputHeight;
    DXGI_RATIONAL OutputFrameRate;
    UINT OutputWidth;
    UINT OutputHeight;
    D3D11_VIDEO_USAGE Usage;
} D3D11_VIDEO_PROCESSOR_CONTENT_DESC;
typedef struct D3D11_VIDEO_PROCESSOR_CAPS {
    UINT DeviceCaps;
    UINT FeatureCaps;
    UINT FilterCaps;
    UINT InputFormatCaps;
    UINT AutoStreamCaps;
    UINT StereoCaps;
    UINT RateConversionCapsCount;
    UINT MaxInputStreams;
    UINT MaxStreamStates;
} D3D11_VIDEO_PROCESSOR_CAPS;
typedef struct D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS {
    UINT PastFrames;
    UINT FutureFrames;
    UINT ProcessorCaps;
    UINT ITelecineCaps;
    UINT CustomRateCount;
} D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS;
typedef struct D3D11_VIDEO_PROCESSOR_CUSTOM_RATE {
    DXGI_RATIONAL CustomRate;
    UINT OutputFrames;
    WINBOOL InputInterlaced;
    UINT InputFramesOrFields;
} D3D11_VIDEO_PROCESSOR_CUSTOM_RATE;
typedef enum D3D11_VIDEO_PROCESSOR_FILTER {
    D3D11_VIDEO_PROCESSOR_FILTER_BRIGHTNESS = 0,
    D3D11_VIDEO_PROCESSOR_FILTER_CONTRAST = 1,
    D3D11_VIDEO_PROCESSOR_FILTER_HUE = 2,
    D3D11_VIDEO_PROCESSOR_FILTER_SATURATION = 3,
    D3D11_VIDEO_PROCESSOR_FILTER_NOISE_REDUCTION = 4,
    D3D11_VIDEO_PROCESSOR_FILTER_EDGE_ENHANCEMENT = 5,
    D3D11_VIDEO_PROCESSOR_FILTER_ANAMORPHIC_SCALING = 6,
    D3D11_VIDEO_PROCESSOR_FILTER_STEREO_ADJUSTMENT = 7
} D3D11_VIDEO_PROCESSOR_FILTER;
typedef struct D3D11_VIDEO_PROCESSOR_FILTER_RANGE {
    int Minimum;
    int Maximum;
    int Default;
    float Multiplier;
} D3D11_VIDEO_PROCESSOR_FILTER_RANGE;
typedef enum D3D11_AUTHENTICATED_CHANNEL_TYPE {
    D3D11_AUTHENTICATED_CHANNEL_D3D11 = 1,
    D3D11_AUTHENTICATED_CHANNEL_DRIVER_SOFTWARE = 2,
    D3D11_AUTHENTICATED_CHANNEL_DRIVER_HARDWARE = 3
} D3D11_AUTHENTICATED_CHANNEL_TYPE;
typedef enum D3D11_VDOV_DIMENSION {
    D3D11_VDOV_DIMENSION_UNKNOWN = 0,
    D3D11_VDOV_DIMENSION_TEXTURE2D = 1
} D3D11_VDOV_DIMENSION;
typedef struct D3D11_TEX2D_VDOV {
    UINT ArraySlice;
} D3D11_TEX2D_VDOV;
typedef struct D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC {
    GUID DecodeProfile;
    D3D11_VDOV_DIMENSION ViewDimension;
    __C89_NAMELESS union {
        D3D11_TEX2D_VDOV Texture2D;
    } __C89_NAMELESSUNIONNAME;
} D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC;
typedef enum D3D11_VPIV_DIMENSION {
    D3D11_VPIV_DIMENSION_UNKNOWN = 0,
    D3D11_VPIV_DIMENSION_TEXTURE2D = 1
} D3D11_VPIV_DIMENSION;
typedef struct D3D11_TEX2D_VPIV {
    UINT MipSlice;
    UINT ArraySlice;
} D3D11_TEX2D_VPIV;
typedef struct D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC {
    UINT FourCC;
    D3D11_VPIV_DIMENSION ViewDimension;
    __C89_NAMELESS union {
        D3D11_TEX2D_VPIV Texture2D;
    } __C89_NAMELESSUNIONNAME;
} D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC;
typedef enum D3D11_VPOV_DIMENSION {
    D3D11_VPOV_DIMENSION_UNKNOWN = 0,
    D3D11_VPOV_DIMENSION_TEXTURE2D = 1,
    D3D11_VPOV_DIMENSION_TEXTURE2DARRAY = 2
} D3D11_VPOV_DIMENSION;
typedef struct D3D11_TEX2D_VPOV {
    UINT MipSlice;
} D3D11_TEX2D_VPOV;
typedef struct D3D11_TEX2D_ARRAY_VPOV {
    UINT MipSlice;
    UINT FirstArraySlice;
    UINT ArraySize;
} D3D11_TEX2D_ARRAY_VPOV;
typedef struct D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC {
    D3D11_VPOV_DIMENSION ViewDimension;
    __C89_NAMELESS union {
        D3D11_TEX2D_VPOV Texture2D;
        D3D11_TEX2D_ARRAY_VPOV Texture2DArray;
    } __C89_NAMELESSUNIONNAME;
} D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC;
typedef struct D3D11_VIDEO_CONTENT_PROTECTION_CAPS {
    UINT Caps;
    UINT KeyExchangeTypeCount;
    UINT BlockAlignmentSize;
    ULONGLONG ProtectedMemorySize;
} D3D11_VIDEO_CONTENT_PROTECTION_CAPS;
typedef struct D3D11_ENCRYPTED_BLOCK_INFO {
    UINT NumEncryptedBytesAtBeginning;
    UINT NumBytesInSkipPattern;
    UINT NumBytesInEncryptPattern;
} D3D11_ENCRYPTED_BLOCK_INFO;
typedef struct D3D11_VIDEO_DECODER_BUFFER_DESC {
    D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType;
    UINT BufferIndex;
    UINT DataOffset;
    UINT DataSize;
    UINT FirstMBaddress;
    UINT NumMBsInBuffer;
    UINT Width;
    UINT Height;
    UINT Stride;
    UINT ReservedBits;
    void *pIV;
    UINT IVSize;
    WINBOOL PartialEncryption;
    D3D11_ENCRYPTED_BLOCK_INFO EncryptedBlockInfo;
} D3D11_VIDEO_DECODER_BUFFER_DESC;
typedef struct D3D11_VIDEO_DECODER_EXTENSION {
    UINT Function;
    void *pPrivateInputData;
    UINT PrivateInputDataSize;
    void *pPrivateOutputData;
    UINT PrivateOutputDataSize;
    UINT ResourceCount;
    ID3D11Resource **ppResourceList;
} D3D11_VIDEO_DECODER_EXTENSION;
typedef struct D3D11_VIDEO_COLOR_YCbCrA {
    float Y;
    float Cb;
    float Cr;
    float A;
} D3D11_VIDEO_COLOR_YCbCrA;
typedef struct D3D11_VIDEO_COLOR_RGBA {
    float R;
    float G;
    float B;
    float A;
} D3D11_VIDEO_COLOR_RGBA;
typedef struct D3D11_VIDEO_COLOR {
    __C89_NAMELESS union {
        D3D11_VIDEO_COLOR_YCbCrA YCbCr;
        D3D11_VIDEO_COLOR_RGBA RGBA;
    } __C89_NAMELESSUNIONNAME;
} D3D11_VIDEO_COLOR;
typedef struct D3D11_VIDEO_PROCESSOR_COLOR_SPACE {
    UINT Usage : 1;
    UINT RGB_Range : 1;
    UINT YCbCr_Matrix : 1;
    UINT YCbCr_xvYCC : 1;
    UINT Nominal_Range : 2;
    UINT Reserved : 26;
} D3D11_VIDEO_PROCESSOR_COLOR_SPACE;
typedef struct D3D11_VIDEO_PROCESSOR_STREAM {
    WINBOOL Enable;
    UINT OutputIndex;
    UINT InputFrameOrField;
    UINT PastFrames;
    UINT FutureFrames;
    ID3D11VideoProcessorInputView **ppPastSurfaces;
    ID3D11VideoProcessorInputView *pInputSurface;
    ID3D11VideoProcessorInputView **ppFutureSurfaces;
    ID3D11VideoProcessorInputView **ppPastSurfacesRight;
    ID3D11VideoProcessorInputView *pInputSurfaceRight;
    ID3D11VideoProcessorInputView **ppFutureSurfacesRight;
} D3D11_VIDEO_PROCESSOR_STREAM;
typedef struct D3D11_OMAC {
    BYTE Omac[16];
} D3D11_OMAC;
typedef struct D3D11_AUTHENTICATED_CONFIGURE_OUTPUT {
    D3D11_OMAC omac;
    GUID ConfigureType;
    HANDLE hChannel;
    UINT SequenceNumber;
    HRESULT ReturnCode;
} D3D11_AUTHENTICATED_CONFIGURE_OUTPUT;
typedef struct D3D11_QUERY_DATA_TIMESTAMP_DISJOINT {
    UINT64 Frequency;
    WINBOOL Disjoint;
} D3D11_QUERY_DATA_TIMESTAMP_DISJOINT;
typedef struct D3D11_QUERY_DATA_PIPELINE_STATISTICS {
    UINT64 IAVertices;
    UINT64 IAPrimitives;
    UINT64 VSInvocations;
    UINT64 GSInvocations;
    UINT64 GSPrimitives;
    UINT64 CInvocations;
    UINT64 CPrimitives;
    UINT64 PSInvocations;
    UINT64 HSInvocations;
    UINT64 DSInvocations;
    UINT64 CSInvocations;
} D3D11_QUERY_DATA_PIPELINE_STATISTICS;
/*****************************************************************************
 * ID3D11DeviceChild interface
 */
#ifndef __ID3D11DeviceChild_INTERFACE_DEFINED__
#define __ID3D11DeviceChild_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11DeviceChild, 0x1841e5c8, 0x16b0, 0x489b, 0xbc,0xc8, 0x44,0xcf,0xb0,0xd5,0xde,0xae);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("1841e5c8-16b0-489b-bcc8-44cfb0d5deae")
ID3D11DeviceChild : public IUnknown
{
    virtual void STDMETHODCALLTYPE GetDevice(
        ID3D11Device **ppDevice) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPrivateData(
        REFGUID guid,
        UINT *pDataSize,
        void *pData) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPrivateData(
        REFGUID guid,
        UINT DataSize,
        const void *pData) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface(
        REFGUID guid,
        const IUnknown *pData) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11DeviceChild, 0x1841e5c8, 0x16b0, 0x489b, 0xbc,0xc8, 0x44,0xcf,0xb0,0xd5,0xde,0xae)
#endif
#else
typedef struct ID3D11DeviceChildVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11DeviceChild* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11DeviceChild* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11DeviceChild* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11DeviceChild* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11DeviceChild* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11DeviceChild* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11DeviceChild* This,
        REFGUID guid,
        const IUnknown *pData);

    END_INTERFACE
} ID3D11DeviceChildVtbl;
interface ID3D11DeviceChild {
    CONST_VTBL ID3D11DeviceChildVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11DeviceChild_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11DeviceChild_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11DeviceChild_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11DeviceChild_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11DeviceChild_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11DeviceChild_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11DeviceChild_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11DeviceChild_QueryInterface(ID3D11DeviceChild* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11DeviceChild_AddRef(ID3D11DeviceChild* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11DeviceChild_Release(ID3D11DeviceChild* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11DeviceChild_GetDevice(ID3D11DeviceChild* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11DeviceChild_GetPrivateData(ID3D11DeviceChild* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11DeviceChild_SetPrivateData(ID3D11DeviceChild* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11DeviceChild_SetPrivateDataInterface(ID3D11DeviceChild* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11DeviceChild_GetDevice_Proxy(
    ID3D11DeviceChild* This,
    ID3D11Device **ppDevice);
void __RPC_STUB ID3D11DeviceChild_GetDevice_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11DeviceChild_GetPrivateData_Proxy(
    ID3D11DeviceChild* This,
    REFGUID guid,
    UINT *pDataSize,
    void *pData);
void __RPC_STUB ID3D11DeviceChild_GetPrivateData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11DeviceChild_SetPrivateData_Proxy(
    ID3D11DeviceChild* This,
    REFGUID guid,
    UINT DataSize,
    const void *pData);
void __RPC_STUB ID3D11DeviceChild_SetPrivateData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11DeviceChild_SetPrivateDataInterface_Proxy(
    ID3D11DeviceChild* This,
    REFGUID guid,
    const IUnknown *pData);
void __RPC_STUB ID3D11DeviceChild_SetPrivateDataInterface_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11DeviceChild_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11Asynchronous interface
 */
#ifndef __ID3D11Asynchronous_INTERFACE_DEFINED__
#define __ID3D11Asynchronous_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11Asynchronous, 0x4b35d0cd, 0x1e15, 0x4258, 0x9c,0x98, 0x1b,0x13,0x33,0xf6,0xdd,0x3b);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("4b35d0cd-1e15-4258-9c98-1b1333f6dd3b")
ID3D11Asynchronous : public ID3D11DeviceChild
{
    virtual UINT STDMETHODCALLTYPE GetDataSize(
        ) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11Asynchronous, 0x4b35d0cd, 0x1e15, 0x4258, 0x9c,0x98, 0x1b,0x13,0x33,0xf6,0xdd,0x3b)
#endif
#else
typedef struct ID3D11AsynchronousVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11Asynchronous* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11Asynchronous* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11Asynchronous* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11Asynchronous* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11Asynchronous* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11Asynchronous* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11Asynchronous* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11Asynchronous methods ***/
    UINT (STDMETHODCALLTYPE *GetDataSize)(
        ID3D11Asynchronous* This);

    END_INTERFACE
} ID3D11AsynchronousVtbl;
interface ID3D11Asynchronous {
    CONST_VTBL ID3D11AsynchronousVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11Asynchronous_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11Asynchronous_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11Asynchronous_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11Asynchronous_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11Asynchronous_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11Asynchronous_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11Asynchronous_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11Asynchronous methods ***/
#define ID3D11Asynchronous_GetDataSize(This) (This)->lpVtbl->GetDataSize(This)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11Asynchronous_QueryInterface(ID3D11Asynchronous* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11Asynchronous_AddRef(ID3D11Asynchronous* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11Asynchronous_Release(ID3D11Asynchronous* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11Asynchronous_GetDevice(ID3D11Asynchronous* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11Asynchronous_GetPrivateData(ID3D11Asynchronous* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Asynchronous_SetPrivateData(ID3D11Asynchronous* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Asynchronous_SetPrivateDataInterface(ID3D11Asynchronous* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11Asynchronous methods ***/
static FORCEINLINE UINT ID3D11Asynchronous_GetDataSize(ID3D11Asynchronous* This) {
    return This->lpVtbl->GetDataSize(This);
}
#endif
#endif

#endif

UINT STDMETHODCALLTYPE ID3D11Asynchronous_GetDataSize_Proxy(
    ID3D11Asynchronous* This);
void __RPC_STUB ID3D11Asynchronous_GetDataSize_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11Asynchronous_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11Query interface
 */
#ifndef __ID3D11Query_INTERFACE_DEFINED__
#define __ID3D11Query_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11Query, 0xd6c00747, 0x87b7, 0x425e, 0xb8,0x4d, 0x44,0xd1,0x08,0x56,0x0a,0xfd);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("d6c00747-87b7-425e-b84d-44d108560afd")
ID3D11Query : public ID3D11Asynchronous
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_QUERY_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11Query, 0xd6c00747, 0x87b7, 0x425e, 0xb8,0x4d, 0x44,0xd1,0x08,0x56,0x0a,0xfd)
#endif
#else
typedef struct ID3D11QueryVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11Query* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11Query* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11Query* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11Query* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11Query* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11Query* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11Query* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11Asynchronous methods ***/
    UINT (STDMETHODCALLTYPE *GetDataSize)(
        ID3D11Query* This);

    /*** ID3D11Query methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11Query* This,
        D3D11_QUERY_DESC *pDesc);

    END_INTERFACE
} ID3D11QueryVtbl;
interface ID3D11Query {
    CONST_VTBL ID3D11QueryVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11Query_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11Query_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11Query_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11Query_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11Query_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11Query_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11Query_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11Asynchronous methods ***/
#define ID3D11Query_GetDataSize(This) (This)->lpVtbl->GetDataSize(This)
/*** ID3D11Query methods ***/
#define ID3D11Query_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11Query_QueryInterface(ID3D11Query* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11Query_AddRef(ID3D11Query* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11Query_Release(ID3D11Query* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11Query_GetDevice(ID3D11Query* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11Query_GetPrivateData(ID3D11Query* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Query_SetPrivateData(ID3D11Query* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Query_SetPrivateDataInterface(ID3D11Query* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11Asynchronous methods ***/
static FORCEINLINE UINT ID3D11Query_GetDataSize(ID3D11Query* This) {
    return This->lpVtbl->GetDataSize(This);
}
/*** ID3D11Query methods ***/
static FORCEINLINE void ID3D11Query_GetDesc(ID3D11Query* This,D3D11_QUERY_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11Query_GetDesc_Proxy(
    ID3D11Query* This,
    D3D11_QUERY_DESC *pDesc);
void __RPC_STUB ID3D11Query_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11Query_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11Resource interface
 */
#ifndef __ID3D11Resource_INTERFACE_DEFINED__
#define __ID3D11Resource_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11Resource, 0xdc8e63f3, 0xd12b, 0x4952, 0xb4,0x7b, 0x5e,0x45,0x02,0x6a,0x86,0x2d);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("dc8e63f3-d12b-4952-b47b-5e45026a862d")
ID3D11Resource : public ID3D11DeviceChild
{
    virtual void STDMETHODCALLTYPE GetType(
        D3D11_RESOURCE_DIMENSION *pResourceDimension) = 0;

    virtual void STDMETHODCALLTYPE SetEvictionPriority(
        UINT EvictionPriority) = 0;

    virtual UINT STDMETHODCALLTYPE GetEvictionPriority(
        ) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11Resource, 0xdc8e63f3, 0xd12b, 0x4952, 0xb4,0x7b, 0x5e,0x45,0x02,0x6a,0x86,0x2d)
#endif
#else
typedef struct ID3D11ResourceVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11Resource* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11Resource* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11Resource* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11Resource* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11Resource* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11Resource* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11Resource* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11Resource methods ***/
    void (STDMETHODCALLTYPE *GetType)(
        ID3D11Resource* This,
        D3D11_RESOURCE_DIMENSION *pResourceDimension);

    void (STDMETHODCALLTYPE *SetEvictionPriority)(
        ID3D11Resource* This,
        UINT EvictionPriority);

    UINT (STDMETHODCALLTYPE *GetEvictionPriority)(
        ID3D11Resource* This);

    END_INTERFACE
} ID3D11ResourceVtbl;
interface ID3D11Resource {
    CONST_VTBL ID3D11ResourceVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11Resource_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11Resource_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11Resource_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11Resource_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11Resource_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11Resource_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11Resource_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11Resource methods ***/
#define ID3D11Resource_GetType(This,pResourceDimension) (This)->lpVtbl->GetType(This,pResourceDimension)
#define ID3D11Resource_SetEvictionPriority(This,EvictionPriority) (This)->lpVtbl->SetEvictionPriority(This,EvictionPriority)
#define ID3D11Resource_GetEvictionPriority(This) (This)->lpVtbl->GetEvictionPriority(This)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11Resource_QueryInterface(ID3D11Resource* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11Resource_AddRef(ID3D11Resource* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11Resource_Release(ID3D11Resource* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11Resource_GetDevice(ID3D11Resource* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11Resource_GetPrivateData(ID3D11Resource* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Resource_SetPrivateData(ID3D11Resource* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Resource_SetPrivateDataInterface(ID3D11Resource* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11Resource methods ***/
static FORCEINLINE void ID3D11Resource_GetType(ID3D11Resource* This,D3D11_RESOURCE_DIMENSION *pResourceDimension) {
    This->lpVtbl->GetType(This,pResourceDimension);
}
static FORCEINLINE void ID3D11Resource_SetEvictionPriority(ID3D11Resource* This,UINT EvictionPriority) {
    This->lpVtbl->SetEvictionPriority(This,EvictionPriority);
}
static FORCEINLINE UINT ID3D11Resource_GetEvictionPriority(ID3D11Resource* This) {
    return This->lpVtbl->GetEvictionPriority(This);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11Resource_GetType_Proxy(
    ID3D11Resource* This,
    D3D11_RESOURCE_DIMENSION *pResourceDimension);
void __RPC_STUB ID3D11Resource_GetType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11Resource_SetEvictionPriority_Proxy(
    ID3D11Resource* This,
    UINT EvictionPriority);
void __RPC_STUB ID3D11Resource_SetEvictionPriority_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
UINT STDMETHODCALLTYPE ID3D11Resource_GetEvictionPriority_Proxy(
    ID3D11Resource* This);
void __RPC_STUB ID3D11Resource_GetEvictionPriority_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11Resource_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11View interface
 */
#ifndef __ID3D11View_INTERFACE_DEFINED__
#define __ID3D11View_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11View, 0x839d1216, 0xbb2e, 0x412b, 0xb7,0xf4, 0xa9,0xdb,0xeb,0xe0,0x8e,0xd1);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("839d1216-bb2e-412b-b7f4-a9dbebe08ed1")
ID3D11View : public ID3D11DeviceChild
{
    virtual void STDMETHODCALLTYPE GetResource(
        ID3D11Resource **ppResource) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11View, 0x839d1216, 0xbb2e, 0x412b, 0xb7,0xf4, 0xa9,0xdb,0xeb,0xe0,0x8e,0xd1)
#endif
#else
typedef struct ID3D11ViewVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11View* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11View* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11View* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11View* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11View* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11View* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11View* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11View methods ***/
    void (STDMETHODCALLTYPE *GetResource)(
        ID3D11View* This,
        ID3D11Resource **ppResource);

    END_INTERFACE
} ID3D11ViewVtbl;
interface ID3D11View {
    CONST_VTBL ID3D11ViewVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11View_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11View_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11View_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11View_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11View_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11View_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11View_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11View methods ***/
#define ID3D11View_GetResource(This,ppResource) (This)->lpVtbl->GetResource(This,ppResource)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11View_QueryInterface(ID3D11View* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11View_AddRef(ID3D11View* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11View_Release(ID3D11View* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11View_GetDevice(ID3D11View* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11View_GetPrivateData(ID3D11View* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11View_SetPrivateData(ID3D11View* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11View_SetPrivateDataInterface(ID3D11View* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11View methods ***/
static FORCEINLINE void ID3D11View_GetResource(ID3D11View* This,ID3D11Resource **ppResource) {
    This->lpVtbl->GetResource(This,ppResource);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11View_GetResource_Proxy(
    ID3D11View* This,
    ID3D11Resource **ppResource);
void __RPC_STUB ID3D11View_GetResource_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11View_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11BlendState interface
 */
#ifndef __ID3D11BlendState_INTERFACE_DEFINED__
#define __ID3D11BlendState_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11BlendState, 0x75b68faa, 0x347d, 0x4159, 0x8f,0x45, 0xa0,0x64,0x0f,0x01,0xcd,0x9a);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("75b68faa-347d-4159-8f45-a0640f01cd9a")
ID3D11BlendState : public ID3D11DeviceChild
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_BLEND_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11BlendState, 0x75b68faa, 0x347d, 0x4159, 0x8f,0x45, 0xa0,0x64,0x0f,0x01,0xcd,0x9a)
#endif
#else
typedef struct ID3D11BlendStateVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11BlendState* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11BlendState* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11BlendState* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11BlendState* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11BlendState* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11BlendState* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11BlendState* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11BlendState methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11BlendState* This,
        D3D11_BLEND_DESC *pDesc);

    END_INTERFACE
} ID3D11BlendStateVtbl;
interface ID3D11BlendState {
    CONST_VTBL ID3D11BlendStateVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11BlendState_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11BlendState_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11BlendState_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11BlendState_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11BlendState_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11BlendState_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11BlendState_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11BlendState methods ***/
#define ID3D11BlendState_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11BlendState_QueryInterface(ID3D11BlendState* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11BlendState_AddRef(ID3D11BlendState* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11BlendState_Release(ID3D11BlendState* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11BlendState_GetDevice(ID3D11BlendState* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11BlendState_GetPrivateData(ID3D11BlendState* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11BlendState_SetPrivateData(ID3D11BlendState* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11BlendState_SetPrivateDataInterface(ID3D11BlendState* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11BlendState methods ***/
static FORCEINLINE void ID3D11BlendState_GetDesc(ID3D11BlendState* This,D3D11_BLEND_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11BlendState_GetDesc_Proxy(
    ID3D11BlendState* This,
    D3D11_BLEND_DESC *pDesc);
void __RPC_STUB ID3D11BlendState_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11BlendState_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11Buffer interface
 */
#ifndef __ID3D11Buffer_INTERFACE_DEFINED__
#define __ID3D11Buffer_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11Buffer, 0x48570b85, 0xd1ee, 0x4fcd, 0xa2,0x50, 0xeb,0x35,0x07,0x22,0xb0,0x37);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("48570b85-d1ee-4fcd-a250-eb350722b037")
ID3D11Buffer : public ID3D11Resource
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_BUFFER_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11Buffer, 0x48570b85, 0xd1ee, 0x4fcd, 0xa2,0x50, 0xeb,0x35,0x07,0x22,0xb0,0x37)
#endif
#else
typedef struct ID3D11BufferVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11Buffer* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11Buffer* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11Buffer* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11Buffer* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11Buffer* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11Buffer* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11Buffer* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11Resource methods ***/
    void (STDMETHODCALLTYPE *GetType)(
        ID3D11Buffer* This,
        D3D11_RESOURCE_DIMENSION *pResourceDimension);

    void (STDMETHODCALLTYPE *SetEvictionPriority)(
        ID3D11Buffer* This,
        UINT EvictionPriority);

    UINT (STDMETHODCALLTYPE *GetEvictionPriority)(
        ID3D11Buffer* This);

    /*** ID3D11Buffer methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11Buffer* This,
        D3D11_BUFFER_DESC *pDesc);

    END_INTERFACE
} ID3D11BufferVtbl;
interface ID3D11Buffer {
    CONST_VTBL ID3D11BufferVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11Buffer_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11Buffer_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11Buffer_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11Buffer_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11Buffer_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11Buffer_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11Buffer_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11Resource methods ***/
#define ID3D11Buffer_GetType(This,pResourceDimension) (This)->lpVtbl->GetType(This,pResourceDimension)
#define ID3D11Buffer_SetEvictionPriority(This,EvictionPriority) (This)->lpVtbl->SetEvictionPriority(This,EvictionPriority)
#define ID3D11Buffer_GetEvictionPriority(This) (This)->lpVtbl->GetEvictionPriority(This)
/*** ID3D11Buffer methods ***/
#define ID3D11Buffer_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11Buffer_QueryInterface(ID3D11Buffer* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11Buffer_AddRef(ID3D11Buffer* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11Buffer_Release(ID3D11Buffer* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11Buffer_GetDevice(ID3D11Buffer* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11Buffer_GetPrivateData(ID3D11Buffer* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Buffer_SetPrivateData(ID3D11Buffer* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Buffer_SetPrivateDataInterface(ID3D11Buffer* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11Resource methods ***/
static FORCEINLINE void ID3D11Buffer_GetType(ID3D11Buffer* This,D3D11_RESOURCE_DIMENSION *pResourceDimension) {
    This->lpVtbl->GetType(This,pResourceDimension);
}
static FORCEINLINE void ID3D11Buffer_SetEvictionPriority(ID3D11Buffer* This,UINT EvictionPriority) {
    This->lpVtbl->SetEvictionPriority(This,EvictionPriority);
}
static FORCEINLINE UINT ID3D11Buffer_GetEvictionPriority(ID3D11Buffer* This) {
    return This->lpVtbl->GetEvictionPriority(This);
}
/*** ID3D11Buffer methods ***/
static FORCEINLINE void ID3D11Buffer_GetDesc(ID3D11Buffer* This,D3D11_BUFFER_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11Buffer_GetDesc_Proxy(
    ID3D11Buffer* This,
    D3D11_BUFFER_DESC *pDesc);
void __RPC_STUB ID3D11Buffer_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11Buffer_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11ClassInstance interface
 */
#ifndef __ID3D11ClassInstance_INTERFACE_DEFINED__
#define __ID3D11ClassInstance_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11ClassInstance, 0xa6cd7faa, 0xb0b7, 0x4a2f, 0x94,0x36, 0x86,0x62,0xa6,0x57,0x97,0xcb);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("a6cd7faa-b0b7-4a2f-9436-8662a65797cb")
ID3D11ClassInstance : public ID3D11DeviceChild
{
    virtual void STDMETHODCALLTYPE GetClassLinkage(
        ID3D11ClassLinkage **ppLinkage) = 0;

    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_CLASS_INSTANCE_DESC *pDesc) = 0;

    virtual void STDMETHODCALLTYPE GetInstanceName(
        LPSTR pInstanceName,
        SIZE_T *pBufferLength) = 0;

    virtual void STDMETHODCALLTYPE GetTypeName(
        LPSTR pTypeName,
        SIZE_T *pBufferLength) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11ClassInstance, 0xa6cd7faa, 0xb0b7, 0x4a2f, 0x94,0x36, 0x86,0x62,0xa6,0x57,0x97,0xcb)
#endif
#else
typedef struct ID3D11ClassInstanceVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11ClassInstance* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11ClassInstance* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11ClassInstance* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11ClassInstance* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11ClassInstance* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11ClassInstance* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11ClassInstance* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11ClassInstance methods ***/
    void (STDMETHODCALLTYPE *GetClassLinkage)(
        ID3D11ClassInstance* This,
        ID3D11ClassLinkage **ppLinkage);

    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11ClassInstance* This,
        D3D11_CLASS_INSTANCE_DESC *pDesc);

    void (STDMETHODCALLTYPE *GetInstanceName)(
        ID3D11ClassInstance* This,
        LPSTR pInstanceName,
        SIZE_T *pBufferLength);

    void (STDMETHODCALLTYPE *GetTypeName)(
        ID3D11ClassInstance* This,
        LPSTR pTypeName,
        SIZE_T *pBufferLength);

    END_INTERFACE
} ID3D11ClassInstanceVtbl;
interface ID3D11ClassInstance {
    CONST_VTBL ID3D11ClassInstanceVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11ClassInstance_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11ClassInstance_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11ClassInstance_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11ClassInstance_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11ClassInstance_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11ClassInstance_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11ClassInstance_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11ClassInstance methods ***/
#define ID3D11ClassInstance_GetClassLinkage(This,ppLinkage) (This)->lpVtbl->GetClassLinkage(This,ppLinkage)
#define ID3D11ClassInstance_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#define ID3D11ClassInstance_GetInstanceName(This,pInstanceName,pBufferLength) (This)->lpVtbl->GetInstanceName(This,pInstanceName,pBufferLength)
#define ID3D11ClassInstance_GetTypeName(This,pTypeName,pBufferLength) (This)->lpVtbl->GetTypeName(This,pTypeName,pBufferLength)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11ClassInstance_QueryInterface(ID3D11ClassInstance* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11ClassInstance_AddRef(ID3D11ClassInstance* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11ClassInstance_Release(ID3D11ClassInstance* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11ClassInstance_GetDevice(ID3D11ClassInstance* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11ClassInstance_GetPrivateData(ID3D11ClassInstance* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11ClassInstance_SetPrivateData(ID3D11ClassInstance* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11ClassInstance_SetPrivateDataInterface(ID3D11ClassInstance* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11ClassInstance methods ***/
static FORCEINLINE void ID3D11ClassInstance_GetClassLinkage(ID3D11ClassInstance* This,ID3D11ClassLinkage **ppLinkage) {
    This->lpVtbl->GetClassLinkage(This,ppLinkage);
}
static FORCEINLINE void ID3D11ClassInstance_GetDesc(ID3D11ClassInstance* This,D3D11_CLASS_INSTANCE_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
static FORCEINLINE void ID3D11ClassInstance_GetInstanceName(ID3D11ClassInstance* This,LPSTR pInstanceName,SIZE_T *pBufferLength) {
    This->lpVtbl->GetInstanceName(This,pInstanceName,pBufferLength);
}
static FORCEINLINE void ID3D11ClassInstance_GetTypeName(ID3D11ClassInstance* This,LPSTR pTypeName,SIZE_T *pBufferLength) {
    This->lpVtbl->GetTypeName(This,pTypeName,pBufferLength);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11ClassInstance_GetClassLinkage_Proxy(
    ID3D11ClassInstance* This,
    ID3D11ClassLinkage **ppLinkage);
void __RPC_STUB ID3D11ClassInstance_GetClassLinkage_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11ClassInstance_GetDesc_Proxy(
    ID3D11ClassInstance* This,
    D3D11_CLASS_INSTANCE_DESC *pDesc);
void __RPC_STUB ID3D11ClassInstance_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11ClassInstance_GetInstanceName_Proxy(
    ID3D11ClassInstance* This,
    LPSTR pInstanceName,
    SIZE_T *pBufferLength);
void __RPC_STUB ID3D11ClassInstance_GetInstanceName_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11ClassInstance_GetTypeName_Proxy(
    ID3D11ClassInstance* This,
    LPSTR pTypeName,
    SIZE_T *pBufferLength);
void __RPC_STUB ID3D11ClassInstance_GetTypeName_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11ClassInstance_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11ClassLinkage interface
 */
#ifndef __ID3D11ClassLinkage_INTERFACE_DEFINED__
#define __ID3D11ClassLinkage_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11ClassLinkage, 0xddf57cba, 0x9543, 0x46e4, 0xa1,0x2b, 0xf2,0x07,0xa0,0xfe,0x7f,0xed);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("ddf57cba-9543-46e4-a12b-f207a0fe7fed")
ID3D11ClassLinkage : public ID3D11DeviceChild
{
    virtual HRESULT STDMETHODCALLTYPE GetClassInstance(
        LPCSTR pClassInstanceName,
        UINT InstanceIndex,
        ID3D11ClassInstance **ppInstance) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateClassInstance(
        LPCSTR pClassTypeName,
        UINT ConstantBufferOffset,
        UINT ConstantVectorOffset,
        UINT TextureOffset,
        UINT SamplerOffset,
        ID3D11ClassInstance **ppInstance) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11ClassLinkage, 0xddf57cba, 0x9543, 0x46e4, 0xa1,0x2b, 0xf2,0x07,0xa0,0xfe,0x7f,0xed)
#endif
#else
typedef struct ID3D11ClassLinkageVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11ClassLinkage* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11ClassLinkage* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11ClassLinkage* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11ClassLinkage* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11ClassLinkage* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11ClassLinkage* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11ClassLinkage* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11ClassLinkage methods ***/
    HRESULT (STDMETHODCALLTYPE *GetClassInstance)(
        ID3D11ClassLinkage* This,
        LPCSTR pClassInstanceName,
        UINT InstanceIndex,
        ID3D11ClassInstance **ppInstance);

    HRESULT (STDMETHODCALLTYPE *CreateClassInstance)(
        ID3D11ClassLinkage* This,
        LPCSTR pClassTypeName,
        UINT ConstantBufferOffset,
        UINT ConstantVectorOffset,
        UINT TextureOffset,
        UINT SamplerOffset,
        ID3D11ClassInstance **ppInstance);

    END_INTERFACE
} ID3D11ClassLinkageVtbl;
interface ID3D11ClassLinkage {
    CONST_VTBL ID3D11ClassLinkageVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11ClassLinkage_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11ClassLinkage_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11ClassLinkage_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11ClassLinkage_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11ClassLinkage_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11ClassLinkage_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11ClassLinkage_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11ClassLinkage methods ***/
#define ID3D11ClassLinkage_GetClassInstance(This,pClassInstanceName,InstanceIndex,ppInstance) (This)->lpVtbl->GetClassInstance(This,pClassInstanceName,InstanceIndex,ppInstance)
#define ID3D11ClassLinkage_CreateClassInstance(This,pClassTypeName,ConstantBufferOffset,ConstantVectorOffset,TextureOffset,SamplerOffset,ppInstance) (This)->lpVtbl->CreateClassInstance(This,pClassTypeName,ConstantBufferOffset,ConstantVectorOffset,TextureOffset,SamplerOffset,ppInstance)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11ClassLinkage_QueryInterface(ID3D11ClassLinkage* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11ClassLinkage_AddRef(ID3D11ClassLinkage* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11ClassLinkage_Release(ID3D11ClassLinkage* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11ClassLinkage_GetDevice(ID3D11ClassLinkage* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11ClassLinkage_GetPrivateData(ID3D11ClassLinkage* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11ClassLinkage_SetPrivateData(ID3D11ClassLinkage* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11ClassLinkage_SetPrivateDataInterface(ID3D11ClassLinkage* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11ClassLinkage methods ***/
static FORCEINLINE HRESULT ID3D11ClassLinkage_GetClassInstance(ID3D11ClassLinkage* This,LPCSTR pClassInstanceName,UINT InstanceIndex,ID3D11ClassInstance **ppInstance) {
    return This->lpVtbl->GetClassInstance(This,pClassInstanceName,InstanceIndex,ppInstance);
}
static FORCEINLINE HRESULT ID3D11ClassLinkage_CreateClassInstance(ID3D11ClassLinkage* This,LPCSTR pClassTypeName,UINT ConstantBufferOffset,UINT ConstantVectorOffset,UINT TextureOffset,UINT SamplerOffset,ID3D11ClassInstance **ppInstance) {
    return This->lpVtbl->CreateClassInstance(This,pClassTypeName,ConstantBufferOffset,ConstantVectorOffset,TextureOffset,SamplerOffset,ppInstance);
}
#endif
#endif

#endif

HRESULT STDMETHODCALLTYPE ID3D11ClassLinkage_GetClassInstance_Proxy(
    ID3D11ClassLinkage* This,
    LPCSTR pClassInstanceName,
    UINT InstanceIndex,
    ID3D11ClassInstance **ppInstance);
void __RPC_STUB ID3D11ClassLinkage_GetClassInstance_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11ClassLinkage_CreateClassInstance_Proxy(
    ID3D11ClassLinkage* This,
    LPCSTR pClassTypeName,
    UINT ConstantBufferOffset,
    UINT ConstantVectorOffset,
    UINT TextureOffset,
    UINT SamplerOffset,
    ID3D11ClassInstance **ppInstance);
void __RPC_STUB ID3D11ClassLinkage_CreateClassInstance_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11ClassLinkage_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11CommandList interface
 */
#ifndef __ID3D11CommandList_INTERFACE_DEFINED__
#define __ID3D11CommandList_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11CommandList, 0xa24bc4d1, 0x769e, 0x43f7, 0x80,0x13, 0x98,0xff,0x56,0x6c,0x18,0xe2);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("a24bc4d1-769e-43f7-8013-98ff566c18e2")
ID3D11CommandList : public ID3D11DeviceChild
{
    virtual UINT STDMETHODCALLTYPE GetContextFlags(
        ) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11CommandList, 0xa24bc4d1, 0x769e, 0x43f7, 0x80,0x13, 0x98,0xff,0x56,0x6c,0x18,0xe2)
#endif
#else
typedef struct ID3D11CommandListVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11CommandList* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11CommandList* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11CommandList* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11CommandList* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11CommandList* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11CommandList* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11CommandList* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11CommandList methods ***/
    UINT (STDMETHODCALLTYPE *GetContextFlags)(
        ID3D11CommandList* This);

    END_INTERFACE
} ID3D11CommandListVtbl;
interface ID3D11CommandList {
    CONST_VTBL ID3D11CommandListVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11CommandList_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11CommandList_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11CommandList_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11CommandList_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11CommandList_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11CommandList_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11CommandList_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11CommandList methods ***/
#define ID3D11CommandList_GetContextFlags(This) (This)->lpVtbl->GetContextFlags(This)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11CommandList_QueryInterface(ID3D11CommandList* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11CommandList_AddRef(ID3D11CommandList* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11CommandList_Release(ID3D11CommandList* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11CommandList_GetDevice(ID3D11CommandList* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11CommandList_GetPrivateData(ID3D11CommandList* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11CommandList_SetPrivateData(ID3D11CommandList* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11CommandList_SetPrivateDataInterface(ID3D11CommandList* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11CommandList methods ***/
static FORCEINLINE UINT ID3D11CommandList_GetContextFlags(ID3D11CommandList* This) {
    return This->lpVtbl->GetContextFlags(This);
}
#endif
#endif

#endif

UINT STDMETHODCALLTYPE ID3D11CommandList_GetContextFlags_Proxy(
    ID3D11CommandList* This);
void __RPC_STUB ID3D11CommandList_GetContextFlags_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11CommandList_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11ComputeShader interface
 */
#ifndef __ID3D11ComputeShader_INTERFACE_DEFINED__
#define __ID3D11ComputeShader_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11ComputeShader, 0x4f5b196e, 0xc2bd, 0x495e, 0xbd,0x01, 0x1f,0xde,0xd3,0x8e,0x49,0x69);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("4f5b196e-c2bd-495e-bd01-1fded38e4969")
ID3D11ComputeShader : public ID3D11DeviceChild
{
};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11ComputeShader, 0x4f5b196e, 0xc2bd, 0x495e, 0xbd,0x01, 0x1f,0xde,0xd3,0x8e,0x49,0x69)
#endif
#else
typedef struct ID3D11ComputeShaderVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11ComputeShader* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11ComputeShader* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11ComputeShader* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11ComputeShader* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11ComputeShader* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11ComputeShader* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11ComputeShader* This,
        REFGUID guid,
        const IUnknown *pData);

    END_INTERFACE
} ID3D11ComputeShaderVtbl;
interface ID3D11ComputeShader {
    CONST_VTBL ID3D11ComputeShaderVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11ComputeShader_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11ComputeShader_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11ComputeShader_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11ComputeShader_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11ComputeShader_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11ComputeShader_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11ComputeShader_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11ComputeShader_QueryInterface(ID3D11ComputeShader* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11ComputeShader_AddRef(ID3D11ComputeShader* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11ComputeShader_Release(ID3D11ComputeShader* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11ComputeShader_GetDevice(ID3D11ComputeShader* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11ComputeShader_GetPrivateData(ID3D11ComputeShader* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11ComputeShader_SetPrivateData(ID3D11ComputeShader* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11ComputeShader_SetPrivateDataInterface(ID3D11ComputeShader* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
#endif
#endif

#endif


#endif  /* __ID3D11ComputeShader_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11Counter interface
 */
#ifndef __ID3D11Counter_INTERFACE_DEFINED__
#define __ID3D11Counter_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11Counter, 0x6e8c49fb, 0xa371, 0x4770, 0xb4,0x40, 0x29,0x08,0x60,0x22,0xb7,0x41);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("6e8c49fb-a371-4770-b440-29086022b741")
ID3D11Counter : public ID3D11Asynchronous
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_COUNTER_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11Counter, 0x6e8c49fb, 0xa371, 0x4770, 0xb4,0x40, 0x29,0x08,0x60,0x22,0xb7,0x41)
#endif
#else
typedef struct ID3D11CounterVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11Counter* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11Counter* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11Counter* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11Counter* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11Counter* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11Counter* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11Counter* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11Asynchronous methods ***/
    UINT (STDMETHODCALLTYPE *GetDataSize)(
        ID3D11Counter* This);

    /*** ID3D11Counter methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11Counter* This,
        D3D11_COUNTER_DESC *pDesc);

    END_INTERFACE
} ID3D11CounterVtbl;
interface ID3D11Counter {
    CONST_VTBL ID3D11CounterVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11Counter_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11Counter_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11Counter_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11Counter_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11Counter_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11Counter_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11Counter_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11Asynchronous methods ***/
#define ID3D11Counter_GetDataSize(This) (This)->lpVtbl->GetDataSize(This)
/*** ID3D11Counter methods ***/
#define ID3D11Counter_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11Counter_QueryInterface(ID3D11Counter* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11Counter_AddRef(ID3D11Counter* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11Counter_Release(ID3D11Counter* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11Counter_GetDevice(ID3D11Counter* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11Counter_GetPrivateData(ID3D11Counter* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Counter_SetPrivateData(ID3D11Counter* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Counter_SetPrivateDataInterface(ID3D11Counter* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11Asynchronous methods ***/
static FORCEINLINE UINT ID3D11Counter_GetDataSize(ID3D11Counter* This) {
    return This->lpVtbl->GetDataSize(This);
}
/*** ID3D11Counter methods ***/
static FORCEINLINE void ID3D11Counter_GetDesc(ID3D11Counter* This,D3D11_COUNTER_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11Counter_GetDesc_Proxy(
    ID3D11Counter* This,
    D3D11_COUNTER_DESC *pDesc);
void __RPC_STUB ID3D11Counter_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11Counter_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11DepthStencilState interface
 */
#ifndef __ID3D11DepthStencilState_INTERFACE_DEFINED__
#define __ID3D11DepthStencilState_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11DepthStencilState, 0x03823efb, 0x8d8f, 0x4e1c, 0x9a,0xa2, 0xf6,0x4b,0xb2,0xcb,0xfd,0xf1);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("03823efb-8d8f-4e1c-9aa2-f64bb2cbfdf1")
ID3D11DepthStencilState : public ID3D11DeviceChild
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_DEPTH_STENCIL_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11DepthStencilState, 0x03823efb, 0x8d8f, 0x4e1c, 0x9a,0xa2, 0xf6,0x4b,0xb2,0xcb,0xfd,0xf1)
#endif
#else
typedef struct ID3D11DepthStencilStateVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11DepthStencilState* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11DepthStencilState* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11DepthStencilState* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11DepthStencilState* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11DepthStencilState* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11DepthStencilState* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11DepthStencilState* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11DepthStencilState methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11DepthStencilState* This,
        D3D11_DEPTH_STENCIL_DESC *pDesc);

    END_INTERFACE
} ID3D11DepthStencilStateVtbl;
interface ID3D11DepthStencilState {
    CONST_VTBL ID3D11DepthStencilStateVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11DepthStencilState_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11DepthStencilState_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11DepthStencilState_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11DepthStencilState_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11DepthStencilState_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11DepthStencilState_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11DepthStencilState_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11DepthStencilState methods ***/
#define ID3D11DepthStencilState_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11DepthStencilState_QueryInterface(ID3D11DepthStencilState* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11DepthStencilState_AddRef(ID3D11DepthStencilState* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11DepthStencilState_Release(ID3D11DepthStencilState* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11DepthStencilState_GetDevice(ID3D11DepthStencilState* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11DepthStencilState_GetPrivateData(ID3D11DepthStencilState* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11DepthStencilState_SetPrivateData(ID3D11DepthStencilState* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11DepthStencilState_SetPrivateDataInterface(ID3D11DepthStencilState* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11DepthStencilState methods ***/
static FORCEINLINE void ID3D11DepthStencilState_GetDesc(ID3D11DepthStencilState* This,D3D11_DEPTH_STENCIL_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11DepthStencilState_GetDesc_Proxy(
    ID3D11DepthStencilState* This,
    D3D11_DEPTH_STENCIL_DESC *pDesc);
void __RPC_STUB ID3D11DepthStencilState_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11DepthStencilState_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11DepthStencilView interface
 */
#ifndef __ID3D11DepthStencilView_INTERFACE_DEFINED__
#define __ID3D11DepthStencilView_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11DepthStencilView, 0x9fdac92a, 0x1876, 0x48c3, 0xaf,0xad, 0x25,0xb9,0x4f,0x84,0xa9,0xb6);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("9fdac92a-1876-48c3-afad-25b94f84a9b6")
ID3D11DepthStencilView : public ID3D11View
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11DepthStencilView, 0x9fdac92a, 0x1876, 0x48c3, 0xaf,0xad, 0x25,0xb9,0x4f,0x84,0xa9,0xb6)
#endif
#else
typedef struct ID3D11DepthStencilViewVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11DepthStencilView* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11DepthStencilView* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11DepthStencilView* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11DepthStencilView* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11DepthStencilView* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11DepthStencilView* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11DepthStencilView* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11View methods ***/
    void (STDMETHODCALLTYPE *GetResource)(
        ID3D11DepthStencilView* This,
        ID3D11Resource **ppResource);

    /*** ID3D11DepthStencilView methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11DepthStencilView* This,
        D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc);

    END_INTERFACE
} ID3D11DepthStencilViewVtbl;
interface ID3D11DepthStencilView {
    CONST_VTBL ID3D11DepthStencilViewVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11DepthStencilView_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11DepthStencilView_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11DepthStencilView_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11DepthStencilView_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11DepthStencilView_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11DepthStencilView_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11DepthStencilView_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11View methods ***/
#define ID3D11DepthStencilView_GetResource(This,ppResource) (This)->lpVtbl->GetResource(This,ppResource)
/*** ID3D11DepthStencilView methods ***/
#define ID3D11DepthStencilView_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11DepthStencilView_QueryInterface(ID3D11DepthStencilView* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11DepthStencilView_AddRef(ID3D11DepthStencilView* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11DepthStencilView_Release(ID3D11DepthStencilView* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11DepthStencilView_GetDevice(ID3D11DepthStencilView* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11DepthStencilView_GetPrivateData(ID3D11DepthStencilView* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11DepthStencilView_SetPrivateData(ID3D11DepthStencilView* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11DepthStencilView_SetPrivateDataInterface(ID3D11DepthStencilView* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11View methods ***/
static FORCEINLINE void ID3D11DepthStencilView_GetResource(ID3D11DepthStencilView* This,ID3D11Resource **ppResource) {
    This->lpVtbl->GetResource(This,ppResource);
}
/*** ID3D11DepthStencilView methods ***/
static FORCEINLINE void ID3D11DepthStencilView_GetDesc(ID3D11DepthStencilView* This,D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11DepthStencilView_GetDesc_Proxy(
    ID3D11DepthStencilView* This,
    D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc);
void __RPC_STUB ID3D11DepthStencilView_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11DepthStencilView_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11DomainShader interface
 */
#ifndef __ID3D11DomainShader_INTERFACE_DEFINED__
#define __ID3D11DomainShader_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11DomainShader, 0xf582c508, 0x0f36, 0x490c, 0x99,0x77, 0x31,0xee,0xce,0x26,0x8c,0xfa);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("f582c508-0f36-490c-9977-31eece268cfa")
ID3D11DomainShader : public ID3D11DeviceChild
{
};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11DomainShader, 0xf582c508, 0x0f36, 0x490c, 0x99,0x77, 0x31,0xee,0xce,0x26,0x8c,0xfa)
#endif
#else
typedef struct ID3D11DomainShaderVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11DomainShader* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11DomainShader* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11DomainShader* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11DomainShader* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11DomainShader* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11DomainShader* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11DomainShader* This,
        REFGUID guid,
        const IUnknown *pData);

    END_INTERFACE
} ID3D11DomainShaderVtbl;
interface ID3D11DomainShader {
    CONST_VTBL ID3D11DomainShaderVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11DomainShader_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11DomainShader_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11DomainShader_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11DomainShader_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11DomainShader_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11DomainShader_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11DomainShader_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11DomainShader_QueryInterface(ID3D11DomainShader* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11DomainShader_AddRef(ID3D11DomainShader* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11DomainShader_Release(ID3D11DomainShader* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11DomainShader_GetDevice(ID3D11DomainShader* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11DomainShader_GetPrivateData(ID3D11DomainShader* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11DomainShader_SetPrivateData(ID3D11DomainShader* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11DomainShader_SetPrivateDataInterface(ID3D11DomainShader* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
#endif
#endif

#endif


#endif  /* __ID3D11DomainShader_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11GeometryShader interface
 */
#ifndef __ID3D11GeometryShader_INTERFACE_DEFINED__
#define __ID3D11GeometryShader_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11GeometryShader, 0x38325b96, 0xeffb, 0x4022, 0xba,0x02, 0x2e,0x79,0x5b,0x70,0x27,0x5c);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("38325b96-effb-4022-ba02-2e795b70275c")
ID3D11GeometryShader : public ID3D11DeviceChild
{
};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11GeometryShader, 0x38325b96, 0xeffb, 0x4022, 0xba,0x02, 0x2e,0x79,0x5b,0x70,0x27,0x5c)
#endif
#else
typedef struct ID3D11GeometryShaderVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11GeometryShader* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11GeometryShader* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11GeometryShader* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11GeometryShader* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11GeometryShader* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11GeometryShader* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11GeometryShader* This,
        REFGUID guid,
        const IUnknown *pData);

    END_INTERFACE
} ID3D11GeometryShaderVtbl;
interface ID3D11GeometryShader {
    CONST_VTBL ID3D11GeometryShaderVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11GeometryShader_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11GeometryShader_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11GeometryShader_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11GeometryShader_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11GeometryShader_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11GeometryShader_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11GeometryShader_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11GeometryShader_QueryInterface(ID3D11GeometryShader* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11GeometryShader_AddRef(ID3D11GeometryShader* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11GeometryShader_Release(ID3D11GeometryShader* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11GeometryShader_GetDevice(ID3D11GeometryShader* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11GeometryShader_GetPrivateData(ID3D11GeometryShader* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11GeometryShader_SetPrivateData(ID3D11GeometryShader* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11GeometryShader_SetPrivateDataInterface(ID3D11GeometryShader* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
#endif
#endif

#endif


#endif  /* __ID3D11GeometryShader_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11HullShader interface
 */
#ifndef __ID3D11HullShader_INTERFACE_DEFINED__
#define __ID3D11HullShader_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11HullShader, 0x8e5c6061, 0x628a, 0x4c8e, 0x82,0x64, 0xbb,0xe4,0x5c,0xb3,0xd5,0xdd);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("8e5c6061-628a-4c8e-8264-bbe45cb3d5dd")
ID3D11HullShader : public ID3D11DeviceChild
{
};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11HullShader, 0x8e5c6061, 0x628a, 0x4c8e, 0x82,0x64, 0xbb,0xe4,0x5c,0xb3,0xd5,0xdd)
#endif
#else
typedef struct ID3D11HullShaderVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11HullShader* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11HullShader* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11HullShader* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11HullShader* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11HullShader* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11HullShader* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11HullShader* This,
        REFGUID guid,
        const IUnknown *pData);

    END_INTERFACE
} ID3D11HullShaderVtbl;
interface ID3D11HullShader {
    CONST_VTBL ID3D11HullShaderVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11HullShader_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11HullShader_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11HullShader_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11HullShader_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11HullShader_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11HullShader_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11HullShader_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11HullShader_QueryInterface(ID3D11HullShader* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11HullShader_AddRef(ID3D11HullShader* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11HullShader_Release(ID3D11HullShader* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11HullShader_GetDevice(ID3D11HullShader* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11HullShader_GetPrivateData(ID3D11HullShader* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11HullShader_SetPrivateData(ID3D11HullShader* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11HullShader_SetPrivateDataInterface(ID3D11HullShader* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
#endif
#endif

#endif


#endif  /* __ID3D11HullShader_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11InputLayout interface
 */
#ifndef __ID3D11InputLayout_INTERFACE_DEFINED__
#define __ID3D11InputLayout_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11InputLayout, 0xe4819ddc, 0x4cf0, 0x4025, 0xbd,0x26, 0x5d,0xe8,0x2a,0x3e,0x07,0xb7);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("e4819ddc-4cf0-4025-bd26-5de82a3e07b7")
ID3D11InputLayout : public ID3D11DeviceChild
{
};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11InputLayout, 0xe4819ddc, 0x4cf0, 0x4025, 0xbd,0x26, 0x5d,0xe8,0x2a,0x3e,0x07,0xb7)
#endif
#else
typedef struct ID3D11InputLayoutVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11InputLayout* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11InputLayout* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11InputLayout* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11InputLayout* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11InputLayout* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11InputLayout* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11InputLayout* This,
        REFGUID guid,
        const IUnknown *pData);

    END_INTERFACE
} ID3D11InputLayoutVtbl;
interface ID3D11InputLayout {
    CONST_VTBL ID3D11InputLayoutVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11InputLayout_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11InputLayout_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11InputLayout_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11InputLayout_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11InputLayout_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11InputLayout_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11InputLayout_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11InputLayout_QueryInterface(ID3D11InputLayout* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11InputLayout_AddRef(ID3D11InputLayout* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11InputLayout_Release(ID3D11InputLayout* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11InputLayout_GetDevice(ID3D11InputLayout* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11InputLayout_GetPrivateData(ID3D11InputLayout* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11InputLayout_SetPrivateData(ID3D11InputLayout* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11InputLayout_SetPrivateDataInterface(ID3D11InputLayout* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
#endif
#endif

#endif


#endif  /* __ID3D11InputLayout_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11PixelShader interface
 */
#ifndef __ID3D11PixelShader_INTERFACE_DEFINED__
#define __ID3D11PixelShader_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11PixelShader, 0xea82e40d, 0x51dc, 0x4f33, 0x93,0xd4, 0xdb,0x7c,0x91,0x25,0xae,0x8c);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("ea82e40d-51dc-4f33-93d4-db7c9125ae8c")
ID3D11PixelShader : public ID3D11DeviceChild
{
};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11PixelShader, 0xea82e40d, 0x51dc, 0x4f33, 0x93,0xd4, 0xdb,0x7c,0x91,0x25,0xae,0x8c)
#endif
#else
typedef struct ID3D11PixelShaderVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11PixelShader* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11PixelShader* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11PixelShader* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11PixelShader* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11PixelShader* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11PixelShader* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11PixelShader* This,
        REFGUID guid,
        const IUnknown *pData);

    END_INTERFACE
} ID3D11PixelShaderVtbl;
interface ID3D11PixelShader {
    CONST_VTBL ID3D11PixelShaderVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11PixelShader_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11PixelShader_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11PixelShader_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11PixelShader_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11PixelShader_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11PixelShader_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11PixelShader_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11PixelShader_QueryInterface(ID3D11PixelShader* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11PixelShader_AddRef(ID3D11PixelShader* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11PixelShader_Release(ID3D11PixelShader* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11PixelShader_GetDevice(ID3D11PixelShader* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11PixelShader_GetPrivateData(ID3D11PixelShader* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11PixelShader_SetPrivateData(ID3D11PixelShader* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11PixelShader_SetPrivateDataInterface(ID3D11PixelShader* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
#endif
#endif

#endif


#endif  /* __ID3D11PixelShader_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11Predicate interface
 */
#ifndef __ID3D11Predicate_INTERFACE_DEFINED__
#define __ID3D11Predicate_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11Predicate, 0x9eb576dd, 0x9f77, 0x4d86, 0x81,0xaa, 0x8b,0xab,0x5f,0xe4,0x90,0xe2);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("9eb576dd-9f77-4d86-81aa-8bab5fe490e2")
ID3D11Predicate : public ID3D11Query
{
};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11Predicate, 0x9eb576dd, 0x9f77, 0x4d86, 0x81,0xaa, 0x8b,0xab,0x5f,0xe4,0x90,0xe2)
#endif
#else
typedef struct ID3D11PredicateVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11Predicate* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11Predicate* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11Predicate* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11Predicate* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11Predicate* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11Predicate* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11Predicate* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11Asynchronous methods ***/
    UINT (STDMETHODCALLTYPE *GetDataSize)(
        ID3D11Predicate* This);

    /*** ID3D11Query methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11Predicate* This,
        D3D11_QUERY_DESC *pDesc);

    END_INTERFACE
} ID3D11PredicateVtbl;
interface ID3D11Predicate {
    CONST_VTBL ID3D11PredicateVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11Predicate_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11Predicate_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11Predicate_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11Predicate_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11Predicate_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11Predicate_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11Predicate_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11Asynchronous methods ***/
#define ID3D11Predicate_GetDataSize(This) (This)->lpVtbl->GetDataSize(This)
/*** ID3D11Query methods ***/
#define ID3D11Predicate_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11Predicate_QueryInterface(ID3D11Predicate* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11Predicate_AddRef(ID3D11Predicate* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11Predicate_Release(ID3D11Predicate* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11Predicate_GetDevice(ID3D11Predicate* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11Predicate_GetPrivateData(ID3D11Predicate* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Predicate_SetPrivateData(ID3D11Predicate* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Predicate_SetPrivateDataInterface(ID3D11Predicate* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11Asynchronous methods ***/
static FORCEINLINE UINT ID3D11Predicate_GetDataSize(ID3D11Predicate* This) {
    return This->lpVtbl->GetDataSize(This);
}
/*** ID3D11Query methods ***/
static FORCEINLINE void ID3D11Predicate_GetDesc(ID3D11Predicate* This,D3D11_QUERY_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif


#endif  /* __ID3D11Predicate_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11RasterizerState interface
 */
#ifndef __ID3D11RasterizerState_INTERFACE_DEFINED__
#define __ID3D11RasterizerState_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11RasterizerState, 0x9bb4ab81, 0xab1a, 0x4d8f, 0xb5,0x06, 0xfc,0x04,0x20,0x0b,0x6e,0xe7);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("9bb4ab81-ab1a-4d8f-b506-fc04200b6ee7")
ID3D11RasterizerState : public ID3D11DeviceChild
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_RASTERIZER_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11RasterizerState, 0x9bb4ab81, 0xab1a, 0x4d8f, 0xb5,0x06, 0xfc,0x04,0x20,0x0b,0x6e,0xe7)
#endif
#else
typedef struct ID3D11RasterizerStateVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11RasterizerState* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11RasterizerState* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11RasterizerState* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11RasterizerState* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11RasterizerState* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11RasterizerState* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11RasterizerState* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11RasterizerState methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11RasterizerState* This,
        D3D11_RASTERIZER_DESC *pDesc);

    END_INTERFACE
} ID3D11RasterizerStateVtbl;
interface ID3D11RasterizerState {
    CONST_VTBL ID3D11RasterizerStateVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11RasterizerState_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11RasterizerState_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11RasterizerState_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11RasterizerState_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11RasterizerState_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11RasterizerState_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11RasterizerState_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11RasterizerState methods ***/
#define ID3D11RasterizerState_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11RasterizerState_QueryInterface(ID3D11RasterizerState* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11RasterizerState_AddRef(ID3D11RasterizerState* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11RasterizerState_Release(ID3D11RasterizerState* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11RasterizerState_GetDevice(ID3D11RasterizerState* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11RasterizerState_GetPrivateData(ID3D11RasterizerState* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11RasterizerState_SetPrivateData(ID3D11RasterizerState* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11RasterizerState_SetPrivateDataInterface(ID3D11RasterizerState* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11RasterizerState methods ***/
static FORCEINLINE void ID3D11RasterizerState_GetDesc(ID3D11RasterizerState* This,D3D11_RASTERIZER_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11RasterizerState_GetDesc_Proxy(
    ID3D11RasterizerState* This,
    D3D11_RASTERIZER_DESC *pDesc);
void __RPC_STUB ID3D11RasterizerState_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11RasterizerState_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11RenderTargetView interface
 */
#ifndef __ID3D11RenderTargetView_INTERFACE_DEFINED__
#define __ID3D11RenderTargetView_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11RenderTargetView, 0xdfdba067, 0x0b8d, 0x4865, 0x87,0x5b, 0xd7,0xb4,0x51,0x6c,0xc1,0x64);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("dfdba067-0b8d-4865-875b-d7b4516cc164")
ID3D11RenderTargetView : public ID3D11View
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_RENDER_TARGET_VIEW_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11RenderTargetView, 0xdfdba067, 0x0b8d, 0x4865, 0x87,0x5b, 0xd7,0xb4,0x51,0x6c,0xc1,0x64)
#endif
#else
typedef struct ID3D11RenderTargetViewVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11RenderTargetView* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11RenderTargetView* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11RenderTargetView* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11RenderTargetView* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11RenderTargetView* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11RenderTargetView* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11RenderTargetView* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11View methods ***/
    void (STDMETHODCALLTYPE *GetResource)(
        ID3D11RenderTargetView* This,
        ID3D11Resource **ppResource);

    /*** ID3D11RenderTargetView methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11RenderTargetView* This,
        D3D11_RENDER_TARGET_VIEW_DESC *pDesc);

    END_INTERFACE
} ID3D11RenderTargetViewVtbl;
interface ID3D11RenderTargetView {
    CONST_VTBL ID3D11RenderTargetViewVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11RenderTargetView_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11RenderTargetView_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11RenderTargetView_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11RenderTargetView_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11RenderTargetView_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11RenderTargetView_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11RenderTargetView_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11View methods ***/
#define ID3D11RenderTargetView_GetResource(This,ppResource) (This)->lpVtbl->GetResource(This,ppResource)
/*** ID3D11RenderTargetView methods ***/
#define ID3D11RenderTargetView_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11RenderTargetView_QueryInterface(ID3D11RenderTargetView* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11RenderTargetView_AddRef(ID3D11RenderTargetView* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11RenderTargetView_Release(ID3D11RenderTargetView* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11RenderTargetView_GetDevice(ID3D11RenderTargetView* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11RenderTargetView_GetPrivateData(ID3D11RenderTargetView* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11RenderTargetView_SetPrivateData(ID3D11RenderTargetView* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11RenderTargetView_SetPrivateDataInterface(ID3D11RenderTargetView* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11View methods ***/
static FORCEINLINE void ID3D11RenderTargetView_GetResource(ID3D11RenderTargetView* This,ID3D11Resource **ppResource) {
    This->lpVtbl->GetResource(This,ppResource);
}
/*** ID3D11RenderTargetView methods ***/
static FORCEINLINE void ID3D11RenderTargetView_GetDesc(ID3D11RenderTargetView* This,D3D11_RENDER_TARGET_VIEW_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11RenderTargetView_GetDesc_Proxy(
    ID3D11RenderTargetView* This,
    D3D11_RENDER_TARGET_VIEW_DESC *pDesc);
void __RPC_STUB ID3D11RenderTargetView_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11RenderTargetView_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11SamplerState interface
 */
#ifndef __ID3D11SamplerState_INTERFACE_DEFINED__
#define __ID3D11SamplerState_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11SamplerState, 0xda6fea51, 0x564c, 0x4487, 0x98,0x10, 0xf0,0xd0,0xf9,0xb4,0xe3,0xa5);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("da6fea51-564c-4487-9810-f0d0f9b4e3a5")
ID3D11SamplerState : public ID3D11DeviceChild
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_SAMPLER_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11SamplerState, 0xda6fea51, 0x564c, 0x4487, 0x98,0x10, 0xf0,0xd0,0xf9,0xb4,0xe3,0xa5)
#endif
#else
typedef struct ID3D11SamplerStateVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11SamplerState* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11SamplerState* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11SamplerState* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11SamplerState* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11SamplerState* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11SamplerState* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11SamplerState* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11SamplerState methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11SamplerState* This,
        D3D11_SAMPLER_DESC *pDesc);

    END_INTERFACE
} ID3D11SamplerStateVtbl;
interface ID3D11SamplerState {
    CONST_VTBL ID3D11SamplerStateVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11SamplerState_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11SamplerState_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11SamplerState_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11SamplerState_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11SamplerState_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11SamplerState_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11SamplerState_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11SamplerState methods ***/
#define ID3D11SamplerState_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11SamplerState_QueryInterface(ID3D11SamplerState* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11SamplerState_AddRef(ID3D11SamplerState* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11SamplerState_Release(ID3D11SamplerState* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11SamplerState_GetDevice(ID3D11SamplerState* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11SamplerState_GetPrivateData(ID3D11SamplerState* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11SamplerState_SetPrivateData(ID3D11SamplerState* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11SamplerState_SetPrivateDataInterface(ID3D11SamplerState* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11SamplerState methods ***/
static FORCEINLINE void ID3D11SamplerState_GetDesc(ID3D11SamplerState* This,D3D11_SAMPLER_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11SamplerState_GetDesc_Proxy(
    ID3D11SamplerState* This,
    D3D11_SAMPLER_DESC *pDesc);
void __RPC_STUB ID3D11SamplerState_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11SamplerState_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11ShaderResourceView interface
 */
#ifndef __ID3D11ShaderResourceView_INTERFACE_DEFINED__
#define __ID3D11ShaderResourceView_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11ShaderResourceView, 0xb0e06fe0, 0x8192, 0x4e1a, 0xb1,0xca, 0x36,0xd7,0x41,0x47,0x10,0xb2);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("b0e06fe0-8192-4e1a-b1ca-36d7414710b2")
ID3D11ShaderResourceView : public ID3D11View
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11ShaderResourceView, 0xb0e06fe0, 0x8192, 0x4e1a, 0xb1,0xca, 0x36,0xd7,0x41,0x47,0x10,0xb2)
#endif
#else
typedef struct ID3D11ShaderResourceViewVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11ShaderResourceView* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11ShaderResourceView* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11ShaderResourceView* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11ShaderResourceView* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11ShaderResourceView* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11ShaderResourceView* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11ShaderResourceView* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11View methods ***/
    void (STDMETHODCALLTYPE *GetResource)(
        ID3D11ShaderResourceView* This,
        ID3D11Resource **ppResource);

    /*** ID3D11ShaderResourceView methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11ShaderResourceView* This,
        D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc);

    END_INTERFACE
} ID3D11ShaderResourceViewVtbl;
interface ID3D11ShaderResourceView {
    CONST_VTBL ID3D11ShaderResourceViewVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11ShaderResourceView_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11ShaderResourceView_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11ShaderResourceView_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11ShaderResourceView_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11ShaderResourceView_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11ShaderResourceView_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11ShaderResourceView_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11View methods ***/
#define ID3D11ShaderResourceView_GetResource(This,ppResource) (This)->lpVtbl->GetResource(This,ppResource)
/*** ID3D11ShaderResourceView methods ***/
#define ID3D11ShaderResourceView_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11ShaderResourceView_QueryInterface(ID3D11ShaderResourceView* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11ShaderResourceView_AddRef(ID3D11ShaderResourceView* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11ShaderResourceView_Release(ID3D11ShaderResourceView* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11ShaderResourceView_GetDevice(ID3D11ShaderResourceView* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11ShaderResourceView_GetPrivateData(ID3D11ShaderResourceView* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11ShaderResourceView_SetPrivateData(ID3D11ShaderResourceView* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11ShaderResourceView_SetPrivateDataInterface(ID3D11ShaderResourceView* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11View methods ***/
static FORCEINLINE void ID3D11ShaderResourceView_GetResource(ID3D11ShaderResourceView* This,ID3D11Resource **ppResource) {
    This->lpVtbl->GetResource(This,ppResource);
}
/*** ID3D11ShaderResourceView methods ***/
static FORCEINLINE void ID3D11ShaderResourceView_GetDesc(ID3D11ShaderResourceView* This,D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11ShaderResourceView_GetDesc_Proxy(
    ID3D11ShaderResourceView* This,
    D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc);
void __RPC_STUB ID3D11ShaderResourceView_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11ShaderResourceView_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11Texture1D interface
 */
#ifndef __ID3D11Texture1D_INTERFACE_DEFINED__
#define __ID3D11Texture1D_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11Texture1D, 0xf8fb5c27, 0xc6b3, 0x4f75, 0xa4,0xc8, 0x43,0x9a,0xf2,0xef,0x56,0x4c);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("f8fb5c27-c6b3-4f75-a4c8-439af2ef564c")
ID3D11Texture1D : public ID3D11Resource
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_TEXTURE1D_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11Texture1D, 0xf8fb5c27, 0xc6b3, 0x4f75, 0xa4,0xc8, 0x43,0x9a,0xf2,0xef,0x56,0x4c)
#endif
#else
typedef struct ID3D11Texture1DVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11Texture1D* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11Texture1D* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11Texture1D* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11Texture1D* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11Texture1D* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11Texture1D* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11Texture1D* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11Resource methods ***/
    void (STDMETHODCALLTYPE *GetType)(
        ID3D11Texture1D* This,
        D3D11_RESOURCE_DIMENSION *pResourceDimension);

    void (STDMETHODCALLTYPE *SetEvictionPriority)(
        ID3D11Texture1D* This,
        UINT EvictionPriority);

    UINT (STDMETHODCALLTYPE *GetEvictionPriority)(
        ID3D11Texture1D* This);

    /*** ID3D11Texture1D methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11Texture1D* This,
        D3D11_TEXTURE1D_DESC *pDesc);

    END_INTERFACE
} ID3D11Texture1DVtbl;
interface ID3D11Texture1D {
    CONST_VTBL ID3D11Texture1DVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11Texture1D_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11Texture1D_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11Texture1D_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11Texture1D_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11Texture1D_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11Texture1D_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11Texture1D_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11Resource methods ***/
#define ID3D11Texture1D_GetType(This,pResourceDimension) (This)->lpVtbl->GetType(This,pResourceDimension)
#define ID3D11Texture1D_SetEvictionPriority(This,EvictionPriority) (This)->lpVtbl->SetEvictionPriority(This,EvictionPriority)
#define ID3D11Texture1D_GetEvictionPriority(This) (This)->lpVtbl->GetEvictionPriority(This)
/*** ID3D11Texture1D methods ***/
#define ID3D11Texture1D_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11Texture1D_QueryInterface(ID3D11Texture1D* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11Texture1D_AddRef(ID3D11Texture1D* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11Texture1D_Release(ID3D11Texture1D* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11Texture1D_GetDevice(ID3D11Texture1D* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11Texture1D_GetPrivateData(ID3D11Texture1D* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Texture1D_SetPrivateData(ID3D11Texture1D* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Texture1D_SetPrivateDataInterface(ID3D11Texture1D* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11Resource methods ***/
static FORCEINLINE void ID3D11Texture1D_GetType(ID3D11Texture1D* This,D3D11_RESOURCE_DIMENSION *pResourceDimension) {
    This->lpVtbl->GetType(This,pResourceDimension);
}
static FORCEINLINE void ID3D11Texture1D_SetEvictionPriority(ID3D11Texture1D* This,UINT EvictionPriority) {
    This->lpVtbl->SetEvictionPriority(This,EvictionPriority);
}
static FORCEINLINE UINT ID3D11Texture1D_GetEvictionPriority(ID3D11Texture1D* This) {
    return This->lpVtbl->GetEvictionPriority(This);
}
/*** ID3D11Texture1D methods ***/
static FORCEINLINE void ID3D11Texture1D_GetDesc(ID3D11Texture1D* This,D3D11_TEXTURE1D_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11Texture1D_GetDesc_Proxy(
    ID3D11Texture1D* This,
    D3D11_TEXTURE1D_DESC *pDesc);
void __RPC_STUB ID3D11Texture1D_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11Texture1D_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11Texture2D interface
 */
#ifndef __ID3D11Texture2D_INTERFACE_DEFINED__
#define __ID3D11Texture2D_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11Texture2D, 0x6f15aaf2, 0xd208, 0x4e89, 0x9a,0xb4, 0x48,0x95,0x35,0xd3,0x4f,0x9c);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("6f15aaf2-d208-4e89-9ab4-489535d34f9c")
ID3D11Texture2D : public ID3D11Resource
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_TEXTURE2D_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11Texture2D, 0x6f15aaf2, 0xd208, 0x4e89, 0x9a,0xb4, 0x48,0x95,0x35,0xd3,0x4f,0x9c)
#endif
#else
typedef struct ID3D11Texture2DVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11Texture2D* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11Texture2D* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11Texture2D* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11Texture2D* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11Texture2D* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11Texture2D* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11Texture2D* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11Resource methods ***/
    void (STDMETHODCALLTYPE *GetType)(
        ID3D11Texture2D* This,
        D3D11_RESOURCE_DIMENSION *pResourceDimension);

    void (STDMETHODCALLTYPE *SetEvictionPriority)(
        ID3D11Texture2D* This,
        UINT EvictionPriority);

    UINT (STDMETHODCALLTYPE *GetEvictionPriority)(
        ID3D11Texture2D* This);

    /*** ID3D11Texture2D methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11Texture2D* This,
        D3D11_TEXTURE2D_DESC *pDesc);

    END_INTERFACE
} ID3D11Texture2DVtbl;
interface ID3D11Texture2D {
    CONST_VTBL ID3D11Texture2DVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11Texture2D_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11Texture2D_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11Texture2D_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11Texture2D_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11Texture2D_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11Texture2D_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11Texture2D_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11Resource methods ***/
#define ID3D11Texture2D_GetType(This,pResourceDimension) (This)->lpVtbl->GetType(This,pResourceDimension)
#define ID3D11Texture2D_SetEvictionPriority(This,EvictionPriority) (This)->lpVtbl->SetEvictionPriority(This,EvictionPriority)
#define ID3D11Texture2D_GetEvictionPriority(This) (This)->lpVtbl->GetEvictionPriority(This)
/*** ID3D11Texture2D methods ***/
#define ID3D11Texture2D_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11Texture2D_QueryInterface(ID3D11Texture2D* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11Texture2D_AddRef(ID3D11Texture2D* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11Texture2D_Release(ID3D11Texture2D* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11Texture2D_GetDevice(ID3D11Texture2D* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11Texture2D_GetPrivateData(ID3D11Texture2D* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Texture2D_SetPrivateData(ID3D11Texture2D* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Texture2D_SetPrivateDataInterface(ID3D11Texture2D* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11Resource methods ***/
static FORCEINLINE void ID3D11Texture2D_GetType(ID3D11Texture2D* This,D3D11_RESOURCE_DIMENSION *pResourceDimension) {
    This->lpVtbl->GetType(This,pResourceDimension);
}
static FORCEINLINE void ID3D11Texture2D_SetEvictionPriority(ID3D11Texture2D* This,UINT EvictionPriority) {
    This->lpVtbl->SetEvictionPriority(This,EvictionPriority);
}
static FORCEINLINE UINT ID3D11Texture2D_GetEvictionPriority(ID3D11Texture2D* This) {
    return This->lpVtbl->GetEvictionPriority(This);
}
/*** ID3D11Texture2D methods ***/
static FORCEINLINE void ID3D11Texture2D_GetDesc(ID3D11Texture2D* This,D3D11_TEXTURE2D_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11Texture2D_GetDesc_Proxy(
    ID3D11Texture2D* This,
    D3D11_TEXTURE2D_DESC *pDesc);
void __RPC_STUB ID3D11Texture2D_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11Texture2D_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11Texture3D interface
 */
#ifndef __ID3D11Texture3D_INTERFACE_DEFINED__
#define __ID3D11Texture3D_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11Texture3D, 0x037e866e, 0xf56d, 0x4357, 0xa8,0xaf, 0x9d,0xab,0xbe,0x6e,0x25,0x0e);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("037e866e-f56d-4357-a8af-9dabbe6e250e")
ID3D11Texture3D : public ID3D11Resource
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_TEXTURE3D_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11Texture3D, 0x037e866e, 0xf56d, 0x4357, 0xa8,0xaf, 0x9d,0xab,0xbe,0x6e,0x25,0x0e)
#endif
#else
typedef struct ID3D11Texture3DVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11Texture3D* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11Texture3D* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11Texture3D* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11Texture3D* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11Texture3D* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11Texture3D* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11Texture3D* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11Resource methods ***/
    void (STDMETHODCALLTYPE *GetType)(
        ID3D11Texture3D* This,
        D3D11_RESOURCE_DIMENSION *pResourceDimension);

    void (STDMETHODCALLTYPE *SetEvictionPriority)(
        ID3D11Texture3D* This,
        UINT EvictionPriority);

    UINT (STDMETHODCALLTYPE *GetEvictionPriority)(
        ID3D11Texture3D* This);

    /*** ID3D11Texture3D methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11Texture3D* This,
        D3D11_TEXTURE3D_DESC *pDesc);

    END_INTERFACE
} ID3D11Texture3DVtbl;
interface ID3D11Texture3D {
    CONST_VTBL ID3D11Texture3DVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11Texture3D_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11Texture3D_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11Texture3D_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11Texture3D_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11Texture3D_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11Texture3D_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11Texture3D_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11Resource methods ***/
#define ID3D11Texture3D_GetType(This,pResourceDimension) (This)->lpVtbl->GetType(This,pResourceDimension)
#define ID3D11Texture3D_SetEvictionPriority(This,EvictionPriority) (This)->lpVtbl->SetEvictionPriority(This,EvictionPriority)
#define ID3D11Texture3D_GetEvictionPriority(This) (This)->lpVtbl->GetEvictionPriority(This)
/*** ID3D11Texture3D methods ***/
#define ID3D11Texture3D_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11Texture3D_QueryInterface(ID3D11Texture3D* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11Texture3D_AddRef(ID3D11Texture3D* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11Texture3D_Release(ID3D11Texture3D* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11Texture3D_GetDevice(ID3D11Texture3D* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11Texture3D_GetPrivateData(ID3D11Texture3D* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Texture3D_SetPrivateData(ID3D11Texture3D* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Texture3D_SetPrivateDataInterface(ID3D11Texture3D* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11Resource methods ***/
static FORCEINLINE void ID3D11Texture3D_GetType(ID3D11Texture3D* This,D3D11_RESOURCE_DIMENSION *pResourceDimension) {
    This->lpVtbl->GetType(This,pResourceDimension);
}
static FORCEINLINE void ID3D11Texture3D_SetEvictionPriority(ID3D11Texture3D* This,UINT EvictionPriority) {
    This->lpVtbl->SetEvictionPriority(This,EvictionPriority);
}
static FORCEINLINE UINT ID3D11Texture3D_GetEvictionPriority(ID3D11Texture3D* This) {
    return This->lpVtbl->GetEvictionPriority(This);
}
/*** ID3D11Texture3D methods ***/
static FORCEINLINE void ID3D11Texture3D_GetDesc(ID3D11Texture3D* This,D3D11_TEXTURE3D_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11Texture3D_GetDesc_Proxy(
    ID3D11Texture3D* This,
    D3D11_TEXTURE3D_DESC *pDesc);
void __RPC_STUB ID3D11Texture3D_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11Texture3D_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11UnorderedAccessView interface
 */
#ifndef __ID3D11UnorderedAccessView_INTERFACE_DEFINED__
#define __ID3D11UnorderedAccessView_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11UnorderedAccessView, 0x28acf509, 0x7f5c, 0x48f6, 0x86,0x11, 0xf3,0x16,0x01,0x0a,0x63,0x80);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("28acf509-7f5c-48f6-8611-f316010a6380")
ID3D11UnorderedAccessView : public ID3D11View
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11UnorderedAccessView, 0x28acf509, 0x7f5c, 0x48f6, 0x86,0x11, 0xf3,0x16,0x01,0x0a,0x63,0x80)
#endif
#else
typedef struct ID3D11UnorderedAccessViewVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11UnorderedAccessView* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11UnorderedAccessView* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11UnorderedAccessView* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11UnorderedAccessView* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11UnorderedAccessView* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11UnorderedAccessView* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11UnorderedAccessView* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11View methods ***/
    void (STDMETHODCALLTYPE *GetResource)(
        ID3D11UnorderedAccessView* This,
        ID3D11Resource **ppResource);

    /*** ID3D11UnorderedAccessView methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11UnorderedAccessView* This,
        D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc);

    END_INTERFACE
} ID3D11UnorderedAccessViewVtbl;
interface ID3D11UnorderedAccessView {
    CONST_VTBL ID3D11UnorderedAccessViewVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11UnorderedAccessView_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11UnorderedAccessView_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11UnorderedAccessView_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11UnorderedAccessView_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11UnorderedAccessView_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11UnorderedAccessView_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11UnorderedAccessView_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11View methods ***/
#define ID3D11UnorderedAccessView_GetResource(This,ppResource) (This)->lpVtbl->GetResource(This,ppResource)
/*** ID3D11UnorderedAccessView methods ***/
#define ID3D11UnorderedAccessView_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11UnorderedAccessView_QueryInterface(ID3D11UnorderedAccessView* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11UnorderedAccessView_AddRef(ID3D11UnorderedAccessView* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11UnorderedAccessView_Release(ID3D11UnorderedAccessView* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11UnorderedAccessView_GetDevice(ID3D11UnorderedAccessView* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11UnorderedAccessView_GetPrivateData(ID3D11UnorderedAccessView* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11UnorderedAccessView_SetPrivateData(ID3D11UnorderedAccessView* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11UnorderedAccessView_SetPrivateDataInterface(ID3D11UnorderedAccessView* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11View methods ***/
static FORCEINLINE void ID3D11UnorderedAccessView_GetResource(ID3D11UnorderedAccessView* This,ID3D11Resource **ppResource) {
    This->lpVtbl->GetResource(This,ppResource);
}
/*** ID3D11UnorderedAccessView methods ***/
static FORCEINLINE void ID3D11UnorderedAccessView_GetDesc(ID3D11UnorderedAccessView* This,D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11UnorderedAccessView_GetDesc_Proxy(
    ID3D11UnorderedAccessView* This,
    D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc);
void __RPC_STUB ID3D11UnorderedAccessView_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11UnorderedAccessView_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11VertexShader interface
 */
#ifndef __ID3D11VertexShader_INTERFACE_DEFINED__
#define __ID3D11VertexShader_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11VertexShader, 0x3b301d64, 0xd678, 0x4289, 0x88,0x97, 0x22,0xf8,0x92,0x8b,0x72,0xf3);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("3b301d64-d678-4289-8897-22f8928b72f3")
ID3D11VertexShader : public ID3D11DeviceChild
{
};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11VertexShader, 0x3b301d64, 0xd678, 0x4289, 0x88,0x97, 0x22,0xf8,0x92,0x8b,0x72,0xf3)
#endif
#else
typedef struct ID3D11VertexShaderVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11VertexShader* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11VertexShader* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11VertexShader* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11VertexShader* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11VertexShader* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11VertexShader* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11VertexShader* This,
        REFGUID guid,
        const IUnknown *pData);

    END_INTERFACE
} ID3D11VertexShaderVtbl;
interface ID3D11VertexShader {
    CONST_VTBL ID3D11VertexShaderVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11VertexShader_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11VertexShader_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11VertexShader_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11VertexShader_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11VertexShader_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11VertexShader_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11VertexShader_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11VertexShader_QueryInterface(ID3D11VertexShader* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11VertexShader_AddRef(ID3D11VertexShader* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11VertexShader_Release(ID3D11VertexShader* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11VertexShader_GetDevice(ID3D11VertexShader* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11VertexShader_GetPrivateData(ID3D11VertexShader* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VertexShader_SetPrivateData(ID3D11VertexShader* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VertexShader_SetPrivateDataInterface(ID3D11VertexShader* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
#endif
#endif

#endif


#endif  /* __ID3D11VertexShader_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11DeviceContext interface
 */
#ifndef __ID3D11DeviceContext_INTERFACE_DEFINED__
#define __ID3D11DeviceContext_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11DeviceContext, 0xc0bfa96c, 0xe089, 0x44fb, 0x8e,0xaf, 0x26,0xf8,0x79,0x61,0x90,0xda);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("c0bfa96c-e089-44fb-8eaf-26f8796190da")
ID3D11DeviceContext : public ID3D11DeviceChild
{
    virtual void STDMETHODCALLTYPE VSSetConstantBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppConstantBuffers) = 0;

    virtual void STDMETHODCALLTYPE PSSetShaderResources(
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView *const *ppShaderResourceViews) = 0;

    virtual void STDMETHODCALLTYPE PSSetShader(
        ID3D11PixelShader *pPixelShader,
        ID3D11ClassInstance *const *ppClassInstances,
        UINT NumClassInstances) = 0;

    virtual void STDMETHODCALLTYPE PSSetSamplers(
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState *const *ppSamplers) = 0;

    virtual void STDMETHODCALLTYPE VSSetShader(
        ID3D11VertexShader *pVertexShader,
        ID3D11ClassInstance *const *ppClassInstances,
        UINT NumClassInstances) = 0;

    virtual void STDMETHODCALLTYPE DrawIndexed(
        UINT IndexCount,
        UINT StartIndexLocation,
        INT BaseVertexLocation) = 0;

    virtual void STDMETHODCALLTYPE Draw(
        UINT VertexCount,
        UINT StartVertexLocation) = 0;

    virtual HRESULT STDMETHODCALLTYPE Map(
        ID3D11Resource *pResource,
        UINT Subresource,
        D3D11_MAP MapType,
        UINT MapFlags,
        D3D11_MAPPED_SUBRESOURCE *pMappedResource) = 0;

    virtual void STDMETHODCALLTYPE Unmap(
        ID3D11Resource *pResource,
        UINT Subresource) = 0;

    virtual void STDMETHODCALLTYPE PSSetConstantBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppConstantBuffers) = 0;

    virtual void STDMETHODCALLTYPE IASetInputLayout(
        ID3D11InputLayout *pInputLayout) = 0;

    virtual void STDMETHODCALLTYPE IASetVertexBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppVertexBuffers,
        const UINT *pStrides,
        const UINT *pOffsets) = 0;

    virtual void STDMETHODCALLTYPE IASetIndexBuffer(
        ID3D11Buffer *pIndexBuffer,
        DXGI_FORMAT Format,
        UINT Offset) = 0;

    virtual void STDMETHODCALLTYPE DrawIndexedInstanced(
        UINT IndexCountPerInstance,
        UINT InstanceCount,
        UINT StartIndexLocation,
        INT BaseVertexLocation,
        UINT StartInstanceLocation) = 0;

    virtual void STDMETHODCALLTYPE DrawInstanced(
        UINT VertexCountPerInstance,
        UINT InstanceCount,
        UINT StartVertexLocation,
        UINT StartInstanceLocation) = 0;

    virtual void STDMETHODCALLTYPE GSSetConstantBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppConstantBuffers) = 0;

    virtual void STDMETHODCALLTYPE GSSetShader(
        ID3D11GeometryShader *pShader,
        ID3D11ClassInstance *const *ppClassInstances,
        UINT NumClassInstances) = 0;

    virtual void STDMETHODCALLTYPE IASetPrimitiveTopology(
        D3D11_PRIMITIVE_TOPOLOGY Topology) = 0;

    virtual void STDMETHODCALLTYPE VSSetShaderResources(
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView *const *ppShaderResourceViews) = 0;

    virtual void STDMETHODCALLTYPE VSSetSamplers(
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState *const *ppSamplers) = 0;

    virtual void STDMETHODCALLTYPE Begin(
        ID3D11Asynchronous *pAsync) = 0;

    virtual void STDMETHODCALLTYPE End(
        ID3D11Asynchronous *pAsync) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetData(
        ID3D11Asynchronous *pAsync,
        void *pData,
        UINT DataSize,
        UINT GetDataFlags) = 0;

    virtual void STDMETHODCALLTYPE SetPredication(
        ID3D11Predicate *pPredicate,
        WINBOOL PredicateValue) = 0;

    virtual void STDMETHODCALLTYPE GSSetShaderResources(
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView *const *ppShaderResourceViews) = 0;

    virtual void STDMETHODCALLTYPE GSSetSamplers(
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState *const *ppSamplers) = 0;

    virtual void STDMETHODCALLTYPE OMSetRenderTargets(
        UINT NumViews,
        ID3D11RenderTargetView *const *ppRenderTargetViews,
        ID3D11DepthStencilView *pDepthStencilView) = 0;

    virtual void STDMETHODCALLTYPE OMSetRenderTargetsAndUnorderedAccessViews(
        UINT NumRTVs,
        ID3D11RenderTargetView *const *ppRenderTargetViews,
        ID3D11DepthStencilView *pDepthStencilView,
        UINT UAVStartSlot,
        UINT NumUAVs,
        ID3D11UnorderedAccessView *const *ppUnorderedAccessViews,
        const UINT *pUAVInitialCounts) = 0;

    virtual void STDMETHODCALLTYPE OMSetBlendState(
        ID3D11BlendState *pBlendState,
        const FLOAT BlendFactor[4],
        UINT SampleMask) = 0;

    virtual void STDMETHODCALLTYPE OMSetDepthStencilState(
        ID3D11DepthStencilState *pDepthStencilState,
        UINT StencilRef) = 0;

    virtual void STDMETHODCALLTYPE SOSetTargets(
        UINT NumBuffers,
        ID3D11Buffer *const *ppSOTargets,
        const UINT *pOffsets) = 0;

    virtual void STDMETHODCALLTYPE DrawAuto(
        ) = 0;

    virtual void STDMETHODCALLTYPE DrawIndexedInstancedIndirect(
        ID3D11Buffer *pBufferForArgs,
        UINT AlignedByteOffsetForArgs) = 0;

    virtual void STDMETHODCALLTYPE DrawInstancedIndirect(
        ID3D11Buffer *pBufferForArgs,
        UINT AlignedByteOffsetForArgs) = 0;

    virtual void STDMETHODCALLTYPE Dispatch(
        UINT ThreadGroupCountX,
        UINT ThreadGroupCountY,
        UINT ThreadGroupCountZ) = 0;

    virtual void STDMETHODCALLTYPE DispatchIndirect(
        ID3D11Buffer *pBufferForArgs,
        UINT AlignedByteOffsetForArgs) = 0;

    virtual void STDMETHODCALLTYPE RSSetState(
        ID3D11RasterizerState *pRasterizerState) = 0;

    virtual void STDMETHODCALLTYPE RSSetViewports(
        UINT NumViewports,
        const D3D11_VIEWPORT *pViewports) = 0;

    virtual void STDMETHODCALLTYPE RSSetScissorRects(
        UINT NumRects,
        const D3D11_RECT *pRects) = 0;

    virtual void STDMETHODCALLTYPE CopySubresourceRegion(
        ID3D11Resource *pDstResource,
        UINT DstSubresource,
        UINT DstX,
        UINT DstY,
        UINT DstZ,
        ID3D11Resource *pSrcResource,
        UINT SrcSubresource,
        const D3D11_BOX *pSrcBox) = 0;

    virtual void STDMETHODCALLTYPE CopyResource(
        ID3D11Resource *pDstResource,
        ID3D11Resource *pSrcResource) = 0;

    virtual void STDMETHODCALLTYPE UpdateSubresource(
        ID3D11Resource *pDstResource,
        UINT DstSubresource,
        const D3D11_BOX *pDstBox,
        const void *pSrcData,
        UINT SrcRowPitch,
        UINT SrcDepthPitch) = 0;

    virtual void STDMETHODCALLTYPE CopyStructureCount(
        ID3D11Buffer *pDstBuffer,
        UINT DstAlignedByteOffset,
        ID3D11UnorderedAccessView *pSrcView) = 0;

    virtual void STDMETHODCALLTYPE ClearRenderTargetView(
        ID3D11RenderTargetView *pRenderTargetView,
        const FLOAT ColorRGBA[4]) = 0;

    virtual void STDMETHODCALLTYPE ClearUnorderedAccessViewUint(
        ID3D11UnorderedAccessView *pUnorderedAccessView,
        const UINT Values[4]) = 0;

    virtual void STDMETHODCALLTYPE ClearUnorderedAccessViewFloat(
        ID3D11UnorderedAccessView *pUnorderedAccessView,
        const FLOAT Values[4]) = 0;

    virtual void STDMETHODCALLTYPE ClearDepthStencilView(
        ID3D11DepthStencilView *pDepthStencilView,
        UINT ClearFlags,
        FLOAT Depth,
        UINT8 Stencil) = 0;

    virtual void STDMETHODCALLTYPE GenerateMips(
        ID3D11ShaderResourceView *pShaderResourceView) = 0;

    virtual void STDMETHODCALLTYPE SetResourceMinLOD(
        ID3D11Resource *pResource,
        FLOAT MinLOD) = 0;

    virtual FLOAT STDMETHODCALLTYPE GetResourceMinLOD(
        ID3D11Resource *pResource) = 0;

    virtual void STDMETHODCALLTYPE ResolveSubresource(
        ID3D11Resource *pDstResource,
        UINT DstSubresource,
        ID3D11Resource *pSrcResource,
        UINT SrcSubresource,
        DXGI_FORMAT Format) = 0;

    virtual void STDMETHODCALLTYPE ExecuteCommandList(
        ID3D11CommandList *pCommandList,
        WINBOOL RestoreContextState) = 0;

    virtual void STDMETHODCALLTYPE HSSetShaderResources(
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView *const *ppShaderResourceViews) = 0;

    virtual void STDMETHODCALLTYPE HSSetShader(
        ID3D11HullShader *pHullShader,
        ID3D11ClassInstance *const *ppClassInstances,
        UINT NumClassInstances) = 0;

    virtual void STDMETHODCALLTYPE HSSetSamplers(
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState *const *ppSamplers) = 0;

    virtual void STDMETHODCALLTYPE HSSetConstantBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppConstantBuffers) = 0;

    virtual void STDMETHODCALLTYPE DSSetShaderResources(
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView *const *ppShaderResourceViews) = 0;

    virtual void STDMETHODCALLTYPE DSSetShader(
        ID3D11DomainShader *pDomainShader,
        ID3D11ClassInstance *const *ppClassInstances,
        UINT NumClassInstances) = 0;

    virtual void STDMETHODCALLTYPE DSSetSamplers(
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState *const *ppSamplers) = 0;

    virtual void STDMETHODCALLTYPE DSSetConstantBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppConstantBuffers) = 0;

    virtual void STDMETHODCALLTYPE CSSetShaderResources(
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView *const *ppShaderResourceViews) = 0;

    virtual void STDMETHODCALLTYPE CSSetUnorderedAccessViews(
        UINT StartSlot,
        UINT NumUAVs,
        ID3D11UnorderedAccessView *const *ppUnorderedAccessViews,
        const UINT *pUAVInitialCounts) = 0;

    virtual void STDMETHODCALLTYPE CSSetShader(
        ID3D11ComputeShader *pComputeShader,
        ID3D11ClassInstance *const *ppClassInstances,
        UINT NumClassInstances) = 0;

    virtual void STDMETHODCALLTYPE CSSetSamplers(
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState *const *ppSamplers) = 0;

    virtual void STDMETHODCALLTYPE CSSetConstantBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppConstantBuffers) = 0;

    virtual void STDMETHODCALLTYPE VSGetConstantBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppConstantBuffers) = 0;

    virtual void STDMETHODCALLTYPE PSGetShaderResources(
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView **ppShaderResourceViews) = 0;

    virtual void STDMETHODCALLTYPE PSGetShader(
        ID3D11PixelShader **ppPixelShader,
        ID3D11ClassInstance **ppClassInstances,
        UINT *pNumClassInstances) = 0;

    virtual void STDMETHODCALLTYPE PSGetSamplers(
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState **ppSamplers) = 0;

    virtual void STDMETHODCALLTYPE VSGetShader(
        ID3D11VertexShader **ppVertexShader,
        ID3D11ClassInstance **ppClassInstances,
        UINT *pNumClassInstances) = 0;

    virtual void STDMETHODCALLTYPE PSGetConstantBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppConstantBuffers) = 0;

    virtual void STDMETHODCALLTYPE IAGetInputLayout(
        ID3D11InputLayout **ppInputLayout) = 0;

    virtual void STDMETHODCALLTYPE IAGetVertexBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppVertexBuffers,
        UINT *pStrides,
        UINT *pOffsets) = 0;

    virtual void STDMETHODCALLTYPE IAGetIndexBuffer(
        ID3D11Buffer **pIndexBuffer,
        DXGI_FORMAT *Format,
        UINT *Offset) = 0;

    virtual void STDMETHODCALLTYPE GSGetConstantBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppConstantBuffers) = 0;

    virtual void STDMETHODCALLTYPE GSGetShader(
        ID3D11GeometryShader **ppGeometryShader,
        ID3D11ClassInstance **ppClassInstances,
        UINT *pNumClassInstances) = 0;

    virtual void STDMETHODCALLTYPE IAGetPrimitiveTopology(
        D3D11_PRIMITIVE_TOPOLOGY *pTopology) = 0;

    virtual void STDMETHODCALLTYPE VSGetShaderResources(
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView **ppShaderResourceViews) = 0;

    virtual void STDMETHODCALLTYPE VSGetSamplers(
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState **ppSamplers) = 0;

    virtual void STDMETHODCALLTYPE GetPredication(
        ID3D11Predicate **ppPredicate,
        WINBOOL *pPredicateValue) = 0;

    virtual void STDMETHODCALLTYPE GSGetShaderResources(
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView **ppShaderResourceViews) = 0;

    virtual void STDMETHODCALLTYPE GSGetSamplers(
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState **ppSamplers) = 0;

    virtual void STDMETHODCALLTYPE OMGetRenderTargets(
        UINT NumViews,
        ID3D11RenderTargetView **ppRenderTargetViews,
        ID3D11DepthStencilView **ppDepthStencilView) = 0;

    virtual void STDMETHODCALLTYPE OMGetRenderTargetsAndUnorderedAccessViews(
        UINT NumRTVs,
        ID3D11RenderTargetView **ppRenderTargetViews,
        ID3D11DepthStencilView **ppDepthStencilView,
        UINT UAVStartSlot,
        UINT NumUAVs,
        ID3D11UnorderedAccessView **ppUnorderedAccessViews) = 0;

    virtual void STDMETHODCALLTYPE OMGetBlendState(
        ID3D11BlendState **ppBlendState,
        FLOAT BlendFactor[4],
        UINT *pSampleMask) = 0;

    virtual void STDMETHODCALLTYPE OMGetDepthStencilState(
        ID3D11DepthStencilState **ppDepthStencilState,
        UINT *pStencilRef) = 0;

    virtual void STDMETHODCALLTYPE SOGetTargets(
        UINT NumBuffers,
        ID3D11Buffer **ppSOTargets) = 0;

    virtual void STDMETHODCALLTYPE RSGetState(
        ID3D11RasterizerState **ppRasterizerState) = 0;

    virtual void STDMETHODCALLTYPE RSGetViewports(
        UINT *pNumViewports,
        D3D11_VIEWPORT *pViewports) = 0;

    virtual void STDMETHODCALLTYPE RSGetScissorRects(
        UINT *pNumRects,
        D3D11_RECT *pRects) = 0;

    virtual void STDMETHODCALLTYPE HSGetShaderResources(
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView **ppShaderResourceViews) = 0;

    virtual void STDMETHODCALLTYPE HSGetShader(
        ID3D11HullShader **ppHullShader,
        ID3D11ClassInstance **ppClassInstances,
        UINT *pNumClassInstances) = 0;

    virtual void STDMETHODCALLTYPE HSGetSamplers(
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState **ppSamplers) = 0;

    virtual void STDMETHODCALLTYPE HSGetConstantBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppConstantBuffers) = 0;

    virtual void STDMETHODCALLTYPE DSGetShaderResources(
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView **ppShaderResourceViews) = 0;

    virtual void STDMETHODCALLTYPE DSGetShader(
        ID3D11DomainShader **ppDomainShader,
        ID3D11ClassInstance **ppClassInstances,
        UINT *pNumClassInstances) = 0;

    virtual void STDMETHODCALLTYPE DSGetSamplers(
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState **ppSamplers) = 0;

    virtual void STDMETHODCALLTYPE DSGetConstantBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppConstantBuffers) = 0;

    virtual void STDMETHODCALLTYPE CSGetShaderResources(
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView **ppShaderResourceViews) = 0;

    virtual void STDMETHODCALLTYPE CSGetUnorderedAccessViews(
        UINT StartSlot,
        UINT NumUAVs,
        ID3D11UnorderedAccessView **ppUnorderedAccessViews) = 0;

    virtual void STDMETHODCALLTYPE CSGetShader(
        ID3D11ComputeShader **ppComputeShader,
        ID3D11ClassInstance **ppClassInstances,
        UINT *pNumClassInstances) = 0;

    virtual void STDMETHODCALLTYPE CSGetSamplers(
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState **ppSamplers) = 0;

    virtual void STDMETHODCALLTYPE CSGetConstantBuffers(
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppConstantBuffers) = 0;

    virtual void STDMETHODCALLTYPE ClearState(
        ) = 0;

    virtual void STDMETHODCALLTYPE Flush(
        ) = 0;

    virtual D3D11_DEVICE_CONTEXT_TYPE STDMETHODCALLTYPE GetType(
        ) = 0;

    virtual UINT STDMETHODCALLTYPE GetContextFlags(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE FinishCommandList(
        WINBOOL RestoreDeferredContextState,
        ID3D11CommandList **ppCommandList) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11DeviceContext, 0xc0bfa96c, 0xe089, 0x44fb, 0x8e,0xaf, 0x26,0xf8,0x79,0x61,0x90,0xda)
#endif
#else
typedef struct ID3D11DeviceContextVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11DeviceContext* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11DeviceContext* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11DeviceContext* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11DeviceContext* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11DeviceContext* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11DeviceContext* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11DeviceContext* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11DeviceContext methods ***/
    void (STDMETHODCALLTYPE *VSSetConstantBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppConstantBuffers);

    void (STDMETHODCALLTYPE *PSSetShaderResources)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView *const *ppShaderResourceViews);

    void (STDMETHODCALLTYPE *PSSetShader)(
        ID3D11DeviceContext* This,
        ID3D11PixelShader *pPixelShader,
        ID3D11ClassInstance *const *ppClassInstances,
        UINT NumClassInstances);

    void (STDMETHODCALLTYPE *PSSetSamplers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState *const *ppSamplers);

    void (STDMETHODCALLTYPE *VSSetShader)(
        ID3D11DeviceContext* This,
        ID3D11VertexShader *pVertexShader,
        ID3D11ClassInstance *const *ppClassInstances,
        UINT NumClassInstances);

    void (STDMETHODCALLTYPE *DrawIndexed)(
        ID3D11DeviceContext* This,
        UINT IndexCount,
        UINT StartIndexLocation,
        INT BaseVertexLocation);

    void (STDMETHODCALLTYPE *Draw)(
        ID3D11DeviceContext* This,
        UINT VertexCount,
        UINT StartVertexLocation);

    HRESULT (STDMETHODCALLTYPE *Map)(
        ID3D11DeviceContext* This,
        ID3D11Resource *pResource,
        UINT Subresource,
        D3D11_MAP MapType,
        UINT MapFlags,
        D3D11_MAPPED_SUBRESOURCE *pMappedResource);

    void (STDMETHODCALLTYPE *Unmap)(
        ID3D11DeviceContext* This,
        ID3D11Resource *pResource,
        UINT Subresource);

    void (STDMETHODCALLTYPE *PSSetConstantBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppConstantBuffers);

    void (STDMETHODCALLTYPE *IASetInputLayout)(
        ID3D11DeviceContext* This,
        ID3D11InputLayout *pInputLayout);

    void (STDMETHODCALLTYPE *IASetVertexBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppVertexBuffers,
        const UINT *pStrides,
        const UINT *pOffsets);

    void (STDMETHODCALLTYPE *IASetIndexBuffer)(
        ID3D11DeviceContext* This,
        ID3D11Buffer *pIndexBuffer,
        DXGI_FORMAT Format,
        UINT Offset);

    void (STDMETHODCALLTYPE *DrawIndexedInstanced)(
        ID3D11DeviceContext* This,
        UINT IndexCountPerInstance,
        UINT InstanceCount,
        UINT StartIndexLocation,
        INT BaseVertexLocation,
        UINT StartInstanceLocation);

    void (STDMETHODCALLTYPE *DrawInstanced)(
        ID3D11DeviceContext* This,
        UINT VertexCountPerInstance,
        UINT InstanceCount,
        UINT StartVertexLocation,
        UINT StartInstanceLocation);

    void (STDMETHODCALLTYPE *GSSetConstantBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppConstantBuffers);

    void (STDMETHODCALLTYPE *GSSetShader)(
        ID3D11DeviceContext* This,
        ID3D11GeometryShader *pShader,
        ID3D11ClassInstance *const *ppClassInstances,
        UINT NumClassInstances);

    void (STDMETHODCALLTYPE *IASetPrimitiveTopology)(
        ID3D11DeviceContext* This,
        D3D11_PRIMITIVE_TOPOLOGY Topology);

    void (STDMETHODCALLTYPE *VSSetShaderResources)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView *const *ppShaderResourceViews);

    void (STDMETHODCALLTYPE *VSSetSamplers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState *const *ppSamplers);

    void (STDMETHODCALLTYPE *Begin)(
        ID3D11DeviceContext* This,
        ID3D11Asynchronous *pAsync);

    void (STDMETHODCALLTYPE *End)(
        ID3D11DeviceContext* This,
        ID3D11Asynchronous *pAsync);

    HRESULT (STDMETHODCALLTYPE *GetData)(
        ID3D11DeviceContext* This,
        ID3D11Asynchronous *pAsync,
        void *pData,
        UINT DataSize,
        UINT GetDataFlags);

    void (STDMETHODCALLTYPE *SetPredication)(
        ID3D11DeviceContext* This,
        ID3D11Predicate *pPredicate,
        WINBOOL PredicateValue);

    void (STDMETHODCALLTYPE *GSSetShaderResources)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView *const *ppShaderResourceViews);

    void (STDMETHODCALLTYPE *GSSetSamplers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState *const *ppSamplers);

    void (STDMETHODCALLTYPE *OMSetRenderTargets)(
        ID3D11DeviceContext* This,
        UINT NumViews,
        ID3D11RenderTargetView *const *ppRenderTargetViews,
        ID3D11DepthStencilView *pDepthStencilView);

    void (STDMETHODCALLTYPE *OMSetRenderTargetsAndUnorderedAccessViews)(
        ID3D11DeviceContext* This,
        UINT NumRTVs,
        ID3D11RenderTargetView *const *ppRenderTargetViews,
        ID3D11DepthStencilView *pDepthStencilView,
        UINT UAVStartSlot,
        UINT NumUAVs,
        ID3D11UnorderedAccessView *const *ppUnorderedAccessViews,
        const UINT *pUAVInitialCounts);

    void (STDMETHODCALLTYPE *OMSetBlendState)(
        ID3D11DeviceContext* This,
        ID3D11BlendState *pBlendState,
        const FLOAT BlendFactor[4],
        UINT SampleMask);

    void (STDMETHODCALLTYPE *OMSetDepthStencilState)(
        ID3D11DeviceContext* This,
        ID3D11DepthStencilState *pDepthStencilState,
        UINT StencilRef);

    void (STDMETHODCALLTYPE *SOSetTargets)(
        ID3D11DeviceContext* This,
        UINT NumBuffers,
        ID3D11Buffer *const *ppSOTargets,
        const UINT *pOffsets);

    void (STDMETHODCALLTYPE *DrawAuto)(
        ID3D11DeviceContext* This);

    void (STDMETHODCALLTYPE *DrawIndexedInstancedIndirect)(
        ID3D11DeviceContext* This,
        ID3D11Buffer *pBufferForArgs,
        UINT AlignedByteOffsetForArgs);

    void (STDMETHODCALLTYPE *DrawInstancedIndirect)(
        ID3D11DeviceContext* This,
        ID3D11Buffer *pBufferForArgs,
        UINT AlignedByteOffsetForArgs);

    void (STDMETHODCALLTYPE *Dispatch)(
        ID3D11DeviceContext* This,
        UINT ThreadGroupCountX,
        UINT ThreadGroupCountY,
        UINT ThreadGroupCountZ);

    void (STDMETHODCALLTYPE *DispatchIndirect)(
        ID3D11DeviceContext* This,
        ID3D11Buffer *pBufferForArgs,
        UINT AlignedByteOffsetForArgs);

    void (STDMETHODCALLTYPE *RSSetState)(
        ID3D11DeviceContext* This,
        ID3D11RasterizerState *pRasterizerState);

    void (STDMETHODCALLTYPE *RSSetViewports)(
        ID3D11DeviceContext* This,
        UINT NumViewports,
        const D3D11_VIEWPORT *pViewports);

    void (STDMETHODCALLTYPE *RSSetScissorRects)(
        ID3D11DeviceContext* This,
        UINT NumRects,
        const D3D11_RECT *pRects);

    void (STDMETHODCALLTYPE *CopySubresourceRegion)(
        ID3D11DeviceContext* This,
        ID3D11Resource *pDstResource,
        UINT DstSubresource,
        UINT DstX,
        UINT DstY,
        UINT DstZ,
        ID3D11Resource *pSrcResource,
        UINT SrcSubresource,
        const D3D11_BOX *pSrcBox);

    void (STDMETHODCALLTYPE *CopyResource)(
        ID3D11DeviceContext* This,
        ID3D11Resource *pDstResource,
        ID3D11Resource *pSrcResource);

    void (STDMETHODCALLTYPE *UpdateSubresource)(
        ID3D11DeviceContext* This,
        ID3D11Resource *pDstResource,
        UINT DstSubresource,
        const D3D11_BOX *pDstBox,
        const void *pSrcData,
        UINT SrcRowPitch,
        UINT SrcDepthPitch);

    void (STDMETHODCALLTYPE *CopyStructureCount)(
        ID3D11DeviceContext* This,
        ID3D11Buffer *pDstBuffer,
        UINT DstAlignedByteOffset,
        ID3D11UnorderedAccessView *pSrcView);

    void (STDMETHODCALLTYPE *ClearRenderTargetView)(
        ID3D11DeviceContext* This,
        ID3D11RenderTargetView *pRenderTargetView,
        const FLOAT ColorRGBA[4]);

    void (STDMETHODCALLTYPE *ClearUnorderedAccessViewUint)(
        ID3D11DeviceContext* This,
        ID3D11UnorderedAccessView *pUnorderedAccessView,
        const UINT Values[4]);

    void (STDMETHODCALLTYPE *ClearUnorderedAccessViewFloat)(
        ID3D11DeviceContext* This,
        ID3D11UnorderedAccessView *pUnorderedAccessView,
        const FLOAT Values[4]);

    void (STDMETHODCALLTYPE *ClearDepthStencilView)(
        ID3D11DeviceContext* This,
        ID3D11DepthStencilView *pDepthStencilView,
        UINT ClearFlags,
        FLOAT Depth,
        UINT8 Stencil);

    void (STDMETHODCALLTYPE *GenerateMips)(
        ID3D11DeviceContext* This,
        ID3D11ShaderResourceView *pShaderResourceView);

    void (STDMETHODCALLTYPE *SetResourceMinLOD)(
        ID3D11DeviceContext* This,
        ID3D11Resource *pResource,
        FLOAT MinLOD);

    FLOAT (STDMETHODCALLTYPE *GetResourceMinLOD)(
        ID3D11DeviceContext* This,
        ID3D11Resource *pResource);

    void (STDMETHODCALLTYPE *ResolveSubresource)(
        ID3D11DeviceContext* This,
        ID3D11Resource *pDstResource,
        UINT DstSubresource,
        ID3D11Resource *pSrcResource,
        UINT SrcSubresource,
        DXGI_FORMAT Format);

    void (STDMETHODCALLTYPE *ExecuteCommandList)(
        ID3D11DeviceContext* This,
        ID3D11CommandList *pCommandList,
        WINBOOL RestoreContextState);

    void (STDMETHODCALLTYPE *HSSetShaderResources)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView *const *ppShaderResourceViews);

    void (STDMETHODCALLTYPE *HSSetShader)(
        ID3D11DeviceContext* This,
        ID3D11HullShader *pHullShader,
        ID3D11ClassInstance *const *ppClassInstances,
        UINT NumClassInstances);

    void (STDMETHODCALLTYPE *HSSetSamplers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState *const *ppSamplers);

    void (STDMETHODCALLTYPE *HSSetConstantBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppConstantBuffers);

    void (STDMETHODCALLTYPE *DSSetShaderResources)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView *const *ppShaderResourceViews);

    void (STDMETHODCALLTYPE *DSSetShader)(
        ID3D11DeviceContext* This,
        ID3D11DomainShader *pDomainShader,
        ID3D11ClassInstance *const *ppClassInstances,
        UINT NumClassInstances);

    void (STDMETHODCALLTYPE *DSSetSamplers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState *const *ppSamplers);

    void (STDMETHODCALLTYPE *DSSetConstantBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppConstantBuffers);

    void (STDMETHODCALLTYPE *CSSetShaderResources)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView *const *ppShaderResourceViews);

    void (STDMETHODCALLTYPE *CSSetUnorderedAccessViews)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumUAVs,
        ID3D11UnorderedAccessView *const *ppUnorderedAccessViews,
        const UINT *pUAVInitialCounts);

    void (STDMETHODCALLTYPE *CSSetShader)(
        ID3D11DeviceContext* This,
        ID3D11ComputeShader *pComputeShader,
        ID3D11ClassInstance *const *ppClassInstances,
        UINT NumClassInstances);

    void (STDMETHODCALLTYPE *CSSetSamplers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState *const *ppSamplers);

    void (STDMETHODCALLTYPE *CSSetConstantBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer *const *ppConstantBuffers);

    void (STDMETHODCALLTYPE *VSGetConstantBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppConstantBuffers);

    void (STDMETHODCALLTYPE *PSGetShaderResources)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView **ppShaderResourceViews);

    void (STDMETHODCALLTYPE *PSGetShader)(
        ID3D11DeviceContext* This,
        ID3D11PixelShader **ppPixelShader,
        ID3D11ClassInstance **ppClassInstances,
        UINT *pNumClassInstances);

    void (STDMETHODCALLTYPE *PSGetSamplers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState **ppSamplers);

    void (STDMETHODCALLTYPE *VSGetShader)(
        ID3D11DeviceContext* This,
        ID3D11VertexShader **ppVertexShader,
        ID3D11ClassInstance **ppClassInstances,
        UINT *pNumClassInstances);

    void (STDMETHODCALLTYPE *PSGetConstantBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppConstantBuffers);

    void (STDMETHODCALLTYPE *IAGetInputLayout)(
        ID3D11DeviceContext* This,
        ID3D11InputLayout **ppInputLayout);

    void (STDMETHODCALLTYPE *IAGetVertexBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppVertexBuffers,
        UINT *pStrides,
        UINT *pOffsets);

    void (STDMETHODCALLTYPE *IAGetIndexBuffer)(
        ID3D11DeviceContext* This,
        ID3D11Buffer **pIndexBuffer,
        DXGI_FORMAT *Format,
        UINT *Offset);

    void (STDMETHODCALLTYPE *GSGetConstantBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppConstantBuffers);

    void (STDMETHODCALLTYPE *GSGetShader)(
        ID3D11DeviceContext* This,
        ID3D11GeometryShader **ppGeometryShader,
        ID3D11ClassInstance **ppClassInstances,
        UINT *pNumClassInstances);

    void (STDMETHODCALLTYPE *IAGetPrimitiveTopology)(
        ID3D11DeviceContext* This,
        D3D11_PRIMITIVE_TOPOLOGY *pTopology);

    void (STDMETHODCALLTYPE *VSGetShaderResources)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView **ppShaderResourceViews);

    void (STDMETHODCALLTYPE *VSGetSamplers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState **ppSamplers);

    void (STDMETHODCALLTYPE *GetPredication)(
        ID3D11DeviceContext* This,
        ID3D11Predicate **ppPredicate,
        WINBOOL *pPredicateValue);

    void (STDMETHODCALLTYPE *GSGetShaderResources)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView **ppShaderResourceViews);

    void (STDMETHODCALLTYPE *GSGetSamplers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState **ppSamplers);

    void (STDMETHODCALLTYPE *OMGetRenderTargets)(
        ID3D11DeviceContext* This,
        UINT NumViews,
        ID3D11RenderTargetView **ppRenderTargetViews,
        ID3D11DepthStencilView **ppDepthStencilView);

    void (STDMETHODCALLTYPE *OMGetRenderTargetsAndUnorderedAccessViews)(
        ID3D11DeviceContext* This,
        UINT NumRTVs,
        ID3D11RenderTargetView **ppRenderTargetViews,
        ID3D11DepthStencilView **ppDepthStencilView,
        UINT UAVStartSlot,
        UINT NumUAVs,
        ID3D11UnorderedAccessView **ppUnorderedAccessViews);

    void (STDMETHODCALLTYPE *OMGetBlendState)(
        ID3D11DeviceContext* This,
        ID3D11BlendState **ppBlendState,
        FLOAT BlendFactor[4],
        UINT *pSampleMask);

    void (STDMETHODCALLTYPE *OMGetDepthStencilState)(
        ID3D11DeviceContext* This,
        ID3D11DepthStencilState **ppDepthStencilState,
        UINT *pStencilRef);

    void (STDMETHODCALLTYPE *SOGetTargets)(
        ID3D11DeviceContext* This,
        UINT NumBuffers,
        ID3D11Buffer **ppSOTargets);

    void (STDMETHODCALLTYPE *RSGetState)(
        ID3D11DeviceContext* This,
        ID3D11RasterizerState **ppRasterizerState);

    void (STDMETHODCALLTYPE *RSGetViewports)(
        ID3D11DeviceContext* This,
        UINT *pNumViewports,
        D3D11_VIEWPORT *pViewports);

    void (STDMETHODCALLTYPE *RSGetScissorRects)(
        ID3D11DeviceContext* This,
        UINT *pNumRects,
        D3D11_RECT *pRects);

    void (STDMETHODCALLTYPE *HSGetShaderResources)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView **ppShaderResourceViews);

    void (STDMETHODCALLTYPE *HSGetShader)(
        ID3D11DeviceContext* This,
        ID3D11HullShader **ppHullShader,
        ID3D11ClassInstance **ppClassInstances,
        UINT *pNumClassInstances);

    void (STDMETHODCALLTYPE *HSGetSamplers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState **ppSamplers);

    void (STDMETHODCALLTYPE *HSGetConstantBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppConstantBuffers);

    void (STDMETHODCALLTYPE *DSGetShaderResources)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView **ppShaderResourceViews);

    void (STDMETHODCALLTYPE *DSGetShader)(
        ID3D11DeviceContext* This,
        ID3D11DomainShader **ppDomainShader,
        ID3D11ClassInstance **ppClassInstances,
        UINT *pNumClassInstances);

    void (STDMETHODCALLTYPE *DSGetSamplers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState **ppSamplers);

    void (STDMETHODCALLTYPE *DSGetConstantBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppConstantBuffers);

    void (STDMETHODCALLTYPE *CSGetShaderResources)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumViews,
        ID3D11ShaderResourceView **ppShaderResourceViews);

    void (STDMETHODCALLTYPE *CSGetUnorderedAccessViews)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumUAVs,
        ID3D11UnorderedAccessView **ppUnorderedAccessViews);

    void (STDMETHODCALLTYPE *CSGetShader)(
        ID3D11DeviceContext* This,
        ID3D11ComputeShader **ppComputeShader,
        ID3D11ClassInstance **ppClassInstances,
        UINT *pNumClassInstances);

    void (STDMETHODCALLTYPE *CSGetSamplers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumSamplers,
        ID3D11SamplerState **ppSamplers);

    void (STDMETHODCALLTYPE *CSGetConstantBuffers)(
        ID3D11DeviceContext* This,
        UINT StartSlot,
        UINT NumBuffers,
        ID3D11Buffer **ppConstantBuffers);

    void (STDMETHODCALLTYPE *ClearState)(
        ID3D11DeviceContext* This);

    void (STDMETHODCALLTYPE *Flush)(
        ID3D11DeviceContext* This);

    D3D11_DEVICE_CONTEXT_TYPE (STDMETHODCALLTYPE *GetType)(
        ID3D11DeviceContext* This);

    UINT (STDMETHODCALLTYPE *GetContextFlags)(
        ID3D11DeviceContext* This);

    HRESULT (STDMETHODCALLTYPE *FinishCommandList)(
        ID3D11DeviceContext* This,
        WINBOOL RestoreDeferredContextState,
        ID3D11CommandList **ppCommandList);

    END_INTERFACE
} ID3D11DeviceContextVtbl;
interface ID3D11DeviceContext {
    CONST_VTBL ID3D11DeviceContextVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11DeviceContext_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11DeviceContext_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11DeviceContext_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11DeviceContext_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11DeviceContext_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11DeviceContext_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11DeviceContext_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11DeviceContext methods ***/
#define ID3D11DeviceContext_VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) (This)->lpVtbl->VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers)
#define ID3D11DeviceContext_PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) (This)->lpVtbl->PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews)
#define ID3D11DeviceContext_PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances) (This)->lpVtbl->PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances)
#define ID3D11DeviceContext_PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) (This)->lpVtbl->PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers)
#define ID3D11DeviceContext_VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances) (This)->lpVtbl->VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances)
#define ID3D11DeviceContext_DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation) (This)->lpVtbl->DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation)
#define ID3D11DeviceContext_Draw(This,VertexCount,StartVertexLocation) (This)->lpVtbl->Draw(This,VertexCount,StartVertexLocation)
#define ID3D11DeviceContext_Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource) (This)->lpVtbl->Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource)
#define ID3D11DeviceContext_Unmap(This,pResource,Subresource) (This)->lpVtbl->Unmap(This,pResource,Subresource)
#define ID3D11DeviceContext_PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) (This)->lpVtbl->PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers)
#define ID3D11DeviceContext_IASetInputLayout(This,pInputLayout) (This)->lpVtbl->IASetInputLayout(This,pInputLayout)
#define ID3D11DeviceContext_IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) (This)->lpVtbl->IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets)
#define ID3D11DeviceContext_IASetIndexBuffer(This,pIndexBuffer,Format,Offset) (This)->lpVtbl->IASetIndexBuffer(This,pIndexBuffer,Format,Offset)
#define ID3D11DeviceContext_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) (This)->lpVtbl->DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation)
#define ID3D11DeviceContext_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) (This)->lpVtbl->DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation)
#define ID3D11DeviceContext_GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) (This)->lpVtbl->GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers)
#define ID3D11DeviceContext_GSSetShader(This,pShader,ppClassInstances,NumClassInstances) (This)->lpVtbl->GSSetShader(This,pShader,ppClassInstances,NumClassInstances)
#define ID3D11DeviceContext_IASetPrimitiveTopology(This,Topology) (This)->lpVtbl->IASetPrimitiveTopology(This,Topology)
#define ID3D11DeviceContext_VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) (This)->lpVtbl->VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews)
#define ID3D11DeviceContext_VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) (This)->lpVtbl->VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers)
#define ID3D11DeviceContext_Begin(This,pAsync) (This)->lpVtbl->Begin(This,pAsync)
#define ID3D11DeviceContext_End(This,pAsync) (This)->lpVtbl->End(This,pAsync)
#define ID3D11DeviceContext_GetData(This,pAsync,pData,DataSize,GetDataFlags) (This)->lpVtbl->GetData(This,pAsync,pData,DataSize,GetDataFlags)
#define ID3D11DeviceContext_SetPredication(This,pPredicate,PredicateValue) (This)->lpVtbl->SetPredication(This,pPredicate,PredicateValue)
#define ID3D11DeviceContext_GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) (This)->lpVtbl->GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews)
#define ID3D11DeviceContext_GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) (This)->lpVtbl->GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers)
#define ID3D11DeviceContext_OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView) (This)->lpVtbl->OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView)
#define ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) (This)->lpVtbl->OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts)
#define ID3D11DeviceContext_OMSetBlendState(This,pBlendState,BlendFactor,SampleMask) (This)->lpVtbl->OMSetBlendState(This,pBlendState,BlendFactor,SampleMask)
#define ID3D11DeviceContext_OMSetDepthStencilState(This,pDepthStencilState,StencilRef) (This)->lpVtbl->OMSetDepthStencilState(This,pDepthStencilState,StencilRef)
#define ID3D11DeviceContext_SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets) (This)->lpVtbl->SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets)
#define ID3D11DeviceContext_DrawAuto(This) (This)->lpVtbl->DrawAuto(This)
#define ID3D11DeviceContext_DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) (This)->lpVtbl->DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs)
#define ID3D11DeviceContext_DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) (This)->lpVtbl->DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs)
#define ID3D11DeviceContext_Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) (This)->lpVtbl->Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ)
#define ID3D11DeviceContext_DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs) (This)->lpVtbl->DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs)
#define ID3D11DeviceContext_RSSetState(This,pRasterizerState) (This)->lpVtbl->RSSetState(This,pRasterizerState)
#define ID3D11DeviceContext_RSSetViewports(This,NumViewports,pViewports) (This)->lpVtbl->RSSetViewports(This,NumViewports,pViewports)
#define ID3D11DeviceContext_RSSetScissorRects(This,NumRects,pRects) (This)->lpVtbl->RSSetScissorRects(This,NumRects,pRects)
#define ID3D11DeviceContext_CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox) (This)->lpVtbl->CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox)
#define ID3D11DeviceContext_CopyResource(This,pDstResource,pSrcResource) (This)->lpVtbl->CopyResource(This,pDstResource,pSrcResource)
#define ID3D11DeviceContext_UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) (This)->lpVtbl->UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch)
#define ID3D11DeviceContext_CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView) (This)->lpVtbl->CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView)
#define ID3D11DeviceContext_ClearRenderTargetView(This,pRenderTargetView,ColorRGBA) (This)->lpVtbl->ClearRenderTargetView(This,pRenderTargetView,ColorRGBA)
#define ID3D11DeviceContext_ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values) (This)->lpVtbl->ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values)
#define ID3D11DeviceContext_ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values) (This)->lpVtbl->ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values)
#define ID3D11DeviceContext_ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil) (This)->lpVtbl->ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil)
#define ID3D11DeviceContext_GenerateMips(This,pShaderResourceView) (This)->lpVtbl->GenerateMips(This,pShaderResourceView)
#define ID3D11DeviceContext_SetResourceMinLOD(This,pResource,MinLOD) (This)->lpVtbl->SetResourceMinLOD(This,pResource,MinLOD)
#define ID3D11DeviceContext_GetResourceMinLOD(This,pResource) (This)->lpVtbl->GetResourceMinLOD(This,pResource)
#define ID3D11DeviceContext_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) (This)->lpVtbl->ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format)
#define ID3D11DeviceContext_ExecuteCommandList(This,pCommandList,RestoreContextState) (This)->lpVtbl->ExecuteCommandList(This,pCommandList,RestoreContextState)
#define ID3D11DeviceContext_HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) (This)->lpVtbl->HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews)
#define ID3D11DeviceContext_HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances) (This)->lpVtbl->HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances)
#define ID3D11DeviceContext_HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) (This)->lpVtbl->HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers)
#define ID3D11DeviceContext_HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) (This)->lpVtbl->HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers)
#define ID3D11DeviceContext_DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) (This)->lpVtbl->DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews)
#define ID3D11DeviceContext_DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances) (This)->lpVtbl->DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances)
#define ID3D11DeviceContext_DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) (This)->lpVtbl->DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers)
#define ID3D11DeviceContext_DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) (This)->lpVtbl->DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers)
#define ID3D11DeviceContext_CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) (This)->lpVtbl->CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews)
#define ID3D11DeviceContext_CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts) (This)->lpVtbl->CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts)
#define ID3D11DeviceContext_CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances) (This)->lpVtbl->CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances)
#define ID3D11DeviceContext_CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers) (This)->lpVtbl->CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers)
#define ID3D11DeviceContext_CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) (This)->lpVtbl->CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers)
#define ID3D11DeviceContext_VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) (This)->lpVtbl->VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers)
#define ID3D11DeviceContext_PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) (This)->lpVtbl->PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews)
#define ID3D11DeviceContext_PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances) (This)->lpVtbl->PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances)
#define ID3D11DeviceContext_PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) (This)->lpVtbl->PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers)
#define ID3D11DeviceContext_VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances) (This)->lpVtbl->VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances)
#define ID3D11DeviceContext_PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) (This)->lpVtbl->PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers)
#define ID3D11DeviceContext_IAGetInputLayout(This,ppInputLayout) (This)->lpVtbl->IAGetInputLayout(This,ppInputLayout)
#define ID3D11DeviceContext_IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets) (This)->lpVtbl->IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets)
#define ID3D11DeviceContext_IAGetIndexBuffer(This,pIndexBuffer,Format,Offset) (This)->lpVtbl->IAGetIndexBuffer(This,pIndexBuffer,Format,Offset)
#define ID3D11DeviceContext_GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) (This)->lpVtbl->GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers)
#define ID3D11DeviceContext_GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances) (This)->lpVtbl->GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances)
#define ID3D11DeviceContext_IAGetPrimitiveTopology(This,pTopology) (This)->lpVtbl->IAGetPrimitiveTopology(This,pTopology)
#define ID3D11DeviceContext_VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) (This)->lpVtbl->VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews)
#define ID3D11DeviceContext_VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) (This)->lpVtbl->VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers)
#define ID3D11DeviceContext_GetPredication(This,ppPredicate,pPredicateValue) (This)->lpVtbl->GetPredication(This,ppPredicate,pPredicateValue)
#define ID3D11DeviceContext_GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) (This)->lpVtbl->GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews)
#define ID3D11DeviceContext_GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) (This)->lpVtbl->GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers)
#define ID3D11DeviceContext_OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView) (This)->lpVtbl->OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView)
#define ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews) (This)->lpVtbl->OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews)
#define ID3D11DeviceContext_OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask) (This)->lpVtbl->OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask)
#define ID3D11DeviceContext_OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef) (This)->lpVtbl->OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef)
#define ID3D11DeviceContext_SOGetTargets(This,NumBuffers,ppSOTargets) (This)->lpVtbl->SOGetTargets(This,NumBuffers,ppSOTargets)
#define ID3D11DeviceContext_RSGetState(This,ppRasterizerState) (This)->lpVtbl->RSGetState(This,ppRasterizerState)
#define ID3D11DeviceContext_RSGetViewports(This,pNumViewports,pViewports) (This)->lpVtbl->RSGetViewports(This,pNumViewports,pViewports)
#define ID3D11DeviceContext_RSGetScissorRects(This,pNumRects,pRects) (This)->lpVtbl->RSGetScissorRects(This,pNumRects,pRects)
#define ID3D11DeviceContext_HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) (This)->lpVtbl->HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews)
#define ID3D11DeviceContext_HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances) (This)->lpVtbl->HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances)
#define ID3D11DeviceContext_HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) (This)->lpVtbl->HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers)
#define ID3D11DeviceContext_HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) (This)->lpVtbl->HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers)
#define ID3D11DeviceContext_DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) (This)->lpVtbl->DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews)
#define ID3D11DeviceContext_DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances) (This)->lpVtbl->DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances)
#define ID3D11DeviceContext_DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) (This)->lpVtbl->DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers)
#define ID3D11DeviceContext_DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) (This)->lpVtbl->DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers)
#define ID3D11DeviceContext_CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews) (This)->lpVtbl->CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews)
#define ID3D11DeviceContext_CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews) (This)->lpVtbl->CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews)
#define ID3D11DeviceContext_CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances) (This)->lpVtbl->CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances)
#define ID3D11DeviceContext_CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers) (This)->lpVtbl->CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers)
#define ID3D11DeviceContext_CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers) (This)->lpVtbl->CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers)
#define ID3D11DeviceContext_ClearState(This) (This)->lpVtbl->ClearState(This)
#define ID3D11DeviceContext_Flush(This) (This)->lpVtbl->Flush(This)
#define ID3D11DeviceContext_GetType(This) (This)->lpVtbl->GetType(This)
#define ID3D11DeviceContext_GetContextFlags(This) (This)->lpVtbl->GetContextFlags(This)
#define ID3D11DeviceContext_FinishCommandList(This,RestoreDeferredContextState,ppCommandList) (This)->lpVtbl->FinishCommandList(This,RestoreDeferredContextState,ppCommandList)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11DeviceContext_QueryInterface(ID3D11DeviceContext* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11DeviceContext_AddRef(ID3D11DeviceContext* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11DeviceContext_Release(ID3D11DeviceContext* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11DeviceContext_GetDevice(ID3D11DeviceContext* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11DeviceContext_GetPrivateData(ID3D11DeviceContext* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11DeviceContext_SetPrivateData(ID3D11DeviceContext* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11DeviceContext_SetPrivateDataInterface(ID3D11DeviceContext* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11DeviceContext methods ***/
static FORCEINLINE void ID3D11DeviceContext_VSSetConstantBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer *const *ppConstantBuffers) {
    This->lpVtbl->VSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers);
}
static FORCEINLINE void ID3D11DeviceContext_PSSetShaderResources(ID3D11DeviceContext* This,UINT StartSlot,UINT NumViews,ID3D11ShaderResourceView *const *ppShaderResourceViews) {
    This->lpVtbl->PSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews);
}
static FORCEINLINE void ID3D11DeviceContext_PSSetShader(ID3D11DeviceContext* This,ID3D11PixelShader *pPixelShader,ID3D11ClassInstance *const *ppClassInstances,UINT NumClassInstances) {
    This->lpVtbl->PSSetShader(This,pPixelShader,ppClassInstances,NumClassInstances);
}
static FORCEINLINE void ID3D11DeviceContext_PSSetSamplers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumSamplers,ID3D11SamplerState *const *ppSamplers) {
    This->lpVtbl->PSSetSamplers(This,StartSlot,NumSamplers,ppSamplers);
}
static FORCEINLINE void ID3D11DeviceContext_VSSetShader(ID3D11DeviceContext* This,ID3D11VertexShader *pVertexShader,ID3D11ClassInstance *const *ppClassInstances,UINT NumClassInstances) {
    This->lpVtbl->VSSetShader(This,pVertexShader,ppClassInstances,NumClassInstances);
}
static FORCEINLINE void ID3D11DeviceContext_DrawIndexed(ID3D11DeviceContext* This,UINT IndexCount,UINT StartIndexLocation,INT BaseVertexLocation) {
    This->lpVtbl->DrawIndexed(This,IndexCount,StartIndexLocation,BaseVertexLocation);
}
static FORCEINLINE void ID3D11DeviceContext_Draw(ID3D11DeviceContext* This,UINT VertexCount,UINT StartVertexLocation) {
    This->lpVtbl->Draw(This,VertexCount,StartVertexLocation);
}
static FORCEINLINE HRESULT ID3D11DeviceContext_Map(ID3D11DeviceContext* This,ID3D11Resource *pResource,UINT Subresource,D3D11_MAP MapType,UINT MapFlags,D3D11_MAPPED_SUBRESOURCE *pMappedResource) {
    return This->lpVtbl->Map(This,pResource,Subresource,MapType,MapFlags,pMappedResource);
}
static FORCEINLINE void ID3D11DeviceContext_Unmap(ID3D11DeviceContext* This,ID3D11Resource *pResource,UINT Subresource) {
    This->lpVtbl->Unmap(This,pResource,Subresource);
}
static FORCEINLINE void ID3D11DeviceContext_PSSetConstantBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer *const *ppConstantBuffers) {
    This->lpVtbl->PSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers);
}
static FORCEINLINE void ID3D11DeviceContext_IASetInputLayout(ID3D11DeviceContext* This,ID3D11InputLayout *pInputLayout) {
    This->lpVtbl->IASetInputLayout(This,pInputLayout);
}
static FORCEINLINE void ID3D11DeviceContext_IASetVertexBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer *const *ppVertexBuffers,const UINT *pStrides,const UINT *pOffsets) {
    This->lpVtbl->IASetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets);
}
static FORCEINLINE void ID3D11DeviceContext_IASetIndexBuffer(ID3D11DeviceContext* This,ID3D11Buffer *pIndexBuffer,DXGI_FORMAT Format,UINT Offset) {
    This->lpVtbl->IASetIndexBuffer(This,pIndexBuffer,Format,Offset);
}
static FORCEINLINE void ID3D11DeviceContext_DrawIndexedInstanced(ID3D11DeviceContext* This,UINT IndexCountPerInstance,UINT InstanceCount,UINT StartIndexLocation,INT BaseVertexLocation,UINT StartInstanceLocation) {
    This->lpVtbl->DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation);
}
static FORCEINLINE void ID3D11DeviceContext_DrawInstanced(ID3D11DeviceContext* This,UINT VertexCountPerInstance,UINT InstanceCount,UINT StartVertexLocation,UINT StartInstanceLocation) {
    This->lpVtbl->DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation);
}
static FORCEINLINE void ID3D11DeviceContext_GSSetConstantBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer *const *ppConstantBuffers) {
    This->lpVtbl->GSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers);
}
static FORCEINLINE void ID3D11DeviceContext_GSSetShader(ID3D11DeviceContext* This,ID3D11GeometryShader *pShader,ID3D11ClassInstance *const *ppClassInstances,UINT NumClassInstances) {
    This->lpVtbl->GSSetShader(This,pShader,ppClassInstances,NumClassInstances);
}
static FORCEINLINE void ID3D11DeviceContext_IASetPrimitiveTopology(ID3D11DeviceContext* This,D3D11_PRIMITIVE_TOPOLOGY Topology) {
    This->lpVtbl->IASetPrimitiveTopology(This,Topology);
}
static FORCEINLINE void ID3D11DeviceContext_VSSetShaderResources(ID3D11DeviceContext* This,UINT StartSlot,UINT NumViews,ID3D11ShaderResourceView *const *ppShaderResourceViews) {
    This->lpVtbl->VSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews);
}
static FORCEINLINE void ID3D11DeviceContext_VSSetSamplers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumSamplers,ID3D11SamplerState *const *ppSamplers) {
    This->lpVtbl->VSSetSamplers(This,StartSlot,NumSamplers,ppSamplers);
}
static FORCEINLINE void ID3D11DeviceContext_Begin(ID3D11DeviceContext* This,ID3D11Asynchronous *pAsync) {
    This->lpVtbl->Begin(This,pAsync);
}
static FORCEINLINE void ID3D11DeviceContext_End(ID3D11DeviceContext* This,ID3D11Asynchronous *pAsync) {
    This->lpVtbl->End(This,pAsync);
}
static FORCEINLINE HRESULT ID3D11DeviceContext_GetData(ID3D11DeviceContext* This,ID3D11Asynchronous *pAsync,void *pData,UINT DataSize,UINT GetDataFlags) {
    return This->lpVtbl->GetData(This,pAsync,pData,DataSize,GetDataFlags);
}
static FORCEINLINE void ID3D11DeviceContext_SetPredication(ID3D11DeviceContext* This,ID3D11Predicate *pPredicate,WINBOOL PredicateValue) {
    This->lpVtbl->SetPredication(This,pPredicate,PredicateValue);
}
static FORCEINLINE void ID3D11DeviceContext_GSSetShaderResources(ID3D11DeviceContext* This,UINT StartSlot,UINT NumViews,ID3D11ShaderResourceView *const *ppShaderResourceViews) {
    This->lpVtbl->GSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews);
}
static FORCEINLINE void ID3D11DeviceContext_GSSetSamplers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumSamplers,ID3D11SamplerState *const *ppSamplers) {
    This->lpVtbl->GSSetSamplers(This,StartSlot,NumSamplers,ppSamplers);
}
static FORCEINLINE void ID3D11DeviceContext_OMSetRenderTargets(ID3D11DeviceContext* This,UINT NumViews,ID3D11RenderTargetView *const *ppRenderTargetViews,ID3D11DepthStencilView *pDepthStencilView) {
    This->lpVtbl->OMSetRenderTargets(This,NumViews,ppRenderTargetViews,pDepthStencilView);
}
static FORCEINLINE void ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(ID3D11DeviceContext* This,UINT NumRTVs,ID3D11RenderTargetView *const *ppRenderTargetViews,ID3D11DepthStencilView *pDepthStencilView,UINT UAVStartSlot,UINT NumUAVs,ID3D11UnorderedAccessView *const *ppUnorderedAccessViews,const UINT *pUAVInitialCounts) {
    This->lpVtbl->OMSetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,pDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts);
}
static FORCEINLINE void ID3D11DeviceContext_OMSetBlendState(ID3D11DeviceContext* This,ID3D11BlendState *pBlendState,const FLOAT BlendFactor[4],UINT SampleMask) {
    This->lpVtbl->OMSetBlendState(This,pBlendState,BlendFactor,SampleMask);
}
static FORCEINLINE void ID3D11DeviceContext_OMSetDepthStencilState(ID3D11DeviceContext* This,ID3D11DepthStencilState *pDepthStencilState,UINT StencilRef) {
    This->lpVtbl->OMSetDepthStencilState(This,pDepthStencilState,StencilRef);
}
static FORCEINLINE void ID3D11DeviceContext_SOSetTargets(ID3D11DeviceContext* This,UINT NumBuffers,ID3D11Buffer *const *ppSOTargets,const UINT *pOffsets) {
    This->lpVtbl->SOSetTargets(This,NumBuffers,ppSOTargets,pOffsets);
}
static FORCEINLINE void ID3D11DeviceContext_DrawAuto(ID3D11DeviceContext* This) {
    This->lpVtbl->DrawAuto(This);
}
static FORCEINLINE void ID3D11DeviceContext_DrawIndexedInstancedIndirect(ID3D11DeviceContext* This,ID3D11Buffer *pBufferForArgs,UINT AlignedByteOffsetForArgs) {
    This->lpVtbl->DrawIndexedInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs);
}
static FORCEINLINE void ID3D11DeviceContext_DrawInstancedIndirect(ID3D11DeviceContext* This,ID3D11Buffer *pBufferForArgs,UINT AlignedByteOffsetForArgs) {
    This->lpVtbl->DrawInstancedIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs);
}
static FORCEINLINE void ID3D11DeviceContext_Dispatch(ID3D11DeviceContext* This,UINT ThreadGroupCountX,UINT ThreadGroupCountY,UINT ThreadGroupCountZ) {
    This->lpVtbl->Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ);
}
static FORCEINLINE void ID3D11DeviceContext_DispatchIndirect(ID3D11DeviceContext* This,ID3D11Buffer *pBufferForArgs,UINT AlignedByteOffsetForArgs) {
    This->lpVtbl->DispatchIndirect(This,pBufferForArgs,AlignedByteOffsetForArgs);
}
static FORCEINLINE void ID3D11DeviceContext_RSSetState(ID3D11DeviceContext* This,ID3D11RasterizerState *pRasterizerState) {
    This->lpVtbl->RSSetState(This,pRasterizerState);
}
static FORCEINLINE void ID3D11DeviceContext_RSSetViewports(ID3D11DeviceContext* This,UINT NumViewports,const D3D11_VIEWPORT *pViewports) {
    This->lpVtbl->RSSetViewports(This,NumViewports,pViewports);
}
static FORCEINLINE void ID3D11DeviceContext_RSSetScissorRects(ID3D11DeviceContext* This,UINT NumRects,const D3D11_RECT *pRects) {
    This->lpVtbl->RSSetScissorRects(This,NumRects,pRects);
}
static FORCEINLINE void ID3D11DeviceContext_CopySubresourceRegion(ID3D11DeviceContext* This,ID3D11Resource *pDstResource,UINT DstSubresource,UINT DstX,UINT DstY,UINT DstZ,ID3D11Resource *pSrcResource,UINT SrcSubresource,const D3D11_BOX *pSrcBox) {
    This->lpVtbl->CopySubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,DstZ,pSrcResource,SrcSubresource,pSrcBox);
}
static FORCEINLINE void ID3D11DeviceContext_CopyResource(ID3D11DeviceContext* This,ID3D11Resource *pDstResource,ID3D11Resource *pSrcResource) {
    This->lpVtbl->CopyResource(This,pDstResource,pSrcResource);
}
static FORCEINLINE void ID3D11DeviceContext_UpdateSubresource(ID3D11DeviceContext* This,ID3D11Resource *pDstResource,UINT DstSubresource,const D3D11_BOX *pDstBox,const void *pSrcData,UINT SrcRowPitch,UINT SrcDepthPitch) {
    This->lpVtbl->UpdateSubresource(This,pDstResource,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch);
}
static FORCEINLINE void ID3D11DeviceContext_CopyStructureCount(ID3D11DeviceContext* This,ID3D11Buffer *pDstBuffer,UINT DstAlignedByteOffset,ID3D11UnorderedAccessView *pSrcView) {
    This->lpVtbl->CopyStructureCount(This,pDstBuffer,DstAlignedByteOffset,pSrcView);
}
static FORCEINLINE void ID3D11DeviceContext_ClearRenderTargetView(ID3D11DeviceContext* This,ID3D11RenderTargetView *pRenderTargetView,const FLOAT ColorRGBA[4]) {
    This->lpVtbl->ClearRenderTargetView(This,pRenderTargetView,ColorRGBA);
}
static FORCEINLINE void ID3D11DeviceContext_ClearUnorderedAccessViewUint(ID3D11DeviceContext* This,ID3D11UnorderedAccessView *pUnorderedAccessView,const UINT Values[4]) {
    This->lpVtbl->ClearUnorderedAccessViewUint(This,pUnorderedAccessView,Values);
}
static FORCEINLINE void ID3D11DeviceContext_ClearUnorderedAccessViewFloat(ID3D11DeviceContext* This,ID3D11UnorderedAccessView *pUnorderedAccessView,const FLOAT Values[4]) {
    This->lpVtbl->ClearUnorderedAccessViewFloat(This,pUnorderedAccessView,Values);
}
static FORCEINLINE void ID3D11DeviceContext_ClearDepthStencilView(ID3D11DeviceContext* This,ID3D11DepthStencilView *pDepthStencilView,UINT ClearFlags,FLOAT Depth,UINT8 Stencil) {
    This->lpVtbl->ClearDepthStencilView(This,pDepthStencilView,ClearFlags,Depth,Stencil);
}
static FORCEINLINE void ID3D11DeviceContext_GenerateMips(ID3D11DeviceContext* This,ID3D11ShaderResourceView *pShaderResourceView) {
    This->lpVtbl->GenerateMips(This,pShaderResourceView);
}
static FORCEINLINE void ID3D11DeviceContext_SetResourceMinLOD(ID3D11DeviceContext* This,ID3D11Resource *pResource,FLOAT MinLOD) {
    This->lpVtbl->SetResourceMinLOD(This,pResource,MinLOD);
}
static FORCEINLINE FLOAT ID3D11DeviceContext_GetResourceMinLOD(ID3D11DeviceContext* This,ID3D11Resource *pResource) {
    return This->lpVtbl->GetResourceMinLOD(This,pResource);
}
static FORCEINLINE void ID3D11DeviceContext_ResolveSubresource(ID3D11DeviceContext* This,ID3D11Resource *pDstResource,UINT DstSubresource,ID3D11Resource *pSrcResource,UINT SrcSubresource,DXGI_FORMAT Format) {
    This->lpVtbl->ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format);
}
static FORCEINLINE void ID3D11DeviceContext_ExecuteCommandList(ID3D11DeviceContext* This,ID3D11CommandList *pCommandList,WINBOOL RestoreContextState) {
    This->lpVtbl->ExecuteCommandList(This,pCommandList,RestoreContextState);
}
static FORCEINLINE void ID3D11DeviceContext_HSSetShaderResources(ID3D11DeviceContext* This,UINT StartSlot,UINT NumViews,ID3D11ShaderResourceView *const *ppShaderResourceViews) {
    This->lpVtbl->HSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews);
}
static FORCEINLINE void ID3D11DeviceContext_HSSetShader(ID3D11DeviceContext* This,ID3D11HullShader *pHullShader,ID3D11ClassInstance *const *ppClassInstances,UINT NumClassInstances) {
    This->lpVtbl->HSSetShader(This,pHullShader,ppClassInstances,NumClassInstances);
}
static FORCEINLINE void ID3D11DeviceContext_HSSetSamplers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumSamplers,ID3D11SamplerState *const *ppSamplers) {
    This->lpVtbl->HSSetSamplers(This,StartSlot,NumSamplers,ppSamplers);
}
static FORCEINLINE void ID3D11DeviceContext_HSSetConstantBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer *const *ppConstantBuffers) {
    This->lpVtbl->HSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers);
}
static FORCEINLINE void ID3D11DeviceContext_DSSetShaderResources(ID3D11DeviceContext* This,UINT StartSlot,UINT NumViews,ID3D11ShaderResourceView *const *ppShaderResourceViews) {
    This->lpVtbl->DSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews);
}
static FORCEINLINE void ID3D11DeviceContext_DSSetShader(ID3D11DeviceContext* This,ID3D11DomainShader *pDomainShader,ID3D11ClassInstance *const *ppClassInstances,UINT NumClassInstances) {
    This->lpVtbl->DSSetShader(This,pDomainShader,ppClassInstances,NumClassInstances);
}
static FORCEINLINE void ID3D11DeviceContext_DSSetSamplers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumSamplers,ID3D11SamplerState *const *ppSamplers) {
    This->lpVtbl->DSSetSamplers(This,StartSlot,NumSamplers,ppSamplers);
}
static FORCEINLINE void ID3D11DeviceContext_DSSetConstantBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer *const *ppConstantBuffers) {
    This->lpVtbl->DSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers);
}
static FORCEINLINE void ID3D11DeviceContext_CSSetShaderResources(ID3D11DeviceContext* This,UINT StartSlot,UINT NumViews,ID3D11ShaderResourceView *const *ppShaderResourceViews) {
    This->lpVtbl->CSSetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews);
}
static FORCEINLINE void ID3D11DeviceContext_CSSetUnorderedAccessViews(ID3D11DeviceContext* This,UINT StartSlot,UINT NumUAVs,ID3D11UnorderedAccessView *const *ppUnorderedAccessViews,const UINT *pUAVInitialCounts) {
    This->lpVtbl->CSSetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews,pUAVInitialCounts);
}
static FORCEINLINE void ID3D11DeviceContext_CSSetShader(ID3D11DeviceContext* This,ID3D11ComputeShader *pComputeShader,ID3D11ClassInstance *const *ppClassInstances,UINT NumClassInstances) {
    This->lpVtbl->CSSetShader(This,pComputeShader,ppClassInstances,NumClassInstances);
}
static FORCEINLINE void ID3D11DeviceContext_CSSetSamplers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumSamplers,ID3D11SamplerState *const *ppSamplers) {
    This->lpVtbl->CSSetSamplers(This,StartSlot,NumSamplers,ppSamplers);
}
static FORCEINLINE void ID3D11DeviceContext_CSSetConstantBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer *const *ppConstantBuffers) {
    This->lpVtbl->CSSetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers);
}
static FORCEINLINE void ID3D11DeviceContext_VSGetConstantBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer **ppConstantBuffers) {
    This->lpVtbl->VSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers);
}
static FORCEINLINE void ID3D11DeviceContext_PSGetShaderResources(ID3D11DeviceContext* This,UINT StartSlot,UINT NumViews,ID3D11ShaderResourceView **ppShaderResourceViews) {
    This->lpVtbl->PSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews);
}
static FORCEINLINE void ID3D11DeviceContext_PSGetShader(ID3D11DeviceContext* This,ID3D11PixelShader **ppPixelShader,ID3D11ClassInstance **ppClassInstances,UINT *pNumClassInstances) {
    This->lpVtbl->PSGetShader(This,ppPixelShader,ppClassInstances,pNumClassInstances);
}
static FORCEINLINE void ID3D11DeviceContext_PSGetSamplers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumSamplers,ID3D11SamplerState **ppSamplers) {
    This->lpVtbl->PSGetSamplers(This,StartSlot,NumSamplers,ppSamplers);
}
static FORCEINLINE void ID3D11DeviceContext_VSGetShader(ID3D11DeviceContext* This,ID3D11VertexShader **ppVertexShader,ID3D11ClassInstance **ppClassInstances,UINT *pNumClassInstances) {
    This->lpVtbl->VSGetShader(This,ppVertexShader,ppClassInstances,pNumClassInstances);
}
static FORCEINLINE void ID3D11DeviceContext_PSGetConstantBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer **ppConstantBuffers) {
    This->lpVtbl->PSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers);
}
static FORCEINLINE void ID3D11DeviceContext_IAGetInputLayout(ID3D11DeviceContext* This,ID3D11InputLayout **ppInputLayout) {
    This->lpVtbl->IAGetInputLayout(This,ppInputLayout);
}
static FORCEINLINE void ID3D11DeviceContext_IAGetVertexBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer **ppVertexBuffers,UINT *pStrides,UINT *pOffsets) {
    This->lpVtbl->IAGetVertexBuffers(This,StartSlot,NumBuffers,ppVertexBuffers,pStrides,pOffsets);
}
static FORCEINLINE void ID3D11DeviceContext_IAGetIndexBuffer(ID3D11DeviceContext* This,ID3D11Buffer **pIndexBuffer,DXGI_FORMAT *Format,UINT *Offset) {
    This->lpVtbl->IAGetIndexBuffer(This,pIndexBuffer,Format,Offset);
}
static FORCEINLINE void ID3D11DeviceContext_GSGetConstantBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer **ppConstantBuffers) {
    This->lpVtbl->GSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers);
}
static FORCEINLINE void ID3D11DeviceContext_GSGetShader(ID3D11DeviceContext* This,ID3D11GeometryShader **ppGeometryShader,ID3D11ClassInstance **ppClassInstances,UINT *pNumClassInstances) {
    This->lpVtbl->GSGetShader(This,ppGeometryShader,ppClassInstances,pNumClassInstances);
}
static FORCEINLINE void ID3D11DeviceContext_IAGetPrimitiveTopology(ID3D11DeviceContext* This,D3D11_PRIMITIVE_TOPOLOGY *pTopology) {
    This->lpVtbl->IAGetPrimitiveTopology(This,pTopology);
}
static FORCEINLINE void ID3D11DeviceContext_VSGetShaderResources(ID3D11DeviceContext* This,UINT StartSlot,UINT NumViews,ID3D11ShaderResourceView **ppShaderResourceViews) {
    This->lpVtbl->VSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews);
}
static FORCEINLINE void ID3D11DeviceContext_VSGetSamplers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumSamplers,ID3D11SamplerState **ppSamplers) {
    This->lpVtbl->VSGetSamplers(This,StartSlot,NumSamplers,ppSamplers);
}
static FORCEINLINE void ID3D11DeviceContext_GetPredication(ID3D11DeviceContext* This,ID3D11Predicate **ppPredicate,WINBOOL *pPredicateValue) {
    This->lpVtbl->GetPredication(This,ppPredicate,pPredicateValue);
}
static FORCEINLINE void ID3D11DeviceContext_GSGetShaderResources(ID3D11DeviceContext* This,UINT StartSlot,UINT NumViews,ID3D11ShaderResourceView **ppShaderResourceViews) {
    This->lpVtbl->GSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews);
}
static FORCEINLINE void ID3D11DeviceContext_GSGetSamplers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumSamplers,ID3D11SamplerState **ppSamplers) {
    This->lpVtbl->GSGetSamplers(This,StartSlot,NumSamplers,ppSamplers);
}
static FORCEINLINE void ID3D11DeviceContext_OMGetRenderTargets(ID3D11DeviceContext* This,UINT NumViews,ID3D11RenderTargetView **ppRenderTargetViews,ID3D11DepthStencilView **ppDepthStencilView) {
    This->lpVtbl->OMGetRenderTargets(This,NumViews,ppRenderTargetViews,ppDepthStencilView);
}
static FORCEINLINE void ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews(ID3D11DeviceContext* This,UINT NumRTVs,ID3D11RenderTargetView **ppRenderTargetViews,ID3D11DepthStencilView **ppDepthStencilView,UINT UAVStartSlot,UINT NumUAVs,ID3D11UnorderedAccessView **ppUnorderedAccessViews) {
    This->lpVtbl->OMGetRenderTargetsAndUnorderedAccessViews(This,NumRTVs,ppRenderTargetViews,ppDepthStencilView,UAVStartSlot,NumUAVs,ppUnorderedAccessViews);
}
static FORCEINLINE void ID3D11DeviceContext_OMGetBlendState(ID3D11DeviceContext* This,ID3D11BlendState **ppBlendState,FLOAT BlendFactor[4],UINT *pSampleMask) {
    This->lpVtbl->OMGetBlendState(This,ppBlendState,BlendFactor,pSampleMask);
}
static FORCEINLINE void ID3D11DeviceContext_OMGetDepthStencilState(ID3D11DeviceContext* This,ID3D11DepthStencilState **ppDepthStencilState,UINT *pStencilRef) {
    This->lpVtbl->OMGetDepthStencilState(This,ppDepthStencilState,pStencilRef);
}
static FORCEINLINE void ID3D11DeviceContext_SOGetTargets(ID3D11DeviceContext* This,UINT NumBuffers,ID3D11Buffer **ppSOTargets) {
    This->lpVtbl->SOGetTargets(This,NumBuffers,ppSOTargets);
}
static FORCEINLINE void ID3D11DeviceContext_RSGetState(ID3D11DeviceContext* This,ID3D11RasterizerState **ppRasterizerState) {
    This->lpVtbl->RSGetState(This,ppRasterizerState);
}
static FORCEINLINE void ID3D11DeviceContext_RSGetViewports(ID3D11DeviceContext* This,UINT *pNumViewports,D3D11_VIEWPORT *pViewports) {
    This->lpVtbl->RSGetViewports(This,pNumViewports,pViewports);
}
static FORCEINLINE void ID3D11DeviceContext_RSGetScissorRects(ID3D11DeviceContext* This,UINT *pNumRects,D3D11_RECT *pRects) {
    This->lpVtbl->RSGetScissorRects(This,pNumRects,pRects);
}
static FORCEINLINE void ID3D11DeviceContext_HSGetShaderResources(ID3D11DeviceContext* This,UINT StartSlot,UINT NumViews,ID3D11ShaderResourceView **ppShaderResourceViews) {
    This->lpVtbl->HSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews);
}
static FORCEINLINE void ID3D11DeviceContext_HSGetShader(ID3D11DeviceContext* This,ID3D11HullShader **ppHullShader,ID3D11ClassInstance **ppClassInstances,UINT *pNumClassInstances) {
    This->lpVtbl->HSGetShader(This,ppHullShader,ppClassInstances,pNumClassInstances);
}
static FORCEINLINE void ID3D11DeviceContext_HSGetSamplers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumSamplers,ID3D11SamplerState **ppSamplers) {
    This->lpVtbl->HSGetSamplers(This,StartSlot,NumSamplers,ppSamplers);
}
static FORCEINLINE void ID3D11DeviceContext_HSGetConstantBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer **ppConstantBuffers) {
    This->lpVtbl->HSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers);
}
static FORCEINLINE void ID3D11DeviceContext_DSGetShaderResources(ID3D11DeviceContext* This,UINT StartSlot,UINT NumViews,ID3D11ShaderResourceView **ppShaderResourceViews) {
    This->lpVtbl->DSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews);
}
static FORCEINLINE void ID3D11DeviceContext_DSGetShader(ID3D11DeviceContext* This,ID3D11DomainShader **ppDomainShader,ID3D11ClassInstance **ppClassInstances,UINT *pNumClassInstances) {
    This->lpVtbl->DSGetShader(This,ppDomainShader,ppClassInstances,pNumClassInstances);
}
static FORCEINLINE void ID3D11DeviceContext_DSGetSamplers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumSamplers,ID3D11SamplerState **ppSamplers) {
    This->lpVtbl->DSGetSamplers(This,StartSlot,NumSamplers,ppSamplers);
}
static FORCEINLINE void ID3D11DeviceContext_DSGetConstantBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer **ppConstantBuffers) {
    This->lpVtbl->DSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers);
}
static FORCEINLINE void ID3D11DeviceContext_CSGetShaderResources(ID3D11DeviceContext* This,UINT StartSlot,UINT NumViews,ID3D11ShaderResourceView **ppShaderResourceViews) {
    This->lpVtbl->CSGetShaderResources(This,StartSlot,NumViews,ppShaderResourceViews);
}
static FORCEINLINE void ID3D11DeviceContext_CSGetUnorderedAccessViews(ID3D11DeviceContext* This,UINT StartSlot,UINT NumUAVs,ID3D11UnorderedAccessView **ppUnorderedAccessViews) {
    This->lpVtbl->CSGetUnorderedAccessViews(This,StartSlot,NumUAVs,ppUnorderedAccessViews);
}
static FORCEINLINE void ID3D11DeviceContext_CSGetShader(ID3D11DeviceContext* This,ID3D11ComputeShader **ppComputeShader,ID3D11ClassInstance **ppClassInstances,UINT *pNumClassInstances) {
    This->lpVtbl->CSGetShader(This,ppComputeShader,ppClassInstances,pNumClassInstances);
}
static FORCEINLINE void ID3D11DeviceContext_CSGetSamplers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumSamplers,ID3D11SamplerState **ppSamplers) {
    This->lpVtbl->CSGetSamplers(This,StartSlot,NumSamplers,ppSamplers);
}
static FORCEINLINE void ID3D11DeviceContext_CSGetConstantBuffers(ID3D11DeviceContext* This,UINT StartSlot,UINT NumBuffers,ID3D11Buffer **ppConstantBuffers) {
    This->lpVtbl->CSGetConstantBuffers(This,StartSlot,NumBuffers,ppConstantBuffers);
}
static FORCEINLINE void ID3D11DeviceContext_ClearState(ID3D11DeviceContext* This) {
    This->lpVtbl->ClearState(This);
}
static FORCEINLINE void ID3D11DeviceContext_Flush(ID3D11DeviceContext* This) {
    This->lpVtbl->Flush(This);
}
static FORCEINLINE D3D11_DEVICE_CONTEXT_TYPE ID3D11DeviceContext_GetType(ID3D11DeviceContext* This) {
    return This->lpVtbl->GetType(This);
}
static FORCEINLINE UINT ID3D11DeviceContext_GetContextFlags(ID3D11DeviceContext* This) {
    return This->lpVtbl->GetContextFlags(This);
}
static FORCEINLINE HRESULT ID3D11DeviceContext_FinishCommandList(ID3D11DeviceContext* This,WINBOOL RestoreDeferredContextState,ID3D11CommandList **ppCommandList) {
    return This->lpVtbl->FinishCommandList(This,RestoreDeferredContextState,ppCommandList);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11DeviceContext_VSSetConstantBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer *const *ppConstantBuffers);
void __RPC_STUB ID3D11DeviceContext_VSSetConstantBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_PSSetShaderResources_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumViews,
    ID3D11ShaderResourceView *const *ppShaderResourceViews);
void __RPC_STUB ID3D11DeviceContext_PSSetShaderResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_PSSetShader_Proxy(
    ID3D11DeviceContext* This,
    ID3D11PixelShader *pPixelShader,
    ID3D11ClassInstance *const *ppClassInstances,
    UINT NumClassInstances);
void __RPC_STUB ID3D11DeviceContext_PSSetShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_PSSetSamplers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumSamplers,
    ID3D11SamplerState *const *ppSamplers);
void __RPC_STUB ID3D11DeviceContext_PSSetSamplers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_VSSetShader_Proxy(
    ID3D11DeviceContext* This,
    ID3D11VertexShader *pVertexShader,
    ID3D11ClassInstance *const *ppClassInstances,
    UINT NumClassInstances);
void __RPC_STUB ID3D11DeviceContext_VSSetShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DrawIndexed_Proxy(
    ID3D11DeviceContext* This,
    UINT IndexCount,
    UINT StartIndexLocation,
    INT BaseVertexLocation);
void __RPC_STUB ID3D11DeviceContext_DrawIndexed_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_Draw_Proxy(
    ID3D11DeviceContext* This,
    UINT VertexCount,
    UINT StartVertexLocation);
void __RPC_STUB ID3D11DeviceContext_Draw_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11DeviceContext_Map_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Resource *pResource,
    UINT Subresource,
    D3D11_MAP MapType,
    UINT MapFlags,
    D3D11_MAPPED_SUBRESOURCE *pMappedResource);
void __RPC_STUB ID3D11DeviceContext_Map_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_Unmap_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Resource *pResource,
    UINT Subresource);
void __RPC_STUB ID3D11DeviceContext_Unmap_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_PSSetConstantBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer *const *ppConstantBuffers);
void __RPC_STUB ID3D11DeviceContext_PSSetConstantBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_IASetInputLayout_Proxy(
    ID3D11DeviceContext* This,
    ID3D11InputLayout *pInputLayout);
void __RPC_STUB ID3D11DeviceContext_IASetInputLayout_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_IASetVertexBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer *const *ppVertexBuffers,
    const UINT *pStrides,
    const UINT *pOffsets);
void __RPC_STUB ID3D11DeviceContext_IASetVertexBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_IASetIndexBuffer_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Buffer *pIndexBuffer,
    DXGI_FORMAT Format,
    UINT Offset);
void __RPC_STUB ID3D11DeviceContext_IASetIndexBuffer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DrawIndexedInstanced_Proxy(
    ID3D11DeviceContext* This,
    UINT IndexCountPerInstance,
    UINT InstanceCount,
    UINT StartIndexLocation,
    INT BaseVertexLocation,
    UINT StartInstanceLocation);
void __RPC_STUB ID3D11DeviceContext_DrawIndexedInstanced_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DrawInstanced_Proxy(
    ID3D11DeviceContext* This,
    UINT VertexCountPerInstance,
    UINT InstanceCount,
    UINT StartVertexLocation,
    UINT StartInstanceLocation);
void __RPC_STUB ID3D11DeviceContext_DrawInstanced_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_GSSetConstantBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer *const *ppConstantBuffers);
void __RPC_STUB ID3D11DeviceContext_GSSetConstantBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_GSSetShader_Proxy(
    ID3D11DeviceContext* This,
    ID3D11GeometryShader *pShader,
    ID3D11ClassInstance *const *ppClassInstances,
    UINT NumClassInstances);
void __RPC_STUB ID3D11DeviceContext_GSSetShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_IASetPrimitiveTopology_Proxy(
    ID3D11DeviceContext* This,
    D3D11_PRIMITIVE_TOPOLOGY Topology);
void __RPC_STUB ID3D11DeviceContext_IASetPrimitiveTopology_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_VSSetShaderResources_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumViews,
    ID3D11ShaderResourceView *const *ppShaderResourceViews);
void __RPC_STUB ID3D11DeviceContext_VSSetShaderResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_VSSetSamplers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumSamplers,
    ID3D11SamplerState *const *ppSamplers);
void __RPC_STUB ID3D11DeviceContext_VSSetSamplers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_Begin_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Asynchronous *pAsync);
void __RPC_STUB ID3D11DeviceContext_Begin_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_End_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Asynchronous *pAsync);
void __RPC_STUB ID3D11DeviceContext_End_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11DeviceContext_GetData_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Asynchronous *pAsync,
    void *pData,
    UINT DataSize,
    UINT GetDataFlags);
void __RPC_STUB ID3D11DeviceContext_GetData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_SetPredication_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Predicate *pPredicate,
    WINBOOL PredicateValue);
void __RPC_STUB ID3D11DeviceContext_SetPredication_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_GSSetShaderResources_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumViews,
    ID3D11ShaderResourceView *const *ppShaderResourceViews);
void __RPC_STUB ID3D11DeviceContext_GSSetShaderResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_GSSetSamplers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumSamplers,
    ID3D11SamplerState *const *ppSamplers);
void __RPC_STUB ID3D11DeviceContext_GSSetSamplers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_OMSetRenderTargets_Proxy(
    ID3D11DeviceContext* This,
    UINT NumViews,
    ID3D11RenderTargetView *const *ppRenderTargetViews,
    ID3D11DepthStencilView *pDepthStencilView);
void __RPC_STUB ID3D11DeviceContext_OMSetRenderTargets_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews_Proxy(
    ID3D11DeviceContext* This,
    UINT NumRTVs,
    ID3D11RenderTargetView *const *ppRenderTargetViews,
    ID3D11DepthStencilView *pDepthStencilView,
    UINT UAVStartSlot,
    UINT NumUAVs,
    ID3D11UnorderedAccessView *const *ppUnorderedAccessViews,
    const UINT *pUAVInitialCounts);
void __RPC_STUB ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_OMSetBlendState_Proxy(
    ID3D11DeviceContext* This,
    ID3D11BlendState *pBlendState,
    const FLOAT BlendFactor[4],
    UINT SampleMask);
void __RPC_STUB ID3D11DeviceContext_OMSetBlendState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_OMSetDepthStencilState_Proxy(
    ID3D11DeviceContext* This,
    ID3D11DepthStencilState *pDepthStencilState,
    UINT StencilRef);
void __RPC_STUB ID3D11DeviceContext_OMSetDepthStencilState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_SOSetTargets_Proxy(
    ID3D11DeviceContext* This,
    UINT NumBuffers,
    ID3D11Buffer *const *ppSOTargets,
    const UINT *pOffsets);
void __RPC_STUB ID3D11DeviceContext_SOSetTargets_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DrawAuto_Proxy(
    ID3D11DeviceContext* This);
void __RPC_STUB ID3D11DeviceContext_DrawAuto_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DrawIndexedInstancedIndirect_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Buffer *pBufferForArgs,
    UINT AlignedByteOffsetForArgs);
void __RPC_STUB ID3D11DeviceContext_DrawIndexedInstancedIndirect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DrawInstancedIndirect_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Buffer *pBufferForArgs,
    UINT AlignedByteOffsetForArgs);
void __RPC_STUB ID3D11DeviceContext_DrawInstancedIndirect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_Dispatch_Proxy(
    ID3D11DeviceContext* This,
    UINT ThreadGroupCountX,
    UINT ThreadGroupCountY,
    UINT ThreadGroupCountZ);
void __RPC_STUB ID3D11DeviceContext_Dispatch_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DispatchIndirect_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Buffer *pBufferForArgs,
    UINT AlignedByteOffsetForArgs);
void __RPC_STUB ID3D11DeviceContext_DispatchIndirect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_RSSetState_Proxy(
    ID3D11DeviceContext* This,
    ID3D11RasterizerState *pRasterizerState);
void __RPC_STUB ID3D11DeviceContext_RSSetState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_RSSetViewports_Proxy(
    ID3D11DeviceContext* This,
    UINT NumViewports,
    const D3D11_VIEWPORT *pViewports);
void __RPC_STUB ID3D11DeviceContext_RSSetViewports_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_RSSetScissorRects_Proxy(
    ID3D11DeviceContext* This,
    UINT NumRects,
    const D3D11_RECT *pRects);
void __RPC_STUB ID3D11DeviceContext_RSSetScissorRects_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CopySubresourceRegion_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Resource *pDstResource,
    UINT DstSubresource,
    UINT DstX,
    UINT DstY,
    UINT DstZ,
    ID3D11Resource *pSrcResource,
    UINT SrcSubresource,
    const D3D11_BOX *pSrcBox);
void __RPC_STUB ID3D11DeviceContext_CopySubresourceRegion_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CopyResource_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Resource *pDstResource,
    ID3D11Resource *pSrcResource);
void __RPC_STUB ID3D11DeviceContext_CopyResource_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_UpdateSubresource_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Resource *pDstResource,
    UINT DstSubresource,
    const D3D11_BOX *pDstBox,
    const void *pSrcData,
    UINT SrcRowPitch,
    UINT SrcDepthPitch);
void __RPC_STUB ID3D11DeviceContext_UpdateSubresource_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CopyStructureCount_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Buffer *pDstBuffer,
    UINT DstAlignedByteOffset,
    ID3D11UnorderedAccessView *pSrcView);
void __RPC_STUB ID3D11DeviceContext_CopyStructureCount_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_ClearRenderTargetView_Proxy(
    ID3D11DeviceContext* This,
    ID3D11RenderTargetView *pRenderTargetView,
    const FLOAT ColorRGBA[4]);
void __RPC_STUB ID3D11DeviceContext_ClearRenderTargetView_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_ClearUnorderedAccessViewUint_Proxy(
    ID3D11DeviceContext* This,
    ID3D11UnorderedAccessView *pUnorderedAccessView,
    const UINT Values[4]);
void __RPC_STUB ID3D11DeviceContext_ClearUnorderedAccessViewUint_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_ClearUnorderedAccessViewFloat_Proxy(
    ID3D11DeviceContext* This,
    ID3D11UnorderedAccessView *pUnorderedAccessView,
    const FLOAT Values[4]);
void __RPC_STUB ID3D11DeviceContext_ClearUnorderedAccessViewFloat_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_ClearDepthStencilView_Proxy(
    ID3D11DeviceContext* This,
    ID3D11DepthStencilView *pDepthStencilView,
    UINT ClearFlags,
    FLOAT Depth,
    UINT8 Stencil);
void __RPC_STUB ID3D11DeviceContext_ClearDepthStencilView_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_GenerateMips_Proxy(
    ID3D11DeviceContext* This,
    ID3D11ShaderResourceView *pShaderResourceView);
void __RPC_STUB ID3D11DeviceContext_GenerateMips_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_SetResourceMinLOD_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Resource *pResource,
    FLOAT MinLOD);
void __RPC_STUB ID3D11DeviceContext_SetResourceMinLOD_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
FLOAT STDMETHODCALLTYPE ID3D11DeviceContext_GetResourceMinLOD_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Resource *pResource);
void __RPC_STUB ID3D11DeviceContext_GetResourceMinLOD_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_ResolveSubresource_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Resource *pDstResource,
    UINT DstSubresource,
    ID3D11Resource *pSrcResource,
    UINT SrcSubresource,
    DXGI_FORMAT Format);
void __RPC_STUB ID3D11DeviceContext_ResolveSubresource_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_ExecuteCommandList_Proxy(
    ID3D11DeviceContext* This,
    ID3D11CommandList *pCommandList,
    WINBOOL RestoreContextState);
void __RPC_STUB ID3D11DeviceContext_ExecuteCommandList_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_HSSetShaderResources_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumViews,
    ID3D11ShaderResourceView *const *ppShaderResourceViews);
void __RPC_STUB ID3D11DeviceContext_HSSetShaderResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_HSSetShader_Proxy(
    ID3D11DeviceContext* This,
    ID3D11HullShader *pHullShader,
    ID3D11ClassInstance *const *ppClassInstances,
    UINT NumClassInstances);
void __RPC_STUB ID3D11DeviceContext_HSSetShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_HSSetSamplers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumSamplers,
    ID3D11SamplerState *const *ppSamplers);
void __RPC_STUB ID3D11DeviceContext_HSSetSamplers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_HSSetConstantBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer *const *ppConstantBuffers);
void __RPC_STUB ID3D11DeviceContext_HSSetConstantBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DSSetShaderResources_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumViews,
    ID3D11ShaderResourceView *const *ppShaderResourceViews);
void __RPC_STUB ID3D11DeviceContext_DSSetShaderResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DSSetShader_Proxy(
    ID3D11DeviceContext* This,
    ID3D11DomainShader *pDomainShader,
    ID3D11ClassInstance *const *ppClassInstances,
    UINT NumClassInstances);
void __RPC_STUB ID3D11DeviceContext_DSSetShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DSSetSamplers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumSamplers,
    ID3D11SamplerState *const *ppSamplers);
void __RPC_STUB ID3D11DeviceContext_DSSetSamplers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DSSetConstantBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer *const *ppConstantBuffers);
void __RPC_STUB ID3D11DeviceContext_DSSetConstantBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CSSetShaderResources_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumViews,
    ID3D11ShaderResourceView *const *ppShaderResourceViews);
void __RPC_STUB ID3D11DeviceContext_CSSetShaderResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CSSetUnorderedAccessViews_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumUAVs,
    ID3D11UnorderedAccessView *const *ppUnorderedAccessViews,
    const UINT *pUAVInitialCounts);
void __RPC_STUB ID3D11DeviceContext_CSSetUnorderedAccessViews_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CSSetShader_Proxy(
    ID3D11DeviceContext* This,
    ID3D11ComputeShader *pComputeShader,
    ID3D11ClassInstance *const *ppClassInstances,
    UINT NumClassInstances);
void __RPC_STUB ID3D11DeviceContext_CSSetShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CSSetSamplers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumSamplers,
    ID3D11SamplerState *const *ppSamplers);
void __RPC_STUB ID3D11DeviceContext_CSSetSamplers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CSSetConstantBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer *const *ppConstantBuffers);
void __RPC_STUB ID3D11DeviceContext_CSSetConstantBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_VSGetConstantBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer **ppConstantBuffers);
void __RPC_STUB ID3D11DeviceContext_VSGetConstantBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_PSGetShaderResources_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumViews,
    ID3D11ShaderResourceView **ppShaderResourceViews);
void __RPC_STUB ID3D11DeviceContext_PSGetShaderResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_PSGetShader_Proxy(
    ID3D11DeviceContext* This,
    ID3D11PixelShader **ppPixelShader,
    ID3D11ClassInstance **ppClassInstances,
    UINT *pNumClassInstances);
void __RPC_STUB ID3D11DeviceContext_PSGetShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_PSGetSamplers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumSamplers,
    ID3D11SamplerState **ppSamplers);
void __RPC_STUB ID3D11DeviceContext_PSGetSamplers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_VSGetShader_Proxy(
    ID3D11DeviceContext* This,
    ID3D11VertexShader **ppVertexShader,
    ID3D11ClassInstance **ppClassInstances,
    UINT *pNumClassInstances);
void __RPC_STUB ID3D11DeviceContext_VSGetShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_PSGetConstantBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer **ppConstantBuffers);
void __RPC_STUB ID3D11DeviceContext_PSGetConstantBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_IAGetInputLayout_Proxy(
    ID3D11DeviceContext* This,
    ID3D11InputLayout **ppInputLayout);
void __RPC_STUB ID3D11DeviceContext_IAGetInputLayout_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_IAGetVertexBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer **ppVertexBuffers,
    UINT *pStrides,
    UINT *pOffsets);
void __RPC_STUB ID3D11DeviceContext_IAGetVertexBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_IAGetIndexBuffer_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Buffer **pIndexBuffer,
    DXGI_FORMAT *Format,
    UINT *Offset);
void __RPC_STUB ID3D11DeviceContext_IAGetIndexBuffer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_GSGetConstantBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer **ppConstantBuffers);
void __RPC_STUB ID3D11DeviceContext_GSGetConstantBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_GSGetShader_Proxy(
    ID3D11DeviceContext* This,
    ID3D11GeometryShader **ppGeometryShader,
    ID3D11ClassInstance **ppClassInstances,
    UINT *pNumClassInstances);
void __RPC_STUB ID3D11DeviceContext_GSGetShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_IAGetPrimitiveTopology_Proxy(
    ID3D11DeviceContext* This,
    D3D11_PRIMITIVE_TOPOLOGY *pTopology);
void __RPC_STUB ID3D11DeviceContext_IAGetPrimitiveTopology_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_VSGetShaderResources_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumViews,
    ID3D11ShaderResourceView **ppShaderResourceViews);
void __RPC_STUB ID3D11DeviceContext_VSGetShaderResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_VSGetSamplers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumSamplers,
    ID3D11SamplerState **ppSamplers);
void __RPC_STUB ID3D11DeviceContext_VSGetSamplers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_GetPredication_Proxy(
    ID3D11DeviceContext* This,
    ID3D11Predicate **ppPredicate,
    WINBOOL *pPredicateValue);
void __RPC_STUB ID3D11DeviceContext_GetPredication_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_GSGetShaderResources_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumViews,
    ID3D11ShaderResourceView **ppShaderResourceViews);
void __RPC_STUB ID3D11DeviceContext_GSGetShaderResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_GSGetSamplers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumSamplers,
    ID3D11SamplerState **ppSamplers);
void __RPC_STUB ID3D11DeviceContext_GSGetSamplers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_OMGetRenderTargets_Proxy(
    ID3D11DeviceContext* This,
    UINT NumViews,
    ID3D11RenderTargetView **ppRenderTargetViews,
    ID3D11DepthStencilView **ppDepthStencilView);
void __RPC_STUB ID3D11DeviceContext_OMGetRenderTargets_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews_Proxy(
    ID3D11DeviceContext* This,
    UINT NumRTVs,
    ID3D11RenderTargetView **ppRenderTargetViews,
    ID3D11DepthStencilView **ppDepthStencilView,
    UINT UAVStartSlot,
    UINT NumUAVs,
    ID3D11UnorderedAccessView **ppUnorderedAccessViews);
void __RPC_STUB ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_OMGetBlendState_Proxy(
    ID3D11DeviceContext* This,
    ID3D11BlendState **ppBlendState,
    FLOAT BlendFactor[4],
    UINT *pSampleMask);
void __RPC_STUB ID3D11DeviceContext_OMGetBlendState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_OMGetDepthStencilState_Proxy(
    ID3D11DeviceContext* This,
    ID3D11DepthStencilState **ppDepthStencilState,
    UINT *pStencilRef);
void __RPC_STUB ID3D11DeviceContext_OMGetDepthStencilState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_SOGetTargets_Proxy(
    ID3D11DeviceContext* This,
    UINT NumBuffers,
    ID3D11Buffer **ppSOTargets);
void __RPC_STUB ID3D11DeviceContext_SOGetTargets_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_RSGetState_Proxy(
    ID3D11DeviceContext* This,
    ID3D11RasterizerState **ppRasterizerState);
void __RPC_STUB ID3D11DeviceContext_RSGetState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_RSGetViewports_Proxy(
    ID3D11DeviceContext* This,
    UINT *pNumViewports,
    D3D11_VIEWPORT *pViewports);
void __RPC_STUB ID3D11DeviceContext_RSGetViewports_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_RSGetScissorRects_Proxy(
    ID3D11DeviceContext* This,
    UINT *pNumRects,
    D3D11_RECT *pRects);
void __RPC_STUB ID3D11DeviceContext_RSGetScissorRects_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_HSGetShaderResources_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumViews,
    ID3D11ShaderResourceView **ppShaderResourceViews);
void __RPC_STUB ID3D11DeviceContext_HSGetShaderResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_HSGetShader_Proxy(
    ID3D11DeviceContext* This,
    ID3D11HullShader **ppHullShader,
    ID3D11ClassInstance **ppClassInstances,
    UINT *pNumClassInstances);
void __RPC_STUB ID3D11DeviceContext_HSGetShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_HSGetSamplers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumSamplers,
    ID3D11SamplerState **ppSamplers);
void __RPC_STUB ID3D11DeviceContext_HSGetSamplers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_HSGetConstantBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer **ppConstantBuffers);
void __RPC_STUB ID3D11DeviceContext_HSGetConstantBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DSGetShaderResources_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumViews,
    ID3D11ShaderResourceView **ppShaderResourceViews);
void __RPC_STUB ID3D11DeviceContext_DSGetShaderResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DSGetShader_Proxy(
    ID3D11DeviceContext* This,
    ID3D11DomainShader **ppDomainShader,
    ID3D11ClassInstance **ppClassInstances,
    UINT *pNumClassInstances);
void __RPC_STUB ID3D11DeviceContext_DSGetShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DSGetSamplers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumSamplers,
    ID3D11SamplerState **ppSamplers);
void __RPC_STUB ID3D11DeviceContext_DSGetSamplers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_DSGetConstantBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer **ppConstantBuffers);
void __RPC_STUB ID3D11DeviceContext_DSGetConstantBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CSGetShaderResources_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumViews,
    ID3D11ShaderResourceView **ppShaderResourceViews);
void __RPC_STUB ID3D11DeviceContext_CSGetShaderResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CSGetUnorderedAccessViews_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumUAVs,
    ID3D11UnorderedAccessView **ppUnorderedAccessViews);
void __RPC_STUB ID3D11DeviceContext_CSGetUnorderedAccessViews_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CSGetShader_Proxy(
    ID3D11DeviceContext* This,
    ID3D11ComputeShader **ppComputeShader,
    ID3D11ClassInstance **ppClassInstances,
    UINT *pNumClassInstances);
void __RPC_STUB ID3D11DeviceContext_CSGetShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CSGetSamplers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumSamplers,
    ID3D11SamplerState **ppSamplers);
void __RPC_STUB ID3D11DeviceContext_CSGetSamplers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_CSGetConstantBuffers_Proxy(
    ID3D11DeviceContext* This,
    UINT StartSlot,
    UINT NumBuffers,
    ID3D11Buffer **ppConstantBuffers);
void __RPC_STUB ID3D11DeviceContext_CSGetConstantBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_ClearState_Proxy(
    ID3D11DeviceContext* This);
void __RPC_STUB ID3D11DeviceContext_ClearState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11DeviceContext_Flush_Proxy(
    ID3D11DeviceContext* This);
void __RPC_STUB ID3D11DeviceContext_Flush_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
D3D11_DEVICE_CONTEXT_TYPE STDMETHODCALLTYPE ID3D11DeviceContext_GetType_Proxy(
    ID3D11DeviceContext* This);
void __RPC_STUB ID3D11DeviceContext_GetType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
UINT STDMETHODCALLTYPE ID3D11DeviceContext_GetContextFlags_Proxy(
    ID3D11DeviceContext* This);
void __RPC_STUB ID3D11DeviceContext_GetContextFlags_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11DeviceContext_FinishCommandList_Proxy(
    ID3D11DeviceContext* This,
    WINBOOL RestoreDeferredContextState,
    ID3D11CommandList **ppCommandList);
void __RPC_STUB ID3D11DeviceContext_FinishCommandList_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11DeviceContext_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11AuthenticatedChannel interface
 */
#ifndef __ID3D11AuthenticatedChannel_INTERFACE_DEFINED__
#define __ID3D11AuthenticatedChannel_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11AuthenticatedChannel, 0x3015a308, 0xdcbd, 0x47aa, 0xa7,0x47, 0x19,0x24,0x86,0xd1,0x4d,0x4a);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("3015a308-dcbd-47aa-a747-192486d14d4a")
ID3D11AuthenticatedChannel : public ID3D11DeviceChild
{
    virtual HRESULT STDMETHODCALLTYPE GetCertificateSize(
        UINT *pCertificateSize) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCertificate(
        UINT CertificateSize,
        BYTE *pCertificate) = 0;

    virtual void STDMETHODCALLTYPE GetChannelHandle(
        HANDLE *pChannelHandle) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11AuthenticatedChannel, 0x3015a308, 0xdcbd, 0x47aa, 0xa7,0x47, 0x19,0x24,0x86,0xd1,0x4d,0x4a)
#endif
#else
typedef struct ID3D11AuthenticatedChannelVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11AuthenticatedChannel* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11AuthenticatedChannel* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11AuthenticatedChannel* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11AuthenticatedChannel* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11AuthenticatedChannel* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11AuthenticatedChannel* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11AuthenticatedChannel* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11AuthenticatedChannel methods ***/
    HRESULT (STDMETHODCALLTYPE *GetCertificateSize)(
        ID3D11AuthenticatedChannel* This,
        UINT *pCertificateSize);

    HRESULT (STDMETHODCALLTYPE *GetCertificate)(
        ID3D11AuthenticatedChannel* This,
        UINT CertificateSize,
        BYTE *pCertificate);

    void (STDMETHODCALLTYPE *GetChannelHandle)(
        ID3D11AuthenticatedChannel* This,
        HANDLE *pChannelHandle);

    END_INTERFACE
} ID3D11AuthenticatedChannelVtbl;
interface ID3D11AuthenticatedChannel {
    CONST_VTBL ID3D11AuthenticatedChannelVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11AuthenticatedChannel_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11AuthenticatedChannel_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11AuthenticatedChannel_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11AuthenticatedChannel_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11AuthenticatedChannel_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11AuthenticatedChannel_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11AuthenticatedChannel_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11AuthenticatedChannel methods ***/
#define ID3D11AuthenticatedChannel_GetCertificateSize(This,pCertificateSize) (This)->lpVtbl->GetCertificateSize(This,pCertificateSize)
#define ID3D11AuthenticatedChannel_GetCertificate(This,CertificateSize,pCertificate) (This)->lpVtbl->GetCertificate(This,CertificateSize,pCertificate)
#define ID3D11AuthenticatedChannel_GetChannelHandle(This,pChannelHandle) (This)->lpVtbl->GetChannelHandle(This,pChannelHandle)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11AuthenticatedChannel_QueryInterface(ID3D11AuthenticatedChannel* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11AuthenticatedChannel_AddRef(ID3D11AuthenticatedChannel* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11AuthenticatedChannel_Release(ID3D11AuthenticatedChannel* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11AuthenticatedChannel_GetDevice(ID3D11AuthenticatedChannel* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11AuthenticatedChannel_GetPrivateData(ID3D11AuthenticatedChannel* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11AuthenticatedChannel_SetPrivateData(ID3D11AuthenticatedChannel* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11AuthenticatedChannel_SetPrivateDataInterface(ID3D11AuthenticatedChannel* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11AuthenticatedChannel methods ***/
static FORCEINLINE HRESULT ID3D11AuthenticatedChannel_GetCertificateSize(ID3D11AuthenticatedChannel* This,UINT *pCertificateSize) {
    return This->lpVtbl->GetCertificateSize(This,pCertificateSize);
}
static FORCEINLINE HRESULT ID3D11AuthenticatedChannel_GetCertificate(ID3D11AuthenticatedChannel* This,UINT CertificateSize,BYTE *pCertificate) {
    return This->lpVtbl->GetCertificate(This,CertificateSize,pCertificate);
}
static FORCEINLINE void ID3D11AuthenticatedChannel_GetChannelHandle(ID3D11AuthenticatedChannel* This,HANDLE *pChannelHandle) {
    This->lpVtbl->GetChannelHandle(This,pChannelHandle);
}
#endif
#endif

#endif

HRESULT STDMETHODCALLTYPE ID3D11AuthenticatedChannel_GetCertificateSize_Proxy(
    ID3D11AuthenticatedChannel* This,
    UINT *pCertificateSize);
void __RPC_STUB ID3D11AuthenticatedChannel_GetCertificateSize_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11AuthenticatedChannel_GetCertificate_Proxy(
    ID3D11AuthenticatedChannel* This,
    UINT CertificateSize,
    BYTE *pCertificate);
void __RPC_STUB ID3D11AuthenticatedChannel_GetCertificate_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11AuthenticatedChannel_GetChannelHandle_Proxy(
    ID3D11AuthenticatedChannel* This,
    HANDLE *pChannelHandle);
void __RPC_STUB ID3D11AuthenticatedChannel_GetChannelHandle_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11AuthenticatedChannel_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11CryptoSession interface
 */
#ifndef __ID3D11CryptoSession_INTERFACE_DEFINED__
#define __ID3D11CryptoSession_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11CryptoSession, 0x9b32f9ad, 0xbdcc, 0x40a6, 0xa3,0x9d, 0xd5,0xc8,0x65,0x84,0x57,0x20);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("9b32f9ad-bdcc-40a6-a39d-d5c865845720")
ID3D11CryptoSession : public ID3D11DeviceChild
{
    virtual void STDMETHODCALLTYPE GetCryptoType(
        GUID *pCryptoType) = 0;

    virtual void STDMETHODCALLTYPE GetDecoderProfile(
        GUID *pDecoderProfile) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCertificateSize(
        UINT *pCertificateSize) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCertificate(
        UINT CertificateSize,
        BYTE *pCertificate) = 0;

    virtual void STDMETHODCALLTYPE GetCryptoSessionHandle(
        HANDLE *pCryptoSessionHandle) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11CryptoSession, 0x9b32f9ad, 0xbdcc, 0x40a6, 0xa3,0x9d, 0xd5,0xc8,0x65,0x84,0x57,0x20)
#endif
#else
typedef struct ID3D11CryptoSessionVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11CryptoSession* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11CryptoSession* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11CryptoSession* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11CryptoSession* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11CryptoSession* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11CryptoSession* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11CryptoSession* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11CryptoSession methods ***/
    void (STDMETHODCALLTYPE *GetCryptoType)(
        ID3D11CryptoSession* This,
        GUID *pCryptoType);

    void (STDMETHODCALLTYPE *GetDecoderProfile)(
        ID3D11CryptoSession* This,
        GUID *pDecoderProfile);

    HRESULT (STDMETHODCALLTYPE *GetCertificateSize)(
        ID3D11CryptoSession* This,
        UINT *pCertificateSize);

    HRESULT (STDMETHODCALLTYPE *GetCertificate)(
        ID3D11CryptoSession* This,
        UINT CertificateSize,
        BYTE *pCertificate);

    void (STDMETHODCALLTYPE *GetCryptoSessionHandle)(
        ID3D11CryptoSession* This,
        HANDLE *pCryptoSessionHandle);

    END_INTERFACE
} ID3D11CryptoSessionVtbl;
interface ID3D11CryptoSession {
    CONST_VTBL ID3D11CryptoSessionVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11CryptoSession_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11CryptoSession_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11CryptoSession_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11CryptoSession_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11CryptoSession_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11CryptoSession_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11CryptoSession_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11CryptoSession methods ***/
#define ID3D11CryptoSession_GetCryptoType(This,pCryptoType) (This)->lpVtbl->GetCryptoType(This,pCryptoType)
#define ID3D11CryptoSession_GetDecoderProfile(This,pDecoderProfile) (This)->lpVtbl->GetDecoderProfile(This,pDecoderProfile)
#define ID3D11CryptoSession_GetCertificateSize(This,pCertificateSize) (This)->lpVtbl->GetCertificateSize(This,pCertificateSize)
#define ID3D11CryptoSession_GetCertificate(This,CertificateSize,pCertificate) (This)->lpVtbl->GetCertificate(This,CertificateSize,pCertificate)
#define ID3D11CryptoSession_GetCryptoSessionHandle(This,pCryptoSessionHandle) (This)->lpVtbl->GetCryptoSessionHandle(This,pCryptoSessionHandle)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11CryptoSession_QueryInterface(ID3D11CryptoSession* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11CryptoSession_AddRef(ID3D11CryptoSession* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11CryptoSession_Release(ID3D11CryptoSession* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11CryptoSession_GetDevice(ID3D11CryptoSession* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11CryptoSession_GetPrivateData(ID3D11CryptoSession* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11CryptoSession_SetPrivateData(ID3D11CryptoSession* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11CryptoSession_SetPrivateDataInterface(ID3D11CryptoSession* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11CryptoSession methods ***/
static FORCEINLINE void ID3D11CryptoSession_GetCryptoType(ID3D11CryptoSession* This,GUID *pCryptoType) {
    This->lpVtbl->GetCryptoType(This,pCryptoType);
}
static FORCEINLINE void ID3D11CryptoSession_GetDecoderProfile(ID3D11CryptoSession* This,GUID *pDecoderProfile) {
    This->lpVtbl->GetDecoderProfile(This,pDecoderProfile);
}
static FORCEINLINE HRESULT ID3D11CryptoSession_GetCertificateSize(ID3D11CryptoSession* This,UINT *pCertificateSize) {
    return This->lpVtbl->GetCertificateSize(This,pCertificateSize);
}
static FORCEINLINE HRESULT ID3D11CryptoSession_GetCertificate(ID3D11CryptoSession* This,UINT CertificateSize,BYTE *pCertificate) {
    return This->lpVtbl->GetCertificate(This,CertificateSize,pCertificate);
}
static FORCEINLINE void ID3D11CryptoSession_GetCryptoSessionHandle(ID3D11CryptoSession* This,HANDLE *pCryptoSessionHandle) {
    This->lpVtbl->GetCryptoSessionHandle(This,pCryptoSessionHandle);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11CryptoSession_GetCryptoType_Proxy(
    ID3D11CryptoSession* This,
    GUID *pCryptoType);
void __RPC_STUB ID3D11CryptoSession_GetCryptoType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11CryptoSession_GetDecoderProfile_Proxy(
    ID3D11CryptoSession* This,
    GUID *pDecoderProfile);
void __RPC_STUB ID3D11CryptoSession_GetDecoderProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11CryptoSession_GetCertificateSize_Proxy(
    ID3D11CryptoSession* This,
    UINT *pCertificateSize);
void __RPC_STUB ID3D11CryptoSession_GetCertificateSize_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11CryptoSession_GetCertificate_Proxy(
    ID3D11CryptoSession* This,
    UINT CertificateSize,
    BYTE *pCertificate);
void __RPC_STUB ID3D11CryptoSession_GetCertificate_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11CryptoSession_GetCryptoSessionHandle_Proxy(
    ID3D11CryptoSession* This,
    HANDLE *pCryptoSessionHandle);
void __RPC_STUB ID3D11CryptoSession_GetCryptoSessionHandle_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11CryptoSession_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11VideoDecoder interface
 */
#ifndef __ID3D11VideoDecoder_INTERFACE_DEFINED__
#define __ID3D11VideoDecoder_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11VideoDecoder, 0x3c9c5b51, 0x995d, 0x48d1, 0x9b,0x8d, 0xfa,0x5c,0xae,0xde,0xd6,0x5c);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("3c9c5b51-995d-48d1-9b8d-fa5caeded65c")
ID3D11VideoDecoder : public ID3D11DeviceChild
{
    virtual HRESULT STDMETHODCALLTYPE GetCreationParameters(
        D3D11_VIDEO_DECODER_DESC *pVideoDesc,
        D3D11_VIDEO_DECODER_CONFIG *pConfig) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDriverHandle(
        HANDLE *pDriverHandle) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11VideoDecoder, 0x3c9c5b51, 0x995d, 0x48d1, 0x9b,0x8d, 0xfa,0x5c,0xae,0xde,0xd6,0x5c)
#endif
#else
typedef struct ID3D11VideoDecoderVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11VideoDecoder* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11VideoDecoder* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11VideoDecoder* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11VideoDecoder* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11VideoDecoder* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11VideoDecoder* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11VideoDecoder* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11VideoDecoder methods ***/
    HRESULT (STDMETHODCALLTYPE *GetCreationParameters)(
        ID3D11VideoDecoder* This,
        D3D11_VIDEO_DECODER_DESC *pVideoDesc,
        D3D11_VIDEO_DECODER_CONFIG *pConfig);

    HRESULT (STDMETHODCALLTYPE *GetDriverHandle)(
        ID3D11VideoDecoder* This,
        HANDLE *pDriverHandle);

    END_INTERFACE
} ID3D11VideoDecoderVtbl;
interface ID3D11VideoDecoder {
    CONST_VTBL ID3D11VideoDecoderVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11VideoDecoder_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11VideoDecoder_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11VideoDecoder_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11VideoDecoder_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11VideoDecoder_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11VideoDecoder_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11VideoDecoder_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11VideoDecoder methods ***/
#define ID3D11VideoDecoder_GetCreationParameters(This,pVideoDesc,pConfig) (This)->lpVtbl->GetCreationParameters(This,pVideoDesc,pConfig)
#define ID3D11VideoDecoder_GetDriverHandle(This,pDriverHandle) (This)->lpVtbl->GetDriverHandle(This,pDriverHandle)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11VideoDecoder_QueryInterface(ID3D11VideoDecoder* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11VideoDecoder_AddRef(ID3D11VideoDecoder* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11VideoDecoder_Release(ID3D11VideoDecoder* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11VideoDecoder_GetDevice(ID3D11VideoDecoder* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11VideoDecoder_GetPrivateData(ID3D11VideoDecoder* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoDecoder_SetPrivateData(ID3D11VideoDecoder* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoDecoder_SetPrivateDataInterface(ID3D11VideoDecoder* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11VideoDecoder methods ***/
static FORCEINLINE HRESULT ID3D11VideoDecoder_GetCreationParameters(ID3D11VideoDecoder* This,D3D11_VIDEO_DECODER_DESC *pVideoDesc,D3D11_VIDEO_DECODER_CONFIG *pConfig) {
    return This->lpVtbl->GetCreationParameters(This,pVideoDesc,pConfig);
}
static FORCEINLINE HRESULT ID3D11VideoDecoder_GetDriverHandle(ID3D11VideoDecoder* This,HANDLE *pDriverHandle) {
    return This->lpVtbl->GetDriverHandle(This,pDriverHandle);
}
#endif
#endif

#endif

HRESULT STDMETHODCALLTYPE ID3D11VideoDecoder_GetCreationParameters_Proxy(
    ID3D11VideoDecoder* This,
    D3D11_VIDEO_DECODER_DESC *pVideoDesc,
    D3D11_VIDEO_DECODER_CONFIG *pConfig);
void __RPC_STUB ID3D11VideoDecoder_GetCreationParameters_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDecoder_GetDriverHandle_Proxy(
    ID3D11VideoDecoder* This,
    HANDLE *pDriverHandle);
void __RPC_STUB ID3D11VideoDecoder_GetDriverHandle_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11VideoDecoder_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11VideoProcessorEnumerator interface
 */
#ifndef __ID3D11VideoProcessorEnumerator_INTERFACE_DEFINED__
#define __ID3D11VideoProcessorEnumerator_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11VideoProcessorEnumerator, 0x31627037, 0x53ab, 0x4200, 0x90,0x61, 0x05,0xfa,0xa9,0xab,0x45,0xf9);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("31627037-53ab-4200-9061-05faa9ab45f9")
ID3D11VideoProcessorEnumerator : public ID3D11DeviceChild
{
    virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorContentDesc(
        D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pContentDesc) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckVideoProcessorFormat(
        DXGI_FORMAT Format,
        UINT *pFlags) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorCaps(
        D3D11_VIDEO_PROCESSOR_CAPS *pCaps) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorRateConversionCaps(
        UINT TypeIndex,
        D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorCustomRate(
        UINT TypeIndex,
        UINT CustomRateIndex,
        D3D11_VIDEO_PROCESSOR_CUSTOM_RATE *pRate) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorFilterRange(
        D3D11_VIDEO_PROCESSOR_FILTER Filter,
        D3D11_VIDEO_PROCESSOR_FILTER_RANGE *pRange) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11VideoProcessorEnumerator, 0x31627037, 0x53ab, 0x4200, 0x90,0x61, 0x05,0xfa,0xa9,0xab,0x45,0xf9)
#endif
#else
typedef struct ID3D11VideoProcessorEnumeratorVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11VideoProcessorEnumerator* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11VideoProcessorEnumerator* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11VideoProcessorEnumerator* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11VideoProcessorEnumerator* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11VideoProcessorEnumerator* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11VideoProcessorEnumerator* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11VideoProcessorEnumerator* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11VideoProcessorEnumerator methods ***/
    HRESULT (STDMETHODCALLTYPE *GetVideoProcessorContentDesc)(
        ID3D11VideoProcessorEnumerator* This,
        D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pContentDesc);

    HRESULT (STDMETHODCALLTYPE *CheckVideoProcessorFormat)(
        ID3D11VideoProcessorEnumerator* This,
        DXGI_FORMAT Format,
        UINT *pFlags);

    HRESULT (STDMETHODCALLTYPE *GetVideoProcessorCaps)(
        ID3D11VideoProcessorEnumerator* This,
        D3D11_VIDEO_PROCESSOR_CAPS *pCaps);

    HRESULT (STDMETHODCALLTYPE *GetVideoProcessorRateConversionCaps)(
        ID3D11VideoProcessorEnumerator* This,
        UINT TypeIndex,
        D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps);

    HRESULT (STDMETHODCALLTYPE *GetVideoProcessorCustomRate)(
        ID3D11VideoProcessorEnumerator* This,
        UINT TypeIndex,
        UINT CustomRateIndex,
        D3D11_VIDEO_PROCESSOR_CUSTOM_RATE *pRate);

    HRESULT (STDMETHODCALLTYPE *GetVideoProcessorFilterRange)(
        ID3D11VideoProcessorEnumerator* This,
        D3D11_VIDEO_PROCESSOR_FILTER Filter,
        D3D11_VIDEO_PROCESSOR_FILTER_RANGE *pRange);

    END_INTERFACE
} ID3D11VideoProcessorEnumeratorVtbl;
interface ID3D11VideoProcessorEnumerator {
    CONST_VTBL ID3D11VideoProcessorEnumeratorVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11VideoProcessorEnumerator_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11VideoProcessorEnumerator_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11VideoProcessorEnumerator_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11VideoProcessorEnumerator_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11VideoProcessorEnumerator_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11VideoProcessorEnumerator_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11VideoProcessorEnumerator_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11VideoProcessorEnumerator methods ***/
#define ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc(This,pContentDesc) (This)->lpVtbl->GetVideoProcessorContentDesc(This,pContentDesc)
#define ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(This,Format,pFlags) (This)->lpVtbl->CheckVideoProcessorFormat(This,Format,pFlags)
#define ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps(This,pCaps) (This)->lpVtbl->GetVideoProcessorCaps(This,pCaps)
#define ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps(This,TypeIndex,pCaps) (This)->lpVtbl->GetVideoProcessorRateConversionCaps(This,TypeIndex,pCaps)
#define ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate(This,TypeIndex,CustomRateIndex,pRate) (This)->lpVtbl->GetVideoProcessorCustomRate(This,TypeIndex,CustomRateIndex,pRate)
#define ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange(This,Filter,pRange) (This)->lpVtbl->GetVideoProcessorFilterRange(This,Filter,pRange)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11VideoProcessorEnumerator_QueryInterface(ID3D11VideoProcessorEnumerator* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11VideoProcessorEnumerator_AddRef(ID3D11VideoProcessorEnumerator* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11VideoProcessorEnumerator_Release(ID3D11VideoProcessorEnumerator* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11VideoProcessorEnumerator_GetDevice(ID3D11VideoProcessorEnumerator* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorEnumerator_GetPrivateData(ID3D11VideoProcessorEnumerator* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorEnumerator_SetPrivateData(ID3D11VideoProcessorEnumerator* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorEnumerator_SetPrivateDataInterface(ID3D11VideoProcessorEnumerator* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11VideoProcessorEnumerator methods ***/
static FORCEINLINE HRESULT ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc(ID3D11VideoProcessorEnumerator* This,D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pContentDesc) {
    return This->lpVtbl->GetVideoProcessorContentDesc(This,pContentDesc);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(ID3D11VideoProcessorEnumerator* This,DXGI_FORMAT Format,UINT *pFlags) {
    return This->lpVtbl->CheckVideoProcessorFormat(This,Format,pFlags);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps(ID3D11VideoProcessorEnumerator* This,D3D11_VIDEO_PROCESSOR_CAPS *pCaps) {
    return This->lpVtbl->GetVideoProcessorCaps(This,pCaps);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps(ID3D11VideoProcessorEnumerator* This,UINT TypeIndex,D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps) {
    return This->lpVtbl->GetVideoProcessorRateConversionCaps(This,TypeIndex,pCaps);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate(ID3D11VideoProcessorEnumerator* This,UINT TypeIndex,UINT CustomRateIndex,D3D11_VIDEO_PROCESSOR_CUSTOM_RATE *pRate) {
    return This->lpVtbl->GetVideoProcessorCustomRate(This,TypeIndex,CustomRateIndex,pRate);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange(ID3D11VideoProcessorEnumerator* This,D3D11_VIDEO_PROCESSOR_FILTER Filter,D3D11_VIDEO_PROCESSOR_FILTER_RANGE *pRange) {
    return This->lpVtbl->GetVideoProcessorFilterRange(This,Filter,pRange);
}
#endif
#endif

#endif

HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc_Proxy(
    ID3D11VideoProcessorEnumerator* This,
    D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pContentDesc);
void __RPC_STUB ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat_Proxy(
    ID3D11VideoProcessorEnumerator* This,
    DXGI_FORMAT Format,
    UINT *pFlags);
void __RPC_STUB ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps_Proxy(
    ID3D11VideoProcessorEnumerator* This,
    D3D11_VIDEO_PROCESSOR_CAPS *pCaps);
void __RPC_STUB ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps_Proxy(
    ID3D11VideoProcessorEnumerator* This,
    UINT TypeIndex,
    D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps);
void __RPC_STUB ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate_Proxy(
    ID3D11VideoProcessorEnumerator* This,
    UINT TypeIndex,
    UINT CustomRateIndex,
    D3D11_VIDEO_PROCESSOR_CUSTOM_RATE *pRate);
void __RPC_STUB ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange_Proxy(
    ID3D11VideoProcessorEnumerator* This,
    D3D11_VIDEO_PROCESSOR_FILTER Filter,
    D3D11_VIDEO_PROCESSOR_FILTER_RANGE *pRange);
void __RPC_STUB ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11VideoProcessorEnumerator_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11VideoProcessor interface
 */
#ifndef __ID3D11VideoProcessor_INTERFACE_DEFINED__
#define __ID3D11VideoProcessor_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11VideoProcessor, 0x1d7b0652, 0x185f, 0x41c6, 0x85,0xce, 0x0c,0x5b,0xe3,0xd4,0xae,0x6c);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("1d7b0652-185f-41c6-85ce-0c5be3d4ae6c")
ID3D11VideoProcessor : public ID3D11DeviceChild
{
    virtual void STDMETHODCALLTYPE GetContentDesc(
        D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc) = 0;

    virtual void STDMETHODCALLTYPE GetRateConversionCaps(
        D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11VideoProcessor, 0x1d7b0652, 0x185f, 0x41c6, 0x85,0xce, 0x0c,0x5b,0xe3,0xd4,0xae,0x6c)
#endif
#else
typedef struct ID3D11VideoProcessorVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11VideoProcessor* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11VideoProcessor* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11VideoProcessor* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11VideoProcessor* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11VideoProcessor* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11VideoProcessor* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11VideoProcessor* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11VideoProcessor methods ***/
    void (STDMETHODCALLTYPE *GetContentDesc)(
        ID3D11VideoProcessor* This,
        D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc);

    void (STDMETHODCALLTYPE *GetRateConversionCaps)(
        ID3D11VideoProcessor* This,
        D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps);

    END_INTERFACE
} ID3D11VideoProcessorVtbl;
interface ID3D11VideoProcessor {
    CONST_VTBL ID3D11VideoProcessorVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11VideoProcessor_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11VideoProcessor_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11VideoProcessor_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11VideoProcessor_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11VideoProcessor_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11VideoProcessor_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11VideoProcessor_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11VideoProcessor methods ***/
#define ID3D11VideoProcessor_GetContentDesc(This,pDesc) (This)->lpVtbl->GetContentDesc(This,pDesc)
#define ID3D11VideoProcessor_GetRateConversionCaps(This,pCaps) (This)->lpVtbl->GetRateConversionCaps(This,pCaps)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11VideoProcessor_QueryInterface(ID3D11VideoProcessor* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11VideoProcessor_AddRef(ID3D11VideoProcessor* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11VideoProcessor_Release(ID3D11VideoProcessor* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11VideoProcessor_GetDevice(ID3D11VideoProcessor* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11VideoProcessor_GetPrivateData(ID3D11VideoProcessor* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoProcessor_SetPrivateData(ID3D11VideoProcessor* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoProcessor_SetPrivateDataInterface(ID3D11VideoProcessor* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11VideoProcessor methods ***/
static FORCEINLINE void ID3D11VideoProcessor_GetContentDesc(ID3D11VideoProcessor* This,D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc) {
    This->lpVtbl->GetContentDesc(This,pDesc);
}
static FORCEINLINE void ID3D11VideoProcessor_GetRateConversionCaps(ID3D11VideoProcessor* This,D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps) {
    This->lpVtbl->GetRateConversionCaps(This,pCaps);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11VideoProcessor_GetContentDesc_Proxy(
    ID3D11VideoProcessor* This,
    D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc);
void __RPC_STUB ID3D11VideoProcessor_GetContentDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoProcessor_GetRateConversionCaps_Proxy(
    ID3D11VideoProcessor* This,
    D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS *pCaps);
void __RPC_STUB ID3D11VideoProcessor_GetRateConversionCaps_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11VideoProcessor_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11VideoDecoderOutputView interface
 */
#ifndef __ID3D11VideoDecoderOutputView_INTERFACE_DEFINED__
#define __ID3D11VideoDecoderOutputView_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11VideoDecoderOutputView, 0xc2931aea, 0x2a85, 0x4f20, 0x86,0x0f, 0xfb,0xa1,0xfd,0x25,0x6e,0x18);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("c2931aea-2a85-4f20-860f-fba1fd256e18")
ID3D11VideoDecoderOutputView : public ID3D11View
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11VideoDecoderOutputView, 0xc2931aea, 0x2a85, 0x4f20, 0x86,0x0f, 0xfb,0xa1,0xfd,0x25,0x6e,0x18)
#endif
#else
typedef struct ID3D11VideoDecoderOutputViewVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11VideoDecoderOutputView* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11VideoDecoderOutputView* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11VideoDecoderOutputView* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11VideoDecoderOutputView* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11VideoDecoderOutputView* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11VideoDecoderOutputView* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11VideoDecoderOutputView* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11View methods ***/
    void (STDMETHODCALLTYPE *GetResource)(
        ID3D11VideoDecoderOutputView* This,
        ID3D11Resource **ppResource);

    /*** ID3D11VideoDecoderOutputView methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11VideoDecoderOutputView* This,
        D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc);

    END_INTERFACE
} ID3D11VideoDecoderOutputViewVtbl;
interface ID3D11VideoDecoderOutputView {
    CONST_VTBL ID3D11VideoDecoderOutputViewVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11VideoDecoderOutputView_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11VideoDecoderOutputView_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11VideoDecoderOutputView_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11VideoDecoderOutputView_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11VideoDecoderOutputView_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11VideoDecoderOutputView_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11VideoDecoderOutputView_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11View methods ***/
#define ID3D11VideoDecoderOutputView_GetResource(This,ppResource) (This)->lpVtbl->GetResource(This,ppResource)
/*** ID3D11VideoDecoderOutputView methods ***/
#define ID3D11VideoDecoderOutputView_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11VideoDecoderOutputView_QueryInterface(ID3D11VideoDecoderOutputView* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11VideoDecoderOutputView_AddRef(ID3D11VideoDecoderOutputView* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11VideoDecoderOutputView_Release(ID3D11VideoDecoderOutputView* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11VideoDecoderOutputView_GetDevice(ID3D11VideoDecoderOutputView* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11VideoDecoderOutputView_GetPrivateData(ID3D11VideoDecoderOutputView* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoDecoderOutputView_SetPrivateData(ID3D11VideoDecoderOutputView* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoDecoderOutputView_SetPrivateDataInterface(ID3D11VideoDecoderOutputView* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11View methods ***/
static FORCEINLINE void ID3D11VideoDecoderOutputView_GetResource(ID3D11VideoDecoderOutputView* This,ID3D11Resource **ppResource) {
    This->lpVtbl->GetResource(This,ppResource);
}
/*** ID3D11VideoDecoderOutputView methods ***/
static FORCEINLINE void ID3D11VideoDecoderOutputView_GetDesc(ID3D11VideoDecoderOutputView* This,D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11VideoDecoderOutputView_GetDesc_Proxy(
    ID3D11VideoDecoderOutputView* This,
    D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc);
void __RPC_STUB ID3D11VideoDecoderOutputView_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11VideoDecoderOutputView_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11VideoProcessorInputView interface
 */
#ifndef __ID3D11VideoProcessorInputView_INTERFACE_DEFINED__
#define __ID3D11VideoProcessorInputView_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11VideoProcessorInputView, 0x11ec5a5f, 0x51dc, 0x4945, 0xab,0x34, 0x6e,0x8c,0x21,0x30,0x0e,0xa5);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("11ec5a5f-51dc-4945-ab34-6e8c21300ea5")
ID3D11VideoProcessorInputView : public ID3D11View
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11VideoProcessorInputView, 0x11ec5a5f, 0x51dc, 0x4945, 0xab,0x34, 0x6e,0x8c,0x21,0x30,0x0e,0xa5)
#endif
#else
typedef struct ID3D11VideoProcessorInputViewVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11VideoProcessorInputView* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11VideoProcessorInputView* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11VideoProcessorInputView* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11VideoProcessorInputView* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11VideoProcessorInputView* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11VideoProcessorInputView* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11VideoProcessorInputView* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11View methods ***/
    void (STDMETHODCALLTYPE *GetResource)(
        ID3D11VideoProcessorInputView* This,
        ID3D11Resource **ppResource);

    /*** ID3D11VideoProcessorInputView methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11VideoProcessorInputView* This,
        D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc);

    END_INTERFACE
} ID3D11VideoProcessorInputViewVtbl;
interface ID3D11VideoProcessorInputView {
    CONST_VTBL ID3D11VideoProcessorInputViewVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11VideoProcessorInputView_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11VideoProcessorInputView_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11VideoProcessorInputView_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11VideoProcessorInputView_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11VideoProcessorInputView_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11VideoProcessorInputView_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11VideoProcessorInputView_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11View methods ***/
#define ID3D11VideoProcessorInputView_GetResource(This,ppResource) (This)->lpVtbl->GetResource(This,ppResource)
/*** ID3D11VideoProcessorInputView methods ***/
#define ID3D11VideoProcessorInputView_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11VideoProcessorInputView_QueryInterface(ID3D11VideoProcessorInputView* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11VideoProcessorInputView_AddRef(ID3D11VideoProcessorInputView* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11VideoProcessorInputView_Release(ID3D11VideoProcessorInputView* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11VideoProcessorInputView_GetDevice(ID3D11VideoProcessorInputView* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorInputView_GetPrivateData(ID3D11VideoProcessorInputView* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorInputView_SetPrivateData(ID3D11VideoProcessorInputView* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorInputView_SetPrivateDataInterface(ID3D11VideoProcessorInputView* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11View methods ***/
static FORCEINLINE void ID3D11VideoProcessorInputView_GetResource(ID3D11VideoProcessorInputView* This,ID3D11Resource **ppResource) {
    This->lpVtbl->GetResource(This,ppResource);
}
/*** ID3D11VideoProcessorInputView methods ***/
static FORCEINLINE void ID3D11VideoProcessorInputView_GetDesc(ID3D11VideoProcessorInputView* This,D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11VideoProcessorInputView_GetDesc_Proxy(
    ID3D11VideoProcessorInputView* This,
    D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc);
void __RPC_STUB ID3D11VideoProcessorInputView_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11VideoProcessorInputView_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11VideoProcessorOutputView interface
 */
#ifndef __ID3D11VideoProcessorOutputView_INTERFACE_DEFINED__
#define __ID3D11VideoProcessorOutputView_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11VideoProcessorOutputView, 0xa048285e, 0x25a9, 0x4527, 0xbd,0x93, 0xd6,0x8b,0x68,0xc4,0x42,0x54);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("a048285e-25a9-4527-bd93-d68b68c44254")
ID3D11VideoProcessorOutputView : public ID3D11View
{
    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11VideoProcessorOutputView, 0xa048285e, 0x25a9, 0x4527, 0xbd,0x93, 0xd6,0x8b,0x68,0xc4,0x42,0x54)
#endif
#else
typedef struct ID3D11VideoProcessorOutputViewVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11VideoProcessorOutputView* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11VideoProcessorOutputView* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11VideoProcessorOutputView* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11VideoProcessorOutputView* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11VideoProcessorOutputView* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11VideoProcessorOutputView* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11VideoProcessorOutputView* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11View methods ***/
    void (STDMETHODCALLTYPE *GetResource)(
        ID3D11VideoProcessorOutputView* This,
        ID3D11Resource **ppResource);

    /*** ID3D11VideoProcessorOutputView methods ***/
    void (STDMETHODCALLTYPE *GetDesc)(
        ID3D11VideoProcessorOutputView* This,
        D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc);

    END_INTERFACE
} ID3D11VideoProcessorOutputViewVtbl;
interface ID3D11VideoProcessorOutputView {
    CONST_VTBL ID3D11VideoProcessorOutputViewVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11VideoProcessorOutputView_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11VideoProcessorOutputView_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11VideoProcessorOutputView_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11VideoProcessorOutputView_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11VideoProcessorOutputView_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11VideoProcessorOutputView_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11VideoProcessorOutputView_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11View methods ***/
#define ID3D11VideoProcessorOutputView_GetResource(This,ppResource) (This)->lpVtbl->GetResource(This,ppResource)
/*** ID3D11VideoProcessorOutputView methods ***/
#define ID3D11VideoProcessorOutputView_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11VideoProcessorOutputView_QueryInterface(ID3D11VideoProcessorOutputView* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11VideoProcessorOutputView_AddRef(ID3D11VideoProcessorOutputView* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11VideoProcessorOutputView_Release(ID3D11VideoProcessorOutputView* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11VideoProcessorOutputView_GetDevice(ID3D11VideoProcessorOutputView* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorOutputView_GetPrivateData(ID3D11VideoProcessorOutputView* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorOutputView_SetPrivateData(ID3D11VideoProcessorOutputView* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoProcessorOutputView_SetPrivateDataInterface(ID3D11VideoProcessorOutputView* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11View methods ***/
static FORCEINLINE void ID3D11VideoProcessorOutputView_GetResource(ID3D11VideoProcessorOutputView* This,ID3D11Resource **ppResource) {
    This->lpVtbl->GetResource(This,ppResource);
}
/*** ID3D11VideoProcessorOutputView methods ***/
static FORCEINLINE void ID3D11VideoProcessorOutputView_GetDesc(ID3D11VideoProcessorOutputView* This,D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc) {
    This->lpVtbl->GetDesc(This,pDesc);
}
#endif
#endif

#endif

void STDMETHODCALLTYPE ID3D11VideoProcessorOutputView_GetDesc_Proxy(
    ID3D11VideoProcessorOutputView* This,
    D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc);
void __RPC_STUB ID3D11VideoProcessorOutputView_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11VideoProcessorOutputView_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11VideoDevice interface
 */
#ifndef __ID3D11VideoDevice_INTERFACE_DEFINED__
#define __ID3D11VideoDevice_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11VideoDevice, 0x10ec4d5b, 0x975a, 0x4689, 0xb9,0xe4, 0xd0,0xaa,0xc3,0x0f,0xe3,0x33);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("10ec4d5b-975a-4689-b9e4-d0aac30fe333")
ID3D11VideoDevice : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE CreateVideoDecoder(
        const D3D11_VIDEO_DECODER_DESC *pVideoDesc,
        const D3D11_VIDEO_DECODER_CONFIG *pConfig,
        ID3D11VideoDecoder **ppDecoder) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessor(
        ID3D11VideoProcessorEnumerator *pEnum,
        UINT RateConversionIndex,
        ID3D11VideoProcessor **ppVideoProcessor) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateAuthenticatedChannel(
        D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType,
        ID3D11AuthenticatedChannel **ppAuthenticatedChannel) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateCryptoSession(
        const GUID *pCryptoType,
        const GUID *pDecoderProfile,
        const GUID *pKeyExchangeType,
        ID3D11CryptoSession **ppCryptoSession) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVideoDecoderOutputView(
        ID3D11Resource *pResource,
        const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc,
        ID3D11VideoDecoderOutputView **ppVDOVView) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessorInputView(
        ID3D11Resource *pResource,
        ID3D11VideoProcessorEnumerator *pEnum,
        const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc,
        ID3D11VideoProcessorInputView **ppVPIView) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessorOutputView(
        ID3D11Resource *pResource,
        ID3D11VideoProcessorEnumerator *pEnum,
        const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc,
        ID3D11VideoProcessorOutputView **ppVPOView) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessorEnumerator(
        const D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc,
        ID3D11VideoProcessorEnumerator **ppEnum) = 0;

    virtual UINT STDMETHODCALLTYPE GetVideoDecoderProfileCount(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVideoDecoderProfile(
        UINT Index,
        GUID *pDecoderProfile) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckVideoDecoderFormat(
        const GUID *pDecoderProfile,
        DXGI_FORMAT Format,
        WINBOOL *pSupported) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVideoDecoderConfigCount(
        const D3D11_VIDEO_DECODER_DESC *pDesc,
        UINT *pCount) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVideoDecoderConfig(
        const D3D11_VIDEO_DECODER_DESC *pDesc,
        UINT Index,
        D3D11_VIDEO_DECODER_CONFIG *pConfig) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetContentProtectionCaps(
        const GUID *pCryptoType,
        const GUID *pDecoderProfile,
        D3D11_VIDEO_CONTENT_PROTECTION_CAPS *pCaps) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckCryptoKeyExchange(
        const GUID *pCryptoType,
        const GUID *pDecoderProfile,
        UINT Index,
        GUID *pKeyExchangeType) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPrivateData(
        REFGUID guid,
        UINT DataSize,
        const void *pData) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface(
        REFGUID guid,
        const IUnknown *pData) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11VideoDevice, 0x10ec4d5b, 0x975a, 0x4689, 0xb9,0xe4, 0xd0,0xaa,0xc3,0x0f,0xe3,0x33)
#endif
#else
typedef struct ID3D11VideoDeviceVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11VideoDevice* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11VideoDevice* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11VideoDevice* This);

    /*** ID3D11VideoDevice methods ***/
    HRESULT (STDMETHODCALLTYPE *CreateVideoDecoder)(
        ID3D11VideoDevice* This,
        const D3D11_VIDEO_DECODER_DESC *pVideoDesc,
        const D3D11_VIDEO_DECODER_CONFIG *pConfig,
        ID3D11VideoDecoder **ppDecoder);

    HRESULT (STDMETHODCALLTYPE *CreateVideoProcessor)(
        ID3D11VideoDevice* This,
        ID3D11VideoProcessorEnumerator *pEnum,
        UINT RateConversionIndex,
        ID3D11VideoProcessor **ppVideoProcessor);

    HRESULT (STDMETHODCALLTYPE *CreateAuthenticatedChannel)(
        ID3D11VideoDevice* This,
        D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType,
        ID3D11AuthenticatedChannel **ppAuthenticatedChannel);

    HRESULT (STDMETHODCALLTYPE *CreateCryptoSession)(
        ID3D11VideoDevice* This,
        const GUID *pCryptoType,
        const GUID *pDecoderProfile,
        const GUID *pKeyExchangeType,
        ID3D11CryptoSession **ppCryptoSession);

    HRESULT (STDMETHODCALLTYPE *CreateVideoDecoderOutputView)(
        ID3D11VideoDevice* This,
        ID3D11Resource *pResource,
        const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc,
        ID3D11VideoDecoderOutputView **ppVDOVView);

    HRESULT (STDMETHODCALLTYPE *CreateVideoProcessorInputView)(
        ID3D11VideoDevice* This,
        ID3D11Resource *pResource,
        ID3D11VideoProcessorEnumerator *pEnum,
        const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc,
        ID3D11VideoProcessorInputView **ppVPIView);

    HRESULT (STDMETHODCALLTYPE *CreateVideoProcessorOutputView)(
        ID3D11VideoDevice* This,
        ID3D11Resource *pResource,
        ID3D11VideoProcessorEnumerator *pEnum,
        const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc,
        ID3D11VideoProcessorOutputView **ppVPOView);

    HRESULT (STDMETHODCALLTYPE *CreateVideoProcessorEnumerator)(
        ID3D11VideoDevice* This,
        const D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc,
        ID3D11VideoProcessorEnumerator **ppEnum);

    UINT (STDMETHODCALLTYPE *GetVideoDecoderProfileCount)(
        ID3D11VideoDevice* This);

    HRESULT (STDMETHODCALLTYPE *GetVideoDecoderProfile)(
        ID3D11VideoDevice* This,
        UINT Index,
        GUID *pDecoderProfile);

    HRESULT (STDMETHODCALLTYPE *CheckVideoDecoderFormat)(
        ID3D11VideoDevice* This,
        const GUID *pDecoderProfile,
        DXGI_FORMAT Format,
        WINBOOL *pSupported);

    HRESULT (STDMETHODCALLTYPE *GetVideoDecoderConfigCount)(
        ID3D11VideoDevice* This,
        const D3D11_VIDEO_DECODER_DESC *pDesc,
        UINT *pCount);

    HRESULT (STDMETHODCALLTYPE *GetVideoDecoderConfig)(
        ID3D11VideoDevice* This,
        const D3D11_VIDEO_DECODER_DESC *pDesc,
        UINT Index,
        D3D11_VIDEO_DECODER_CONFIG *pConfig);

    HRESULT (STDMETHODCALLTYPE *GetContentProtectionCaps)(
        ID3D11VideoDevice* This,
        const GUID *pCryptoType,
        const GUID *pDecoderProfile,
        D3D11_VIDEO_CONTENT_PROTECTION_CAPS *pCaps);

    HRESULT (STDMETHODCALLTYPE *CheckCryptoKeyExchange)(
        ID3D11VideoDevice* This,
        const GUID *pCryptoType,
        const GUID *pDecoderProfile,
        UINT Index,
        GUID *pKeyExchangeType);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11VideoDevice* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11VideoDevice* This,
        REFGUID guid,
        const IUnknown *pData);

    END_INTERFACE
} ID3D11VideoDeviceVtbl;
interface ID3D11VideoDevice {
    CONST_VTBL ID3D11VideoDeviceVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11VideoDevice_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11VideoDevice_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11VideoDevice_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11VideoDevice methods ***/
#define ID3D11VideoDevice_CreateVideoDecoder(This,pVideoDesc,pConfig,ppDecoder) (This)->lpVtbl->CreateVideoDecoder(This,pVideoDesc,pConfig,ppDecoder)
#define ID3D11VideoDevice_CreateVideoProcessor(This,pEnum,RateConversionIndex,ppVideoProcessor) (This)->lpVtbl->CreateVideoProcessor(This,pEnum,RateConversionIndex,ppVideoProcessor)
#define ID3D11VideoDevice_CreateAuthenticatedChannel(This,ChannelType,ppAuthenticatedChannel) (This)->lpVtbl->CreateAuthenticatedChannel(This,ChannelType,ppAuthenticatedChannel)
#define ID3D11VideoDevice_CreateCryptoSession(This,pCryptoType,pDecoderProfile,pKeyExchangeType,ppCryptoSession) (This)->lpVtbl->CreateCryptoSession(This,pCryptoType,pDecoderProfile,pKeyExchangeType,ppCryptoSession)
#define ID3D11VideoDevice_CreateVideoDecoderOutputView(This,pResource,pDesc,ppVDOVView) (This)->lpVtbl->CreateVideoDecoderOutputView(This,pResource,pDesc,ppVDOVView)
#define ID3D11VideoDevice_CreateVideoProcessorInputView(This,pResource,pEnum,pDesc,ppVPIView) (This)->lpVtbl->CreateVideoProcessorInputView(This,pResource,pEnum,pDesc,ppVPIView)
#define ID3D11VideoDevice_CreateVideoProcessorOutputView(This,pResource,pEnum,pDesc,ppVPOView) (This)->lpVtbl->CreateVideoProcessorOutputView(This,pResource,pEnum,pDesc,ppVPOView)
#define ID3D11VideoDevice_CreateVideoProcessorEnumerator(This,pDesc,ppEnum) (This)->lpVtbl->CreateVideoProcessorEnumerator(This,pDesc,ppEnum)
#define ID3D11VideoDevice_GetVideoDecoderProfileCount(This) (This)->lpVtbl->GetVideoDecoderProfileCount(This)
#define ID3D11VideoDevice_GetVideoDecoderProfile(This,Index,pDecoderProfile) (This)->lpVtbl->GetVideoDecoderProfile(This,Index,pDecoderProfile)
#define ID3D11VideoDevice_CheckVideoDecoderFormat(This,pDecoderProfile,Format,pSupported) (This)->lpVtbl->CheckVideoDecoderFormat(This,pDecoderProfile,Format,pSupported)
#define ID3D11VideoDevice_GetVideoDecoderConfigCount(This,pDesc,pCount) (This)->lpVtbl->GetVideoDecoderConfigCount(This,pDesc,pCount)
#define ID3D11VideoDevice_GetVideoDecoderConfig(This,pDesc,Index,pConfig) (This)->lpVtbl->GetVideoDecoderConfig(This,pDesc,Index,pConfig)
#define ID3D11VideoDevice_GetContentProtectionCaps(This,pCryptoType,pDecoderProfile,pCaps) (This)->lpVtbl->GetContentProtectionCaps(This,pCryptoType,pDecoderProfile,pCaps)
#define ID3D11VideoDevice_CheckCryptoKeyExchange(This,pCryptoType,pDecoderProfile,Index,pKeyExchangeType) (This)->lpVtbl->CheckCryptoKeyExchange(This,pCryptoType,pDecoderProfile,Index,pKeyExchangeType)
#define ID3D11VideoDevice_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11VideoDevice_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11VideoDevice_QueryInterface(ID3D11VideoDevice* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11VideoDevice_AddRef(ID3D11VideoDevice* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11VideoDevice_Release(ID3D11VideoDevice* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11VideoDevice methods ***/
static FORCEINLINE HRESULT ID3D11VideoDevice_CreateVideoDecoder(ID3D11VideoDevice* This,const D3D11_VIDEO_DECODER_DESC *pVideoDesc,const D3D11_VIDEO_DECODER_CONFIG *pConfig,ID3D11VideoDecoder **ppDecoder) {
    return This->lpVtbl->CreateVideoDecoder(This,pVideoDesc,pConfig,ppDecoder);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_CreateVideoProcessor(ID3D11VideoDevice* This,ID3D11VideoProcessorEnumerator *pEnum,UINT RateConversionIndex,ID3D11VideoProcessor **ppVideoProcessor) {
    return This->lpVtbl->CreateVideoProcessor(This,pEnum,RateConversionIndex,ppVideoProcessor);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_CreateAuthenticatedChannel(ID3D11VideoDevice* This,D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType,ID3D11AuthenticatedChannel **ppAuthenticatedChannel) {
    return This->lpVtbl->CreateAuthenticatedChannel(This,ChannelType,ppAuthenticatedChannel);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_CreateCryptoSession(ID3D11VideoDevice* This,const GUID *pCryptoType,const GUID *pDecoderProfile,const GUID *pKeyExchangeType,ID3D11CryptoSession **ppCryptoSession) {
    return This->lpVtbl->CreateCryptoSession(This,pCryptoType,pDecoderProfile,pKeyExchangeType,ppCryptoSession);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_CreateVideoDecoderOutputView(ID3D11VideoDevice* This,ID3D11Resource *pResource,const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc,ID3D11VideoDecoderOutputView **ppVDOVView) {
    return This->lpVtbl->CreateVideoDecoderOutputView(This,pResource,pDesc,ppVDOVView);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_CreateVideoProcessorInputView(ID3D11VideoDevice* This,ID3D11Resource *pResource,ID3D11VideoProcessorEnumerator *pEnum,const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc,ID3D11VideoProcessorInputView **ppVPIView) {
    return This->lpVtbl->CreateVideoProcessorInputView(This,pResource,pEnum,pDesc,ppVPIView);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_CreateVideoProcessorOutputView(ID3D11VideoDevice* This,ID3D11Resource *pResource,ID3D11VideoProcessorEnumerator *pEnum,const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc,ID3D11VideoProcessorOutputView **ppVPOView) {
    return This->lpVtbl->CreateVideoProcessorOutputView(This,pResource,pEnum,pDesc,ppVPOView);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_CreateVideoProcessorEnumerator(ID3D11VideoDevice* This,const D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc,ID3D11VideoProcessorEnumerator **ppEnum) {
    return This->lpVtbl->CreateVideoProcessorEnumerator(This,pDesc,ppEnum);
}
static FORCEINLINE UINT ID3D11VideoDevice_GetVideoDecoderProfileCount(ID3D11VideoDevice* This) {
    return This->lpVtbl->GetVideoDecoderProfileCount(This);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_GetVideoDecoderProfile(ID3D11VideoDevice* This,UINT Index,GUID *pDecoderProfile) {
    return This->lpVtbl->GetVideoDecoderProfile(This,Index,pDecoderProfile);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_CheckVideoDecoderFormat(ID3D11VideoDevice* This,const GUID *pDecoderProfile,DXGI_FORMAT Format,WINBOOL *pSupported) {
    return This->lpVtbl->CheckVideoDecoderFormat(This,pDecoderProfile,Format,pSupported);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_GetVideoDecoderConfigCount(ID3D11VideoDevice* This,const D3D11_VIDEO_DECODER_DESC *pDesc,UINT *pCount) {
    return This->lpVtbl->GetVideoDecoderConfigCount(This,pDesc,pCount);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_GetVideoDecoderConfig(ID3D11VideoDevice* This,const D3D11_VIDEO_DECODER_DESC *pDesc,UINT Index,D3D11_VIDEO_DECODER_CONFIG *pConfig) {
    return This->lpVtbl->GetVideoDecoderConfig(This,pDesc,Index,pConfig);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_GetContentProtectionCaps(ID3D11VideoDevice* This,const GUID *pCryptoType,const GUID *pDecoderProfile,D3D11_VIDEO_CONTENT_PROTECTION_CAPS *pCaps) {
    return This->lpVtbl->GetContentProtectionCaps(This,pCryptoType,pDecoderProfile,pCaps);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_CheckCryptoKeyExchange(ID3D11VideoDevice* This,const GUID *pCryptoType,const GUID *pDecoderProfile,UINT Index,GUID *pKeyExchangeType) {
    return This->lpVtbl->CheckCryptoKeyExchange(This,pCryptoType,pDecoderProfile,Index,pKeyExchangeType);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_SetPrivateData(ID3D11VideoDevice* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoDevice_SetPrivateDataInterface(ID3D11VideoDevice* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
#endif
#endif

#endif

HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_CreateVideoDecoder_Proxy(
    ID3D11VideoDevice* This,
    const D3D11_VIDEO_DECODER_DESC *pVideoDesc,
    const D3D11_VIDEO_DECODER_CONFIG *pConfig,
    ID3D11VideoDecoder **ppDecoder);
void __RPC_STUB ID3D11VideoDevice_CreateVideoDecoder_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_CreateVideoProcessor_Proxy(
    ID3D11VideoDevice* This,
    ID3D11VideoProcessorEnumerator *pEnum,
    UINT RateConversionIndex,
    ID3D11VideoProcessor **ppVideoProcessor);
void __RPC_STUB ID3D11VideoDevice_CreateVideoProcessor_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_CreateAuthenticatedChannel_Proxy(
    ID3D11VideoDevice* This,
    D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType,
    ID3D11AuthenticatedChannel **ppAuthenticatedChannel);
void __RPC_STUB ID3D11VideoDevice_CreateAuthenticatedChannel_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_CreateCryptoSession_Proxy(
    ID3D11VideoDevice* This,
    const GUID *pCryptoType,
    const GUID *pDecoderProfile,
    const GUID *pKeyExchangeType,
    ID3D11CryptoSession **ppCryptoSession);
void __RPC_STUB ID3D11VideoDevice_CreateCryptoSession_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_CreateVideoDecoderOutputView_Proxy(
    ID3D11VideoDevice* This,
    ID3D11Resource *pResource,
    const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc,
    ID3D11VideoDecoderOutputView **ppVDOVView);
void __RPC_STUB ID3D11VideoDevice_CreateVideoDecoderOutputView_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_CreateVideoProcessorInputView_Proxy(
    ID3D11VideoDevice* This,
    ID3D11Resource *pResource,
    ID3D11VideoProcessorEnumerator *pEnum,
    const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *pDesc,
    ID3D11VideoProcessorInputView **ppVPIView);
void __RPC_STUB ID3D11VideoDevice_CreateVideoProcessorInputView_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_CreateVideoProcessorOutputView_Proxy(
    ID3D11VideoDevice* This,
    ID3D11Resource *pResource,
    ID3D11VideoProcessorEnumerator *pEnum,
    const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *pDesc,
    ID3D11VideoProcessorOutputView **ppVPOView);
void __RPC_STUB ID3D11VideoDevice_CreateVideoProcessorOutputView_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_CreateVideoProcessorEnumerator_Proxy(
    ID3D11VideoDevice* This,
    const D3D11_VIDEO_PROCESSOR_CONTENT_DESC *pDesc,
    ID3D11VideoProcessorEnumerator **ppEnum);
void __RPC_STUB ID3D11VideoDevice_CreateVideoProcessorEnumerator_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
UINT STDMETHODCALLTYPE ID3D11VideoDevice_GetVideoDecoderProfileCount_Proxy(
    ID3D11VideoDevice* This);
void __RPC_STUB ID3D11VideoDevice_GetVideoDecoderProfileCount_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_GetVideoDecoderProfile_Proxy(
    ID3D11VideoDevice* This,
    UINT Index,
    GUID *pDecoderProfile);
void __RPC_STUB ID3D11VideoDevice_GetVideoDecoderProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_CheckVideoDecoderFormat_Proxy(
    ID3D11VideoDevice* This,
    const GUID *pDecoderProfile,
    DXGI_FORMAT Format,
    WINBOOL *pSupported);
void __RPC_STUB ID3D11VideoDevice_CheckVideoDecoderFormat_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_GetVideoDecoderConfigCount_Proxy(
    ID3D11VideoDevice* This,
    const D3D11_VIDEO_DECODER_DESC *pDesc,
    UINT *pCount);
void __RPC_STUB ID3D11VideoDevice_GetVideoDecoderConfigCount_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_GetVideoDecoderConfig_Proxy(
    ID3D11VideoDevice* This,
    const D3D11_VIDEO_DECODER_DESC *pDesc,
    UINT Index,
    D3D11_VIDEO_DECODER_CONFIG *pConfig);
void __RPC_STUB ID3D11VideoDevice_GetVideoDecoderConfig_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_GetContentProtectionCaps_Proxy(
    ID3D11VideoDevice* This,
    const GUID *pCryptoType,
    const GUID *pDecoderProfile,
    D3D11_VIDEO_CONTENT_PROTECTION_CAPS *pCaps);
void __RPC_STUB ID3D11VideoDevice_GetContentProtectionCaps_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_CheckCryptoKeyExchange_Proxy(
    ID3D11VideoDevice* This,
    const GUID *pCryptoType,
    const GUID *pDecoderProfile,
    UINT Index,
    GUID *pKeyExchangeType);
void __RPC_STUB ID3D11VideoDevice_CheckCryptoKeyExchange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_SetPrivateData_Proxy(
    ID3D11VideoDevice* This,
    REFGUID guid,
    UINT DataSize,
    const void *pData);
void __RPC_STUB ID3D11VideoDevice_SetPrivateData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_SetPrivateDataInterface_Proxy(
    ID3D11VideoDevice* This,
    REFGUID guid,
    const IUnknown *pData);
void __RPC_STUB ID3D11VideoDevice_SetPrivateDataInterface_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11VideoDevice_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11VideoContext interface
 */
#ifndef __ID3D11VideoContext_INTERFACE_DEFINED__
#define __ID3D11VideoContext_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11VideoContext, 0x61f21c45, 0x3c0e, 0x4a74, 0x9c,0xea, 0x67,0x10,0x0d,0x9a,0xd5,0xe4);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("61f21c45-3c0e-4a74-9cea-67100d9ad5e4")
ID3D11VideoContext : public ID3D11DeviceChild
{
    virtual HRESULT STDMETHODCALLTYPE GetDecoderBuffer(
        ID3D11VideoDecoder *decoder,
        D3D11_VIDEO_DECODER_BUFFER_TYPE type,
        UINT *buffer_size,
        void **buffer) = 0;

    virtual HRESULT STDMETHODCALLTYPE ReleaseDecoderBuffer(
        ID3D11VideoDecoder *decoder,
        D3D11_VIDEO_DECODER_BUFFER_TYPE type) = 0;

    virtual HRESULT STDMETHODCALLTYPE DecoderBeginFrame(
        ID3D11VideoDecoder *decoder,
        ID3D11VideoDecoderOutputView *view,
        UINT key_size,
        const void *key) = 0;

    virtual HRESULT STDMETHODCALLTYPE DecoderEndFrame(
        ID3D11VideoDecoder *decoder) = 0;

    virtual HRESULT STDMETHODCALLTYPE SubmitDecoderBuffers(
        ID3D11VideoDecoder *decoder,
        UINT buffers_count,
        const D3D11_VIDEO_DECODER_BUFFER_DESC *buffer_desc) = 0;

    virtual HRESULT STDMETHODCALLTYPE DecoderExtension(
        ID3D11VideoDecoder *decoder,
        const D3D11_VIDEO_DECODER_EXTENSION *extension) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetOutputTargetRect(
        ID3D11VideoProcessor *processor,
        WINBOOL enable,
        const RECT *rect) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetOutputBackgroundColor(
        ID3D11VideoProcessor *processor,
        WINBOOL y_cb_cr,
        const D3D11_VIDEO_COLOR *color) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetOutputColorSpace(
        ID3D11VideoProcessor *processor,
        const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetOutputAlphaFillMode(
        ID3D11VideoProcessor *processor,
        D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE alpha_fill_mode,
        UINT stream_idx) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetOutputConstriction(
        ID3D11VideoProcessor *processor,
        WINBOOL enable,
        SIZE size) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetOutputStereoMode(
        ID3D11VideoProcessor *processor,
        WINBOOL enable) = 0;

    virtual HRESULT STDMETHODCALLTYPE VideoProcessorSetOutputExtension(
        ID3D11VideoProcessor *processor,
        const GUID *guid,
        UINT data_size,
        void *data) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetOutputTargetRect(
        ID3D11VideoProcessor *processor,
        WINBOOL *enabled,
        RECT *rect) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetOutputBackgroundColor(
        ID3D11VideoProcessor *processor,
        WINBOOL *y_cb_cr,
        D3D11_VIDEO_COLOR *color) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetOutputColorSpace(
        ID3D11VideoProcessor *processor,
        D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetOutputAlphaFillMode(
        ID3D11VideoProcessor *processor,
        D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE *alpha_fill_mode,
        UINT *stream_idx) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetOutputConstriction(
        ID3D11VideoProcessor *processor,
        WINBOOL *enabled,
        SIZE *size) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetOutputStereoMode(
        ID3D11VideoProcessor *processor,
        WINBOOL *enabled) = 0;

    virtual HRESULT STDMETHODCALLTYPE VideoProcessorGetOutputExtension(
        ID3D11VideoProcessor *processor,
        const GUID *guid,
        UINT data_size,
        void *data) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamFrameFormat(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_FRAME_FORMAT format) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamColorSpace(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamOutputRate(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_PROCESSOR_OUTPUT_RATE rate,
        WINBOOL repeat,
        const DXGI_RATIONAL *custom_rate) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamSourceRect(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        const RECT *rect) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamDestRect(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        const RECT *rect) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamAlpha(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        float alpha) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamPalette(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        UINT entry_count,
        const UINT *entries) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamPixelAspectRatio(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        const DXGI_RATIONAL *src_aspect_ratio,
        const DXGI_RATIONAL *dst_aspect_ratio) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamLumaKey(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        float lower,
        float upper) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamStereoFormat(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        D3D11_VIDEO_PROCESSOR_STEREO_FORMAT format,
        WINBOOL left_view_frame0,
        WINBOOL base_view_frame0,
        D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE flip_mode,
        int mono_offset) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamAutoProcessingMode(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamFilter(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_PROCESSOR_FILTER filter,
        WINBOOL enable,
        int level) = 0;

    virtual HRESULT STDMETHODCALLTYPE VideoProcessorSetStreamExtension(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        const GUID *guid,
        UINT data_size,
        void *data) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamFrameFormat(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_FRAME_FORMAT *format) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamColorSpace(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamOutputRate(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_PROCESSOR_OUTPUT_RATE *rate,
        WINBOOL *repeat,
        DXGI_RATIONAL *custom_rate) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamSourceRect(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled,
        RECT *rect) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamDestRect(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled,
        RECT *rect) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamAlpha(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled,
        float *alpha) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamPalette(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        UINT entry_count,
        UINT *entries) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamPixelAspectRatio(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled,
        DXGI_RATIONAL *src_aspect_ratio,
        DXGI_RATIONAL *dst_aspect_ratio) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamLumaKey(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled,
        float *lower,
        float *upper) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamStereoFormat(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled,
        D3D11_VIDEO_PROCESSOR_STEREO_FORMAT *format,
        WINBOOL *left_view_frame0,
        WINBOOL *base_view_frame0,
        D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE *flip_mode,
        int *mono_offset) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamAutoProcessingMode(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamFilter(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_PROCESSOR_FILTER filter,
        WINBOOL *enabled,
        int *level) = 0;

    virtual HRESULT STDMETHODCALLTYPE VideoProcessorGetStreamExtension(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        const GUID *guid,
        UINT data_size,
        void *data) = 0;

    virtual HRESULT STDMETHODCALLTYPE VideoProcessorBlt(
        ID3D11VideoProcessor *processor,
        ID3D11VideoProcessorOutputView *view,
        UINT frame_idx,
        UINT stream_count,
        const D3D11_VIDEO_PROCESSOR_STREAM *streams) = 0;

    virtual HRESULT STDMETHODCALLTYPE NegotiateCryptoSessionKeyExchange(
        ID3D11CryptoSession *session,
        UINT data_size,
        void *data) = 0;

    virtual void STDMETHODCALLTYPE EncryptionBlt(
        ID3D11CryptoSession *session,
        ID3D11Texture2D *src_surface,
        ID3D11Texture2D *dst_surface,
        UINT iv_size,
        void *iv) = 0;

    virtual void STDMETHODCALLTYPE DecryptionBlt(
        ID3D11CryptoSession *session,
        ID3D11Texture2D *src_surface,
        ID3D11Texture2D *dst_surface,
        D3D11_ENCRYPTED_BLOCK_INFO *block_info,
        UINT key_size,
        const void *key,
        UINT iv_size,
        void *iv) = 0;

    virtual void STDMETHODCALLTYPE StartSessionKeyRefresh(
        ID3D11CryptoSession *session,
        UINT random_number_size,
        void *random_number) = 0;

    virtual void STDMETHODCALLTYPE FinishSessionKeyRefresh(
        ID3D11CryptoSession *session) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetEncryptionBltKey(
        ID3D11CryptoSession *session,
        UINT key_size,
        void *key) = 0;

    virtual HRESULT STDMETHODCALLTYPE NegotiateAuthenticatedChannelKeyExchange(
        ID3D11AuthenticatedChannel *channel,
        UINT data_size,
        void *data) = 0;

    virtual HRESULT STDMETHODCALLTYPE QueryAuthenticatedChannel(
        ID3D11AuthenticatedChannel *channel,
        UINT input_size,
        const void *input,
        UINT output_size,
        void *output) = 0;

    virtual HRESULT STDMETHODCALLTYPE ConfigureAuthenticatedChannel(
        ID3D11AuthenticatedChannel *channel,
        UINT input_size,
        const void *input,
        D3D11_AUTHENTICATED_CONFIGURE_OUTPUT *output) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorSetStreamRotation(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        D3D11_VIDEO_PROCESSOR_ROTATION rotation) = 0;

    virtual void STDMETHODCALLTYPE VideoProcessorGetStreamRotation(
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enable,
        D3D11_VIDEO_PROCESSOR_ROTATION *rotation) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11VideoContext, 0x61f21c45, 0x3c0e, 0x4a74, 0x9c,0xea, 0x67,0x10,0x0d,0x9a,0xd5,0xe4)
#endif
#else
typedef struct ID3D11VideoContextVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11VideoContext* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11VideoContext* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11VideoContext* This);

    /*** ID3D11DeviceChild methods ***/
    void (STDMETHODCALLTYPE *GetDevice)(
        ID3D11VideoContext* This,
        ID3D11Device **ppDevice);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11VideoContext* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11VideoContext* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11VideoContext* This,
        REFGUID guid,
        const IUnknown *pData);

    /*** ID3D11VideoContext methods ***/
    HRESULT (STDMETHODCALLTYPE *GetDecoderBuffer)(
        ID3D11VideoContext* This,
        ID3D11VideoDecoder *decoder,
        D3D11_VIDEO_DECODER_BUFFER_TYPE type,
        UINT *buffer_size,
        void **buffer);

    HRESULT (STDMETHODCALLTYPE *ReleaseDecoderBuffer)(
        ID3D11VideoContext* This,
        ID3D11VideoDecoder *decoder,
        D3D11_VIDEO_DECODER_BUFFER_TYPE type);

    HRESULT (STDMETHODCALLTYPE *DecoderBeginFrame)(
        ID3D11VideoContext* This,
        ID3D11VideoDecoder *decoder,
        ID3D11VideoDecoderOutputView *view,
        UINT key_size,
        const void *key);

    HRESULT (STDMETHODCALLTYPE *DecoderEndFrame)(
        ID3D11VideoContext* This,
        ID3D11VideoDecoder *decoder);

    HRESULT (STDMETHODCALLTYPE *SubmitDecoderBuffers)(
        ID3D11VideoContext* This,
        ID3D11VideoDecoder *decoder,
        UINT buffers_count,
        const D3D11_VIDEO_DECODER_BUFFER_DESC *buffer_desc);

    HRESULT (STDMETHODCALLTYPE *DecoderExtension)(
        ID3D11VideoContext* This,
        ID3D11VideoDecoder *decoder,
        const D3D11_VIDEO_DECODER_EXTENSION *extension);

    void (STDMETHODCALLTYPE *VideoProcessorSetOutputTargetRect)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        WINBOOL enable,
        const RECT *rect);

    void (STDMETHODCALLTYPE *VideoProcessorSetOutputBackgroundColor)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        WINBOOL y_cb_cr,
        const D3D11_VIDEO_COLOR *color);

    void (STDMETHODCALLTYPE *VideoProcessorSetOutputColorSpace)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space);

    void (STDMETHODCALLTYPE *VideoProcessorSetOutputAlphaFillMode)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE alpha_fill_mode,
        UINT stream_idx);

    void (STDMETHODCALLTYPE *VideoProcessorSetOutputConstriction)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        WINBOOL enable,
        SIZE size);

    void (STDMETHODCALLTYPE *VideoProcessorSetOutputStereoMode)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        WINBOOL enable);

    HRESULT (STDMETHODCALLTYPE *VideoProcessorSetOutputExtension)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        const GUID *guid,
        UINT data_size,
        void *data);

    void (STDMETHODCALLTYPE *VideoProcessorGetOutputTargetRect)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        WINBOOL *enabled,
        RECT *rect);

    void (STDMETHODCALLTYPE *VideoProcessorGetOutputBackgroundColor)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        WINBOOL *y_cb_cr,
        D3D11_VIDEO_COLOR *color);

    void (STDMETHODCALLTYPE *VideoProcessorGetOutputColorSpace)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space);

    void (STDMETHODCALLTYPE *VideoProcessorGetOutputAlphaFillMode)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE *alpha_fill_mode,
        UINT *stream_idx);

    void (STDMETHODCALLTYPE *VideoProcessorGetOutputConstriction)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        WINBOOL *enabled,
        SIZE *size);

    void (STDMETHODCALLTYPE *VideoProcessorGetOutputStereoMode)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        WINBOOL *enabled);

    HRESULT (STDMETHODCALLTYPE *VideoProcessorGetOutputExtension)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        const GUID *guid,
        UINT data_size,
        void *data);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamFrameFormat)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_FRAME_FORMAT format);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamColorSpace)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamOutputRate)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_PROCESSOR_OUTPUT_RATE rate,
        WINBOOL repeat,
        const DXGI_RATIONAL *custom_rate);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamSourceRect)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        const RECT *rect);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamDestRect)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        const RECT *rect);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamAlpha)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        float alpha);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamPalette)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        UINT entry_count,
        const UINT *entries);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamPixelAspectRatio)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        const DXGI_RATIONAL *src_aspect_ratio,
        const DXGI_RATIONAL *dst_aspect_ratio);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamLumaKey)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        float lower,
        float upper);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamStereoFormat)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        D3D11_VIDEO_PROCESSOR_STEREO_FORMAT format,
        WINBOOL left_view_frame0,
        WINBOOL base_view_frame0,
        D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE flip_mode,
        int mono_offset);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamAutoProcessingMode)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamFilter)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_PROCESSOR_FILTER filter,
        WINBOOL enable,
        int level);

    HRESULT (STDMETHODCALLTYPE *VideoProcessorSetStreamExtension)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        const GUID *guid,
        UINT data_size,
        void *data);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamFrameFormat)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_FRAME_FORMAT *format);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamColorSpace)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamOutputRate)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_PROCESSOR_OUTPUT_RATE *rate,
        WINBOOL *repeat,
        DXGI_RATIONAL *custom_rate);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamSourceRect)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled,
        RECT *rect);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamDestRect)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled,
        RECT *rect);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamAlpha)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled,
        float *alpha);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamPalette)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        UINT entry_count,
        UINT *entries);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamPixelAspectRatio)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled,
        DXGI_RATIONAL *src_aspect_ratio,
        DXGI_RATIONAL *dst_aspect_ratio);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamLumaKey)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled,
        float *lower,
        float *upper);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamStereoFormat)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled,
        D3D11_VIDEO_PROCESSOR_STEREO_FORMAT *format,
        WINBOOL *left_view_frame0,
        WINBOOL *base_view_frame0,
        D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE *flip_mode,
        int *mono_offset);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamAutoProcessingMode)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enabled);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamFilter)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        D3D11_VIDEO_PROCESSOR_FILTER filter,
        WINBOOL *enabled,
        int *level);

    HRESULT (STDMETHODCALLTYPE *VideoProcessorGetStreamExtension)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        const GUID *guid,
        UINT data_size,
        void *data);

    HRESULT (STDMETHODCALLTYPE *VideoProcessorBlt)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        ID3D11VideoProcessorOutputView *view,
        UINT frame_idx,
        UINT stream_count,
        const D3D11_VIDEO_PROCESSOR_STREAM *streams);

    HRESULT (STDMETHODCALLTYPE *NegotiateCryptoSessionKeyExchange)(
        ID3D11VideoContext* This,
        ID3D11CryptoSession *session,
        UINT data_size,
        void *data);

    void (STDMETHODCALLTYPE *EncryptionBlt)(
        ID3D11VideoContext* This,
        ID3D11CryptoSession *session,
        ID3D11Texture2D *src_surface,
        ID3D11Texture2D *dst_surface,
        UINT iv_size,
        void *iv);

    void (STDMETHODCALLTYPE *DecryptionBlt)(
        ID3D11VideoContext* This,
        ID3D11CryptoSession *session,
        ID3D11Texture2D *src_surface,
        ID3D11Texture2D *dst_surface,
        D3D11_ENCRYPTED_BLOCK_INFO *block_info,
        UINT key_size,
        const void *key,
        UINT iv_size,
        void *iv);

    void (STDMETHODCALLTYPE *StartSessionKeyRefresh)(
        ID3D11VideoContext* This,
        ID3D11CryptoSession *session,
        UINT random_number_size,
        void *random_number);

    void (STDMETHODCALLTYPE *FinishSessionKeyRefresh)(
        ID3D11VideoContext* This,
        ID3D11CryptoSession *session);

    HRESULT (STDMETHODCALLTYPE *GetEncryptionBltKey)(
        ID3D11VideoContext* This,
        ID3D11CryptoSession *session,
        UINT key_size,
        void *key);

    HRESULT (STDMETHODCALLTYPE *NegotiateAuthenticatedChannelKeyExchange)(
        ID3D11VideoContext* This,
        ID3D11AuthenticatedChannel *channel,
        UINT data_size,
        void *data);

    HRESULT (STDMETHODCALLTYPE *QueryAuthenticatedChannel)(
        ID3D11VideoContext* This,
        ID3D11AuthenticatedChannel *channel,
        UINT input_size,
        const void *input,
        UINT output_size,
        void *output);

    HRESULT (STDMETHODCALLTYPE *ConfigureAuthenticatedChannel)(
        ID3D11VideoContext* This,
        ID3D11AuthenticatedChannel *channel,
        UINT input_size,
        const void *input,
        D3D11_AUTHENTICATED_CONFIGURE_OUTPUT *output);

    void (STDMETHODCALLTYPE *VideoProcessorSetStreamRotation)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL enable,
        D3D11_VIDEO_PROCESSOR_ROTATION rotation);

    void (STDMETHODCALLTYPE *VideoProcessorGetStreamRotation)(
        ID3D11VideoContext* This,
        ID3D11VideoProcessor *processor,
        UINT stream_idx,
        WINBOOL *enable,
        D3D11_VIDEO_PROCESSOR_ROTATION *rotation);

    END_INTERFACE
} ID3D11VideoContextVtbl;
interface ID3D11VideoContext {
    CONST_VTBL ID3D11VideoContextVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11VideoContext_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11VideoContext_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11VideoContext_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11DeviceChild methods ***/
#define ID3D11VideoContext_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
#define ID3D11VideoContext_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11VideoContext_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11VideoContext_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
/*** ID3D11VideoContext methods ***/
#define ID3D11VideoContext_GetDecoderBuffer(This,decoder,type,buffer_size,buffer) (This)->lpVtbl->GetDecoderBuffer(This,decoder,type,buffer_size,buffer)
#define ID3D11VideoContext_ReleaseDecoderBuffer(This,decoder,type) (This)->lpVtbl->ReleaseDecoderBuffer(This,decoder,type)
#define ID3D11VideoContext_DecoderBeginFrame(This,decoder,view,key_size,key) (This)->lpVtbl->DecoderBeginFrame(This,decoder,view,key_size,key)
#define ID3D11VideoContext_DecoderEndFrame(This,decoder) (This)->lpVtbl->DecoderEndFrame(This,decoder)
#define ID3D11VideoContext_SubmitDecoderBuffers(This,decoder,buffers_count,buffer_desc) (This)->lpVtbl->SubmitDecoderBuffers(This,decoder,buffers_count,buffer_desc)
#define ID3D11VideoContext_DecoderExtension(This,decoder,extension) (This)->lpVtbl->DecoderExtension(This,decoder,extension)
#define ID3D11VideoContext_VideoProcessorSetOutputTargetRect(This,processor,enable,rect) (This)->lpVtbl->VideoProcessorSetOutputTargetRect(This,processor,enable,rect)
#define ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor(This,processor,y_cb_cr,color) (This)->lpVtbl->VideoProcessorSetOutputBackgroundColor(This,processor,y_cb_cr,color)
#define ID3D11VideoContext_VideoProcessorSetOutputColorSpace(This,processor,color_space) (This)->lpVtbl->VideoProcessorSetOutputColorSpace(This,processor,color_space)
#define ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode(This,processor,alpha_fill_mode,stream_idx) (This)->lpVtbl->VideoProcessorSetOutputAlphaFillMode(This,processor,alpha_fill_mode,stream_idx)
#define ID3D11VideoContext_VideoProcessorSetOutputConstriction(This,processor,enable,size) (This)->lpVtbl->VideoProcessorSetOutputConstriction(This,processor,enable,size)
#define ID3D11VideoContext_VideoProcessorSetOutputStereoMode(This,processor,enable) (This)->lpVtbl->VideoProcessorSetOutputStereoMode(This,processor,enable)
#define ID3D11VideoContext_VideoProcessorSetOutputExtension(This,processor,guid,data_size,data) (This)->lpVtbl->VideoProcessorSetOutputExtension(This,processor,guid,data_size,data)
#define ID3D11VideoContext_VideoProcessorGetOutputTargetRect(This,processor,enabled,rect) (This)->lpVtbl->VideoProcessorGetOutputTargetRect(This,processor,enabled,rect)
#define ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor(This,processor,y_cb_cr,color) (This)->lpVtbl->VideoProcessorGetOutputBackgroundColor(This,processor,y_cb_cr,color)
#define ID3D11VideoContext_VideoProcessorGetOutputColorSpace(This,processor,color_space) (This)->lpVtbl->VideoProcessorGetOutputColorSpace(This,processor,color_space)
#define ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode(This,processor,alpha_fill_mode,stream_idx) (This)->lpVtbl->VideoProcessorGetOutputAlphaFillMode(This,processor,alpha_fill_mode,stream_idx)
#define ID3D11VideoContext_VideoProcessorGetOutputConstriction(This,processor,enabled,size) (This)->lpVtbl->VideoProcessorGetOutputConstriction(This,processor,enabled,size)
#define ID3D11VideoContext_VideoProcessorGetOutputStereoMode(This,processor,enabled) (This)->lpVtbl->VideoProcessorGetOutputStereoMode(This,processor,enabled)
#define ID3D11VideoContext_VideoProcessorGetOutputExtension(This,processor,guid,data_size,data) (This)->lpVtbl->VideoProcessorGetOutputExtension(This,processor,guid,data_size,data)
#define ID3D11VideoContext_VideoProcessorSetStreamFrameFormat(This,processor,stream_idx,format) (This)->lpVtbl->VideoProcessorSetStreamFrameFormat(This,processor,stream_idx,format)
#define ID3D11VideoContext_VideoProcessorSetStreamColorSpace(This,processor,stream_idx,color_space) (This)->lpVtbl->VideoProcessorSetStreamColorSpace(This,processor,stream_idx,color_space)
#define ID3D11VideoContext_VideoProcessorSetStreamOutputRate(This,processor,stream_idx,rate,repeat,custom_rate) (This)->lpVtbl->VideoProcessorSetStreamOutputRate(This,processor,stream_idx,rate,repeat,custom_rate)
#define ID3D11VideoContext_VideoProcessorSetStreamSourceRect(This,processor,stream_idx,enable,rect) (This)->lpVtbl->VideoProcessorSetStreamSourceRect(This,processor,stream_idx,enable,rect)
#define ID3D11VideoContext_VideoProcessorSetStreamDestRect(This,processor,stream_idx,enable,rect) (This)->lpVtbl->VideoProcessorSetStreamDestRect(This,processor,stream_idx,enable,rect)
#define ID3D11VideoContext_VideoProcessorSetStreamAlpha(This,processor,stream_idx,enable,alpha) (This)->lpVtbl->VideoProcessorSetStreamAlpha(This,processor,stream_idx,enable,alpha)
#define ID3D11VideoContext_VideoProcessorSetStreamPalette(This,processor,stream_idx,entry_count,entries) (This)->lpVtbl->VideoProcessorSetStreamPalette(This,processor,stream_idx,entry_count,entries)
#define ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio(This,processor,stream_idx,enable,src_aspect_ratio,dst_aspect_ratio) (This)->lpVtbl->VideoProcessorSetStreamPixelAspectRatio(This,processor,stream_idx,enable,src_aspect_ratio,dst_aspect_ratio)
#define ID3D11VideoContext_VideoProcessorSetStreamLumaKey(This,processor,stream_idx,enable,lower,upper) (This)->lpVtbl->VideoProcessorSetStreamLumaKey(This,processor,stream_idx,enable,lower,upper)
#define ID3D11VideoContext_VideoProcessorSetStreamStereoFormat(This,processor,stream_idx,enable,format,left_view_frame0,base_view_frame0,flip_mode,mono_offset) (This)->lpVtbl->VideoProcessorSetStreamStereoFormat(This,processor,stream_idx,enable,format,left_view_frame0,base_view_frame0,flip_mode,mono_offset)
#define ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode(This,processor,stream_idx,enable) (This)->lpVtbl->VideoProcessorSetStreamAutoProcessingMode(This,processor,stream_idx,enable)
#define ID3D11VideoContext_VideoProcessorSetStreamFilter(This,processor,stream_idx,filter,enable,level) (This)->lpVtbl->VideoProcessorSetStreamFilter(This,processor,stream_idx,filter,enable,level)
#define ID3D11VideoContext_VideoProcessorSetStreamExtension(This,processor,stream_idx,guid,data_size,data) (This)->lpVtbl->VideoProcessorSetStreamExtension(This,processor,stream_idx,guid,data_size,data)
#define ID3D11VideoContext_VideoProcessorGetStreamFrameFormat(This,processor,stream_idx,format) (This)->lpVtbl->VideoProcessorGetStreamFrameFormat(This,processor,stream_idx,format)
#define ID3D11VideoContext_VideoProcessorGetStreamColorSpace(This,processor,stream_idx,color_space) (This)->lpVtbl->VideoProcessorGetStreamColorSpace(This,processor,stream_idx,color_space)
#define ID3D11VideoContext_VideoProcessorGetStreamOutputRate(This,processor,stream_idx,rate,repeat,custom_rate) (This)->lpVtbl->VideoProcessorGetStreamOutputRate(This,processor,stream_idx,rate,repeat,custom_rate)
#define ID3D11VideoContext_VideoProcessorGetStreamSourceRect(This,processor,stream_idx,enabled,rect) (This)->lpVtbl->VideoProcessorGetStreamSourceRect(This,processor,stream_idx,enabled,rect)
#define ID3D11VideoContext_VideoProcessorGetStreamDestRect(This,processor,stream_idx,enabled,rect) (This)->lpVtbl->VideoProcessorGetStreamDestRect(This,processor,stream_idx,enabled,rect)
#define ID3D11VideoContext_VideoProcessorGetStreamAlpha(This,processor,stream_idx,enabled,alpha) (This)->lpVtbl->VideoProcessorGetStreamAlpha(This,processor,stream_idx,enabled,alpha)
#define ID3D11VideoContext_VideoProcessorGetStreamPalette(This,processor,stream_idx,entry_count,entries) (This)->lpVtbl->VideoProcessorGetStreamPalette(This,processor,stream_idx,entry_count,entries)
#define ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio(This,processor,stream_idx,enabled,src_aspect_ratio,dst_aspect_ratio) (This)->lpVtbl->VideoProcessorGetStreamPixelAspectRatio(This,processor,stream_idx,enabled,src_aspect_ratio,dst_aspect_ratio)
#define ID3D11VideoContext_VideoProcessorGetStreamLumaKey(This,processor,stream_idx,enabled,lower,upper) (This)->lpVtbl->VideoProcessorGetStreamLumaKey(This,processor,stream_idx,enabled,lower,upper)
#define ID3D11VideoContext_VideoProcessorGetStreamStereoFormat(This,processor,stream_idx,enabled,format,left_view_frame0,base_view_frame0,flip_mode,mono_offset) (This)->lpVtbl->VideoProcessorGetStreamStereoFormat(This,processor,stream_idx,enabled,format,left_view_frame0,base_view_frame0,flip_mode,mono_offset)
#define ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode(This,processor,stream_idx,enabled) (This)->lpVtbl->VideoProcessorGetStreamAutoProcessingMode(This,processor,stream_idx,enabled)
#define ID3D11VideoContext_VideoProcessorGetStreamFilter(This,processor,stream_idx,filter,enabled,level) (This)->lpVtbl->VideoProcessorGetStreamFilter(This,processor,stream_idx,filter,enabled,level)
#define ID3D11VideoContext_VideoProcessorGetStreamExtension(This,processor,stream_idx,guid,data_size,data) (This)->lpVtbl->VideoProcessorGetStreamExtension(This,processor,stream_idx,guid,data_size,data)
#define ID3D11VideoContext_VideoProcessorBlt(This,processor,view,frame_idx,stream_count,streams) (This)->lpVtbl->VideoProcessorBlt(This,processor,view,frame_idx,stream_count,streams)
#define ID3D11VideoContext_NegotiateCryptoSessionKeyExchange(This,session,data_size,data) (This)->lpVtbl->NegotiateCryptoSessionKeyExchange(This,session,data_size,data)
#define ID3D11VideoContext_EncryptionBlt(This,session,src_surface,dst_surface,iv_size,iv) (This)->lpVtbl->EncryptionBlt(This,session,src_surface,dst_surface,iv_size,iv)
#define ID3D11VideoContext_DecryptionBlt(This,session,src_surface,dst_surface,block_info,key_size,key,iv_size,iv) (This)->lpVtbl->DecryptionBlt(This,session,src_surface,dst_surface,block_info,key_size,key,iv_size,iv)
#define ID3D11VideoContext_StartSessionKeyRefresh(This,session,random_number_size,random_number) (This)->lpVtbl->StartSessionKeyRefresh(This,session,random_number_size,random_number)
#define ID3D11VideoContext_FinishSessionKeyRefresh(This,session) (This)->lpVtbl->FinishSessionKeyRefresh(This,session)
#define ID3D11VideoContext_GetEncryptionBltKey(This,session,key_size,key) (This)->lpVtbl->GetEncryptionBltKey(This,session,key_size,key)
#define ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange(This,channel,data_size,data) (This)->lpVtbl->NegotiateAuthenticatedChannelKeyExchange(This,channel,data_size,data)
#define ID3D11VideoContext_QueryAuthenticatedChannel(This,channel,input_size,input,output_size,output) (This)->lpVtbl->QueryAuthenticatedChannel(This,channel,input_size,input,output_size,output)
#define ID3D11VideoContext_ConfigureAuthenticatedChannel(This,channel,input_size,input,output) (This)->lpVtbl->ConfigureAuthenticatedChannel(This,channel,input_size,input,output)
#define ID3D11VideoContext_VideoProcessorSetStreamRotation(This,processor,stream_idx,enable,rotation) (This)->lpVtbl->VideoProcessorSetStreamRotation(This,processor,stream_idx,enable,rotation)
#define ID3D11VideoContext_VideoProcessorGetStreamRotation(This,processor,stream_idx,enable,rotation) (This)->lpVtbl->VideoProcessorGetStreamRotation(This,processor,stream_idx,enable,rotation)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11VideoContext_QueryInterface(ID3D11VideoContext* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11VideoContext_AddRef(ID3D11VideoContext* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11VideoContext_Release(ID3D11VideoContext* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11DeviceChild methods ***/
static FORCEINLINE void ID3D11VideoContext_GetDevice(ID3D11VideoContext* This,ID3D11Device **ppDevice) {
    This->lpVtbl->GetDevice(This,ppDevice);
}
static FORCEINLINE HRESULT ID3D11VideoContext_GetPrivateData(ID3D11VideoContext* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoContext_SetPrivateData(ID3D11VideoContext* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11VideoContext_SetPrivateDataInterface(ID3D11VideoContext* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
/*** ID3D11VideoContext methods ***/
static FORCEINLINE HRESULT ID3D11VideoContext_GetDecoderBuffer(ID3D11VideoContext* This,ID3D11VideoDecoder *decoder,D3D11_VIDEO_DECODER_BUFFER_TYPE type,UINT *buffer_size,void **buffer) {
    return This->lpVtbl->GetDecoderBuffer(This,decoder,type,buffer_size,buffer);
}
static FORCEINLINE HRESULT ID3D11VideoContext_ReleaseDecoderBuffer(ID3D11VideoContext* This,ID3D11VideoDecoder *decoder,D3D11_VIDEO_DECODER_BUFFER_TYPE type) {
    return This->lpVtbl->ReleaseDecoderBuffer(This,decoder,type);
}
static FORCEINLINE HRESULT ID3D11VideoContext_DecoderBeginFrame(ID3D11VideoContext* This,ID3D11VideoDecoder *decoder,ID3D11VideoDecoderOutputView *view,UINT key_size,const void *key) {
    return This->lpVtbl->DecoderBeginFrame(This,decoder,view,key_size,key);
}
static FORCEINLINE HRESULT ID3D11VideoContext_DecoderEndFrame(ID3D11VideoContext* This,ID3D11VideoDecoder *decoder) {
    return This->lpVtbl->DecoderEndFrame(This,decoder);
}
static FORCEINLINE HRESULT ID3D11VideoContext_SubmitDecoderBuffers(ID3D11VideoContext* This,ID3D11VideoDecoder *decoder,UINT buffers_count,const D3D11_VIDEO_DECODER_BUFFER_DESC *buffer_desc) {
    return This->lpVtbl->SubmitDecoderBuffers(This,decoder,buffers_count,buffer_desc);
}
static FORCEINLINE HRESULT ID3D11VideoContext_DecoderExtension(ID3D11VideoContext* This,ID3D11VideoDecoder *decoder,const D3D11_VIDEO_DECODER_EXTENSION *extension) {
    return This->lpVtbl->DecoderExtension(This,decoder,extension);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetOutputTargetRect(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,WINBOOL enable,const RECT *rect) {
    This->lpVtbl->VideoProcessorSetOutputTargetRect(This,processor,enable,rect);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,WINBOOL y_cb_cr,const D3D11_VIDEO_COLOR *color) {
    This->lpVtbl->VideoProcessorSetOutputBackgroundColor(This,processor,y_cb_cr,color);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetOutputColorSpace(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space) {
    This->lpVtbl->VideoProcessorSetOutputColorSpace(This,processor,color_space);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE alpha_fill_mode,UINT stream_idx) {
    This->lpVtbl->VideoProcessorSetOutputAlphaFillMode(This,processor,alpha_fill_mode,stream_idx);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetOutputConstriction(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,WINBOOL enable,SIZE size) {
    This->lpVtbl->VideoProcessorSetOutputConstriction(This,processor,enable,size);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetOutputStereoMode(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,WINBOOL enable) {
    This->lpVtbl->VideoProcessorSetOutputStereoMode(This,processor,enable);
}
static FORCEINLINE HRESULT ID3D11VideoContext_VideoProcessorSetOutputExtension(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,const GUID *guid,UINT data_size,void *data) {
    return This->lpVtbl->VideoProcessorSetOutputExtension(This,processor,guid,data_size,data);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetOutputTargetRect(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,WINBOOL *enabled,RECT *rect) {
    This->lpVtbl->VideoProcessorGetOutputTargetRect(This,processor,enabled,rect);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,WINBOOL *y_cb_cr,D3D11_VIDEO_COLOR *color) {
    This->lpVtbl->VideoProcessorGetOutputBackgroundColor(This,processor,y_cb_cr,color);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetOutputColorSpace(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space) {
    This->lpVtbl->VideoProcessorGetOutputColorSpace(This,processor,color_space);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE *alpha_fill_mode,UINT *stream_idx) {
    This->lpVtbl->VideoProcessorGetOutputAlphaFillMode(This,processor,alpha_fill_mode,stream_idx);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetOutputConstriction(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,WINBOOL *enabled,SIZE *size) {
    This->lpVtbl->VideoProcessorGetOutputConstriction(This,processor,enabled,size);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetOutputStereoMode(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,WINBOOL *enabled) {
    This->lpVtbl->VideoProcessorGetOutputStereoMode(This,processor,enabled);
}
static FORCEINLINE HRESULT ID3D11VideoContext_VideoProcessorGetOutputExtension(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,const GUID *guid,UINT data_size,void *data) {
    return This->lpVtbl->VideoProcessorGetOutputExtension(This,processor,guid,data_size,data);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamFrameFormat(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,D3D11_VIDEO_FRAME_FORMAT format) {
    This->lpVtbl->VideoProcessorSetStreamFrameFormat(This,processor,stream_idx,format);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamColorSpace(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space) {
    This->lpVtbl->VideoProcessorSetStreamColorSpace(This,processor,stream_idx,color_space);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamOutputRate(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,D3D11_VIDEO_PROCESSOR_OUTPUT_RATE rate,WINBOOL repeat,const DXGI_RATIONAL *custom_rate) {
    This->lpVtbl->VideoProcessorSetStreamOutputRate(This,processor,stream_idx,rate,repeat,custom_rate);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamSourceRect(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL enable,const RECT *rect) {
    This->lpVtbl->VideoProcessorSetStreamSourceRect(This,processor,stream_idx,enable,rect);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamDestRect(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL enable,const RECT *rect) {
    This->lpVtbl->VideoProcessorSetStreamDestRect(This,processor,stream_idx,enable,rect);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamAlpha(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL enable,float alpha) {
    This->lpVtbl->VideoProcessorSetStreamAlpha(This,processor,stream_idx,enable,alpha);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamPalette(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,UINT entry_count,const UINT *entries) {
    This->lpVtbl->VideoProcessorSetStreamPalette(This,processor,stream_idx,entry_count,entries);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL enable,const DXGI_RATIONAL *src_aspect_ratio,const DXGI_RATIONAL *dst_aspect_ratio) {
    This->lpVtbl->VideoProcessorSetStreamPixelAspectRatio(This,processor,stream_idx,enable,src_aspect_ratio,dst_aspect_ratio);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamLumaKey(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL enable,float lower,float upper) {
    This->lpVtbl->VideoProcessorSetStreamLumaKey(This,processor,stream_idx,enable,lower,upper);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamStereoFormat(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL enable,D3D11_VIDEO_PROCESSOR_STEREO_FORMAT format,WINBOOL left_view_frame0,WINBOOL base_view_frame0,D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE flip_mode,int mono_offset) {
    This->lpVtbl->VideoProcessorSetStreamStereoFormat(This,processor,stream_idx,enable,format,left_view_frame0,base_view_frame0,flip_mode,mono_offset);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL enable) {
    This->lpVtbl->VideoProcessorSetStreamAutoProcessingMode(This,processor,stream_idx,enable);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamFilter(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,D3D11_VIDEO_PROCESSOR_FILTER filter,WINBOOL enable,int level) {
    This->lpVtbl->VideoProcessorSetStreamFilter(This,processor,stream_idx,filter,enable,level);
}
static FORCEINLINE HRESULT ID3D11VideoContext_VideoProcessorSetStreamExtension(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,const GUID *guid,UINT data_size,void *data) {
    return This->lpVtbl->VideoProcessorSetStreamExtension(This,processor,stream_idx,guid,data_size,data);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamFrameFormat(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,D3D11_VIDEO_FRAME_FORMAT *format) {
    This->lpVtbl->VideoProcessorGetStreamFrameFormat(This,processor,stream_idx,format);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamColorSpace(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space) {
    This->lpVtbl->VideoProcessorGetStreamColorSpace(This,processor,stream_idx,color_space);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamOutputRate(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,D3D11_VIDEO_PROCESSOR_OUTPUT_RATE *rate,WINBOOL *repeat,DXGI_RATIONAL *custom_rate) {
    This->lpVtbl->VideoProcessorGetStreamOutputRate(This,processor,stream_idx,rate,repeat,custom_rate);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamSourceRect(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL *enabled,RECT *rect) {
    This->lpVtbl->VideoProcessorGetStreamSourceRect(This,processor,stream_idx,enabled,rect);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamDestRect(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL *enabled,RECT *rect) {
    This->lpVtbl->VideoProcessorGetStreamDestRect(This,processor,stream_idx,enabled,rect);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamAlpha(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL *enabled,float *alpha) {
    This->lpVtbl->VideoProcessorGetStreamAlpha(This,processor,stream_idx,enabled,alpha);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamPalette(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,UINT entry_count,UINT *entries) {
    This->lpVtbl->VideoProcessorGetStreamPalette(This,processor,stream_idx,entry_count,entries);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL *enabled,DXGI_RATIONAL *src_aspect_ratio,DXGI_RATIONAL *dst_aspect_ratio) {
    This->lpVtbl->VideoProcessorGetStreamPixelAspectRatio(This,processor,stream_idx,enabled,src_aspect_ratio,dst_aspect_ratio);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamLumaKey(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL *enabled,float *lower,float *upper) {
    This->lpVtbl->VideoProcessorGetStreamLumaKey(This,processor,stream_idx,enabled,lower,upper);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamStereoFormat(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL *enabled,D3D11_VIDEO_PROCESSOR_STEREO_FORMAT *format,WINBOOL *left_view_frame0,WINBOOL *base_view_frame0,D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE *flip_mode,int *mono_offset) {
    This->lpVtbl->VideoProcessorGetStreamStereoFormat(This,processor,stream_idx,enabled,format,left_view_frame0,base_view_frame0,flip_mode,mono_offset);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL *enabled) {
    This->lpVtbl->VideoProcessorGetStreamAutoProcessingMode(This,processor,stream_idx,enabled);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamFilter(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,D3D11_VIDEO_PROCESSOR_FILTER filter,WINBOOL *enabled,int *level) {
    This->lpVtbl->VideoProcessorGetStreamFilter(This,processor,stream_idx,filter,enabled,level);
}
static FORCEINLINE HRESULT ID3D11VideoContext_VideoProcessorGetStreamExtension(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,const GUID *guid,UINT data_size,void *data) {
    return This->lpVtbl->VideoProcessorGetStreamExtension(This,processor,stream_idx,guid,data_size,data);
}
static FORCEINLINE HRESULT ID3D11VideoContext_VideoProcessorBlt(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,ID3D11VideoProcessorOutputView *view,UINT frame_idx,UINT stream_count,const D3D11_VIDEO_PROCESSOR_STREAM *streams) {
    return This->lpVtbl->VideoProcessorBlt(This,processor,view,frame_idx,stream_count,streams);
}
static FORCEINLINE HRESULT ID3D11VideoContext_NegotiateCryptoSessionKeyExchange(ID3D11VideoContext* This,ID3D11CryptoSession *session,UINT data_size,void *data) {
    return This->lpVtbl->NegotiateCryptoSessionKeyExchange(This,session,data_size,data);
}
static FORCEINLINE void ID3D11VideoContext_EncryptionBlt(ID3D11VideoContext* This,ID3D11CryptoSession *session,ID3D11Texture2D *src_surface,ID3D11Texture2D *dst_surface,UINT iv_size,void *iv) {
    This->lpVtbl->EncryptionBlt(This,session,src_surface,dst_surface,iv_size,iv);
}
static FORCEINLINE void ID3D11VideoContext_DecryptionBlt(ID3D11VideoContext* This,ID3D11CryptoSession *session,ID3D11Texture2D *src_surface,ID3D11Texture2D *dst_surface,D3D11_ENCRYPTED_BLOCK_INFO *block_info,UINT key_size,const void *key,UINT iv_size,void *iv) {
    This->lpVtbl->DecryptionBlt(This,session,src_surface,dst_surface,block_info,key_size,key,iv_size,iv);
}
static FORCEINLINE void ID3D11VideoContext_StartSessionKeyRefresh(ID3D11VideoContext* This,ID3D11CryptoSession *session,UINT random_number_size,void *random_number) {
    This->lpVtbl->StartSessionKeyRefresh(This,session,random_number_size,random_number);
}
static FORCEINLINE void ID3D11VideoContext_FinishSessionKeyRefresh(ID3D11VideoContext* This,ID3D11CryptoSession *session) {
    This->lpVtbl->FinishSessionKeyRefresh(This,session);
}
static FORCEINLINE HRESULT ID3D11VideoContext_GetEncryptionBltKey(ID3D11VideoContext* This,ID3D11CryptoSession *session,UINT key_size,void *key) {
    return This->lpVtbl->GetEncryptionBltKey(This,session,key_size,key);
}
static FORCEINLINE HRESULT ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange(ID3D11VideoContext* This,ID3D11AuthenticatedChannel *channel,UINT data_size,void *data) {
    return This->lpVtbl->NegotiateAuthenticatedChannelKeyExchange(This,channel,data_size,data);
}
static FORCEINLINE HRESULT ID3D11VideoContext_QueryAuthenticatedChannel(ID3D11VideoContext* This,ID3D11AuthenticatedChannel *channel,UINT input_size,const void *input,UINT output_size,void *output) {
    return This->lpVtbl->QueryAuthenticatedChannel(This,channel,input_size,input,output_size,output);
}
static FORCEINLINE HRESULT ID3D11VideoContext_ConfigureAuthenticatedChannel(ID3D11VideoContext* This,ID3D11AuthenticatedChannel *channel,UINT input_size,const void *input,D3D11_AUTHENTICATED_CONFIGURE_OUTPUT *output) {
    return This->lpVtbl->ConfigureAuthenticatedChannel(This,channel,input_size,input,output);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorSetStreamRotation(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL enable,D3D11_VIDEO_PROCESSOR_ROTATION rotation) {
    This->lpVtbl->VideoProcessorSetStreamRotation(This,processor,stream_idx,enable,rotation);
}
static FORCEINLINE void ID3D11VideoContext_VideoProcessorGetStreamRotation(ID3D11VideoContext* This,ID3D11VideoProcessor *processor,UINT stream_idx,WINBOOL *enable,D3D11_VIDEO_PROCESSOR_ROTATION *rotation) {
    This->lpVtbl->VideoProcessorGetStreamRotation(This,processor,stream_idx,enable,rotation);
}
#endif
#endif

#endif

HRESULT STDMETHODCALLTYPE ID3D11VideoContext_GetDecoderBuffer_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoDecoder *decoder,
    D3D11_VIDEO_DECODER_BUFFER_TYPE type,
    UINT *buffer_size,
    void **buffer);
void __RPC_STUB ID3D11VideoContext_GetDecoderBuffer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_ReleaseDecoderBuffer_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoDecoder *decoder,
    D3D11_VIDEO_DECODER_BUFFER_TYPE type);
void __RPC_STUB ID3D11VideoContext_ReleaseDecoderBuffer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_DecoderBeginFrame_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoDecoder *decoder,
    ID3D11VideoDecoderOutputView *view,
    UINT key_size,
    const void *key);
void __RPC_STUB ID3D11VideoContext_DecoderBeginFrame_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_DecoderEndFrame_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoDecoder *decoder);
void __RPC_STUB ID3D11VideoContext_DecoderEndFrame_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_SubmitDecoderBuffers_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoDecoder *decoder,
    UINT buffers_count,
    const D3D11_VIDEO_DECODER_BUFFER_DESC *buffer_desc);
void __RPC_STUB ID3D11VideoContext_SubmitDecoderBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_DecoderExtension_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoDecoder *decoder,
    const D3D11_VIDEO_DECODER_EXTENSION *extension);
void __RPC_STUB ID3D11VideoContext_DecoderExtension_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetOutputTargetRect_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    WINBOOL enable,
    const RECT *rect);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetOutputTargetRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    WINBOOL y_cb_cr,
    const D3D11_VIDEO_COLOR *color);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetOutputColorSpace_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetOutputColorSpace_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE alpha_fill_mode,
    UINT stream_idx);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetOutputConstriction_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    WINBOOL enable,
    SIZE size);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetOutputConstriction_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetOutputStereoMode_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    WINBOOL enable);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetOutputStereoMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetOutputExtension_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    const GUID *guid,
    UINT data_size,
    void *data);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetOutputExtension_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetOutputTargetRect_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    WINBOOL *enabled,
    RECT *rect);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetOutputTargetRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    WINBOOL *y_cb_cr,
    D3D11_VIDEO_COLOR *color);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetOutputColorSpace_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetOutputColorSpace_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE *alpha_fill_mode,
    UINT *stream_idx);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetOutputConstriction_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    WINBOOL *enabled,
    SIZE *size);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetOutputConstriction_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetOutputStereoMode_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    WINBOOL *enabled);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetOutputStereoMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetOutputExtension_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    const GUID *guid,
    UINT data_size,
    void *data);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetOutputExtension_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamFrameFormat_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    D3D11_VIDEO_FRAME_FORMAT format);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamFrameFormat_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamColorSpace_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamColorSpace_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamOutputRate_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    D3D11_VIDEO_PROCESSOR_OUTPUT_RATE rate,
    WINBOOL repeat,
    const DXGI_RATIONAL *custom_rate);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamOutputRate_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamSourceRect_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL enable,
    const RECT *rect);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamSourceRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamDestRect_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL enable,
    const RECT *rect);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamDestRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamAlpha_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL enable,
    float alpha);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamAlpha_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamPalette_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    UINT entry_count,
    const UINT *entries);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamPalette_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL enable,
    const DXGI_RATIONAL *src_aspect_ratio,
    const DXGI_RATIONAL *dst_aspect_ratio);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamLumaKey_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL enable,
    float lower,
    float upper);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamLumaKey_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamStereoFormat_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL enable,
    D3D11_VIDEO_PROCESSOR_STEREO_FORMAT format,
    WINBOOL left_view_frame0,
    WINBOOL base_view_frame0,
    D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE flip_mode,
    int mono_offset);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamStereoFormat_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL enable);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamFilter_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    D3D11_VIDEO_PROCESSOR_FILTER filter,
    WINBOOL enable,
    int level);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamFilter_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamExtension_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    const GUID *guid,
    UINT data_size,
    void *data);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamExtension_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamFrameFormat_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    D3D11_VIDEO_FRAME_FORMAT *format);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamFrameFormat_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamColorSpace_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    D3D11_VIDEO_PROCESSOR_COLOR_SPACE *color_space);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamColorSpace_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamOutputRate_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    D3D11_VIDEO_PROCESSOR_OUTPUT_RATE *rate,
    WINBOOL *repeat,
    DXGI_RATIONAL *custom_rate);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamOutputRate_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamSourceRect_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL *enabled,
    RECT *rect);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamSourceRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamDestRect_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL *enabled,
    RECT *rect);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamDestRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamAlpha_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL *enabled,
    float *alpha);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamAlpha_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamPalette_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    UINT entry_count,
    UINT *entries);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamPalette_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL *enabled,
    DXGI_RATIONAL *src_aspect_ratio,
    DXGI_RATIONAL *dst_aspect_ratio);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamLumaKey_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL *enabled,
    float *lower,
    float *upper);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamLumaKey_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamStereoFormat_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL *enabled,
    D3D11_VIDEO_PROCESSOR_STEREO_FORMAT *format,
    WINBOOL *left_view_frame0,
    WINBOOL *base_view_frame0,
    D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE *flip_mode,
    int *mono_offset);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamStereoFormat_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL *enabled);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamFilter_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    D3D11_VIDEO_PROCESSOR_FILTER filter,
    WINBOOL *enabled,
    int *level);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamFilter_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamExtension_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    const GUID *guid,
    UINT data_size,
    void *data);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamExtension_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorBlt_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    ID3D11VideoProcessorOutputView *view,
    UINT frame_idx,
    UINT stream_count,
    const D3D11_VIDEO_PROCESSOR_STREAM *streams);
void __RPC_STUB ID3D11VideoContext_VideoProcessorBlt_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_NegotiateCryptoSessionKeyExchange_Proxy(
    ID3D11VideoContext* This,
    ID3D11CryptoSession *session,
    UINT data_size,
    void *data);
void __RPC_STUB ID3D11VideoContext_NegotiateCryptoSessionKeyExchange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_EncryptionBlt_Proxy(
    ID3D11VideoContext* This,
    ID3D11CryptoSession *session,
    ID3D11Texture2D *src_surface,
    ID3D11Texture2D *dst_surface,
    UINT iv_size,
    void *iv);
void __RPC_STUB ID3D11VideoContext_EncryptionBlt_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_DecryptionBlt_Proxy(
    ID3D11VideoContext* This,
    ID3D11CryptoSession *session,
    ID3D11Texture2D *src_surface,
    ID3D11Texture2D *dst_surface,
    D3D11_ENCRYPTED_BLOCK_INFO *block_info,
    UINT key_size,
    const void *key,
    UINT iv_size,
    void *iv);
void __RPC_STUB ID3D11VideoContext_DecryptionBlt_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_StartSessionKeyRefresh_Proxy(
    ID3D11VideoContext* This,
    ID3D11CryptoSession *session,
    UINT random_number_size,
    void *random_number);
void __RPC_STUB ID3D11VideoContext_StartSessionKeyRefresh_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_FinishSessionKeyRefresh_Proxy(
    ID3D11VideoContext* This,
    ID3D11CryptoSession *session);
void __RPC_STUB ID3D11VideoContext_FinishSessionKeyRefresh_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_GetEncryptionBltKey_Proxy(
    ID3D11VideoContext* This,
    ID3D11CryptoSession *session,
    UINT key_size,
    void *key);
void __RPC_STUB ID3D11VideoContext_GetEncryptionBltKey_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange_Proxy(
    ID3D11VideoContext* This,
    ID3D11AuthenticatedChannel *channel,
    UINT data_size,
    void *data);
void __RPC_STUB ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_QueryAuthenticatedChannel_Proxy(
    ID3D11VideoContext* This,
    ID3D11AuthenticatedChannel *channel,
    UINT input_size,
    const void *input,
    UINT output_size,
    void *output);
void __RPC_STUB ID3D11VideoContext_QueryAuthenticatedChannel_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11VideoContext_ConfigureAuthenticatedChannel_Proxy(
    ID3D11VideoContext* This,
    ID3D11AuthenticatedChannel *channel,
    UINT input_size,
    const void *input,
    D3D11_AUTHENTICATED_CONFIGURE_OUTPUT *output);
void __RPC_STUB ID3D11VideoContext_ConfigureAuthenticatedChannel_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorSetStreamRotation_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL enable,
    D3D11_VIDEO_PROCESSOR_ROTATION rotation);
void __RPC_STUB ID3D11VideoContext_VideoProcessorSetStreamRotation_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11VideoContext_VideoProcessorGetStreamRotation_Proxy(
    ID3D11VideoContext* This,
    ID3D11VideoProcessor *processor,
    UINT stream_idx,
    WINBOOL *enable,
    D3D11_VIDEO_PROCESSOR_ROTATION *rotation);
void __RPC_STUB ID3D11VideoContext_VideoProcessorGetStreamRotation_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11VideoContext_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ID3D11Device interface
 */
#ifndef __ID3D11Device_INTERFACE_DEFINED__
#define __ID3D11Device_INTERFACE_DEFINED__

DEFINE_GUID(IID_ID3D11Device, 0xdb6f6ddb, 0xac77, 0x4e88, 0x82,0x53, 0x81,0x9d,0xf9,0xbb,0xf1,0x40);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("db6f6ddb-ac77-4e88-8253-819df9bbf140")
ID3D11Device : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE CreateBuffer(
        const D3D11_BUFFER_DESC *pDesc,
        const D3D11_SUBRESOURCE_DATA *pInitialData,
        ID3D11Buffer **ppBuffer) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateTexture1D(
        const D3D11_TEXTURE1D_DESC *pDesc,
        const D3D11_SUBRESOURCE_DATA *pInitialData,
        ID3D11Texture1D **ppTexture1D) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateTexture2D(
        const D3D11_TEXTURE2D_DESC *pDesc,
        const D3D11_SUBRESOURCE_DATA *pInitialData,
        ID3D11Texture2D **ppTexture2D) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateTexture3D(
        const D3D11_TEXTURE3D_DESC *pDesc,
        const D3D11_SUBRESOURCE_DATA *pInitialData,
        ID3D11Texture3D **ppTexture3D) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateShaderResourceView(
        ID3D11Resource *pResource,
        const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc,
        ID3D11ShaderResourceView **ppSRView) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateUnorderedAccessView(
        ID3D11Resource *pResource,
        const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc,
        ID3D11UnorderedAccessView **ppUAView) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateRenderTargetView(
        ID3D11Resource *pResource,
        const D3D11_RENDER_TARGET_VIEW_DESC *pDesc,
        ID3D11RenderTargetView **ppRTView) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilView(
        ID3D11Resource *pResource,
        const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc,
        ID3D11DepthStencilView **ppDepthStencilView) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateInputLayout(
        const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs,
        UINT NumElements,
        const void *pShaderBytecodeWithInputSignature,
        SIZE_T BytecodeLength,
        ID3D11InputLayout **ppInputLayout) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVertexShader(
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11VertexShader **ppVertexShader) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateGeometryShader(
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11GeometryShader **ppGeometryShader) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateGeometryShaderWithStreamOutput(
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        const D3D11_SO_DECLARATION_ENTRY *pSODeclaration,
        UINT NumEntries,
        const UINT *pBufferStrides,
        UINT NumStrides,
        UINT RasterizedStream,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11GeometryShader **ppGeometryShader) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreatePixelShader(
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11PixelShader **ppPixelShader) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateHullShader(
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11HullShader **ppHullShader) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateDomainShader(
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11DomainShader **ppDomainShader) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateComputeShader(
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11ComputeShader **ppComputeShader) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateClassLinkage(
        ID3D11ClassLinkage **ppLinkage) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateBlendState(
        const D3D11_BLEND_DESC *pBlendStateDesc,
        ID3D11BlendState **ppBlendState) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilState(
        const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc,
        ID3D11DepthStencilState **ppDepthStencilState) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateRasterizerState(
        const D3D11_RASTERIZER_DESC *pRasterizerDesc,
        ID3D11RasterizerState **ppRasterizerState) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateSamplerState(
        const D3D11_SAMPLER_DESC *pSamplerDesc,
        ID3D11SamplerState **ppSamplerState) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateQuery(
        const D3D11_QUERY_DESC *pQueryDesc,
        ID3D11Query **ppQuery) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreatePredicate(
        const D3D11_QUERY_DESC *pPredicateDesc,
        ID3D11Predicate **ppPredicate) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateCounter(
        const D3D11_COUNTER_DESC *pCounterDesc,
        ID3D11Counter **ppCounter) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateDeferredContext(
        UINT ContextFlags,
        ID3D11DeviceContext **ppDeferredContext) = 0;

    virtual HRESULT STDMETHODCALLTYPE OpenSharedResource(
        HANDLE hResource,
        REFIID ReturnedInterface,
        void **ppResource) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckFormatSupport(
        DXGI_FORMAT Format,
        UINT *pFormatSupport) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckMultisampleQualityLevels(
        DXGI_FORMAT Format,
        UINT SampleCount,
        UINT *pNumQualityLevels) = 0;

    virtual void STDMETHODCALLTYPE CheckCounterInfo(
        D3D11_COUNTER_INFO *pCounterInfo) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckCounter(
        const D3D11_COUNTER_DESC *pDesc,
        D3D11_COUNTER_TYPE *pType,
        UINT *pActiveCounters,
        LPSTR szName,
        UINT *pNameLength,
        LPSTR szUnits,
        UINT *pUnitsLength,
        LPSTR szDescription,
        UINT *pDescriptionLength) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckFeatureSupport(
        D3D11_FEATURE Feature,
        void *pFeatureSupportData,
        UINT FeatureSupportDataSize) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPrivateData(
        REFGUID guid,
        UINT *pDataSize,
        void *pData) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPrivateData(
        REFGUID guid,
        UINT DataSize,
        const void *pData) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface(
        REFGUID guid,
        const IUnknown *pData) = 0;

    virtual D3D_FEATURE_LEVEL STDMETHODCALLTYPE GetFeatureLevel(
        ) = 0;

    virtual UINT STDMETHODCALLTYPE GetCreationFlags(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDeviceRemovedReason(
        ) = 0;

    virtual void STDMETHODCALLTYPE GetImmediateContext(
        ID3D11DeviceContext **ppImmediateContext) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetExceptionMode(
        UINT RaiseFlags) = 0;

    virtual UINT STDMETHODCALLTYPE GetExceptionMode(
        ) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ID3D11Device, 0xdb6f6ddb, 0xac77, 0x4e88, 0x82,0x53, 0x81,0x9d,0xf9,0xbb,0xf1,0x40)
#endif
#else
typedef struct ID3D11DeviceVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ID3D11Device* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ID3D11Device* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ID3D11Device* This);

    /*** ID3D11Device methods ***/
    HRESULT (STDMETHODCALLTYPE *CreateBuffer)(
        ID3D11Device* This,
        const D3D11_BUFFER_DESC *pDesc,
        const D3D11_SUBRESOURCE_DATA *pInitialData,
        ID3D11Buffer **ppBuffer);

    HRESULT (STDMETHODCALLTYPE *CreateTexture1D)(
        ID3D11Device* This,
        const D3D11_TEXTURE1D_DESC *pDesc,
        const D3D11_SUBRESOURCE_DATA *pInitialData,
        ID3D11Texture1D **ppTexture1D);

    HRESULT (STDMETHODCALLTYPE *CreateTexture2D)(
        ID3D11Device* This,
        const D3D11_TEXTURE2D_DESC *pDesc,
        const D3D11_SUBRESOURCE_DATA *pInitialData,
        ID3D11Texture2D **ppTexture2D);

    HRESULT (STDMETHODCALLTYPE *CreateTexture3D)(
        ID3D11Device* This,
        const D3D11_TEXTURE3D_DESC *pDesc,
        const D3D11_SUBRESOURCE_DATA *pInitialData,
        ID3D11Texture3D **ppTexture3D);

    HRESULT (STDMETHODCALLTYPE *CreateShaderResourceView)(
        ID3D11Device* This,
        ID3D11Resource *pResource,
        const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc,
        ID3D11ShaderResourceView **ppSRView);

    HRESULT (STDMETHODCALLTYPE *CreateUnorderedAccessView)(
        ID3D11Device* This,
        ID3D11Resource *pResource,
        const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc,
        ID3D11UnorderedAccessView **ppUAView);

    HRESULT (STDMETHODCALLTYPE *CreateRenderTargetView)(
        ID3D11Device* This,
        ID3D11Resource *pResource,
        const D3D11_RENDER_TARGET_VIEW_DESC *pDesc,
        ID3D11RenderTargetView **ppRTView);

    HRESULT (STDMETHODCALLTYPE *CreateDepthStencilView)(
        ID3D11Device* This,
        ID3D11Resource *pResource,
        const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc,
        ID3D11DepthStencilView **ppDepthStencilView);

    HRESULT (STDMETHODCALLTYPE *CreateInputLayout)(
        ID3D11Device* This,
        const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs,
        UINT NumElements,
        const void *pShaderBytecodeWithInputSignature,
        SIZE_T BytecodeLength,
        ID3D11InputLayout **ppInputLayout);

    HRESULT (STDMETHODCALLTYPE *CreateVertexShader)(
        ID3D11Device* This,
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11VertexShader **ppVertexShader);

    HRESULT (STDMETHODCALLTYPE *CreateGeometryShader)(
        ID3D11Device* This,
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11GeometryShader **ppGeometryShader);

    HRESULT (STDMETHODCALLTYPE *CreateGeometryShaderWithStreamOutput)(
        ID3D11Device* This,
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        const D3D11_SO_DECLARATION_ENTRY *pSODeclaration,
        UINT NumEntries,
        const UINT *pBufferStrides,
        UINT NumStrides,
        UINT RasterizedStream,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11GeometryShader **ppGeometryShader);

    HRESULT (STDMETHODCALLTYPE *CreatePixelShader)(
        ID3D11Device* This,
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11PixelShader **ppPixelShader);

    HRESULT (STDMETHODCALLTYPE *CreateHullShader)(
        ID3D11Device* This,
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11HullShader **ppHullShader);

    HRESULT (STDMETHODCALLTYPE *CreateDomainShader)(
        ID3D11Device* This,
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11DomainShader **ppDomainShader);

    HRESULT (STDMETHODCALLTYPE *CreateComputeShader)(
        ID3D11Device* This,
        const void *pShaderBytecode,
        SIZE_T BytecodeLength,
        ID3D11ClassLinkage *pClassLinkage,
        ID3D11ComputeShader **ppComputeShader);

    HRESULT (STDMETHODCALLTYPE *CreateClassLinkage)(
        ID3D11Device* This,
        ID3D11ClassLinkage **ppLinkage);

    HRESULT (STDMETHODCALLTYPE *CreateBlendState)(
        ID3D11Device* This,
        const D3D11_BLEND_DESC *pBlendStateDesc,
        ID3D11BlendState **ppBlendState);

    HRESULT (STDMETHODCALLTYPE *CreateDepthStencilState)(
        ID3D11Device* This,
        const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc,
        ID3D11DepthStencilState **ppDepthStencilState);

    HRESULT (STDMETHODCALLTYPE *CreateRasterizerState)(
        ID3D11Device* This,
        const D3D11_RASTERIZER_DESC *pRasterizerDesc,
        ID3D11RasterizerState **ppRasterizerState);

    HRESULT (STDMETHODCALLTYPE *CreateSamplerState)(
        ID3D11Device* This,
        const D3D11_SAMPLER_DESC *pSamplerDesc,
        ID3D11SamplerState **ppSamplerState);

    HRESULT (STDMETHODCALLTYPE *CreateQuery)(
        ID3D11Device* This,
        const D3D11_QUERY_DESC *pQueryDesc,
        ID3D11Query **ppQuery);

    HRESULT (STDMETHODCALLTYPE *CreatePredicate)(
        ID3D11Device* This,
        const D3D11_QUERY_DESC *pPredicateDesc,
        ID3D11Predicate **ppPredicate);

    HRESULT (STDMETHODCALLTYPE *CreateCounter)(
        ID3D11Device* This,
        const D3D11_COUNTER_DESC *pCounterDesc,
        ID3D11Counter **ppCounter);

    HRESULT (STDMETHODCALLTYPE *CreateDeferredContext)(
        ID3D11Device* This,
        UINT ContextFlags,
        ID3D11DeviceContext **ppDeferredContext);

    HRESULT (STDMETHODCALLTYPE *OpenSharedResource)(
        ID3D11Device* This,
        HANDLE hResource,
        REFIID ReturnedInterface,
        void **ppResource);

    HRESULT (STDMETHODCALLTYPE *CheckFormatSupport)(
        ID3D11Device* This,
        DXGI_FORMAT Format,
        UINT *pFormatSupport);

    HRESULT (STDMETHODCALLTYPE *CheckMultisampleQualityLevels)(
        ID3D11Device* This,
        DXGI_FORMAT Format,
        UINT SampleCount,
        UINT *pNumQualityLevels);

    void (STDMETHODCALLTYPE *CheckCounterInfo)(
        ID3D11Device* This,
        D3D11_COUNTER_INFO *pCounterInfo);

    HRESULT (STDMETHODCALLTYPE *CheckCounter)(
        ID3D11Device* This,
        const D3D11_COUNTER_DESC *pDesc,
        D3D11_COUNTER_TYPE *pType,
        UINT *pActiveCounters,
        LPSTR szName,
        UINT *pNameLength,
        LPSTR szUnits,
        UINT *pUnitsLength,
        LPSTR szDescription,
        UINT *pDescriptionLength);

    HRESULT (STDMETHODCALLTYPE *CheckFeatureSupport)(
        ID3D11Device* This,
        D3D11_FEATURE Feature,
        void *pFeatureSupportData,
        UINT FeatureSupportDataSize);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        ID3D11Device* This,
        REFGUID guid,
        UINT *pDataSize,
        void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        ID3D11Device* This,
        REFGUID guid,
        UINT DataSize,
        const void *pData);

    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
        ID3D11Device* This,
        REFGUID guid,
        const IUnknown *pData);

    D3D_FEATURE_LEVEL (STDMETHODCALLTYPE *GetFeatureLevel)(
        ID3D11Device* This);

    UINT (STDMETHODCALLTYPE *GetCreationFlags)(
        ID3D11Device* This);

    HRESULT (STDMETHODCALLTYPE *GetDeviceRemovedReason)(
        ID3D11Device* This);

    void (STDMETHODCALLTYPE *GetImmediateContext)(
        ID3D11Device* This,
        ID3D11DeviceContext **ppImmediateContext);

    HRESULT (STDMETHODCALLTYPE *SetExceptionMode)(
        ID3D11Device* This,
        UINT RaiseFlags);

    UINT (STDMETHODCALLTYPE *GetExceptionMode)(
        ID3D11Device* This);

    END_INTERFACE
} ID3D11DeviceVtbl;
interface ID3D11Device {
    CONST_VTBL ID3D11DeviceVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ID3D11Device_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ID3D11Device_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ID3D11Device_Release(This) (This)->lpVtbl->Release(This)
/*** ID3D11Device methods ***/
#define ID3D11Device_CreateBuffer(This,pDesc,pInitialData,ppBuffer) (This)->lpVtbl->CreateBuffer(This,pDesc,pInitialData,ppBuffer)
#define ID3D11Device_CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) (This)->lpVtbl->CreateTexture1D(This,pDesc,pInitialData,ppTexture1D)
#define ID3D11Device_CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) (This)->lpVtbl->CreateTexture2D(This,pDesc,pInitialData,ppTexture2D)
#define ID3D11Device_CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) (This)->lpVtbl->CreateTexture3D(This,pDesc,pInitialData,ppTexture3D)
#define ID3D11Device_CreateShaderResourceView(This,pResource,pDesc,ppSRView) (This)->lpVtbl->CreateShaderResourceView(This,pResource,pDesc,ppSRView)
#define ID3D11Device_CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) (This)->lpVtbl->CreateUnorderedAccessView(This,pResource,pDesc,ppUAView)
#define ID3D11Device_CreateRenderTargetView(This,pResource,pDesc,ppRTView) (This)->lpVtbl->CreateRenderTargetView(This,pResource,pDesc,ppRTView)
#define ID3D11Device_CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) (This)->lpVtbl->CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView)
#define ID3D11Device_CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) (This)->lpVtbl->CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout)
#define ID3D11Device_CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) (This)->lpVtbl->CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader)
#define ID3D11Device_CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) (This)->lpVtbl->CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader)
#define ID3D11Device_CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) (This)->lpVtbl->CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader)
#define ID3D11Device_CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) (This)->lpVtbl->CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader)
#define ID3D11Device_CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) (This)->lpVtbl->CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader)
#define ID3D11Device_CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) (This)->lpVtbl->CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader)
#define ID3D11Device_CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) (This)->lpVtbl->CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader)
#define ID3D11Device_CreateClassLinkage(This,ppLinkage) (This)->lpVtbl->CreateClassLinkage(This,ppLinkage)
#define ID3D11Device_CreateBlendState(This,pBlendStateDesc,ppBlendState) (This)->lpVtbl->CreateBlendState(This,pBlendStateDesc,ppBlendState)
#define ID3D11Device_CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) (This)->lpVtbl->CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState)
#define ID3D11Device_CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) (This)->lpVtbl->CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState)
#define ID3D11Device_CreateSamplerState(This,pSamplerDesc,ppSamplerState) (This)->lpVtbl->CreateSamplerState(This,pSamplerDesc,ppSamplerState)
#define ID3D11Device_CreateQuery(This,pQueryDesc,ppQuery) (This)->lpVtbl->CreateQuery(This,pQueryDesc,ppQuery)
#define ID3D11Device_CreatePredicate(This,pPredicateDesc,ppPredicate) (This)->lpVtbl->CreatePredicate(This,pPredicateDesc,ppPredicate)
#define ID3D11Device_CreateCounter(This,pCounterDesc,ppCounter) (This)->lpVtbl->CreateCounter(This,pCounterDesc,ppCounter)
#define ID3D11Device_CreateDeferredContext(This,ContextFlags,ppDeferredContext) (This)->lpVtbl->CreateDeferredContext(This,ContextFlags,ppDeferredContext)
#define ID3D11Device_OpenSharedResource(This,hResource,ReturnedInterface,ppResource) (This)->lpVtbl->OpenSharedResource(This,hResource,ReturnedInterface,ppResource)
#define ID3D11Device_CheckFormatSupport(This,Format,pFormatSupport) (This)->lpVtbl->CheckFormatSupport(This,Format,pFormatSupport)
#define ID3D11Device_CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) (This)->lpVtbl->CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels)
#define ID3D11Device_CheckCounterInfo(This,pCounterInfo) (This)->lpVtbl->CheckCounterInfo(This,pCounterInfo)
#define ID3D11Device_CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) (This)->lpVtbl->CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength)
#define ID3D11Device_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) (This)->lpVtbl->CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize)
#define ID3D11Device_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
#define ID3D11Device_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
#define ID3D11Device_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
#define ID3D11Device_GetFeatureLevel(This) (This)->lpVtbl->GetFeatureLevel(This)
#define ID3D11Device_GetCreationFlags(This) (This)->lpVtbl->GetCreationFlags(This)
#define ID3D11Device_GetDeviceRemovedReason(This) (This)->lpVtbl->GetDeviceRemovedReason(This)
#define ID3D11Device_GetImmediateContext(This,ppImmediateContext) (This)->lpVtbl->GetImmediateContext(This,ppImmediateContext)
#define ID3D11Device_SetExceptionMode(This,RaiseFlags) (This)->lpVtbl->SetExceptionMode(This,RaiseFlags)
#define ID3D11Device_GetExceptionMode(This) (This)->lpVtbl->GetExceptionMode(This)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ID3D11Device_QueryInterface(ID3D11Device* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ID3D11Device_AddRef(ID3D11Device* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ID3D11Device_Release(ID3D11Device* This) {
    return This->lpVtbl->Release(This);
}
/*** ID3D11Device methods ***/
static FORCEINLINE HRESULT ID3D11Device_CreateBuffer(ID3D11Device* This,const D3D11_BUFFER_DESC *pDesc,const D3D11_SUBRESOURCE_DATA *pInitialData,ID3D11Buffer **ppBuffer) {
    return This->lpVtbl->CreateBuffer(This,pDesc,pInitialData,ppBuffer);
}
static FORCEINLINE HRESULT ID3D11Device_CreateTexture1D(ID3D11Device* This,const D3D11_TEXTURE1D_DESC *pDesc,const D3D11_SUBRESOURCE_DATA *pInitialData,ID3D11Texture1D **ppTexture1D) {
    return This->lpVtbl->CreateTexture1D(This,pDesc,pInitialData,ppTexture1D);
}
static FORCEINLINE HRESULT ID3D11Device_CreateTexture2D(ID3D11Device* This,const D3D11_TEXTURE2D_DESC *pDesc,const D3D11_SUBRESOURCE_DATA *pInitialData,ID3D11Texture2D **ppTexture2D) {
    return This->lpVtbl->CreateTexture2D(This,pDesc,pInitialData,ppTexture2D);
}
static FORCEINLINE HRESULT ID3D11Device_CreateTexture3D(ID3D11Device* This,const D3D11_TEXTURE3D_DESC *pDesc,const D3D11_SUBRESOURCE_DATA *pInitialData,ID3D11Texture3D **ppTexture3D) {
    return This->lpVtbl->CreateTexture3D(This,pDesc,pInitialData,ppTexture3D);
}
static FORCEINLINE HRESULT ID3D11Device_CreateShaderResourceView(ID3D11Device* This,ID3D11Resource *pResource,const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc,ID3D11ShaderResourceView **ppSRView) {
    return This->lpVtbl->CreateShaderResourceView(This,pResource,pDesc,ppSRView);
}
static FORCEINLINE HRESULT ID3D11Device_CreateUnorderedAccessView(ID3D11Device* This,ID3D11Resource *pResource,const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc,ID3D11UnorderedAccessView **ppUAView) {
    return This->lpVtbl->CreateUnorderedAccessView(This,pResource,pDesc,ppUAView);
}
static FORCEINLINE HRESULT ID3D11Device_CreateRenderTargetView(ID3D11Device* This,ID3D11Resource *pResource,const D3D11_RENDER_TARGET_VIEW_DESC *pDesc,ID3D11RenderTargetView **ppRTView) {
    return This->lpVtbl->CreateRenderTargetView(This,pResource,pDesc,ppRTView);
}
static FORCEINLINE HRESULT ID3D11Device_CreateDepthStencilView(ID3D11Device* This,ID3D11Resource *pResource,const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc,ID3D11DepthStencilView **ppDepthStencilView) {
    return This->lpVtbl->CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView);
}
static FORCEINLINE HRESULT ID3D11Device_CreateInputLayout(ID3D11Device* This,const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs,UINT NumElements,const void *pShaderBytecodeWithInputSignature,SIZE_T BytecodeLength,ID3D11InputLayout **ppInputLayout) {
    return This->lpVtbl->CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout);
}
static FORCEINLINE HRESULT ID3D11Device_CreateVertexShader(ID3D11Device* This,const void *pShaderBytecode,SIZE_T BytecodeLength,ID3D11ClassLinkage *pClassLinkage,ID3D11VertexShader **ppVertexShader) {
    return This->lpVtbl->CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader);
}
static FORCEINLINE HRESULT ID3D11Device_CreateGeometryShader(ID3D11Device* This,const void *pShaderBytecode,SIZE_T BytecodeLength,ID3D11ClassLinkage *pClassLinkage,ID3D11GeometryShader **ppGeometryShader) {
    return This->lpVtbl->CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader);
}
static FORCEINLINE HRESULT ID3D11Device_CreateGeometryShaderWithStreamOutput(ID3D11Device* This,const void *pShaderBytecode,SIZE_T BytecodeLength,const D3D11_SO_DECLARATION_ENTRY *pSODeclaration,UINT NumEntries,const UINT *pBufferStrides,UINT NumStrides,UINT RasterizedStream,ID3D11ClassLinkage *pClassLinkage,ID3D11GeometryShader **ppGeometryShader) {
    return This->lpVtbl->CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader);
}
static FORCEINLINE HRESULT ID3D11Device_CreatePixelShader(ID3D11Device* This,const void *pShaderBytecode,SIZE_T BytecodeLength,ID3D11ClassLinkage *pClassLinkage,ID3D11PixelShader **ppPixelShader) {
    return This->lpVtbl->CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader);
}
static FORCEINLINE HRESULT ID3D11Device_CreateHullShader(ID3D11Device* This,const void *pShaderBytecode,SIZE_T BytecodeLength,ID3D11ClassLinkage *pClassLinkage,ID3D11HullShader **ppHullShader) {
    return This->lpVtbl->CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader);
}
static FORCEINLINE HRESULT ID3D11Device_CreateDomainShader(ID3D11Device* This,const void *pShaderBytecode,SIZE_T BytecodeLength,ID3D11ClassLinkage *pClassLinkage,ID3D11DomainShader **ppDomainShader) {
    return This->lpVtbl->CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader);
}
static FORCEINLINE HRESULT ID3D11Device_CreateComputeShader(ID3D11Device* This,const void *pShaderBytecode,SIZE_T BytecodeLength,ID3D11ClassLinkage *pClassLinkage,ID3D11ComputeShader **ppComputeShader) {
    return This->lpVtbl->CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader);
}
static FORCEINLINE HRESULT ID3D11Device_CreateClassLinkage(ID3D11Device* This,ID3D11ClassLinkage **ppLinkage) {
    return This->lpVtbl->CreateClassLinkage(This,ppLinkage);
}
static FORCEINLINE HRESULT ID3D11Device_CreateBlendState(ID3D11Device* This,const D3D11_BLEND_DESC *pBlendStateDesc,ID3D11BlendState **ppBlendState) {
    return This->lpVtbl->CreateBlendState(This,pBlendStateDesc,ppBlendState);
}
static FORCEINLINE HRESULT ID3D11Device_CreateDepthStencilState(ID3D11Device* This,const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc,ID3D11DepthStencilState **ppDepthStencilState) {
    return This->lpVtbl->CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState);
}
static FORCEINLINE HRESULT ID3D11Device_CreateRasterizerState(ID3D11Device* This,const D3D11_RASTERIZER_DESC *pRasterizerDesc,ID3D11RasterizerState **ppRasterizerState) {
    return This->lpVtbl->CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState);
}
static FORCEINLINE HRESULT ID3D11Device_CreateSamplerState(ID3D11Device* This,const D3D11_SAMPLER_DESC *pSamplerDesc,ID3D11SamplerState **ppSamplerState) {
    return This->lpVtbl->CreateSamplerState(This,pSamplerDesc,ppSamplerState);
}
static FORCEINLINE HRESULT ID3D11Device_CreateQuery(ID3D11Device* This,const D3D11_QUERY_DESC *pQueryDesc,ID3D11Query **ppQuery) {
    return This->lpVtbl->CreateQuery(This,pQueryDesc,ppQuery);
}
static FORCEINLINE HRESULT ID3D11Device_CreatePredicate(ID3D11Device* This,const D3D11_QUERY_DESC *pPredicateDesc,ID3D11Predicate **ppPredicate) {
    return This->lpVtbl->CreatePredicate(This,pPredicateDesc,ppPredicate);
}
static FORCEINLINE HRESULT ID3D11Device_CreateCounter(ID3D11Device* This,const D3D11_COUNTER_DESC *pCounterDesc,ID3D11Counter **ppCounter) {
    return This->lpVtbl->CreateCounter(This,pCounterDesc,ppCounter);
}
static FORCEINLINE HRESULT ID3D11Device_CreateDeferredContext(ID3D11Device* This,UINT ContextFlags,ID3D11DeviceContext **ppDeferredContext) {
    return This->lpVtbl->CreateDeferredContext(This,ContextFlags,ppDeferredContext);
}
static FORCEINLINE HRESULT ID3D11Device_OpenSharedResource(ID3D11Device* This,HANDLE hResource,REFIID ReturnedInterface,void **ppResource) {
    return This->lpVtbl->OpenSharedResource(This,hResource,ReturnedInterface,ppResource);
}
static FORCEINLINE HRESULT ID3D11Device_CheckFormatSupport(ID3D11Device* This,DXGI_FORMAT Format,UINT *pFormatSupport) {
    return This->lpVtbl->CheckFormatSupport(This,Format,pFormatSupport);
}
static FORCEINLINE HRESULT ID3D11Device_CheckMultisampleQualityLevels(ID3D11Device* This,DXGI_FORMAT Format,UINT SampleCount,UINT *pNumQualityLevels) {
    return This->lpVtbl->CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels);
}
static FORCEINLINE void ID3D11Device_CheckCounterInfo(ID3D11Device* This,D3D11_COUNTER_INFO *pCounterInfo) {
    This->lpVtbl->CheckCounterInfo(This,pCounterInfo);
}
static FORCEINLINE HRESULT ID3D11Device_CheckCounter(ID3D11Device* This,const D3D11_COUNTER_DESC *pDesc,D3D11_COUNTER_TYPE *pType,UINT *pActiveCounters,LPSTR szName,UINT *pNameLength,LPSTR szUnits,UINT *pUnitsLength,LPSTR szDescription,UINT *pDescriptionLength) {
    return This->lpVtbl->CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength);
}
static FORCEINLINE HRESULT ID3D11Device_CheckFeatureSupport(ID3D11Device* This,D3D11_FEATURE Feature,void *pFeatureSupportData,UINT FeatureSupportDataSize) {
    return This->lpVtbl->CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize);
}
static FORCEINLINE HRESULT ID3D11Device_GetPrivateData(ID3D11Device* This,REFGUID guid,UINT *pDataSize,void *pData) {
    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Device_SetPrivateData(ID3D11Device* This,REFGUID guid,UINT DataSize,const void *pData) {
    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
}
static FORCEINLINE HRESULT ID3D11Device_SetPrivateDataInterface(ID3D11Device* This,REFGUID guid,const IUnknown *pData) {
    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
}
static FORCEINLINE D3D_FEATURE_LEVEL ID3D11Device_GetFeatureLevel(ID3D11Device* This) {
    return This->lpVtbl->GetFeatureLevel(This);
}
static FORCEINLINE UINT ID3D11Device_GetCreationFlags(ID3D11Device* This) {
    return This->lpVtbl->GetCreationFlags(This);
}
static FORCEINLINE HRESULT ID3D11Device_GetDeviceRemovedReason(ID3D11Device* This) {
    return This->lpVtbl->GetDeviceRemovedReason(This);
}
static FORCEINLINE void ID3D11Device_GetImmediateContext(ID3D11Device* This,ID3D11DeviceContext **ppImmediateContext) {
    This->lpVtbl->GetImmediateContext(This,ppImmediateContext);
}
static FORCEINLINE HRESULT ID3D11Device_SetExceptionMode(ID3D11Device* This,UINT RaiseFlags) {
    return This->lpVtbl->SetExceptionMode(This,RaiseFlags);
}
static FORCEINLINE UINT ID3D11Device_GetExceptionMode(ID3D11Device* This) {
    return This->lpVtbl->GetExceptionMode(This);
}
#endif
#endif

#endif

HRESULT STDMETHODCALLTYPE ID3D11Device_CreateBuffer_Proxy(
    ID3D11Device* This,
    const D3D11_BUFFER_DESC *pDesc,
    const D3D11_SUBRESOURCE_DATA *pInitialData,
    ID3D11Buffer **ppBuffer);
void __RPC_STUB ID3D11Device_CreateBuffer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateTexture1D_Proxy(
    ID3D11Device* This,
    const D3D11_TEXTURE1D_DESC *pDesc,
    const D3D11_SUBRESOURCE_DATA *pInitialData,
    ID3D11Texture1D **ppTexture1D);
void __RPC_STUB ID3D11Device_CreateTexture1D_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateTexture2D_Proxy(
    ID3D11Device* This,
    const D3D11_TEXTURE2D_DESC *pDesc,
    const D3D11_SUBRESOURCE_DATA *pInitialData,
    ID3D11Texture2D **ppTexture2D);
void __RPC_STUB ID3D11Device_CreateTexture2D_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateTexture3D_Proxy(
    ID3D11Device* This,
    const D3D11_TEXTURE3D_DESC *pDesc,
    const D3D11_SUBRESOURCE_DATA *pInitialData,
    ID3D11Texture3D **ppTexture3D);
void __RPC_STUB ID3D11Device_CreateTexture3D_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateShaderResourceView_Proxy(
    ID3D11Device* This,
    ID3D11Resource *pResource,
    const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc,
    ID3D11ShaderResourceView **ppSRView);
void __RPC_STUB ID3D11Device_CreateShaderResourceView_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateUnorderedAccessView_Proxy(
    ID3D11Device* This,
    ID3D11Resource *pResource,
    const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc,
    ID3D11UnorderedAccessView **ppUAView);
void __RPC_STUB ID3D11Device_CreateUnorderedAccessView_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateRenderTargetView_Proxy(
    ID3D11Device* This,
    ID3D11Resource *pResource,
    const D3D11_RENDER_TARGET_VIEW_DESC *pDesc,
    ID3D11RenderTargetView **ppRTView);
void __RPC_STUB ID3D11Device_CreateRenderTargetView_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateDepthStencilView_Proxy(
    ID3D11Device* This,
    ID3D11Resource *pResource,
    const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc,
    ID3D11DepthStencilView **ppDepthStencilView);
void __RPC_STUB ID3D11Device_CreateDepthStencilView_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateInputLayout_Proxy(
    ID3D11Device* This,
    const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs,
    UINT NumElements,
    const void *pShaderBytecodeWithInputSignature,
    SIZE_T BytecodeLength,
    ID3D11InputLayout **ppInputLayout);
void __RPC_STUB ID3D11Device_CreateInputLayout_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateVertexShader_Proxy(
    ID3D11Device* This,
    const void *pShaderBytecode,
    SIZE_T BytecodeLength,
    ID3D11ClassLinkage *pClassLinkage,
    ID3D11VertexShader **ppVertexShader);
void __RPC_STUB ID3D11Device_CreateVertexShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateGeometryShader_Proxy(
    ID3D11Device* This,
    const void *pShaderBytecode,
    SIZE_T BytecodeLength,
    ID3D11ClassLinkage *pClassLinkage,
    ID3D11GeometryShader **ppGeometryShader);
void __RPC_STUB ID3D11Device_CreateGeometryShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateGeometryShaderWithStreamOutput_Proxy(
    ID3D11Device* This,
    const void *pShaderBytecode,
    SIZE_T BytecodeLength,
    const D3D11_SO_DECLARATION_ENTRY *pSODeclaration,
    UINT NumEntries,
    const UINT *pBufferStrides,
    UINT NumStrides,
    UINT RasterizedStream,
    ID3D11ClassLinkage *pClassLinkage,
    ID3D11GeometryShader **ppGeometryShader);
void __RPC_STUB ID3D11Device_CreateGeometryShaderWithStreamOutput_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreatePixelShader_Proxy(
    ID3D11Device* This,
    const void *pShaderBytecode,
    SIZE_T BytecodeLength,
    ID3D11ClassLinkage *pClassLinkage,
    ID3D11PixelShader **ppPixelShader);
void __RPC_STUB ID3D11Device_CreatePixelShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateHullShader_Proxy(
    ID3D11Device* This,
    const void *pShaderBytecode,
    SIZE_T BytecodeLength,
    ID3D11ClassLinkage *pClassLinkage,
    ID3D11HullShader **ppHullShader);
void __RPC_STUB ID3D11Device_CreateHullShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateDomainShader_Proxy(
    ID3D11Device* This,
    const void *pShaderBytecode,
    SIZE_T BytecodeLength,
    ID3D11ClassLinkage *pClassLinkage,
    ID3D11DomainShader **ppDomainShader);
void __RPC_STUB ID3D11Device_CreateDomainShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateComputeShader_Proxy(
    ID3D11Device* This,
    const void *pShaderBytecode,
    SIZE_T BytecodeLength,
    ID3D11ClassLinkage *pClassLinkage,
    ID3D11ComputeShader **ppComputeShader);
void __RPC_STUB ID3D11Device_CreateComputeShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateClassLinkage_Proxy(
    ID3D11Device* This,
    ID3D11ClassLinkage **ppLinkage);
void __RPC_STUB ID3D11Device_CreateClassLinkage_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateBlendState_Proxy(
    ID3D11Device* This,
    const D3D11_BLEND_DESC *pBlendStateDesc,
    ID3D11BlendState **ppBlendState);
void __RPC_STUB ID3D11Device_CreateBlendState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateDepthStencilState_Proxy(
    ID3D11Device* This,
    const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc,
    ID3D11DepthStencilState **ppDepthStencilState);
void __RPC_STUB ID3D11Device_CreateDepthStencilState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateRasterizerState_Proxy(
    ID3D11Device* This,
    const D3D11_RASTERIZER_DESC *pRasterizerDesc,
    ID3D11RasterizerState **ppRasterizerState);
void __RPC_STUB ID3D11Device_CreateRasterizerState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateSamplerState_Proxy(
    ID3D11Device* This,
    const D3D11_SAMPLER_DESC *pSamplerDesc,
    ID3D11SamplerState **ppSamplerState);
void __RPC_STUB ID3D11Device_CreateSamplerState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateQuery_Proxy(
    ID3D11Device* This,
    const D3D11_QUERY_DESC *pQueryDesc,
    ID3D11Query **ppQuery);
void __RPC_STUB ID3D11Device_CreateQuery_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreatePredicate_Proxy(
    ID3D11Device* This,
    const D3D11_QUERY_DESC *pPredicateDesc,
    ID3D11Predicate **ppPredicate);
void __RPC_STUB ID3D11Device_CreatePredicate_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateCounter_Proxy(
    ID3D11Device* This,
    const D3D11_COUNTER_DESC *pCounterDesc,
    ID3D11Counter **ppCounter);
void __RPC_STUB ID3D11Device_CreateCounter_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CreateDeferredContext_Proxy(
    ID3D11Device* This,
    UINT ContextFlags,
    ID3D11DeviceContext **ppDeferredContext);
void __RPC_STUB ID3D11Device_CreateDeferredContext_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_OpenSharedResource_Proxy(
    ID3D11Device* This,
    HANDLE hResource,
    REFIID ReturnedInterface,
    void **ppResource);
void __RPC_STUB ID3D11Device_OpenSharedResource_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CheckFormatSupport_Proxy(
    ID3D11Device* This,
    DXGI_FORMAT Format,
    UINT *pFormatSupport);
void __RPC_STUB ID3D11Device_CheckFormatSupport_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CheckMultisampleQualityLevels_Proxy(
    ID3D11Device* This,
    DXGI_FORMAT Format,
    UINT SampleCount,
    UINT *pNumQualityLevels);
void __RPC_STUB ID3D11Device_CheckMultisampleQualityLevels_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11Device_CheckCounterInfo_Proxy(
    ID3D11Device* This,
    D3D11_COUNTER_INFO *pCounterInfo);
void __RPC_STUB ID3D11Device_CheckCounterInfo_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CheckCounter_Proxy(
    ID3D11Device* This,
    const D3D11_COUNTER_DESC *pDesc,
    D3D11_COUNTER_TYPE *pType,
    UINT *pActiveCounters,
    LPSTR szName,
    UINT *pNameLength,
    LPSTR szUnits,
    UINT *pUnitsLength,
    LPSTR szDescription,
    UINT *pDescriptionLength);
void __RPC_STUB ID3D11Device_CheckCounter_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_CheckFeatureSupport_Proxy(
    ID3D11Device* This,
    D3D11_FEATURE Feature,
    void *pFeatureSupportData,
    UINT FeatureSupportDataSize);
void __RPC_STUB ID3D11Device_CheckFeatureSupport_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_GetPrivateData_Proxy(
    ID3D11Device* This,
    REFGUID guid,
    UINT *pDataSize,
    void *pData);
void __RPC_STUB ID3D11Device_GetPrivateData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_SetPrivateData_Proxy(
    ID3D11Device* This,
    REFGUID guid,
    UINT DataSize,
    const void *pData);
void __RPC_STUB ID3D11Device_SetPrivateData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_SetPrivateDataInterface_Proxy(
    ID3D11Device* This,
    REFGUID guid,
    const IUnknown *pData);
void __RPC_STUB ID3D11Device_SetPrivateDataInterface_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
D3D_FEATURE_LEVEL STDMETHODCALLTYPE ID3D11Device_GetFeatureLevel_Proxy(
    ID3D11Device* This);
void __RPC_STUB ID3D11Device_GetFeatureLevel_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
UINT STDMETHODCALLTYPE ID3D11Device_GetCreationFlags_Proxy(
    ID3D11Device* This);
void __RPC_STUB ID3D11Device_GetCreationFlags_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_GetDeviceRemovedReason_Proxy(
    ID3D11Device* This);
void __RPC_STUB ID3D11Device_GetDeviceRemovedReason_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE ID3D11Device_GetImmediateContext_Proxy(
    ID3D11Device* This,
    ID3D11DeviceContext **ppImmediateContext);
void __RPC_STUB ID3D11Device_GetImmediateContext_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ID3D11Device_SetExceptionMode_Proxy(
    ID3D11Device* This,
    UINT RaiseFlags);
void __RPC_STUB ID3D11Device_SetExceptionMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
UINT STDMETHODCALLTYPE ID3D11Device_GetExceptionMode_Proxy(
    ID3D11Device* This);
void __RPC_STUB ID3D11Device_GetExceptionMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ID3D11Device_INTERFACE_DEFINED__ */

typedef enum D3D11_CREATE_DEVICE_FLAG {
    D3D11_CREATE_DEVICE_SINGLETHREADED = 0x1,
    D3D11_CREATE_DEVICE_DEBUG = 0x2,
    D3D11_CREATE_DEVICE_SWITCH_TO_REF = 0x4,
    D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS = 0x8,
    D3D11_CREATE_DEVICE_BGRA_SUPPORT = 0x20,
    D3D11_CREATE_DEVICE_DEBUGGABLE = 0x40,
    D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY = 0x80,
    D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT = 0x100,
    D3D11_CREATE_DEVICE_VIDEO_SUPPORT = 0x800
} D3D11_CREATE_DEVICE_FLAG;
typedef enum D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT {
    D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT = 0x00000001,
    D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT = 0x00000002,
} D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT;

#define D3D11_SDK_VERSION (7)

#include <d3d10_1.h>
#ifndef D3D11_IGNORE_SDK_LAYERS
# include <d3d11sdklayers.h>
#endif
#include <d3d10misc.h>
#include <d3d10shader.h>
#include <d3d10effect.h>
#include <d3d10_1shader.h>
#define _FACD3D11 (0x87c)

#define MAKE_D3D11_HRESULT(code) MAKE_HRESULT(SEVERITY_ERROR, _FACD3D11, code)
typedef HRESULT (WINAPI* PFN_D3D11_CREATE_DEVICE)(IDXGIAdapter*,D3D_DRIVER_TYPE,HMODULE,UINT,
    const D3D_FEATURE_LEVEL*,UINT,UINT,ID3D11Device**,D3D_FEATURE_LEVEL*,ID3D11DeviceContext**);
HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter*,D3D_DRIVER_TYPE,HMODULE,UINT,const D3D_FEATURE_LEVEL*,
    UINT,UINT,ID3D11Device**,D3D_FEATURE_LEVEL*,ID3D11DeviceContext**);
typedef HRESULT (WINAPI *PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN)(IDXGIAdapter*,D3D_DRIVER_TYPE,HMODULE,UINT,
    const D3D_FEATURE_LEVEL*,UINT,UINT,const DXGI_SWAP_CHAIN_DESC*,IDXGISwapChain**,ID3D11Device**,
    D3D_FEATURE_LEVEL*,ID3D11DeviceContext**);
HRESULT __stdcall  D3D11CreateDeviceAndSwapChain(IDXGIAdapter *adapter,D3D_DRIVER_TYPE driver_type,HMODULE swrast,UINT flags,const D3D_FEATURE_LEVEL *feature_levels,UINT levels,UINT sdk_version,const DXGI_SWAP_CHAIN_DESC *swapchain_desc,IDXGISwapChain **swapchain,ID3D11Device **device,D3D_FEATURE_LEVEL *obtained_feature_level,ID3D11DeviceContext **immediate_context);

/* Begin additional prototypes for all interfaces */


/* End additional prototypes */

#ifdef __cplusplus
}
#endif

#endif /* __d3d11_h__ */
Michael Niedermayer Nov. 7, 2017, 12:40 a.m. UTC | #3
On Mon, Nov 06, 2017 at 11:28:38PM +0000, Mironov, Mikhail wrote:
> > -----Original Message-----
> > From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf
> > Of Michael Niedermayer
> > Sent: November 6, 2017 5:47 PM
> > To: FFmpeg development discussions and patches <ffmpeg-
> > devel@ffmpeg.org>
> > Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD
> > GPUs based on AMF SDK
> > 
> > On Sat, Nov 04, 2017 at 10:49:44PM -0500, Mikhail Mironov wrote:
> > > From fc6a3f63eb9c3734f4101cee2a2f5707e063ab62 Mon Sep 17 00:00:00
> > 2001
> > > From: mmironov <mikhail.mironov@amd.com>
> > > Date: Fri, 27 Oct 2017 13:03:15 -0400
> > > Subject: [PATCH] Added: HW accelerated H.264 and HEVC encoding for
> > AMD
> > > GPUs  based on AMF SDK
> > >
> > > Signed-off-by: mmironov <mikhail.mironov@amd.com>
> > > ---
> > >  Changelog                |    3 +-
> > >  compat/amd/amfsdkenc.h   | 1753
> > ++++++++++++++++++++++++++++++++++++++++++++++
> > >  configure                |   25 +
> > >  libavcodec/Makefile      |    4 +
> > >  libavcodec/allcodecs.c   |    2 +
> > >  libavcodec/amfenc.c      |  515 ++++++++++++++
> > >  libavcodec/amfenc.h      |  137 ++++
> > >  libavcodec/amfenc_h264.c |  366 ++++++++++  libavcodec/amfenc_hevc.c
> > > |  294 ++++++++
> > >  libavcodec/version.h     |    4 +-
> > >  10 files changed, 3100 insertions(+), 3 deletions(-)  create mode
> > > 100644 compat/amd/amfsdkenc.h  create mode 100644
> > libavcodec/amfenc.c
> > > create mode 100644 libavcodec/amfenc.h  create mode 100644
> > > libavcodec/amfenc_h264.c  create mode 100644 libavcodec/amfenc_hevc.c
> > 
> > This seems to fail building in mingw64
> 
> This is strange. Just in case: my build setup is described here:
> https://github.com/Xaymar/ffmpeg-amf/blob/master/Build.txt
> 
> I also attached full amfsdkenc.h header file in case I made a mistake with git integration.
> 
> 
> > 
> > make
> > CC      libavcodec/amfenc.o
> > In file included from src/libavcodec/amfenc.c:22:0:
> > src/libavutil/hwcontext_d3d11va.h:71:5: error: unknown type name
> > ‘ID3D11VideoDevice’
> >      ID3D11VideoDevice   *video_device;
> >      ^
> > src/libavutil/hwcontext_d3d11va.h:79:5: error: unknown type name
> > ‘ID3D11VideoContext’
> >      ID3D11VideoContext  *video_context;
> >      ^
> 
> This is declared in d3d11.h and came with mingw64. Mine version has it:
> msys64new\mingw64\x86_64-w64-mingw32\include\d3d11.h  - attached.
> Is it possible that we use different versions of mingw? Do you have it declared?

theres no match for ID3D11VideoContext in my d3d11.h

my mingw stuff should be just the official packages from
ubuntu LTS 14.04

[...]
mmironov Nov. 7, 2017, 1:36 a.m. UTC | #4
> theres no match for ID3D11VideoContext in my d3d11.h

> my mingw stuff should be just the official packages from
> ubuntu LTS 14.04

Then how would you compile hwcontext_d3d11va.h where ID3D11DeviceContext and ID3D11VideoDevice  are used?

Thanks,
Mikhail
Michael Niedermayer Nov. 7, 2017, 2:57 a.m. UTC | #5
On Tue, Nov 07, 2017 at 01:36:57AM +0000, Mironov, Mikhail wrote:
> 
> 
> > theres no match for ID3D11VideoContext in my d3d11.h
> 
> > my mingw stuff should be just the official packages from
> > ubuntu LTS 14.04
> 
> Then how would you compile hwcontext_d3d11va.h where ID3D11DeviceContext and ID3D11VideoDevice  are used?

config.h lists:
#define CONFIG_D3D11VA 0

so this would not get compiled as its disabled


> 
> Thanks,
> Mikhail
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Hendrik Leppkes Nov. 7, 2017, 8:25 a.m. UTC | #6
On Tue, Nov 7, 2017 at 12:28 AM, Mironov, Mikhail
<Mikhail.Mironov@amd.com> wrote:
>> -----Original Message-----
>> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf
>> Of Michael Niedermayer
>> Sent: November 6, 2017 5:47 PM
>> To: FFmpeg development discussions and patches <ffmpeg-
>> devel@ffmpeg.org>
>> Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD
>> GPUs based on AMF SDK
>>
>> On Sat, Nov 04, 2017 at 10:49:44PM -0500, Mikhail Mironov wrote:
>> > From fc6a3f63eb9c3734f4101cee2a2f5707e063ab62 Mon Sep 17 00:00:00
>> 2001
>> > From: mmironov <mikhail.mironov@amd.com>
>> > Date: Fri, 27 Oct 2017 13:03:15 -0400
>> > Subject: [PATCH] Added: HW accelerated H.264 and HEVC encoding for
>> AMD
>> > GPUs  based on AMF SDK
>> >
>> > Signed-off-by: mmironov <mikhail.mironov@amd.com>
>> > ---
>> >  Changelog                |    3 +-
>> >  compat/amd/amfsdkenc.h   | 1753
>> ++++++++++++++++++++++++++++++++++++++++++++++
>> >  configure                |   25 +
>> >  libavcodec/Makefile      |    4 +
>> >  libavcodec/allcodecs.c   |    2 +
>> >  libavcodec/amfenc.c      |  515 ++++++++++++++
>> >  libavcodec/amfenc.h      |  137 ++++
>> >  libavcodec/amfenc_h264.c |  366 ++++++++++  libavcodec/amfenc_hevc.c
>> > |  294 ++++++++
>> >  libavcodec/version.h     |    4 +-
>> >  10 files changed, 3100 insertions(+), 3 deletions(-)  create mode
>> > 100644 compat/amd/amfsdkenc.h  create mode 100644
>> libavcodec/amfenc.c
>> > create mode 100644 libavcodec/amfenc.h  create mode 100644
>> > libavcodec/amfenc_h264.c  create mode 100644 libavcodec/amfenc_hevc.c
>>
>> This seems to fail building in mingw64
>
> This is strange. Just in case: my build setup is described here:
> https://github.com/Xaymar/ffmpeg-amf/blob/master/Build.txt
>
> I also attached full amfsdkenc.h header file in case I made a mistake with git integration.
>
>
>>
>> make
>> CC      libavcodec/amfenc.o
>> In file included from src/libavcodec/amfenc.c:22:0:
>> src/libavutil/hwcontext_d3d11va.h:71:5: error: unknown type name
>> ‘ID3D11VideoDevice’
>>      ID3D11VideoDevice   *video_device;
>>      ^
>> src/libavutil/hwcontext_d3d11va.h:79:5: error: unknown type name
>> ‘ID3D11VideoContext’
>>      ID3D11VideoContext  *video_context;
>>      ^
>
> This is declared in d3d11.h and came with mingw64. Mine version has it:
> msys64new\mingw64\x86_64-w64-mingw32\include\d3d11.h  - attached.
> Is it possible that we use different versions of mingw? Do you have it declared?
>

If you use/rely on hwcontext_d3d11va, you should probably have a
configure dependency on that part being available.

- Hendrik
mmironov Nov. 7, 2017, 2:50 p.m. UTC | #7
> -----Original Message-----

> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf

> Of Hendrik Leppkes

> Sent: November 7, 2017 3:25 AM

> To: FFmpeg development discussions and patches <ffmpeg-

> devel@ffmpeg.org>

> Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD

> GPUs based on AMF SDK

> 

> On Tue, Nov 7, 2017 at 12:28 AM, Mironov, Mikhail

> <Mikhail.Mironov@amd.com> wrote:

> >> -----Original Message-----

> >> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On

> Behalf

> >> Of Michael Niedermayer

> >> Sent: November 6, 2017 5:47 PM

> >> To: FFmpeg development discussions and patches <ffmpeg-

> >> devel@ffmpeg.org>

> >> Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for

> AMD

> >> GPUs based on AMF SDK

> >>

> >> On Sat, Nov 04, 2017 at 10:49:44PM -0500, Mikhail Mironov wrote:

> >> > From fc6a3f63eb9c3734f4101cee2a2f5707e063ab62 Mon Sep 17

> 00:00:00

> >> 2001

> >> > From: mmironov <mikhail.mironov@amd.com>

> >> > Date: Fri, 27 Oct 2017 13:03:15 -0400

> >> > Subject: [PATCH] Added: HW accelerated H.264 and HEVC encoding for

> >> AMD

> >> > GPUs  based on AMF SDK

> >> >

> >> > Signed-off-by: mmironov <mikhail.mironov@amd.com>

> >> > ---

> >> >  Changelog                |    3 +-

> >> >  compat/amd/amfsdkenc.h   | 1753

> >> ++++++++++++++++++++++++++++++++++++++++++++++

> >> >  configure                |   25 +

> >> >  libavcodec/Makefile      |    4 +

> >> >  libavcodec/allcodecs.c   |    2 +

> >> >  libavcodec/amfenc.c      |  515 ++++++++++++++

> >> >  libavcodec/amfenc.h      |  137 ++++

> >> >  libavcodec/amfenc_h264.c |  366 ++++++++++

> >> > libavcodec/amfenc_hevc.c

> >> > |  294 ++++++++

> >> >  libavcodec/version.h     |    4 +-

> >> >  10 files changed, 3100 insertions(+), 3 deletions(-)  create mode

> >> > 100644 compat/amd/amfsdkenc.h  create mode 100644

> >> libavcodec/amfenc.c

> >> > create mode 100644 libavcodec/amfenc.h  create mode 100644

> >> > libavcodec/amfenc_h264.c  create mode 100644

> >> > libavcodec/amfenc_hevc.c

> >>

> >> This seems to fail building in mingw64

> >

> > This is strange. Just in case: my build setup is described here:

> > https://github.com/Xaymar/ffmpeg-amf/blob/master/Build.txt

> >

> > I also attached full amfsdkenc.h header file in case I made a mistake with

> git integration.

> >

> >

> >>

> >> make

> >> CC      libavcodec/amfenc.o

> >> In file included from src/libavcodec/amfenc.c:22:0:

> >> src/libavutil/hwcontext_d3d11va.h:71:5: error: unknown type name

> >> ‘ID3D11VideoDevice’

> >>      ID3D11VideoDevice   *video_device;

> >>      ^

> >> src/libavutil/hwcontext_d3d11va.h:79:5: error: unknown type name

> >> ‘ID3D11VideoContext’

> >>      ID3D11VideoContext  *video_context;

> >>      ^

> >

> > This is declared in d3d11.h and came with mingw64. Mine version has it:

> > msys64new\mingw64\x86_64-w64-mingw32\include\d3d11.h  - attached.

> > Is it possible that we use different versions of mingw? Do you have it

> declared?

> >

> 

> If you use/rely on hwcontext_d3d11va, you should probably have a

> configure dependency on that part being available.


OK, use of hwcontext_d3d11va  is optional, I will put the dependent parts of the code under #ifdef

> 

> - Hendrik

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Thanks,
Mikhail
Mark Thompson Nov. 8, 2017, 3:15 p.m. UTC | #8
On 06/11/17 22:46, Michael Niedermayer wrote:
> ...
> In file included from src/libavcodec/amfenc.h:24:0,
>                  from src/libavcodec/amfenc.c:27:
> src/compat/amd/amfsdkenc.h:191:23: error: no previous prototype for ‘AMFConstructRect’ [-Werror=missing-prototypes]
>  AMF_INLINE struct AMFRect AMFConstructRect(amf_int32 left, amf_int32 top, amf_int32 right, amf_int32 bottom)
>                        ^
> src/compat/amd/amfsdkenc.h:203:23: error: no previous prototype for ‘AMFConstructSize’ [-Werror=missing-prototypes]
>  AMF_INLINE struct AMFSize AMFConstructSize(amf_int32 width, amf_int32 height)
>                        ^
> src/compat/amd/amfsdkenc.h:215:24: error: no previous prototype for ‘AMFConstructPoint’ [-Werror=missing-prototypes]
>  AMF_INLINE struct AMFPoint AMFConstructPoint(amf_int32 x, amf_int32 y)
>                         ^
> src/compat/amd/amfsdkenc.h:227:23: error: no previous prototype for ‘AMFConstructRate’ [-Werror=missing-prototypes]
>  AMF_INLINE struct AMFRate AMFConstructRate(amf_uint32 num, amf_uint32 den)
>                        ^
> src/compat/amd/amfsdkenc.h:239:24: error: no previous prototype for ‘AMFConstructRatio’ [-Werror=missing-prototypes]
>  AMF_INLINE struct AMFRatio AMFConstructRatio(amf_uint32 num, amf_uint32 den)
>                         ^
> In file included from src/libavcodec/amfenc.h:24:0,
>                  from src/libavcodec/amfenc.c:27:
> src/compat/amd/amfsdkenc.h:275:24: error: no previous prototype for ‘AMFConstructColor’ [-Werror=missing-prototypes]
>  AMF_INLINE struct AMFColor AMFConstructColor(amf_uint8 r, amf_uint8 g, amf_uint8 b, amf_uint8 a)
>                         ^
> In file included from src/libavcodec/amfenc.h:24:0,
>                  from src/libavcodec/amfenc.c:27:
> src/compat/amd/amfsdkenc.h:293:45: error: no previous prototype for ‘amf_variant_alloc’ [-Werror=missing-prototypes]
>      AMF_INLINE void* AMF_CDECL_CALL amf_variant_alloc(amf_size count)
>                                              ^
> src/compat/amd/amfsdkenc.h:297:44: error: no previous prototype for ‘amf_variant_free’ [-Werror=missing-prototypes]
>      AMF_INLINE void AMF_CDECL_CALL amf_variant_free(void* ptr)
>                                             ^
> cc1: some warnings being treated as errors
> make: *** [libavcodec/amfenc.o] Error 1

This is showing an error in the AMF C API.

AMF_INLINE is defined at <https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/amf/public/include/core/Platform.h#L99> as just "__inline__" (i.e. "inline"), so these functions are all inline without a storage class specifier.  But, no external definition actually exists anywhere, so if the compiler doesn't inline all instances you will fail to link.

(The behaviour is not the same in C++, where external versions are generated anyway in this case and then the multiple instances collapsed together later by invoking the ODR.)

Trivial test case (gcc defaults to not inlining anything when no optimisation options are given):

$ cat amf-inline.c
#include "Platform.h"

int main(void)
{
    AMFSize size;
    size = AMFConstructSize(123, 456);
    return 0;
}
$ gcc -std=c99 amf-inline.c
In file included from amf-inline.c:1:0:
Platform.h: In function ‘AMFCompareGUIDs’:
Platform.h:421:16: warning: implicit declaration of function ‘memcmp’ [-Wimplicit-function-declaration]
         return memcmp(&guid1, &guid2, sizeof(guid1)) == 0;
                ^
/tmp/ccMCUBTW.o: In function `main':
amf-inline.c:(.text+0x13): undefined reference to `AMFConstructSize'
collect2: error: ld returned 1 exit status
$ gcc -c -std=c99 amf-inline.c
In file included from amf-inline.c:1:0:
Platform.h: In function ‘AMFCompareGUIDs’:
Platform.h:421:16: warning: implicit declaration of function ‘memcmp’ [-Wimplicit-function-declaration]
         return memcmp(&guid1, &guid2, sizeof(guid1)) == 0;
                ^
$ nm amf-inline.o 
                 U AMFConstructSize
0000000000000000 T main
$ gcc -O1 -std=c99 amf-inline.c
In file included from amf-inline.c:1:0:
Platform.h: In function ‘AMFCompareGUIDs’:
Platform.h:421:16: warning: implicit declaration of function ‘memcmp’ [-Wimplicit-function-declaration]
         return memcmp(&guid1, &guid2, sizeof(guid1)) == 0;
                ^
$ 

I think AMF_INLINE should for these functions instead be "static inline" (though I didn't look at all uses, so there may be others where this isn't true).

- Mark
mmironov Nov. 8, 2017, 6:23 p.m. UTC | #9
> -----Original Message-----

> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf

> Of Mark Thompson

> Sent: November 8, 2017 10:15 AM

> To: ffmpeg-devel@ffmpeg.org

> Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD

> GPUs based on AMF SDK

> 

> On 06/11/17 22:46, Michael Niedermayer wrote:

> > ...

> > In file included from src/libavcodec/amfenc.h:24:0,

> >                  from src/libavcodec/amfenc.c:27:

> > src/compat/amd/amfsdkenc.h:191:23: error: no previous prototype for

> > ‘AMFConstructRect’ [-Werror=missing-prototypes]  AMF_INLINE struct

> AMFRect AMFConstructRect(amf_int32 left, amf_int32 top, amf_int32 right,

> amf_int32 bottom)

> >                        ^

> > src/compat/amd/amfsdkenc.h:203:23: error: no previous prototype for

> > ‘AMFConstructSize’ [-Werror=missing-prototypes]  AMF_INLINE struct

> AMFSize AMFConstructSize(amf_int32 width, amf_int32 height)

> >                        ^

> > src/compat/amd/amfsdkenc.h:215:24: error: no previous prototype for

> > ‘AMFConstructPoint’ [-Werror=missing-prototypes]  AMF_INLINE struct

> AMFPoint AMFConstructPoint(amf_int32 x, amf_int32 y)

> >                         ^

> > src/compat/amd/amfsdkenc.h:227:23: error: no previous prototype for

> > ‘AMFConstructRate’ [-Werror=missing-prototypes]  AMF_INLINE struct

> AMFRate AMFConstructRate(amf_uint32 num, amf_uint32 den)

> >                        ^

> > src/compat/amd/amfsdkenc.h:239:24: error: no previous prototype for

> > ‘AMFConstructRatio’ [-Werror=missing-prototypes]  AMF_INLINE struct

> AMFRatio AMFConstructRatio(amf_uint32 num, amf_uint32 den)

> >                         ^

> > In file included from src/libavcodec/amfenc.h:24:0,

> >                  from src/libavcodec/amfenc.c:27:

> > src/compat/amd/amfsdkenc.h:275:24: error: no previous prototype for

> > ‘AMFConstructColor’ [-Werror=missing-prototypes]  AMF_INLINE struct

> AMFColor AMFConstructColor(amf_uint8 r, amf_uint8 g, amf_uint8 b,

> amf_uint8 a)

> >                         ^

> > In file included from src/libavcodec/amfenc.h:24:0,

> >                  from src/libavcodec/amfenc.c:27:

> > src/compat/amd/amfsdkenc.h:293:45: error: no previous prototype for

> ‘amf_variant_alloc’ [-Werror=missing-prototypes]

> >      AMF_INLINE void* AMF_CDECL_CALL amf_variant_alloc(amf_size count)

> >                                              ^

> > src/compat/amd/amfsdkenc.h:297:44: error: no previous prototype for

> ‘amf_variant_free’ [-Werror=missing-prototypes]

> >      AMF_INLINE void AMF_CDECL_CALL amf_variant_free(void* ptr)

> >                                             ^

> > cc1: some warnings being treated as errors

> > make: *** [libavcodec/amfenc.o] Error 1

> 

> This is showing an error in the AMF C API.

> 

> AMF_INLINE is defined at <https://github.com/GPUOpen-

> LibrariesAndSDKs/AMF/blob/master/amf/public/include/core/Platform.h#L9

> 9> as just "__inline__" (i.e. "inline"), so these functions are all inline without

> a storage class specifier.  But, no external definition actually exists anywhere,

> so if the compiler doesn't inline all instances you will fail to link.

> 

> (The behaviour is not the same in C++, where external versions are

> generated anyway in this case and then the multiple instances collapsed

> together later by invoking the ODR.)

> 

> Trivial test case (gcc defaults to not inlining anything when no optimisation

> options are given):

> 

> $ cat amf-inline.c

> #include "Platform.h"

> 

> int main(void)

> {

>     AMFSize size;

>     size = AMFConstructSize(123, 456);

>     return 0;

> }

> $ gcc -std=c99 amf-inline.c

> In file included from amf-inline.c:1:0:

> Platform.h: In function ‘AMFCompareGUIDs’:

> Platform.h:421:16: warning: implicit declaration of function ‘memcmp’ [-

> Wimplicit-function-declaration]

>          return memcmp(&guid1, &guid2, sizeof(guid1)) == 0;

>                 ^

> /tmp/ccMCUBTW.o: In function `main':

> amf-inline.c:(.text+0x13): undefined reference to `AMFConstructSize'

> collect2: error: ld returned 1 exit status $ gcc -c -std=c99 amf-inline.c In file

> included from amf-inline.c:1:0:

> Platform.h: In function ‘AMFCompareGUIDs’:

> Platform.h:421:16: warning: implicit declaration of function ‘memcmp’ [-

> Wimplicit-function-declaration]

>          return memcmp(&guid1, &guid2, sizeof(guid1)) == 0;

>                 ^

> $ nm amf-inline.o

>                  U AMFConstructSize

> 0000000000000000 T main

> $ gcc -O1 -std=c99 amf-inline.c

> In file included from amf-inline.c:1:0:

> Platform.h: In function ‘AMFCompareGUIDs’:

> Platform.h:421:16: warning: implicit declaration of function ‘memcmp’ [-

> Wimplicit-function-declaration]

>          return memcmp(&guid1, &guid2, sizeof(guid1)) == 0;

>                 ^

> $

> 

> I think AMF_INLINE should for these functions instead be "static inline"

> (though I didn't look at all uses, so there may be others where this isn't true).



Yes, this is the issue. I found that in most of the functions "static" was added 
but not to these few. And my debug script build had a different issue so I didn’t catch it.
I've added "static". Please use amfenc.h header from the next patch. GitHub AMF headers 
will be updated together with other changes.

> 

> - Mark

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Thanks,
Mikhail
Mark Thompson Nov. 12, 2017, 6:21 p.m. UTC | #10
On 05/11/17 03:49, Mikhail Mironov wrote:
> From fc6a3f63eb9c3734f4101cee2a2f5707e063ab62 Mon Sep 17 00:00:00 2001
> From: mmironov <mikhail.mironov@amd.com>
> Date: Fri, 27 Oct 2017 13:03:15 -0400
> Subject: [PATCH] Added: HW accelerated H.264 and HEVC encoding for AMD GPUs
>  based on AMF SDK
> 
> Signed-off-by: mmironov <mikhail.mironov@amd.com>
> ---
>  Changelog                |    3 +-
>  compat/amd/amfsdkenc.h   | 1753 ++++++++++++++++++++++++++++++++++++++++++++++
>  configure                |   25 +
>  libavcodec/Makefile      |    4 +
>  libavcodec/allcodecs.c   |    2 +
>  libavcodec/amfenc.c      |  515 ++++++++++++++
>  libavcodec/amfenc.h      |  137 ++++
>  libavcodec/amfenc_h264.c |  366 ++++++++++
>  libavcodec/amfenc_hevc.c |  294 ++++++++
>  libavcodec/version.h     |    4 +-
>  10 files changed, 3100 insertions(+), 3 deletions(-)
>  create mode 100644 compat/amd/amfsdkenc.h
>  create mode 100644 libavcodec/amfenc.c
>  create mode 100644 libavcodec/amfenc.h
>  create mode 100644 libavcodec/amfenc_h264.c
>  create mode 100644 libavcodec/amfenc_hevc.c
> 
> ...
> diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c
> new file mode 100644
> index 0000000..fcfbd20
> --- /dev/null
> +++ b/libavcodec/amfenc.c
> ...
> +
> +static int amf_init_context(AVCodecContext *avctx)
> +{
> +    AmfContext         *ctx = avctx->priv_data;
> +    AMF_RESULT          res = AMF_OK;
> +
> +    // confugure AMF logger
> +    // the return of these functions indicates old state and do not affect behaviour
> +    ctx->trace->pVtbl->EnableWriter(ctx->trace, AMF_TRACE_WRITER_DEBUG_OUTPUT, ctx->log_to_dbg != 0 );
> +    if (ctx->log_to_dbg)
> +        ctx->trace->pVtbl->SetWriterLevel(ctx->trace, AMF_TRACE_WRITER_DEBUG_OUTPUT, AMF_TRACE_TRACE);
> +    ctx->trace->pVtbl->EnableWriter(ctx->trace, AMF_TRACE_WRITER_CONSOLE, 0);
> +    ctx->trace->pVtbl->SetGlobalLevel(ctx->trace, AMF_TRACE_TRACE);
> +
> +    // connect AMF logger to av_log
> +    ctx->tracer.vtbl = &tracer_vtbl;
> +    ctx->tracer.avctx = avctx;
> +    ctx->trace->pVtbl->RegisterWriter(ctx->trace, FFMPEG_AMF_WRITER_ID,(AMFTraceWriter*)&ctx->tracer, 1);
> +    ctx->trace->pVtbl->SetWriterLevel(ctx->trace, FFMPEG_AMF_WRITER_ID, AMF_TRACE_TRACE);
> +
> +    res = ctx->factory->pVtbl->CreateContext(ctx->factory, &ctx->context);
> +    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_UNKNOWN, "CreateContext() failed with error %d\n", res);
> +    // try to reuse existing DX device
> +    if (avctx->hw_frames_ctx) {
> +        AVHWFramesContext *device_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data;
> +        if (device_ctx->device_ctx->type == AV_HWDEVICE_TYPE_D3D11VA){
> +            if (amf_av_to_amf_format(device_ctx->sw_format) == AMF_SURFACE_UNKNOWN) {

This test is inverted.

Have you actually tested this path?  Even with that test fixed, I'm unable to pass the following initialisation test with an AMD D3D11 device.

> +                if (device_ctx->device_ctx->hwctx) {
> +                    AVD3D11VADeviceContext *device_d3d11 = (AVD3D11VADeviceContext *)device_ctx->device_ctx->hwctx;
> +                    res = ctx->context->pVtbl->InitDX11(ctx->context, device_d3d11->device, AMF_DX11_1);
> +                    if (res == AMF_OK) {
> +                        ctx->hw_frames_ctx = av_buffer_ref(avctx->hw_frames_ctx);
> +                    }else {
> +                        av_log(avctx, AV_LOG_INFO, "amf_shared: avctx->hw_frames_ctx has non-AMD device, switching to default\n");
> +                    }
> +                }
> +            }else {
> +                av_log(avctx, AV_LOG_INFO, "amf_shared: avctx->hw_frames_ctx has format not uspported by AMF, switching to default\n");
> +            }
> +        }
> +    } else if (avctx->hw_device_ctx) {
> +        AVHWDeviceContext *device_ctx = (AVHWDeviceContext*)(avctx->hw_device_ctx->data);
> +        if (device_ctx->type == AV_HWDEVICE_TYPE_D3D11VA) {
> +            if (device_ctx->hwctx) {
> +                AVD3D11VADeviceContext *device_d3d11 = (AVD3D11VADeviceContext *)device_ctx->hwctx;
> +                res = ctx->context->pVtbl->InitDX11(ctx->context, device_d3d11->device, AMF_DX11_1);
> +                if (res == AMF_OK) {
> +                    ctx->hw_device_ctx = av_buffer_ref(avctx->hw_device_ctx);
> +                } else {
> +                    av_log(avctx, AV_LOG_INFO, "amf_shared: avctx->hw_device_ctx has non-AMD device, switching to default\n");
> +                }
> +            }
> +        }
> +    }
> +    if (!ctx->hw_frames_ctx && !ctx->hw_device_ctx) {
> +        res = ctx->context->pVtbl->InitDX11(ctx->context, NULL, AMF_DX11_1);
> +        if (res != AMF_OK) {
> +            res = ctx->context->pVtbl->InitDX9(ctx->context, NULL);
> +            AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_UNKNOWN, "InitDX9() failed with error %d\n", res);
> +        }
> +    }
> +    return 0;
> +}
> +
> +static int amf_init_encoder(AVCodecContext *avctx)
> +{
> +    AmfContext          *ctx = avctx->priv_data;
> +    const wchar_t       *codec_id = NULL;
> +    AMF_RESULT           res = AMF_OK;
> +
> +    switch (avctx->codec->id) {
> +        case AV_CODEC_ID_H264:
> +            codec_id = AMFVideoEncoderVCE_AVC;
> +            break;
> +        case AV_CODEC_ID_HEVC:
> +            codec_id = AMFVideoEncoder_HEVC;
> +            break;
> +        default:
> +            break;
> +    }
> +    AMF_RETURN_IF_FALSE(ctx, codec_id != NULL, AVERROR(EINVAL), "Codec %d is not supported\n", avctx->codec->id);
> +
> +    ctx->format = amf_av_to_amf_format(avctx->pix_fmt);
> +    AMF_RETURN_IF_FALSE(ctx, ctx->format != AMF_SURFACE_UNKNOWN, AVERROR(EINVAL), "Format %d is not supported\n", avctx->pix_fmt);
> +
> +    res = ctx->factory->pVtbl->CreateComponent(ctx->factory, ctx->context, codec_id, &ctx->encoder);
> +    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_ENCODER_NOT_FOUND, "CreateComponent(%ls) failed with error %d\n", codec_id, res);
> +
> +    return 0;
> +}
> +
> +int av_cold ff_amf_encode_close(AVCodecContext *avctx)
> +{
> +    AmfContext      *ctx = avctx->priv_data;
> +    if (ctx->delayed_surface)
> +    {
> +        ctx->delayed_surface->pVtbl->Release(ctx->delayed_surface);
> +        ctx->delayed_surface = NULL;
> +    }
> +
> +    if (ctx->encoder) {
> +        ctx->encoder->pVtbl->Terminate(ctx->encoder);
> +        ctx->encoder->pVtbl->Release(ctx->encoder);
> +        ctx->encoder = NULL;
> +    }
> +
> +    if (ctx->context) {
> +        ctx->context->pVtbl->Terminate(ctx->context);
> +        ctx->context->pVtbl->Release(ctx->context);
> +        ctx->context = NULL;
> +    }
> +    av_buffer_unref(&ctx->hw_device_ctx);
> +    av_buffer_unref(&ctx->hw_frames_ctx);
> +
> +    if (ctx->trace) {
> +        ctx->trace->pVtbl->UnregisterWriter(ctx->trace, FFMPEG_AMF_WRITER_ID);
> +    }
> +    if (ctx->library) {
> +        dlclose(ctx->library);
> +        ctx->library = NULL;
> +    }
> +    ctx->trace = NULL;
> +    ctx->debug = NULL;
> +    ctx->factory = NULL;
> +    ctx->version = 0;
> +    ctx->delayed_drain = 0;
> +    av_frame_free(&ctx->delayed_frame);
> +
> +    return 0;
> +}
> +
> +static int amf_copy_surface(AVCodecContext *avctx, const AVFrame *frame,
> +    AMFSurface* surface)
> +{
> +    AVFrame        *sw_frame = NULL;
> +    AMFPlane       *plane = NULL;
> +    uint8_t        *dst_data[4];
> +    int             dst_linesize[4];
> +    int             ret = 0;
> +    int             planes;
> +
> +    if (frame->hw_frames_ctx && is_hwaccel_pix_fmt(frame->format)) {
> +        if (!(sw_frame = av_frame_alloc())) {
> +            av_log(avctx, AV_LOG_ERROR, "Can not alloc frame\n");
> +            ret = AVERROR(ENOMEM);
> +            goto fail;
> +        }
> +        if ((ret = av_hwframe_transfer_data(sw_frame, frame, 0)) < 0) {
> +            av_log(avctx, AV_LOG_ERROR, "Error transferring the data to system memory\n");
> +            ret = AVERROR(EINVAL);
> +            goto fail;
> +        }
> +        frame = sw_frame;
> +    }
> +    planes = (int)surface->pVtbl->GetPlanesCount(surface);
> +    if (planes > amf_countof(dst_data)) {
> +        av_log(avctx, AV_LOG_ERROR, "Invalid number of planes %d in surface\n", planes);
> +        ret = AVERROR(EINVAL);
> +        goto fail;
> +    }
> +
> +    for (int i = 0; i < planes; i++) {
> +        plane = surface->pVtbl->GetPlaneAt(surface, i);
> +        dst_data[i] = plane->pVtbl->GetNative(plane);
> +        dst_linesize[i] = plane->pVtbl->GetHPitch(plane);
> +    }
> +    av_image_copy(dst_data, dst_linesize,
> +        (const uint8_t**)frame->data, frame->linesize, frame->format,
> +        avctx->width, avctx->height);
> +
> +fail:
> +    if (sw_frame){
> +        av_frame_free(&sw_frame);
> +    }
> +    return ret;
> +}
> +
> +static int amf_copy_buffer(AVCodecContext *avctx, AVPacket *pkt, AMFBuffer *buffer)
> +{
> +    int                 ret;
> +    AMFVariantStruct    var = {0};
> +    int64_t                 size = buffer->pVtbl->GetSize(buffer);
> +
> +    if (ret = ff_alloc_packet2(avctx, pkt, size, 0) < 0) {
> +        return ret;
> +    }
> +    memcpy(pkt->data, buffer->pVtbl->GetNative(buffer), size);
> +
> +    switch (avctx->codec->id) {
> +        case AV_CODEC_ID_H264:
> +            buffer->pVtbl->GetProperty(buffer, AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE, &var);
> +            if(var.int64Value == AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_IDR) {
> +                pkt->flags = AV_PKT_FLAG_KEY;
> +            }
> +            break;
> +        case AV_CODEC_ID_HEVC:
> +            buffer->pVtbl->GetProperty(buffer, AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE, &var);
> +            if (var.int64Value == AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE_IDR) {
> +                pkt->flags = AV_PKT_FLAG_KEY;
> +            }
> +            break;
> +        default:
> +            break;
> +    }
> +
> +    buffer->pVtbl->GetProperty(buffer, PTS_PROP, &var);
> +
> +    pkt->pts = var.int64Value; // original pts
> +    pkt->dts = buffer->pVtbl->GetPts(buffer); // in monotonic order

This generates invalid dts values.  dts cannot be greater than pts (that is, a frame cannot be decoded after its intended presentation time).

E.g. for the three-frame stream made by "./ffmpeg_g -y -f lavfi -i testsrc -an -c:v h264_amf -bsf:v trace_headers -frames:v 3 -bf 1 out.mp4" we get the three packets:

pts 0     dts 0
pts 1024  dts 512
pts 512   dts 1024

and the mp4 muxer correctly complains "Invalid DTS: 1024 PTS: 512 in output stream 0:0, replacing by guess".

> +
> +    return 0;
> +}
> +
> +// amfenc API implmentation
> +int ff_amf_encode_init(AVCodecContext *avctx)
> +{
> +    AmfContext     *ctx = avctx->priv_data;
> +    int             ret;
> +
> +    ctx->factory = NULL;
> +    ctx->debug = NULL;
> +    ctx->trace = NULL;
> +    ctx->context = NULL;
> +    ctx->encoder = NULL;
> +    ctx->library = NULL;
> +    ctx->version = 0;
> +    ctx->eof = 0;
> +    ctx->format = 0;
> +    ctx->tracer.vtbl = NULL;
> +    ctx->tracer.avctx = NULL;
> +
> +    if ((ret = amf_load_library(avctx)) == 0) {
> +        if ((ret = amf_init_context(avctx)) == 0) {
> +            if ((ret = amf_init_encoder(avctx)) == 0) {
> +                return 0;
> +            }
> +        }
> +    }
> +    ff_amf_encode_close(avctx);
> +    return ret;
> +}
> +
> +
> +int ff_amf_send_frame(AVCodecContext *avctx, const AVFrame *frame)
> +{
> +    AMF_RESULT      res = AMF_OK;
> +    AmfContext     *ctx = avctx->priv_data;
> +    AMFSurface     *surface = NULL;
> +
> +    if (!ctx->encoder)
> +        return AVERROR(EINVAL);
> +
> +    if (!frame) { // submit drain
> +        if (!ctx->eof) { // submit drain one time only
> +            if (ctx->delayed_surface != NULL) {
> +                ctx->delayed_drain = 1; // input queue is full: resubmit Drain() in ff_amf_receive_packet
> +            } else if(!ctx->delayed_drain){
> +                res = ctx->encoder->pVtbl->Drain(ctx->encoder);
> +                if (res == AMF_INPUT_FULL) {
> +                    ctx->delayed_drain = 1; // input queue is full: resubmit Drain() in ff_amf_receive_packet
> +                }else {
> +                    if (res == AMF_OK) {
> +                        ctx->eof = 1; // drain started
> +                    }
> +                    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_UNKNOWN, "Drain() failed with error %d\n", res);
> +                }
> +            }
> +        }else{
> +            return AVERROR_EOF;
> +        }
> +    } else { // submit frame
> +        if (ctx->delayed_surface != NULL) {
> +            return AVERROR(EAGAIN); // should not happen when called from ffmpeg, other clients may resubmit
> +        }
> +        // prepare surface from frame
> +        if (frame->hw_frames_ctx && ( // HW frame detected
> +            // check if the same hw_frames_ctx as used in initialization
> +            (ctx->hw_frames_ctx && frame->hw_frames_ctx->data == ctx->hw_frames_ctx->data) ||
> +            // check if the same hw_device_ctx as used in initialization
> +            (ctx->hw_device_ctx && ((AVHWFramesContext*)frame->hw_frames_ctx->data)->device_ctx ==
> +            (AVHWDeviceContext*)ctx->hw_device_ctx->data)
> +        )) {
> +            GUID             AMFTextureArrayIndexGUID = AMFTextureArrayIndexGUIDDef;
> +            ID3D11Texture2D *texture = (ID3D11Texture2D*)frame->data[0]; // actual texture
> +            int index = (int)(size_t)frame->data[1]; // index is a slice in texture array is - set to tell AMF which slice to use
> +            texture->lpVtbl->SetPrivateData(texture, &AMFTextureArrayIndexGUID, sizeof(index), &index);
> +
> +            res = ctx->context->pVtbl->CreateSurfaceFromDX11Native(ctx->context, texture, &surface, NULL); // wrap to AMF surface
> +            AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR(ENOMEM), "CreateSurfaceFromDX11Native() failed  with error %d\n", res);
> +
> +            // input HW surfaces can be vertically aligned by 16; tell AMF the real size
> +            surface->pVtbl->SetCrop(surface, 0, 0, frame->width, frame->height);
> +        } else {
> +            res = ctx->context->pVtbl->AllocSurface(ctx->context, AMF_MEMORY_HOST, ctx->format, avctx->width, avctx->height, &surface);
> +            AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR(ENOMEM), "AllocSurface() failed  with error %d\n", res);
> +            amf_copy_surface(avctx, frame, surface);
> +        }
> +        surface->pVtbl->SetPts(surface, frame->pts);
> +        AMF_ASSIGN_PROPERTY_INT64(res, surface, PTS_PROP, frame->pts);
> +
> +        // submit surface
> +        res = ctx->encoder->pVtbl->SubmitInput(ctx->encoder, (AMFData*)surface);
> +        if (res == AMF_INPUT_FULL) { // handle full queue
> +            //store surface for later submission
> +            ctx->delayed_surface = surface;
> +            if (surface->pVtbl->GetMemoryType(surface) == AMF_MEMORY_DX11) {
> +                av_frame_ref(ctx->delayed_frame, frame);
> +            }
> +        }
> +        else {
> +            surface->pVtbl->Release(surface);
> +            AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_UNKNOWN, "SubmitInput() failed with error %d\n", res);
> +        }
> +    }
> +    return 0;
> +}
> +int ff_amf_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
> +{
> +    int             ret;
> +    AMF_RESULT      res;
> +    AMF_RESULT      res_query;
> +    AmfContext     *ctx = avctx->priv_data;
> +    AMFData        *data = NULL;
> +    int             block_and_wait;
> +
> +    if (!ctx->encoder)
> +        return AVERROR(EINVAL);
> +
> +    do {
> +        block_and_wait = 0;
> +        // poll data
> +        res_query = ctx->encoder->pVtbl->QueryOutput(ctx->encoder, &data);
> +        if (data) {
> +            // copy data to packet
> +            AMFBuffer* buffer;
> +            AMFGuid guid = IID_AMFBuffer();
> +            data->pVtbl->QueryInterface(data, &guid, (void**)&buffer); // query for buffer interface
> +            ret = amf_copy_buffer(avctx, avpkt, buffer);
> +
> +            buffer->pVtbl->Release(buffer);
> +            data->pVtbl->Release(data);
> +
> +            AMF_RETURN_IF_FALSE(ctx, ret >= 0, ret, "amf_copy_buffer() failed with error %d\n", ret);
> +
> +            if (ctx->delayed_surface != NULL) { // try to resubmit frame
> +                res = ctx->encoder->pVtbl->SubmitInput(ctx->encoder, (AMFData*)ctx->delayed_surface);
> +                if (res != AMF_INPUT_FULL) {
> +                    ctx->delayed_surface->pVtbl->Release(ctx->delayed_surface);
> +                    ctx->delayed_surface = NULL;
> +                    av_frame_unref(ctx->delayed_frame);
> +
> +                    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_UNKNOWN, "Repeated SubmitInput() failed with error %d\n", res);
> +                }else {
> +                    av_log(avctx, AV_LOG_WARNING, "Data acquired but delayed frame submission got AMF_INPUT_FULL- should not happen\n");
> +                }
> +            }else if (ctx->delayed_drain) { // try to resubmit drain
> +                res = ctx->encoder->pVtbl->Drain(ctx->encoder);
> +                if (res != AMF_INPUT_FULL) {
> +                    ctx->delayed_drain = 0;
> +                    ctx->eof = 1; // drain started
> +                    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_UNKNOWN, "Repeated Drain() failed with error %d\n", res);
> +                }else {
> +                    av_log(avctx, AV_LOG_WARNING, "Data acquired but delayed drain submission got AMF_INPUT_FULL- should not happen\n");
> +                }
> +            }
> +        }else if (ctx->delayed_surface != NULL || ctx->delayed_drain || (ctx->eof && res_query != AMF_EOF)) {
> +            block_and_wait = 1;
> +            av_usleep(1000); // wait and poll again
> +        }
> +    } while (block_and_wait);
> +
> +    if (res_query == AMF_EOF) {
> +        ret = AVERROR_EOF;
> +    }else if (data == NULL) {
> +        ret = AVERROR(EAGAIN);
> +    }else {
> +        ret = 0;
> +    }
> +    return ret;
> +}
> diff --git a/libavcodec/amfenc.h b/libavcodec/amfenc.h
> new file mode 100644
> index 0000000..21e9c67
> --- /dev/null
> +++ b/libavcodec/amfenc.h
> ...
> +
> +/**
> +* Error handling helper
> +*/
> +#define AMF_RETURN_IF_FALSE(avctx, exp, ret_value, /*message,*/ ...) \
> +    if (!(exp)) { \
> +        av_log(avctx, AV_LOG_ERROR, __VA_ARGS__); \
> +        return AVERROR(ret_value); \

In most cases you call with an AVERROR() value here rather than an errno.  The wrapping in AVERROR therefore makes it positive and renders many of your "< 0" error checks ineffective, leading to segfaults.

> +    }
> +
> +#endif //AVCODEC_AMFENC_H
> diff --git a/libavcodec/amfenc_h264.c b/libavcodec/amfenc_h264.c
> new file mode 100644
> index 0000000..f7812a1
> --- /dev/null
> +++ b/libavcodec/amfenc_h264.c
> @@ -0,0 +1,366 @@
> +/*
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + */
> +
> +
> +#include "libavutil/internal.h"
> +#include "libavutil/opt.h"
> +#include "amfenc.h"
> +#include "internal.h"
> +
> +#define OFFSET(x) offsetof(AmfContext, x)
> +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
> +
> +static const AVOption options[] = {
> +    // Static
> +    /// Usage
> +    { "usage",          "Encoder Usage",        OFFSET(usage),  AV_OPT_TYPE_INT,   { .i64 = AMF_VIDEO_ENCODER_USAGE_TRANSCONDING      }, AMF_VIDEO_ENCODER_USAGE_TRANSCONDING, AMF_VIDEO_ENCODER_USAGE_WEBCAM, VE, "usage" },
> +    { "transcoding",    "Generic Transcoding",  0,              AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_USAGE_TRANSCONDING      }, 0, 0, VE, "usage" },
> +    { "ultralowlatency","",                     0,              AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_USAGE_ULTRA_LOW_LATENCY }, 0, 0, VE, "usage" },
> +    { "lowlatency",     "",                     0,              AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_USAGE_LOW_LATENCY       }, 0, 0, VE, "usage" },
> +    { "webcam",         "Webcam",               0,              AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_USAGE_WEBCAM            }, 0, 0, VE, "usage" },
> +
> +    /// Profile,
> +    { "profile",        "Profile",              OFFSET(profile),AV_OPT_TYPE_INT, { .i64 = AMF_VIDEO_ENCODER_PROFILE_MAIN       }, AMF_VIDEO_ENCODER_PROFILE_BASELINE, AMF_VIDEO_ENCODER_PROFILE_CONSTRAINED_HIGH, VE, "profile" },
> +    { "main",           "",                     0,              AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_PROFILE_MAIN     }, 0, 0, VE, "profile" },
> +    { "high",           "",                     0,              AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_PROFILE_HIGH     }, 0, 0, VE, "profile" },
> +    { "constrained_baseline",           "",     0,              AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_PROFILE_CONSTRAINED_BASELINE }, 0, 0, VE, "profile" },
> +    { "constrained_high",           "",         0,              AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_PROFILE_CONSTRAINED_HIGH }, 0, 0, VE, "profile" },
> +
> +    /// Profile Level
> +    { "level",          "Profile Level",        OFFSET(level),  AV_OPT_TYPE_INT,   { .i64 = 0  }, 0, 62, VE, "level" },
> +    { "auto",           "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 0  }, 0, 0,  VE, "level" },
> +    { "1.0",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 10 }, 0, 0,  VE, "level" },
> +    { "1.1",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 11 }, 0, 0,  VE, "level" },
> +    { "1.2",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 12 }, 0, 0,  VE, "level" },
> +    { "1.3",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 13 }, 0, 0,  VE, "level" },
> +    { "2.0",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 20 }, 0, 0,  VE, "level" },
> +    { "2.1",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 21 }, 0, 0,  VE, "level" },
> +    { "2.2",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 22 }, 0, 0,  VE, "level" },
> +    { "3.0",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 30 }, 0, 0,  VE, "level" },
> +    { "3.1",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 31 }, 0, 0,  VE, "level" },
> +    { "3.2",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 32 }, 0, 0,  VE, "level" },
> +    { "4.0",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 40 }, 0, 0,  VE, "level" },
> +    { "4.1",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 41 }, 0, 0,  VE, "level" },
> +    { "4.2",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 42 }, 0, 0,  VE, "level" },
> +    { "5.0",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 50 }, 0, 0,  VE, "level" },
> +    { "5.1",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 51 }, 0, 0,  VE, "level" },
> +    { "5.2",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 52 }, 0, 0,  VE, "level" },
> +    { "6.0",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 60 }, 0, 0,  VE, "level" },
> +    { "6.1",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 61 }, 0, 0,  VE, "level" },
> +    { "6.2",            "",                     0,              AV_OPT_TYPE_CONST, { .i64 = 62 }, 0, 0,  VE, "level" },
> +
> +
> +    /// Quality Preset
> +    { "quality",        "Quality Preference",                   OFFSET(quality),    AV_OPT_TYPE_INT,   { .i64 = AMF_VIDEO_ENCODER_QUALITY_PRESET_SPEED    }, AMF_VIDEO_ENCODER_QUALITY_PRESET_BALANCED, AMF_VIDEO_ENCODER_QUALITY_PRESET_QUALITY, VE, "quality" },
> +    { "speed",          "Prefer Speed",                         0,                  AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_QUALITY_PRESET_SPEED    },       0, 0, VE, "quality" },
> +    { "balanced",       "Balanced",                             0,                  AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_QUALITY_PRESET_BALANCED },    0, 0, VE, "quality" },
> +    { "quality",        "Prefer Quality",                       0,                  AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_QUALITY_PRESET_QUALITY  },     0, 0, VE, "quality" },
> +
> +    // Dynamic
> +    /// Rate Control Method
> +    { "rc",             "Rate Control Method",                  OFFSET(rate_control_mode),  AV_OPT_TYPE_INT,   { .i64 = AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR    }, AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP, AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR, VE, "rc" },
> +    { "cqp",            "Constant Quantization Parameter",      0,                          AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP             }, 0, 0, VE, "rc" },
> +    { "cbr",            "Constant Bitrate",                     0,                          AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR                     }, 0, 0, VE, "rc" },
> +    { "vbr_peak",       "Peak Contrained Variable Bitrate",     0,                          AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR    }, 0, 0, VE, "rc" },
> +    { "vbr_latency",    "Latency Constrained Variable Bitrate", 0,                          AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR }, 0, 0, VE, "rc" },

I think the default for this option needs to be decided dynamically.  Just setting "-b:v" is a not-unreasonable thing to do, and currently the choice of PEAK_CONSTRAINED_VBR makes it then complain that maxrate isn't set.  Similarly, if the only setting is some constant-quality option (-q/-global_quality, or your private ones below), it ignores that and use the default 2Mbps instead.

> +    /// Enforce HRD, Filler Data, VBAQ, Frame Skipping
> +    { "enforce_hrd",    "Enforce HRD",                          OFFSET(enforce_hrd),        AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

Does this option work?  I don't seem to be able to push it into generating HRD information with any combination of options.

> +    { "filler_data",    "Filler Data Enable",                   OFFSET(filler_data),        AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
> +    { "vbaq",           "Enable VBAQ",                          OFFSET(enable_vbaq),        AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
> +    { "frame_skipping", "Rate Control Based Frame Skip",        OFFSET(skip_frame),         AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
> +
> +    /// QP Values
> +    { "qp_i",           "Quantization Parameter for I-Frame",   OFFSET(qp_i),               AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
> +    { "qp_p",           "Quantization Parameter for P-Frame",   OFFSET(qp_p),               AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
> +    { "qp_b",           "Quantization Parameter for B-Frame",   OFFSET(qp_b),               AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
> +
> +    /// Pre-Pass, Pre-Analysis, Two-Pass
> +    { "preanalysis",    "Pre-Analysis Mode",                    OFFSET(preanalysis),        AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE, NULL },
> +
> +    /// Maximum Access Unit Size
> +    { "max_au_size",    "Maximum Access Unit Size for rate control (in bits)",   OFFSET(max_au_size),        AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },

Can you explain more about what this option does?  I don't seem to be able to get it to do anything - e.g. setting -max_au_size 80000 with 30fps CBR 1M (which should be easily achievable) still makes packets of more than 80000 bits.)

> +
> +    /// Header Insertion Spacing
> +    { "header_spacing", "Header Insertion Spacing",             OFFSET(header_spacing),     AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1000, VE },
> +
> +    /// B-Frames
> +    // BPicturesPattern=bf
> +    { "bf_delta_qp",    "B-Picture Delta QP",                   OFFSET(b_frame_delta_qp),   AV_OPT_TYPE_INT,  { .i64 = 4 }, -10, 10, VE },
> +    { "bf_ref",         "Enable Reference to B-Frames",         OFFSET(b_frame_ref),        AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VE },
> +    { "bf_ref_delta_qp","Reference B-Picture Delta QP",         OFFSET(ref_b_frame_delta_qp), AV_OPT_TYPE_INT,  { .i64 = 4 }, -10, 10, VE },
> +
> +    /// Intra-Refresh
> +    { "intra_refresh_mb","Intra Refresh MBs Number Per Slot in Macroblocks",       OFFSET(intra_refresh_mb),    AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
> +
> +    /// coder
> +    { "coder",          "Coding Type",                          OFFSET(coding_mode),   AV_OPT_TYPE_INT,   { .i64 = AMF_VIDEO_ENCODER_UNDEFINED }, AMF_VIDEO_ENCODER_UNDEFINED, AMF_VIDEO_ENCODER_CALV, VE, "coder" },
> +    { "auto",           "Automatic",                            0,                     AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_UNDEFINED }, 0, 0, VE, "coder" },
> +    { "cavlc",          "Context Adaptive Variable-Length Coding", 0,                  AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_CALV },      0, 0, VE, "coder" },
> +    { "cabac",          "Context Adaptive Binary Arithmetic Coding", 0,                AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_CABAC },     0, 0, VE, "coder" },
> +
> +    { "me_half_pel",    "Enable ME Half Pixel",                 OFFSET(me_half_pel),   AV_OPT_TYPE_BOOL,  { .i64 = 1 }, 0, 1, VE },
> +    { "me_quarter_pel", "Enable ME Quarter Pixel",              OFFSET(me_quarter_pel),AV_OPT_TYPE_BOOL,  { .i64 = 1 }, 0, 1, VE },
> +
> +    { "log_to_dbg",     "Enable AMF logging to debug output",   OFFSET(log_to_dbg), AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE },
> +    { NULL }
> +};
> +
> ...
> +AVCodec ff_h264_amf_encoder = {
> +    .name           = "h264_amf",
> +    .long_name      = NULL_IF_CONFIG_SMALL("AMD AMF H.264 Encoder"),
> +    .type           = AVMEDIA_TYPE_VIDEO,
> +    .id             = AV_CODEC_ID_H264,
> +    .init           = amf_encode_init_h264,
> +    .send_frame     = ff_amf_send_frame,
> +    .receive_packet = ff_amf_receive_packet,
> +    .close          = ff_amf_encode_close,
> +    .priv_data_size = sizeof(AmfContext),
> +    .priv_class     = &h264_amf_class,
> +    .defaults       = defaults,
> +    .capabilities   = AV_CODEC_CAP_DELAY,
> +    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
> +    .pix_fmts       = ff_amf_pix_fmts,
> +};

And some thoughts on the stream it makes:

"ffmpeg_g -report -y -f lavfi -i testsrc -an -c:v h264_amf -bsf:v trace_headers -frames:v 1000 out.mp4"

[AVBSFContext @ 000000000049b9c0] Sequence Parameter Set
[AVBSFContext @ 000000000049b9c0] 40          max_num_ref_frames                                      00101 = 4
[AVBSFContext @ 000000000049b9c0] 206         max_dec_frame_buffering                                 00101 = 4

Where did 4 come from?  It never uses more than 1 reference in the stream.

[AVBSFContext @ 000000000049b9c0] Access Unit Delimiter

It seems to put AUDs in every packet by default.  Is there a way to turn that off?  (It messes with sending over RTP by forcing a useless extra packet because they can't be combined with fragmentation units.)


Thanks,

- Mark
mmironov Nov. 13, 2017, 11 p.m. UTC | #11
> > +    res = ctx->factory->pVtbl->CreateContext(ctx->factory, &ctx->context);

> > +    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_UNKNOWN,

> "CreateContext() failed with error %d\n", res);

> > +    // try to reuse existing DX device

> > +    if (avctx->hw_frames_ctx) {

> > +        AVHWFramesContext *device_ctx = (AVHWFramesContext*)avctx-

> >hw_frames_ctx->data;

> > +        if (device_ctx->device_ctx->type == AV_HWDEVICE_TYPE_D3D11VA){

> > +            if (amf_av_to_amf_format(device_ctx->sw_format) ==

> > + AMF_SURFACE_UNKNOWN) {

> 

> This test is inverted.

> 

> Have you actually tested this path?  Even with that test fixed, I'm unable to

> pass the following initialisation test with an AMD D3D11 device.

> 


Yes, the condition should be reverted. To test I had to add 
"-hwaccel d3d11va -hwaccel_output_format d3d11" to the command line.

> > +

> > +    // Dynamic

> > +    /// Rate Control Method

> > +    { "rc",             "Rate Control Method",

> OFFSET(rate_control_mode),  AV_OPT_TYPE_INT,   { .i64 =

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VB

> R    }, AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP,

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED

> _VBR, VE, "rc" },

> > +    { "cqp",            "Constant Quantization Parameter",      0,

> AV_OPT_TYPE_CONST, { .i64 =

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP             },

> 0, 0, VE, "rc" },

> > +    { "cbr",            "Constant Bitrate",                     0,

> AV_OPT_TYPE_CONST, { .i64 =

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR                     }, 0, 0,

> VE, "rc" },

> > +    { "vbr_peak",       "Peak Contrained Variable Bitrate",     0,

> AV_OPT_TYPE_CONST, { .i64 =

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VB

> R    }, 0, 0, VE, "rc" },

> > +    { "vbr_latency",    "Latency Constrained Variable Bitrate", 0,

> AV_OPT_TYPE_CONST, { .i64 =

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED

> _VBR }, 0, 0, VE, "rc" },

> 

> I think the default for this option needs to be decided dynamically.  Just

> setting "-b:v" is a not-unreasonable thing to do, and currently the choice of

> PEAK_CONSTRAINED_VBR makes it then complain that maxrate isn't set.

> Similarly, if the only setting is some constant-quality option (-q/-

> global_quality, or your private ones below), it ignores that and use the

> default 2Mbps instead.

> 

> > +    /// Enforce HRD, Filler Data, VBAQ, Frame Skipping

> > +    { "enforce_hrd",    "Enforce HRD",                          OFFSET(enforce_hrd),

> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> 

> Does this option work?  I don't seem to be able to push it into generating

> HRD information with any combination of options.

> 


Fixed.

> > +    { "filler_data",    "Filler Data Enable",                   OFFSET(filler_data),

> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> > +    { "vbaq",           "Enable VBAQ",                          OFFSET(enable_vbaq),

> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> > +    { "frame_skipping", "Rate Control Based Frame Skip",

> OFFSET(skip_frame),         AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> > +

> > +    /// QP Values

> > +    { "qp_i",           "Quantization Parameter for I-Frame",   OFFSET(qp_i),

> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> > +    { "qp_p",           "Quantization Parameter for P-Frame",   OFFSET(qp_p),

> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> > +    { "qp_b",           "Quantization Parameter for B-Frame",   OFFSET(qp_b),

> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> > +

> > +    /// Pre-Pass, Pre-Analysis, Two-Pass

> > +    { "preanalysis",    "Pre-Analysis Mode",                    OFFSET(preanalysis),

> AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE, NULL },

> > +

> > +    /// Maximum Access Unit Size

> > +    { "max_au_size",    "Maximum Access Unit Size for rate control (in bits)",

> OFFSET(max_au_size),        AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },

> 

> Can you explain more about what this option does?  I don't seem to be able

> to get it to do anything - e.g. setting -max_au_size 80000 with 30fps CBR 1M

> (which should be easily achievable) still makes packets of more than 80000

> bits.)

> 


It means maximum frame size in bits, and it should be used together 
with enforce_hrd enabled.  I tested, it works after the related fix for enforce_hrd.
I added  dependency handling.

> 

> And some thoughts on the stream it makes:

> 

> "ffmpeg_g -report -y -f lavfi -i testsrc -an -c:v h264_amf -bsf:v trace_headers -

> frames:v 1000 out.mp4"

> 

> [AVBSFContext @ 000000000049b9c0] Sequence Parameter Set

> [AVBSFContext @ 000000000049b9c0] 40          max_num_ref_frames

> 00101 = 4

> [AVBSFContext @ 000000000049b9c0] 206         max_dec_frame_buffering

> 00101 = 4

> 

> Where did 4 come from?  It never uses more than 1 reference in the stream.


According to codec guys this field filled in by HW and represents how many 
frames can be stored in DPB buffer. But in reality HW encoder will reference 
one frame at the time.
 
> 

> [AVBSFContext @ 000000000049b9c0] Access Unit Delimiter

> 

> It seems to put AUDs in every packet by default.  Is there a way to turn that

> off?  (It messes with sending over RTP by forcing a useless extra packet

> because they can't be combined with fragmentation units.)

> 


I've added an option with handling  to the send() code. The property existed in 
AMF API but it is per-frame property and it was missing in the initial integration.

> 

> Thanks,

> 

> - Mark

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


I fixed and tested the rest of problems.

Thanks,
Mikhail
Mark Thompson Nov. 14, 2017, 2:14 p.m. UTC | #12
On 13/11/17 23:00, Mironov, Mikhail wrote:
>>> +    res = ctx->factory->pVtbl->CreateContext(ctx->factory, &ctx->context);
>>> +    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_UNKNOWN,
>> "CreateContext() failed with error %d\n", res);
>>> +    // try to reuse existing DX device
>>> +    if (avctx->hw_frames_ctx) {
>>> +        AVHWFramesContext *device_ctx = (AVHWFramesContext*)avctx-
>>> hw_frames_ctx->data;
>>> +        if (device_ctx->device_ctx->type == AV_HWDEVICE_TYPE_D3D11VA){
>>> +            if (amf_av_to_amf_format(device_ctx->sw_format) ==
>>> + AMF_SURFACE_UNKNOWN) {
>>
>> This test is inverted.
>>
>> Have you actually tested this path?  Even with that test fixed, I'm unable to
>> pass the following initialisation test with an AMD D3D11 device.
>>
> 
> Yes, the condition should be reverted. To test I had to add 
> "-hwaccel d3d11va -hwaccel_output_format d3d11" to the command line.

Yeah.  I get:

$ ./ffmpeg_g -y -hwaccel d3d11va -hwaccel_device 0 -hwaccel_output_format d3d11 -i ~/bbb_1080_264.mp4 -an -c:v h264_amf out.mp4
...
[AVHWDeviceContext @ 000000000270e120] Created on device 1002:665f (AMD Radeon (TM) R7 360 Series).
...
[h264_amf @ 00000000004dcd80] amf_shared: avctx->hw_frames_ctx has non-AMD device, switching to default

It's then comedically slow in this state (about 2fps), but works fine when the decode is in software.

>>> +
>>> +    // Dynamic
>>> +    /// Rate Control Method
>>> +    { "rc",             "Rate Control Method",
>> OFFSET(rate_control_mode),  AV_OPT_TYPE_INT,   { .i64 =
>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VB
>> R    }, AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP,
>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED
>> _VBR, VE, "rc" },
>>> +    { "cqp",            "Constant Quantization Parameter",      0,
>> AV_OPT_TYPE_CONST, { .i64 =
>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP             },
>> 0, 0, VE, "rc" },
>>> +    { "cbr",            "Constant Bitrate",                     0,
>> AV_OPT_TYPE_CONST, { .i64 =
>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR                     }, 0, 0,
>> VE, "rc" },
>>> +    { "vbr_peak",       "Peak Contrained Variable Bitrate",     0,
>> AV_OPT_TYPE_CONST, { .i64 =
>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VB
>> R    }, 0, 0, VE, "rc" },
>>> +    { "vbr_latency",    "Latency Constrained Variable Bitrate", 0,
>> AV_OPT_TYPE_CONST, { .i64 =
>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED
>> _VBR }, 0, 0, VE, "rc" },
>>
>> I think the default for this option needs to be decided dynamically.  Just
>> setting "-b:v" is a not-unreasonable thing to do, and currently the choice of
>> PEAK_CONSTRAINED_VBR makes it then complain that maxrate isn't set.
>> Similarly, if the only setting is some constant-quality option (-q/-
>> global_quality, or your private ones below), it ignores that and use the
>> default 2Mbps instead.
>>
>>> +    /// Enforce HRD, Filler Data, VBAQ, Frame Skipping
>>> +    { "enforce_hrd",    "Enforce HRD",                          OFFSET(enforce_hrd),
>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>
>> Does this option work?  I don't seem to be able to push it into generating
>> HRD information with any combination of options.
>>
> 
> Fixed.

What combination of options are needed to get the HRD parameters in the output stream?  I still don't see them with the new version.

>>> +    { "filler_data",    "Filler Data Enable",                   OFFSET(filler_data),
>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>> +    { "vbaq",           "Enable VBAQ",                          OFFSET(enable_vbaq),
>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>> +    { "frame_skipping", "Rate Control Based Frame Skip",
>> OFFSET(skip_frame),         AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>> +
>>> +    /// QP Values
>>> +    { "qp_i",           "Quantization Parameter for I-Frame",   OFFSET(qp_i),
>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
>>> +    { "qp_p",           "Quantization Parameter for P-Frame",   OFFSET(qp_p),
>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
>>> +    { "qp_b",           "Quantization Parameter for B-Frame",   OFFSET(qp_b),
>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
>>> +
>>> +    /// Pre-Pass, Pre-Analysis, Two-Pass
>>> +    { "preanalysis",    "Pre-Analysis Mode",                    OFFSET(preanalysis),
>> AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE, NULL },
>>> +
>>> +    /// Maximum Access Unit Size
>>> +    { "max_au_size",    "Maximum Access Unit Size for rate control (in bits)",
>> OFFSET(max_au_size),        AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
>>
>> Can you explain more about what this option does?  I don't seem to be able
>> to get it to do anything - e.g. setting -max_au_size 80000 with 30fps CBR 1M
>> (which should be easily achievable) still makes packets of more than 80000
>> bits.)
>>
> 
> It means maximum frame size in bits, and it should be used together 
> with enforce_hrd enabled.  I tested, it works after the related fix for enforce_hrd.
> I added  dependency handling.

$ ./ffmpeg_g -y -nostats -i ~/bbb_1080_264.mp4 -an -c:v h264_amf -bsf:v trace_headers -frames:v 1000 -enforce_hrd 1 -b:v 1M -maxrate 1M -max_au_size 80000 out.mp4 2>&1 | grep 'Packet: [0-9]\{5\}'
[AVBSFContext @ 00000000029d7f40] Packet: 11426 bytes, key frame, pts 128000, dts 128000.
[AVBSFContext @ 00000000029d7f40] Packet: 17623 bytes, key frame, pts 192000, dts 192000.
[AVBSFContext @ 00000000029d7f40] Packet: 23358 bytes, pts 249856, dts 249856.

(That is, packets bigger than the supposed 80000-bit maximum.)  Expected?

>>
>> And some thoughts on the stream it makes:
>>
>> "ffmpeg_g -report -y -f lavfi -i testsrc -an -c:v h264_amf -bsf:v trace_headers -
>> frames:v 1000 out.mp4"
>>
>> [AVBSFContext @ 000000000049b9c0] Sequence Parameter Set
>> [AVBSFContext @ 000000000049b9c0] 40          max_num_ref_frames
>> 00101 = 4
>> [AVBSFContext @ 000000000049b9c0] 206         max_dec_frame_buffering
>> 00101 = 4
>>
>> Where did 4 come from?  It never uses more than 1 reference in the stream.
> 
> According to codec guys this field filled in by HW and represents how many 
> frames can be stored in DPB buffer. But in reality HW encoder will reference 
> one frame at the time.

Why set it to 4, then?  That just creates needless incompatibility.
 
Thanks,

- Mark
mmironov Nov. 14, 2017, 3:51 p.m. UTC | #13
> -----Original Message-----

> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf

> Of Mark Thompson

> Sent: November 14, 2017 9:14 AM

> To: ffmpeg-devel@ffmpeg.org

> Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD

> GPUs based on AMF SDK

> 

> On 13/11/17 23:00, Mironov, Mikhail wrote:

> >>> +    res = ctx->factory->pVtbl->CreateContext(ctx->factory, &ctx-

> >context);

> >>> +    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_UNKNOWN,

> >> "CreateContext() failed with error %d\n", res);

> >>> +    // try to reuse existing DX device

> >>> +    if (avctx->hw_frames_ctx) {

> >>> +        AVHWFramesContext *device_ctx = (AVHWFramesContext*)avctx-

> >>> hw_frames_ctx->data;

> >>> +        if (device_ctx->device_ctx->type ==

> AV_HWDEVICE_TYPE_D3D11VA){

> >>> +            if (amf_av_to_amf_format(device_ctx->sw_format) ==

> >>> + AMF_SURFACE_UNKNOWN) {

> >>

> >> This test is inverted.

> >>

> >> Have you actually tested this path?  Even with that test fixed, I'm

> >> unable to pass the following initialisation test with an AMD D3D11 device.

> >>

> >

> > Yes, the condition should be reverted. To test I had to add "-hwaccel

> > d3d11va -hwaccel_output_format d3d11" to the command line.

> 

> Yeah.  I get:

> 

> $ ./ffmpeg_g -y -hwaccel d3d11va -hwaccel_device 0 -

> hwaccel_output_format d3d11 -i ~/bbb_1080_264.mp4 -an -c:v h264_amf

> out.mp4 ...

> [AVHWDeviceContext @ 000000000270e120] Created on device 1002:665f

> (AMD Radeon (TM) R7 360 Series).

> ...

> [h264_amf @ 00000000004dcd80] amf_shared: avctx->hw_frames_ctx has

> non-AMD device, switching to default

> 

> It's then comedically slow in this state (about 2fps), but works fine when the

> decode is in software.


Is it possible that you also have iGPU not disabled and it is used for decoding as adapter 0?
Can you provide a log from dxdiag.exe?
If AMF created own DX device then submission logic an speed is the same as from SW decoder. 
It would be interesting to see a short GPUVIEW log.

> 

> >>> +

> >>> +    // Dynamic

> >>> +    /// Rate Control Method

> >>> +    { "rc",             "Rate Control Method",

> >> OFFSET(rate_control_mode),  AV_OPT_TYPE_INT,   { .i64 =

> >>

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VB

> >> R    }, AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP,

> >>

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED

> >> _VBR, VE, "rc" },

> >>> +    { "cqp",            "Constant Quantization Parameter",      0,

> >> AV_OPT_TYPE_CONST, { .i64 =

> >> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP

> },

> >> 0, 0, VE, "rc" },

> >>> +    { "cbr",            "Constant Bitrate",                     0,

> >> AV_OPT_TYPE_CONST, { .i64 =

> >> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR                     }, 0, 0,

> >> VE, "rc" },

> >>> +    { "vbr_peak",       "Peak Contrained Variable Bitrate",     0,

> >> AV_OPT_TYPE_CONST, { .i64 =

> >>

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VB

> >> R    }, 0, 0, VE, "rc" },

> >>> +    { "vbr_latency",    "Latency Constrained Variable Bitrate", 0,

> >> AV_OPT_TYPE_CONST, { .i64 =

> >>

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED

> >> _VBR }, 0, 0, VE, "rc" },

> >>

> >> I think the default for this option needs to be decided dynamically.

> >> Just setting "-b:v" is a not-unreasonable thing to do, and currently

> >> the choice of PEAK_CONSTRAINED_VBR makes it then complain that

> maxrate isn't set.

> >> Similarly, if the only setting is some constant-quality option (-q/-

> >> global_quality, or your private ones below), it ignores that and use

> >> the default 2Mbps instead.

> >>

> >>> +    /// Enforce HRD, Filler Data, VBAQ, Frame Skipping

> >>> +    { "enforce_hrd",    "Enforce HRD",

> OFFSET(enforce_hrd),

> >> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>

> >> Does this option work?  I don't seem to be able to push it into

> >> generating HRD information with any combination of options.

> >>

> >

> > Fixed.

> 

> What combination of options are needed to get the HRD parameters in the

> output stream?  I still don't see them with the new version.


From codec team: AMF HRD parameter ensures that the output stream is conformant 
to HRD bit rate requirements but does not add SEI any other stream parameters. 

> 

> >>> +    { "filler_data",    "Filler Data Enable",                   OFFSET(filler_data),

> >> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>> +    { "vbaq",           "Enable VBAQ",                          OFFSET(enable_vbaq),

> >> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>> +    { "frame_skipping", "Rate Control Based Frame Skip",

> >> OFFSET(skip_frame),         AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>> +

> >>> +    /// QP Values

> >>> +    { "qp_i",           "Quantization Parameter for I-Frame",   OFFSET(qp_i),

> >> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> >>> +    { "qp_p",           "Quantization Parameter for P-Frame",

> OFFSET(qp_p),

> >> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> >>> +    { "qp_b",           "Quantization Parameter for B-Frame",

> OFFSET(qp_b),

> >> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> >>> +

> >>> +    /// Pre-Pass, Pre-Analysis, Two-Pass

> >>> +    { "preanalysis",    "Pre-Analysis Mode",

> OFFSET(preanalysis),

> >> AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE, NULL },

> >>> +

> >>> +    /// Maximum Access Unit Size

> >>> +    { "max_au_size",    "Maximum Access Unit Size for rate control (in

> bits)",

> >> OFFSET(max_au_size),        AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE

> },

> >>

> >> Can you explain more about what this option does?  I don't seem to be

> >> able to get it to do anything - e.g. setting -max_au_size 80000 with

> >> 30fps CBR 1M (which should be easily achievable) still makes packets

> >> of more than 80000

> >> bits.)

> >>

> >

> > It means maximum frame size in bits, and it should be used together

> > with enforce_hrd enabled.  I tested, it works after the related fix for

> enforce_hrd.

> > I added  dependency handling.

> 

> $ ./ffmpeg_g -y -nostats -i ~/bbb_1080_264.mp4 -an -c:v h264_amf -bsf:v

> trace_headers -frames:v 1000 -enforce_hrd 1 -b:v 1M -maxrate 1M -

> max_au_size 80000 out.mp4 2>&1 | grep 'Packet: [0-9]\{5\}'

> [AVBSFContext @ 00000000029d7f40] Packet: 11426 bytes, key frame, pts

> 128000, dts 128000.

> [AVBSFContext @ 00000000029d7f40] Packet: 17623 bytes, key frame, pts

> 192000, dts 192000.

> [AVBSFContext @ 00000000029d7f40] Packet: 23358 bytes, pts 249856, dts

> 249856.

> 

> (That is, packets bigger than the supposed 80000-bit maximum.)  Expected?


No, this is not expected. I tried the exact command line and did not get packages 
more then 80000 bits. Sorry to ask but did you apply the change in amfenc.h?

> 

> >>

> >> And some thoughts on the stream it makes:

> >>

> >> "ffmpeg_g -report -y -f lavfi -i testsrc -an -c:v h264_amf -bsf:v

> >> trace_headers - frames:v 1000 out.mp4"

> >>

> >> [AVBSFContext @ 000000000049b9c0] Sequence Parameter Set

> >> [AVBSFContext @ 000000000049b9c0] 40          max_num_ref_frames

> >> 00101 = 4

> >> [AVBSFContext @ 000000000049b9c0] 206         max_dec_frame_buffering

> >> 00101 = 4

> >>

> >> Where did 4 come from?  It never uses more than 1 reference in the

> stream.

> >

> > According to codec guys this field filled in by HW and represents how

> > many frames can be stored in DPB buffer. But in reality HW encoder

> > will reference one frame at the time.

> 

> Why set it to 4, then?  That just creates needless incompatibility.


Codec team answer: "AMF has ability to mark frames as LTR frames and then 
it will be more then one reference candidate."
4 is the default and can be changed by avctx->refs.

> 

> Thanks,

> 

> - Mark

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


I will update to the latest master and resubmit. 

Thanks,
Mikhail
mmironov Nov. 14, 2017, 4:20 p.m. UTC | #14
> -----Original Message-----

> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf

> Of Mironov, Mikhail

> Sent: November 14, 2017 10:51 AM

> To: FFmpeg development discussions and patches <ffmpeg-

> devel@ffmpeg.org>

> Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD

> GPUs based on AMF SDK

> 

> > -----Original Message-----

> > From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf

> > Of Mark Thompson

> > Sent: November 14, 2017 9:14 AM

> > To: ffmpeg-devel@ffmpeg.org

> > Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD

> > GPUs based on AMF SDK

> >

> > On 13/11/17 23:00, Mironov, Mikhail wrote:

> > >>> +    res = ctx->factory->pVtbl->CreateContext(ctx->factory, &ctx-

> > >context);

> > >>> +    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_UNKNOWN,

> > >> "CreateContext() failed with error %d\n", res);

> > >>> +    // try to reuse existing DX device

> > >>> +    if (avctx->hw_frames_ctx) {

> > >>> +        AVHWFramesContext *device_ctx =

> > >>> + (AVHWFramesContext*)avctx-

> > >>> hw_frames_ctx->data;

> > >>> +        if (device_ctx->device_ctx->type ==

> > AV_HWDEVICE_TYPE_D3D11VA){

> > >>> +            if (amf_av_to_amf_format(device_ctx->sw_format) ==

> > >>> + AMF_SURFACE_UNKNOWN) {

> > >>

> > >> This test is inverted.

> > >>

> > >> Have you actually tested this path?  Even with that test fixed, I'm

> > >> unable to pass the following initialisation test with an AMD D3D11

> device.

> > >>

> > >

> > > Yes, the condition should be reverted. To test I had to add

> > > "-hwaccel d3d11va -hwaccel_output_format d3d11" to the command

> line.

> >

> > Yeah.  I get:

> >

> > $ ./ffmpeg_g -y -hwaccel d3d11va -hwaccel_device 0 -

> > hwaccel_output_format d3d11 -i ~/bbb_1080_264.mp4 -an -c:v h264_amf

> > out.mp4 ...

> > [AVHWDeviceContext @ 000000000270e120] Created on device 1002:665f

> > (AMD Radeon (TM) R7 360 Series).

> > ...

> > [h264_amf @ 00000000004dcd80] amf_shared: avctx->hw_frames_ctx has

> > non-AMD device, switching to default

> >

> > It's then comedically slow in this state (about 2fps), but works fine

> > when the decode is in software.

> 

> Is it possible that you also have iGPU not disabled and it is used for decoding

> as adapter 0?

> Can you provide a log from dxdiag.exe?

> If AMF created own DX device then submission logic an speed is the same as

> from SW decoder.

> It would be interesting to see a short GPUVIEW log.

> 

> >

> > >>> +

> > >>> +    // Dynamic

> > >>> +    /// Rate Control Method

> > >>> +    { "rc",             "Rate Control Method",

> > >> OFFSET(rate_control_mode),  AV_OPT_TYPE_INT,   { .i64 =

> > >>

> >

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VB

> > >> R    },

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP,

> > >>

> >

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED

> > >> _VBR, VE, "rc" },

> > >>> +    { "cqp",            "Constant Quantization Parameter",      0,

> > >> AV_OPT_TYPE_CONST, { .i64 =

> > >> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP

> > },

> > >> 0, 0, VE, "rc" },

> > >>> +    { "cbr",            "Constant Bitrate",                     0,

> > >> AV_OPT_TYPE_CONST, { .i64 =

> > >> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR                     }, 0,

> 0,

> > >> VE, "rc" },

> > >>> +    { "vbr_peak",       "Peak Contrained Variable Bitrate",     0,

> > >> AV_OPT_TYPE_CONST, { .i64 =

> > >>

> >

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VB

> > >> R    }, 0, 0, VE, "rc" },

> > >>> +    { "vbr_latency",    "Latency Constrained Variable Bitrate", 0,

> > >> AV_OPT_TYPE_CONST, { .i64 =

> > >>

> >

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED

> > >> _VBR }, 0, 0, VE, "rc" },

> > >>

> > >> I think the default for this option needs to be decided dynamically.

> > >> Just setting "-b:v" is a not-unreasonable thing to do, and

> > >> currently the choice of PEAK_CONSTRAINED_VBR makes it then

> complain

> > >> that

> > maxrate isn't set.

> > >> Similarly, if the only setting is some constant-quality option

> > >> (-q/- global_quality, or your private ones below), it ignores that

> > >> and use the default 2Mbps instead.

> > >>

> > >>> +    /// Enforce HRD, Filler Data, VBAQ, Frame Skipping

> > >>> +    { "enforce_hrd",    "Enforce HRD",

> > OFFSET(enforce_hrd),

> > >> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> > >>

> > >> Does this option work?  I don't seem to be able to push it into

> > >> generating HRD information with any combination of options.

> > >>

> > >

> > > Fixed.

> >

> > What combination of options are needed to get the HRD parameters in

> > the output stream?  I still don't see them with the new version.

> 

> From codec team: AMF HRD parameter ensures that the output stream is

> conformant to HRD bit rate requirements but does not add SEI any other

> stream parameters.

> 

> >

> > >>> +    { "filler_data",    "Filler Data Enable",                   OFFSET(filler_data),

> > >> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> > >>> +    { "vbaq",           "Enable VBAQ",                          OFFSET(enable_vbaq),

> > >> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> > >>> +    { "frame_skipping", "Rate Control Based Frame Skip",

> > >> OFFSET(skip_frame),         AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> > >>> +

> > >>> +    /// QP Values

> > >>> +    { "qp_i",           "Quantization Parameter for I-Frame",

> OFFSET(qp_i),

> > >> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> > >>> +    { "qp_p",           "Quantization Parameter for P-Frame",

> > OFFSET(qp_p),

> > >> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> > >>> +    { "qp_b",           "Quantization Parameter for B-Frame",

> > OFFSET(qp_b),

> > >> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> > >>> +

> > >>> +    /// Pre-Pass, Pre-Analysis, Two-Pass

> > >>> +    { "preanalysis",    "Pre-Analysis Mode",

> > OFFSET(preanalysis),

> > >> AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE, NULL },

> > >>> +

> > >>> +    /// Maximum Access Unit Size

> > >>> +    { "max_au_size",    "Maximum Access Unit Size for rate control (in

> > bits)",

> > >> OFFSET(max_au_size),        AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX,

> VE

> > },

> > >>

> > >> Can you explain more about what this option does?  I don't seem to

> > >> be able to get it to do anything - e.g. setting -max_au_size 80000

> > >> with 30fps CBR 1M (which should be easily achievable) still makes

> > >> packets of more than 80000

> > >> bits.)

> > >>

> > >

> > > It means maximum frame size in bits, and it should be used together

> > > with enforce_hrd enabled.  I tested, it works after the related fix

> > > for

> > enforce_hrd.

> > > I added  dependency handling.

> >

> > $ ./ffmpeg_g -y -nostats -i ~/bbb_1080_264.mp4 -an -c:v h264_amf

> > -bsf:v trace_headers -frames:v 1000 -enforce_hrd 1 -b:v 1M -maxrate 1M

> > - max_au_size 80000 out.mp4 2>&1 | grep 'Packet: [0-9]\{5\}'

> > [AVBSFContext @ 00000000029d7f40] Packet: 11426 bytes, key frame, pts

> > 128000, dts 128000.

> > [AVBSFContext @ 00000000029d7f40] Packet: 17623 bytes, key frame, pts

> > 192000, dts 192000.

> > [AVBSFContext @ 00000000029d7f40] Packet: 23358 bytes, pts 249856, dts

> > 249856.

> >

> > (That is, packets bigger than the supposed 80000-bit maximum.)  Expected?

> 

> No, this is not expected. I tried the exact command line and did not get

> packages more then 80000 bits. Sorry to ask but did you apply the change in

> amfenc.h?

> 


Sorry, the change is in amfsdkenc.h

> >

> > >>

> > >> And some thoughts on the stream it makes:

> > >>

> > >> "ffmpeg_g -report -y -f lavfi -i testsrc -an -c:v h264_amf -bsf:v

> > >> trace_headers - frames:v 1000 out.mp4"

> > >>

> > >> [AVBSFContext @ 000000000049b9c0] Sequence Parameter Set

> > >> [AVBSFContext @ 000000000049b9c0] 40          max_num_ref_frames

> > >> 00101 = 4

> > >> [AVBSFContext @ 000000000049b9c0] 206

> max_dec_frame_buffering

> > >> 00101 = 4

> > >>

> > >> Where did 4 come from?  It never uses more than 1 reference in the

> > stream.

> > >

> > > According to codec guys this field filled in by HW and represents

> > > how many frames can be stored in DPB buffer. But in reality HW

> > > encoder will reference one frame at the time.

> >

> > Why set it to 4, then?  That just creates needless incompatibility.

> 

> Codec team answer: "AMF has ability to mark frames as LTR frames and then

> it will be more then one reference candidate."

> 4 is the default and can be changed by avctx->refs.

> 

> >

> > Thanks,

> >

> > - Mark

> > _______________________________________________

> > ffmpeg-devel mailing list

> > ffmpeg-devel@ffmpeg.org

> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

> 

> I will update to the latest master and resubmit.

> 

> Thanks,

> Mikhail

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Mark Thompson Nov. 14, 2017, 4:45 p.m. UTC | #15
On 14/11/17 15:51, Mironov, Mikhail wrote:
>> -----Original Message-----
>> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf
>> Of Mark Thompson
>> Sent: November 14, 2017 9:14 AM
>> To: ffmpeg-devel@ffmpeg.org
>> Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD
>> GPUs based on AMF SDK
>>
>> On 13/11/17 23:00, Mironov, Mikhail wrote:
>>>>> +    res = ctx->factory->pVtbl->CreateContext(ctx->factory, &ctx-
>>> context);
>>>>> +    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_UNKNOWN,
>>>> "CreateContext() failed with error %d\n", res);
>>>>> +    // try to reuse existing DX device
>>>>> +    if (avctx->hw_frames_ctx) {
>>>>> +        AVHWFramesContext *device_ctx = (AVHWFramesContext*)avctx-
>>>>> hw_frames_ctx->data;
>>>>> +        if (device_ctx->device_ctx->type ==
>> AV_HWDEVICE_TYPE_D3D11VA){
>>>>> +            if (amf_av_to_amf_format(device_ctx->sw_format) ==
>>>>> + AMF_SURFACE_UNKNOWN) {
>>>>
>>>> This test is inverted.
>>>>
>>>> Have you actually tested this path?  Even with that test fixed, I'm
>>>> unable to pass the following initialisation test with an AMD D3D11 device.
>>>>
>>>
>>> Yes, the condition should be reverted. To test I had to add "-hwaccel
>>> d3d11va -hwaccel_output_format d3d11" to the command line.
>>
>> Yeah.  I get:
>>
>> $ ./ffmpeg_g -y -hwaccel d3d11va -hwaccel_device 0 -
>> hwaccel_output_format d3d11 -i ~/bbb_1080_264.mp4 -an -c:v h264_amf
>> out.mp4 ...
>> [AVHWDeviceContext @ 000000000270e120] Created on device 1002:665f
>> (AMD Radeon (TM) R7 360 Series).
>> ...
>> [h264_amf @ 00000000004dcd80] amf_shared: avctx->hw_frames_ctx has
>> non-AMD device, switching to default
>>
>> It's then comedically slow in this state (about 2fps), but works fine when the
>> decode is in software.
> 
> Is it possible that you also have iGPU not disabled and it is used for decoding as adapter 0?

There is an integrated GPU, but it's currently completely disabled.  (I made <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-November/219795.html> to check that the device was definitely right.)

> Can you provide a log from dxdiag.exe?

<http://ixia.jkqxz.net/~mrt/DxDiag.txt>

> If AMF created own DX device then submission logic an speed is the same as from SW decoder. 
> It would be interesting to see a short GPUVIEW log.

My Windows knowledge is insufficient to get that immediately, but if you think it's useful I can look into it?

>>>>> +
>>>>> +    // Dynamic
>>>>> +    /// Rate Control Method
>>>>> +    { "rc",             "Rate Control Method",
>>>> OFFSET(rate_control_mode),  AV_OPT_TYPE_INT,   { .i64 =
>>>>
>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VB
>>>> R    }, AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP,
>>>>
>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED
>>>> _VBR, VE, "rc" },
>>>>> +    { "cqp",            "Constant Quantization Parameter",      0,
>>>> AV_OPT_TYPE_CONST, { .i64 =
>>>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP
>> },
>>>> 0, 0, VE, "rc" },
>>>>> +    { "cbr",            "Constant Bitrate",                     0,
>>>> AV_OPT_TYPE_CONST, { .i64 =
>>>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR                     }, 0, 0,
>>>> VE, "rc" },
>>>>> +    { "vbr_peak",       "Peak Contrained Variable Bitrate",     0,
>>>> AV_OPT_TYPE_CONST, { .i64 =
>>>>
>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VB
>>>> R    }, 0, 0, VE, "rc" },
>>>>> +    { "vbr_latency",    "Latency Constrained Variable Bitrate", 0,
>>>> AV_OPT_TYPE_CONST, { .i64 =
>>>>
>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED
>>>> _VBR }, 0, 0, VE, "rc" },
>>>>
>>>> I think the default for this option needs to be decided dynamically.
>>>> Just setting "-b:v" is a not-unreasonable thing to do, and currently
>>>> the choice of PEAK_CONSTRAINED_VBR makes it then complain that
>> maxrate isn't set.
>>>> Similarly, if the only setting is some constant-quality option (-q/-
>>>> global_quality, or your private ones below), it ignores that and use
>>>> the default 2Mbps instead.
>>>>
>>>>> +    /// Enforce HRD, Filler Data, VBAQ, Frame Skipping
>>>>> +    { "enforce_hrd",    "Enforce HRD",
>> OFFSET(enforce_hrd),
>>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>>>
>>>> Does this option work?  I don't seem to be able to push it into
>>>> generating HRD information with any combination of options.
>>>>
>>>
>>> Fixed.
>>
>> What combination of options are needed to get the HRD parameters in the
>> output stream?  I still don't see them with the new version.
> 
> From codec team: AMF HRD parameter ensures that the output stream is conformant 
> to HRD bit rate requirements but does not add SEI any other stream parameters. 

Ok, sure.

>>>>> +    { "filler_data",    "Filler Data Enable",                   OFFSET(filler_data),
>>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>>>> +    { "vbaq",           "Enable VBAQ",                          OFFSET(enable_vbaq),
>>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>>>> +    { "frame_skipping", "Rate Control Based Frame Skip",
>>>> OFFSET(skip_frame),         AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>>>> +
>>>>> +    /// QP Values
>>>>> +    { "qp_i",           "Quantization Parameter for I-Frame",   OFFSET(qp_i),
>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
>>>>> +    { "qp_p",           "Quantization Parameter for P-Frame",
>> OFFSET(qp_p),
>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
>>>>> +    { "qp_b",           "Quantization Parameter for B-Frame",
>> OFFSET(qp_b),
>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
>>>>> +
>>>>> +    /// Pre-Pass, Pre-Analysis, Two-Pass
>>>>> +    { "preanalysis",    "Pre-Analysis Mode",
>> OFFSET(preanalysis),
>>>> AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE, NULL },
>>>>> +
>>>>> +    /// Maximum Access Unit Size
>>>>> +    { "max_au_size",    "Maximum Access Unit Size for rate control (in
>> bits)",
>>>> OFFSET(max_au_size),        AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE
>> },
>>>>
>>>> Can you explain more about what this option does?  I don't seem to be
>>>> able to get it to do anything - e.g. setting -max_au_size 80000 with
>>>> 30fps CBR 1M (which should be easily achievable) still makes packets
>>>> of more than 80000
>>>> bits.)
>>>>
>>>
>>> It means maximum frame size in bits, and it should be used together
>>> with enforce_hrd enabled.  I tested, it works after the related fix for
>> enforce_hrd.
>>> I added  dependency handling.
>>
>> $ ./ffmpeg_g -y -nostats -i ~/bbb_1080_264.mp4 -an -c:v h264_amf -bsf:v
>> trace_headers -frames:v 1000 -enforce_hrd 1 -b:v 1M -maxrate 1M -
>> max_au_size 80000 out.mp4 2>&1 | grep 'Packet: [0-9]\{5\}'
>> [AVBSFContext @ 00000000029d7f40] Packet: 11426 bytes, key frame, pts
>> 128000, dts 128000.
>> [AVBSFContext @ 00000000029d7f40] Packet: 17623 bytes, key frame, pts
>> 192000, dts 192000.
>> [AVBSFContext @ 00000000029d7f40] Packet: 23358 bytes, pts 249856, dts
>> 249856.
>>
>> (That is, packets bigger than the supposed 80000-bit maximum.)  Expected?
> 
> No, this is not expected. I tried the exact command line and did not get packages 
> more then 80000 bits. Sorry to ask but did you apply the change in amfenc.h?

I used the most recent patch on the list, <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-November/219757.html>.  (Required a bit of fixup to apply, as Michael already noted.)

- Mark
mmironov Nov. 14, 2017, 5:14 p.m. UTC | #16
> >>>>> +    res = ctx->factory->pVtbl->CreateContext(ctx->factory, &ctx-

> >>> context);

> >>>>> +    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK,

> AVERROR_UNKNOWN,

> >>>> "CreateContext() failed with error %d\n", res);

> >>>>> +    // try to reuse existing DX device

> >>>>> +    if (avctx->hw_frames_ctx) {

> >>>>> +        AVHWFramesContext *device_ctx =

> >>>>> + (AVHWFramesContext*)avctx-

> >>>>> hw_frames_ctx->data;

> >>>>> +        if (device_ctx->device_ctx->type ==

> >> AV_HWDEVICE_TYPE_D3D11VA){

> >>>>> +            if (amf_av_to_amf_format(device_ctx->sw_format) ==

> >>>>> + AMF_SURFACE_UNKNOWN) {

> >>>>

> >>>> This test is inverted.

> >>>>

> >>>> Have you actually tested this path?  Even with that test fixed, I'm

> >>>> unable to pass the following initialisation test with an AMD D3D11

> device.

> >>>>

> >>>

> >>> Yes, the condition should be reverted. To test I had to add

> >>> "-hwaccel d3d11va -hwaccel_output_format d3d11" to the command

> line.

> >>

> >> Yeah.  I get:

> >>

> >> $ ./ffmpeg_g -y -hwaccel d3d11va -hwaccel_device 0 -

> >> hwaccel_output_format d3d11 -i ~/bbb_1080_264.mp4 -an -c:v h264_amf

> >> out.mp4 ...

> >> [AVHWDeviceContext @ 000000000270e120] Created on device 1002:665f

> >> (AMD Radeon (TM) R7 360 Series).

> >> ...

> >> [h264_amf @ 00000000004dcd80] amf_shared: avctx->hw_frames_ctx

> has

> >> non-AMD device, switching to default

> >>

> >> It's then comedically slow in this state (about 2fps), but works fine

> >> when the decode is in software.

> >

> > Is it possible that you also have iGPU not disabled and it is used for

> decoding as adapter 0?

> 

> There is an integrated GPU, but it's currently completely disabled.  (I made

> <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-

> November/219795.html> to check that the device was definitely right.)

> 

> > Can you provide a log from dxdiag.exe?

> 

> <http://ixia.jkqxz.net/~mrt/DxDiag.txt>

> 

> > If AMF created own DX device then submission logic an speed is the same

> as from SW decoder.

> > It would be interesting to see a short GPUVIEW log.

> 

> My Windows knowledge is insufficient to get that immediately, but if you

> think it's useful I can look into it?


I think I know what is going on. You are on Win7. In Win7 D3D11VA API is not available from MSFT. 
AMF will fall into DX9 based encoding submission and this is why the message was produced.
The AMF performance should be the same on DX9 but I don’t know how decoding is done 
without D3D11VA support.
GPUVIEW is not really needed if my assumptions are correct. 

> 

> >>>>> +

> >>>>> +    // Dynamic

> >>>>> +    /// Rate Control Method

> >>>>> +    { "rc",             "Rate Control Method",

> >>>> OFFSET(rate_control_mode),  AV_OPT_TYPE_INT,   { .i64 =

> >>>>

> >>

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VB

> >>>> R    },

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP,

> >>>>

> >>

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED

> >>>> _VBR, VE, "rc" },

> >>>>> +    { "cqp",            "Constant Quantization Parameter",      0,

> >>>> AV_OPT_TYPE_CONST, { .i64 =

> >>>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP

> >> },

> >>>> 0, 0, VE, "rc" },

> >>>>> +    { "cbr",            "Constant Bitrate",                     0,

> >>>> AV_OPT_TYPE_CONST, { .i64 =

> >>>> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR                     }, 0,

> 0,

> >>>> VE, "rc" },

> >>>>> +    { "vbr_peak",       "Peak Contrained Variable Bitrate",     0,

> >>>> AV_OPT_TYPE_CONST, { .i64 =

> >>>>

> >>

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VB

> >>>> R    }, 0, 0, VE, "rc" },

> >>>>> +    { "vbr_latency",    "Latency Constrained Variable Bitrate", 0,

> >>>> AV_OPT_TYPE_CONST, { .i64 =

> >>>>

> >>

> AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED

> >>>> _VBR }, 0, 0, VE, "rc" },

> >>>>

> >>>> I think the default for this option needs to be decided dynamically.

> >>>> Just setting "-b:v" is a not-unreasonable thing to do, and

> >>>> currently the choice of PEAK_CONSTRAINED_VBR makes it then

> complain

> >>>> that

> >> maxrate isn't set.

> >>>> Similarly, if the only setting is some constant-quality option

> >>>> (-q/- global_quality, or your private ones below), it ignores that

> >>>> and use the default 2Mbps instead.

> >>>>

> >>>>> +    /// Enforce HRD, Filler Data, VBAQ, Frame Skipping

> >>>>> +    { "enforce_hrd",    "Enforce HRD",

> >> OFFSET(enforce_hrd),

> >>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>>>

> >>>> Does this option work?  I don't seem to be able to push it into

> >>>> generating HRD information with any combination of options.

> >>>>

> >>>

> >>> Fixed.

> >>

> >> What combination of options are needed to get the HRD parameters in

> >> the output stream?  I still don't see them with the new version.

> >

> > From codec team: AMF HRD parameter ensures that the output stream is

> > conformant to HRD bit rate requirements but does not add SEI any other

> stream parameters.

> 

> Ok, sure.

> 

> >>>>> +    { "filler_data",    "Filler Data Enable",                   OFFSET(filler_data),

> >>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>>>> +    { "vbaq",           "Enable VBAQ",

> OFFSET(enable_vbaq),

> >>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>>>> +    { "frame_skipping", "Rate Control Based Frame Skip",

> >>>> OFFSET(skip_frame),         AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>>>> +

> >>>>> +    /// QP Values

> >>>>> +    { "qp_i",           "Quantization Parameter for I-Frame",

> OFFSET(qp_i),

> >>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> >>>>> +    { "qp_p",           "Quantization Parameter for P-Frame",

> >> OFFSET(qp_p),

> >>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> >>>>> +    { "qp_b",           "Quantization Parameter for B-Frame",

> >> OFFSET(qp_b),

> >>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> >>>>> +

> >>>>> +    /// Pre-Pass, Pre-Analysis, Two-Pass

> >>>>> +    { "preanalysis",    "Pre-Analysis Mode",

> >> OFFSET(preanalysis),

> >>>> AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE, NULL },

> >>>>> +

> >>>>> +    /// Maximum Access Unit Size

> >>>>> +    { "max_au_size",    "Maximum Access Unit Size for rate control (in

> >> bits)",

> >>>> OFFSET(max_au_size),        AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX,

> VE

> >> },

> >>>>

> >>>> Can you explain more about what this option does?  I don't seem to

> >>>> be able to get it to do anything - e.g. setting -max_au_size 80000

> >>>> with 30fps CBR 1M (which should be easily achievable) still makes

> >>>> packets of more than 80000

> >>>> bits.)

> >>>>

> >>>

> >>> It means maximum frame size in bits, and it should be used together

> >>> with enforce_hrd enabled.  I tested, it works after the related fix

> >>> for

> >> enforce_hrd.

> >>> I added  dependency handling.

> >>

> >> $ ./ffmpeg_g -y -nostats -i ~/bbb_1080_264.mp4 -an -c:v h264_amf

> >> -bsf:v trace_headers -frames:v 1000 -enforce_hrd 1 -b:v 1M -maxrate

> >> 1M - max_au_size 80000 out.mp4 2>&1 | grep 'Packet: [0-9]\{5\}'

> >> [AVBSFContext @ 00000000029d7f40] Packet: 11426 bytes, key frame, pts

> >> 128000, dts 128000.

> >> [AVBSFContext @ 00000000029d7f40] Packet: 17623 bytes, key frame, pts

> >> 192000, dts 192000.

> >> [AVBSFContext @ 00000000029d7f40] Packet: 23358 bytes, pts 249856,

> >> dts 249856.

> >>

> >> (That is, packets bigger than the supposed 80000-bit maximum.)

> Expected?

> >

> > No, this is not expected. I tried the exact command line and did not

> > get packages more then 80000 bits. Sorry to ask but did you apply the

> change in amfenc.h?

> 

> I used the most recent patch on the list,

> <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-

> November/219757.html>.  (Required a bit of fixup to apply, as Michael

> already noted.)


Yes, I will submit the update today but I cannot repro large packets.
Can you just check if you get the change:

- typedef     amf_uint16          amf_bool;
+ typedef     amf_uint8          amf_bool;

> 

> - Mark

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Thanks,
Mikhail
Mark Thompson Nov. 14, 2017, 5:45 p.m. UTC | #17
On 14/11/17 17:14, Mironov, Mikhail wrote:
>>>>>>> +    res = ctx->factory->pVtbl->CreateContext(ctx->factory, &ctx-
>>>>> context);
>>>>>>> +    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK,
>> AVERROR_UNKNOWN,
>>>>>> "CreateContext() failed with error %d\n", res);
>>>>>>> +    // try to reuse existing DX device
>>>>>>> +    if (avctx->hw_frames_ctx) {
>>>>>>> +        AVHWFramesContext *device_ctx =
>>>>>>> + (AVHWFramesContext*)avctx-
>>>>>>> hw_frames_ctx->data;
>>>>>>> +        if (device_ctx->device_ctx->type ==
>>>> AV_HWDEVICE_TYPE_D3D11VA){
>>>>>>> +            if (amf_av_to_amf_format(device_ctx->sw_format) ==
>>>>>>> + AMF_SURFACE_UNKNOWN) {
>>>>>>
>>>>>> This test is inverted.
>>>>>>
>>>>>> Have you actually tested this path?  Even with that test fixed, I'm
>>>>>> unable to pass the following initialisation test with an AMD D3D11
>> device.
>>>>>>
>>>>>
>>>>> Yes, the condition should be reverted. To test I had to add
>>>>> "-hwaccel d3d11va -hwaccel_output_format d3d11" to the command
>> line.
>>>>
>>>> Yeah.  I get:
>>>>
>>>> $ ./ffmpeg_g -y -hwaccel d3d11va -hwaccel_device 0 -
>>>> hwaccel_output_format d3d11 -i ~/bbb_1080_264.mp4 -an -c:v h264_amf
>>>> out.mp4 ...
>>>> [AVHWDeviceContext @ 000000000270e120] Created on device 1002:665f
>>>> (AMD Radeon (TM) R7 360 Series).
>>>> ...
>>>> [h264_amf @ 00000000004dcd80] amf_shared: avctx->hw_frames_ctx
>> has
>>>> non-AMD device, switching to default
>>>>
>>>> It's then comedically slow in this state (about 2fps), but works fine
>>>> when the decode is in software.
>>>
>>> Is it possible that you also have iGPU not disabled and it is used for
>> decoding as adapter 0?
>>
>> There is an integrated GPU, but it's currently completely disabled.  (I made
>> <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-
>> November/219795.html> to check that the device was definitely right.)
>>
>>> Can you provide a log from dxdiag.exe?
>>
>> <http://ixia.jkqxz.net/~mrt/DxDiag.txt>
>>
>>> If AMF created own DX device then submission logic an speed is the same
>> as from SW decoder.
>>> It would be interesting to see a short GPUVIEW log.
>>
>> My Windows knowledge is insufficient to get that immediately, but if you
>> think it's useful I can look into it?
> 
> I think I know what is going on. You are on Win7. In Win7 D3D11VA API is not available from MSFT. 
> AMF will fall into DX9 based encoding submission and this is why the message was produced.
> The AMF performance should be the same on DX9 but I don’t know how decoding is done 
> without D3D11VA support.
> GPUVIEW is not really needed if my assumptions are correct. 

Ah, that would make sense.  Maybe detect it and fail earlier with a helpful message - the current "not an AMD device" is wrong in this case.

Decode via D3D11 does work for me on Windows 7 with both AMD and Intel; I don't know anything about how, though.  (I don't really care about Windows 7 - this was just a set of parts mashed together into a working machine for testing, the Windows 7 install is inherited from elsewhere.)

>>>>>>> +    { "filler_data",    "Filler Data Enable",                   OFFSET(filler_data),
>>>>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>>>>>> +    { "vbaq",           "Enable VBAQ",
>> OFFSET(enable_vbaq),
>>>>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>>>>>> +    { "frame_skipping", "Rate Control Based Frame Skip",
>>>>>> OFFSET(skip_frame),         AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>>>>>> +
>>>>>>> +    /// QP Values
>>>>>>> +    { "qp_i",           "Quantization Parameter for I-Frame",
>> OFFSET(qp_i),
>>>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
>>>>>>> +    { "qp_p",           "Quantization Parameter for P-Frame",
>>>> OFFSET(qp_p),
>>>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
>>>>>>> +    { "qp_b",           "Quantization Parameter for B-Frame",
>>>> OFFSET(qp_b),
>>>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
>>>>>>> +
>>>>>>> +    /// Pre-Pass, Pre-Analysis, Two-Pass
>>>>>>> +    { "preanalysis",    "Pre-Analysis Mode",
>>>> OFFSET(preanalysis),
>>>>>> AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE, NULL },
>>>>>>> +
>>>>>>> +    /// Maximum Access Unit Size
>>>>>>> +    { "max_au_size",    "Maximum Access Unit Size for rate control (in
>>>> bits)",
>>>>>> OFFSET(max_au_size),        AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX,
>> VE
>>>> },
>>>>>>
>>>>>> Can you explain more about what this option does?  I don't seem to
>>>>>> be able to get it to do anything - e.g. setting -max_au_size 80000
>>>>>> with 30fps CBR 1M (which should be easily achievable) still makes
>>>>>> packets of more than 80000
>>>>>> bits.)
>>>>>>
>>>>>
>>>>> It means maximum frame size in bits, and it should be used together
>>>>> with enforce_hrd enabled.  I tested, it works after the related fix
>>>>> for
>>>> enforce_hrd.
>>>>> I added  dependency handling.
>>>>
>>>> $ ./ffmpeg_g -y -nostats -i ~/bbb_1080_264.mp4 -an -c:v h264_amf
>>>> -bsf:v trace_headers -frames:v 1000 -enforce_hrd 1 -b:v 1M -maxrate
>>>> 1M - max_au_size 80000 out.mp4 2>&1 | grep 'Packet: [0-9]\{5\}'
>>>> [AVBSFContext @ 00000000029d7f40] Packet: 11426 bytes, key frame, pts
>>>> 128000, dts 128000.
>>>> [AVBSFContext @ 00000000029d7f40] Packet: 17623 bytes, key frame, pts
>>>> 192000, dts 192000.
>>>> [AVBSFContext @ 00000000029d7f40] Packet: 23358 bytes, pts 249856,
>>>> dts 249856.
>>>>
>>>> (That is, packets bigger than the supposed 80000-bit maximum.)
>> Expected?
>>>
>>> No, this is not expected. I tried the exact command line and did not
>>> get packages more then 80000 bits. Sorry to ask but did you apply the
>> change in amfenc.h?
>>
>> I used the most recent patch on the list,
>> <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-
>> November/219757.html>.  (Required a bit of fixup to apply, as Michael
>> already noted.)
> 
> Yes, I will submit the update today but I cannot repro large packets.
> Can you just check if you get the change:
> 
> - typedef     amf_uint16          amf_bool;
> + typedef     amf_uint8          amf_bool;

Yes, I have that change.

Could it be a difference in support for the particular card I am using (Bonaire / GCN 2, so several generations old now), or will that be the same across all of them?

Thanks,

- Mark
mmironov Nov. 14, 2017, 10:10 p.m. UTC | #18
> On 14/11/17 17:14, Mironov, Mikhail wrote:

> >>>>>>> +    res = ctx->factory->pVtbl->CreateContext(ctx->factory,

> >>>>>>> + &ctx-

> >>>>> context);

> >>>>>>> +    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK,

> >> AVERROR_UNKNOWN,

> >>>>>> "CreateContext() failed with error %d\n", res);

> >>>>>>> +    // try to reuse existing DX device

> >>>>>>> +    if (avctx->hw_frames_ctx) {

> >>>>>>> +        AVHWFramesContext *device_ctx =

> >>>>>>> + (AVHWFramesContext*)avctx-

> >>>>>>> hw_frames_ctx->data;

> >>>>>>> +        if (device_ctx->device_ctx->type ==

> >>>> AV_HWDEVICE_TYPE_D3D11VA){

> >>>>>>> +            if (amf_av_to_amf_format(device_ctx->sw_format) ==

> >>>>>>> + AMF_SURFACE_UNKNOWN) {

> >>>>>>

> >>>>>> This test is inverted.

> >>>>>>

> >>>>>> Have you actually tested this path?  Even with that test fixed,

> >>>>>> I'm unable to pass the following initialisation test with an AMD

> >>>>>> D3D11

> >> device.

> >>>>>>

> >>>>>

> >>>>> Yes, the condition should be reverted. To test I had to add

> >>>>> "-hwaccel d3d11va -hwaccel_output_format d3d11" to the command

> >> line.

> >>>>

> >>>> Yeah.  I get:

> >>>>

> >>>> $ ./ffmpeg_g -y -hwaccel d3d11va -hwaccel_device 0 -

> >>>> hwaccel_output_format d3d11 -i ~/bbb_1080_264.mp4 -an -c:v

> h264_amf

> >>>> out.mp4 ...

> >>>> [AVHWDeviceContext @ 000000000270e120] Created on device

> 1002:665f

> >>>> (AMD Radeon (TM) R7 360 Series).

> >>>> ...

> >>>> [h264_amf @ 00000000004dcd80] amf_shared: avctx->hw_frames_ctx

> >> has

> >>>> non-AMD device, switching to default

> >>>>

> >>>> It's then comedically slow in this state (about 2fps), but works

> >>>> fine when the decode is in software.

> >>>

> >>> Is it possible that you also have iGPU not disabled and it is used

> >>> for

> >> decoding as adapter 0?

> >>

> >> There is an integrated GPU, but it's currently completely disabled.

> >> (I made

> >> <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-

> >> November/219795.html> to check that the device was definitely right.)

> >>

> >>> Can you provide a log from dxdiag.exe?

> >>

> >> <http://ixia.jkqxz.net/~mrt/DxDiag.txt>

> >>

> >>> If AMF created own DX device then submission logic an speed is the

> >>> same

> >> as from SW decoder.

> >>> It would be interesting to see a short GPUVIEW log.

> >>

> >> My Windows knowledge is insufficient to get that immediately, but if

> >> you think it's useful I can look into it?

> >

> > I think I know what is going on. You are on Win7. In Win7 D3D11VA API is

> not available from MSFT.

> > AMF will fall into DX9 based encoding submission and this is why the

> message was produced.

> > The AMF performance should be the same on DX9 but I don’t know how

> > decoding is done without D3D11VA support.

> > GPUVIEW is not really needed if my assumptions are correct.

> 

> Ah, that would make sense.  Maybe detect it and fail earlier with a helpful

> message - the current "not an AMD device" is wrong in this case.

> 

> Decode via D3D11 does work for me on Windows 7 with both AMD and Intel;

> I don't know anything about how, though.  (I don't really care about

> Windows 7 - this was just a set of parts mashed together into a working

> machine for testing, the Windows 7 install is inherited from elsewhere.)


I run this in Win7.  What I see is the decoding does go via D3D11VA. The support comes 
with Platform Update. But AMF encoder works on Win7 via D3D9 only. That explains 
the performance hit: In D3D11 to copy video output HW accelerator copies frame via staging texture. 
If I use for decoding DXVA2 it is faster because staging texture is not needed.
I am thinking to connect dxva2 acceleration with AMF encoder 
but probably in the next phase.
I've added more precise logging.

> 

> >>>>>>> +    { "filler_data",    "Filler Data Enable",

> OFFSET(filler_data),

> >>>>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>>>>>> +    { "vbaq",           "Enable VBAQ",

> >> OFFSET(enable_vbaq),

> >>>>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>>>>>> +    { "frame_skipping", "Rate Control Based Frame Skip",

> >>>>>> OFFSET(skip_frame),         AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>>>>>> +

> >>>>>>> +    /// QP Values

> >>>>>>> +    { "qp_i",           "Quantization Parameter for I-Frame",

> >> OFFSET(qp_i),

> >>>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> >>>>>>> +    { "qp_p",           "Quantization Parameter for P-Frame",

> >>>> OFFSET(qp_p),

> >>>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> >>>>>>> +    { "qp_b",           "Quantization Parameter for B-Frame",

> >>>> OFFSET(qp_b),

> >>>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> >>>>>>> +

> >>>>>>> +    /// Pre-Pass, Pre-Analysis, Two-Pass

> >>>>>>> +    { "preanalysis",    "Pre-Analysis Mode",

> >>>> OFFSET(preanalysis),

> >>>>>> AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE, NULL },

> >>>>>>> +

> >>>>>>> +    /// Maximum Access Unit Size

> >>>>>>> +    { "max_au_size",    "Maximum Access Unit Size for rate control

> (in

> >>>> bits)",

> >>>>>> OFFSET(max_au_size),        AV_OPT_TYPE_INT, { .i64 = 0 }, 0,

> INT_MAX,

> >> VE

> >>>> },

> >>>>>>

> >>>>>> Can you explain more about what this option does?  I don't seem

> >>>>>> to be able to get it to do anything - e.g. setting -max_au_size

> >>>>>> 80000 with 30fps CBR 1M (which should be easily achievable) still

> >>>>>> makes packets of more than 80000

> >>>>>> bits.)

> >>>>>>

> >>>>>

> >>>>> It means maximum frame size in bits, and it should be used

> >>>>> together with enforce_hrd enabled.  I tested, it works after the

> >>>>> related fix for

> >>>> enforce_hrd.

> >>>>> I added  dependency handling.

> >>>>

> >>>> $ ./ffmpeg_g -y -nostats -i ~/bbb_1080_264.mp4 -an -c:v h264_amf

> >>>> -bsf:v trace_headers -frames:v 1000 -enforce_hrd 1 -b:v 1M -maxrate

> >>>> 1M - max_au_size 80000 out.mp4 2>&1 | grep 'Packet: [0-9]\{5\}'

> >>>> [AVBSFContext @ 00000000029d7f40] Packet: 11426 bytes, key frame,

> >>>> pts 128000, dts 128000.

> >>>> [AVBSFContext @ 00000000029d7f40] Packet: 17623 bytes, key frame,

> >>>> pts 192000, dts 192000.

> >>>> [AVBSFContext @ 00000000029d7f40] Packet: 23358 bytes, pts 249856,

> >>>> dts 249856.

> >>>>

> >>>> (That is, packets bigger than the supposed 80000-bit maximum.)

> >> Expected?

> >>>

> >>> No, this is not expected. I tried the exact command line and did not

> >>> get packages more then 80000 bits. Sorry to ask but did you apply

> >>> the

> >> change in amfenc.h?

> >>

> >> I used the most recent patch on the list,

> >> <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-

> >> November/219757.html>.  (Required a bit of fixup to apply, as Michael

> >> already noted.)

> >

> > Yes, I will submit the update today but I cannot repro large packets.

> > Can you just check if you get the change:

> >

> > - typedef     amf_uint16          amf_bool;

> > + typedef     amf_uint8          amf_bool;

> 

> Yes, I have that change.

> 

> Could it be a difference in support for the particular card I am using (Bonaire

> / GCN 2, so several generations old now), or will that be the same across all

> of them?

> 


I got a different clip and reproduced the issue. We discussed this with our main "rate control" guy. 
Basically, this parameter cannot guarantee the frame size in a complex scene case when it is combined 
with relatively low bit rate value  and relatively low max AU size value. 
To confirm this it would be great if you could share your output stream so we verify that this is the case.
(or input stream).


> Thanks,

> 

> - Mark

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Thanks,
Mikhail
Hendrik Leppkes Nov. 14, 2017, 10:32 p.m. UTC | #19
On Tue, Nov 14, 2017 at 6:45 PM, Mark Thompson <sw@jkqxz.net> wrote:
>
> Decode via D3D11 does work for me on Windows 7 with both AMD and Intel; I don't know anything about how, though.  (I don't really care about Windows 7 - this was just a set of parts mashed together into a working machine for testing, the Windows 7 install is inherited from elsewhere.)

Even with the platform update, D3D11 on Windows 7 does not support
NV12 textures. All you could potentially decode into is the opaque
format, but thats not much fun at all.

- Hendrik
mmironov Nov. 14, 2017, 10:53 p.m. UTC | #20
> -----Original Message-----

> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf

> Of Hendrik Leppkes

> Sent: November 14, 2017 5:32 PM

> To: FFmpeg development discussions and patches <ffmpeg-

> devel@ffmpeg.org>

> Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD

> GPUs based on AMF SDK

> 

> On Tue, Nov 14, 2017 at 6:45 PM, Mark Thompson <sw@jkqxz.net> wrote:

> >

> > Decode via D3D11 does work for me on Windows 7 with both AMD and

> > Intel; I don't know anything about how, though.  (I don't really care

> > about Windows 7 - this was just a set of parts mashed together into a

> > working machine for testing, the Windows 7 install is inherited from

> > elsewhere.)

> 

> Even with the platform update, D3D11 on Windows 7 does not support

> NV12 textures. All you could potentially decode into is the opaque format,

> but thats not much fun at all.

> 


I thought the same way but today I debugged FFmpeg on Win7 and saw that 
CreateTexture2D() with DXGI_FORMAT_NV12 succeeded and 
video device and context acquired.. 
I think some optional update requeued, though. 

> - Hendrik

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Thanks,
Mikhail
Mark Thompson Nov. 14, 2017, 11:11 p.m. UTC | #21
On 14/11/17 22:10, Mironov, Mikhail wrote:
>> On 14/11/17 17:14, Mironov, Mikhail wrote:
>>>>>>>>> +    res = ctx->factory->pVtbl->CreateContext(ctx->factory,
>>>>>>>>> + &ctx-
>>>>>>> context);
>>>>>>>>> +    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK,
>>>> AVERROR_UNKNOWN,
>>>>>>>> "CreateContext() failed with error %d\n", res);
>>>>>>>>> +    // try to reuse existing DX device
>>>>>>>>> +    if (avctx->hw_frames_ctx) {
>>>>>>>>> +        AVHWFramesContext *device_ctx =
>>>>>>>>> + (AVHWFramesContext*)avctx-
>>>>>>>>> hw_frames_ctx->data;
>>>>>>>>> +        if (device_ctx->device_ctx->type ==
>>>>>> AV_HWDEVICE_TYPE_D3D11VA){
>>>>>>>>> +            if (amf_av_to_amf_format(device_ctx->sw_format) ==
>>>>>>>>> + AMF_SURFACE_UNKNOWN) {
>>>>>>>>
>>>>>>>> This test is inverted.
>>>>>>>>
>>>>>>>> Have you actually tested this path?  Even with that test fixed,
>>>>>>>> I'm unable to pass the following initialisation test with an AMD
>>>>>>>> D3D11
>>>> device.
>>>>>>>>
>>>>>>>
>>>>>>> Yes, the condition should be reverted. To test I had to add
>>>>>>> "-hwaccel d3d11va -hwaccel_output_format d3d11" to the command
>>>> line.
>>>>>>
>>>>>> Yeah.  I get:
>>>>>>
>>>>>> $ ./ffmpeg_g -y -hwaccel d3d11va -hwaccel_device 0 -
>>>>>> hwaccel_output_format d3d11 -i ~/bbb_1080_264.mp4 -an -c:v
>> h264_amf
>>>>>> out.mp4 ...
>>>>>> [AVHWDeviceContext @ 000000000270e120] Created on device
>> 1002:665f
>>>>>> (AMD Radeon (TM) R7 360 Series).
>>>>>> ...
>>>>>> [h264_amf @ 00000000004dcd80] amf_shared: avctx->hw_frames_ctx
>>>> has
>>>>>> non-AMD device, switching to default
>>>>>>
>>>>>> It's then comedically slow in this state (about 2fps), but works
>>>>>> fine when the decode is in software.
>>>>>
>>>>> Is it possible that you also have iGPU not disabled and it is used
>>>>> for
>>>> decoding as adapter 0?
>>>>
>>>> There is an integrated GPU, but it's currently completely disabled.
>>>> (I made
>>>> <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-
>>>> November/219795.html> to check that the device was definitely right.)
>>>>
>>>>> Can you provide a log from dxdiag.exe?
>>>>
>>>> <http://ixia.jkqxz.net/~mrt/DxDiag.txt>
>>>>
>>>>> If AMF created own DX device then submission logic an speed is the
>>>>> same
>>>> as from SW decoder.
>>>>> It would be interesting to see a short GPUVIEW log.
>>>>
>>>> My Windows knowledge is insufficient to get that immediately, but if
>>>> you think it's useful I can look into it?
>>>
>>> I think I know what is going on. You are on Win7. In Win7 D3D11VA API is
>> not available from MSFT.
>>> AMF will fall into DX9 based encoding submission and this is why the
>> message was produced.
>>> The AMF performance should be the same on DX9 but I don’t know how
>>> decoding is done without D3D11VA support.
>>> GPUVIEW is not really needed if my assumptions are correct.
>>
>> Ah, that would make sense.  Maybe detect it and fail earlier with a helpful
>> message - the current "not an AMD device" is wrong in this case.
>>
>> Decode via D3D11 does work for me on Windows 7 with both AMD and Intel;
>> I don't know anything about how, though.  (I don't really care about
>> Windows 7 - this was just a set of parts mashed together into a working
>> machine for testing, the Windows 7 install is inherited from elsewhere.)
> 
> I run this in Win7.  What I see is the decoding does go via D3D11VA. The support comes 
> with Platform Update. But AMF encoder works on Win7 via D3D9 only. That explains 
> the performance hit: In D3D11 to copy video output HW accelerator copies frame via staging texture. 
> If I use for decoding DXVA2 it is faster because staging texture is not needed.
> I am thinking to connect dxva2 acceleration with AMF encoder 
> but probably in the next phase.
> I've added more precise logging.
> 
>>
>>>>>>>>> +    { "filler_data",    "Filler Data Enable",
>> OFFSET(filler_data),
>>>>>>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>>>>>>>> +    { "vbaq",           "Enable VBAQ",
>>>> OFFSET(enable_vbaq),
>>>>>>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>>>>>>>> +    { "frame_skipping", "Rate Control Based Frame Skip",
>>>>>>>> OFFSET(skip_frame),         AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
>>>>>>>>> +
>>>>>>>>> +    /// QP Values
>>>>>>>>> +    { "qp_i",           "Quantization Parameter for I-Frame",
>>>> OFFSET(qp_i),
>>>>>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
>>>>>>>>> +    { "qp_p",           "Quantization Parameter for P-Frame",
>>>>>> OFFSET(qp_p),
>>>>>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
>>>>>>>>> +    { "qp_b",           "Quantization Parameter for B-Frame",
>>>>>> OFFSET(qp_b),
>>>>>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },
>>>>>>>>> +
>>>>>>>>> +    /// Pre-Pass, Pre-Analysis, Two-Pass
>>>>>>>>> +    { "preanalysis",    "Pre-Analysis Mode",
>>>>>> OFFSET(preanalysis),
>>>>>>>> AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE, NULL },
>>>>>>>>> +
>>>>>>>>> +    /// Maximum Access Unit Size
>>>>>>>>> +    { "max_au_size",    "Maximum Access Unit Size for rate control
>> (in
>>>>>> bits)",
>>>>>>>> OFFSET(max_au_size),        AV_OPT_TYPE_INT, { .i64 = 0 }, 0,
>> INT_MAX,
>>>> VE
>>>>>> },
>>>>>>>>
>>>>>>>> Can you explain more about what this option does?  I don't seem
>>>>>>>> to be able to get it to do anything - e.g. setting -max_au_size
>>>>>>>> 80000 with 30fps CBR 1M (which should be easily achievable) still
>>>>>>>> makes packets of more than 80000
>>>>>>>> bits.)
>>>>>>>>
>>>>>>>
>>>>>>> It means maximum frame size in bits, and it should be used
>>>>>>> together with enforce_hrd enabled.  I tested, it works after the
>>>>>>> related fix for
>>>>>> enforce_hrd.
>>>>>>> I added  dependency handling.
>>>>>>
>>>>>> $ ./ffmpeg_g -y -nostats -i ~/bbb_1080_264.mp4 -an -c:v h264_amf
>>>>>> -bsf:v trace_headers -frames:v 1000 -enforce_hrd 1 -b:v 1M -maxrate
>>>>>> 1M - max_au_size 80000 out.mp4 2>&1 | grep 'Packet: [0-9]\{5\}'
>>>>>> [AVBSFContext @ 00000000029d7f40] Packet: 11426 bytes, key frame,
>>>>>> pts 128000, dts 128000.
>>>>>> [AVBSFContext @ 00000000029d7f40] Packet: 17623 bytes, key frame,
>>>>>> pts 192000, dts 192000.
>>>>>> [AVBSFContext @ 00000000029d7f40] Packet: 23358 bytes, pts 249856,
>>>>>> dts 249856.
>>>>>>
>>>>>> (That is, packets bigger than the supposed 80000-bit maximum.)
>>>> Expected?
>>>>>
>>>>> No, this is not expected. I tried the exact command line and did not
>>>>> get packages more then 80000 bits. Sorry to ask but did you apply
>>>>> the
>>>> change in amfenc.h?
>>>>
>>>> I used the most recent patch on the list,
>>>> <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-
>>>> November/219757.html>.  (Required a bit of fixup to apply, as Michael
>>>> already noted.)
>>>
>>> Yes, I will submit the update today but I cannot repro large packets.
>>> Can you just check if you get the change:
>>>
>>> - typedef     amf_uint16          amf_bool;
>>> + typedef     amf_uint8          amf_bool;
>>
>> Yes, I have that change.
>>
>> Could it be a difference in support for the particular card I am using (Bonaire
>> / GCN 2, so several generations old now), or will that be the same across all
>> of them?
>>
> 
> I got a different clip and reproduced the issue. We discussed this with our main "rate control" guy. 
> Basically, this parameter cannot guarantee the frame size in a complex scene case when it is combined 
> with relatively low bit rate value  and relatively low max AU size value. 
> To confirm this it would be great if you could share your output stream so we verify that this is the case.
> (or input stream).

Input:  <http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4>
Output: <http://ixia.jkqxz.net/~mrt/amf_max_au_size.mp4>

Looking at the transition on frame 976, the output quality is pretty bad, but not really bad enough to merit the failure - the macroblock QPs are only 37/38, and go higher on following frames.

- Mark
mmironov Nov. 14, 2017, 11:47 p.m. UTC | #22
> -----Original Message-----

> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf

> Of Mark Thompson

> Sent: November 14, 2017 6:11 PM

> To: ffmpeg-devel@ffmpeg.org

> Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD

> GPUs based on AMF SDK

> 

> On 14/11/17 22:10, Mironov, Mikhail wrote:

> >> On 14/11/17 17:14, Mironov, Mikhail wrote:

> >>>>>>>>> +    res = ctx->factory->pVtbl->CreateContext(ctx->factory,

> >>>>>>>>> + &ctx-

> >>>>>>> context);

> >>>>>>>>> +    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK,

> >>>> AVERROR_UNKNOWN,

> >>>>>>>> "CreateContext() failed with error %d\n", res);

> >>>>>>>>> +    // try to reuse existing DX device

> >>>>>>>>> +    if (avctx->hw_frames_ctx) {

> >>>>>>>>> +        AVHWFramesContext *device_ctx =

> >>>>>>>>> + (AVHWFramesContext*)avctx-

> >>>>>>>>> hw_frames_ctx->data;

> >>>>>>>>> +        if (device_ctx->device_ctx->type ==

> >>>>>> AV_HWDEVICE_TYPE_D3D11VA){

> >>>>>>>>> +            if (amf_av_to_amf_format(device_ctx->sw_format)

> >>>>>>>>> + ==

> >>>>>>>>> + AMF_SURFACE_UNKNOWN) {

> >>>>>>>>

> >>>>>>>> This test is inverted.

> >>>>>>>>

> >>>>>>>> Have you actually tested this path?  Even with that test fixed,

> >>>>>>>> I'm unable to pass the following initialisation test with an

> >>>>>>>> AMD

> >>>>>>>> D3D11

> >>>> device.

> >>>>>>>>

> >>>>>>>

> >>>>>>> Yes, the condition should be reverted. To test I had to add

> >>>>>>> "-hwaccel d3d11va -hwaccel_output_format d3d11" to the

> command

> >>>> line.

> >>>>>>

> >>>>>> Yeah.  I get:

> >>>>>>

> >>>>>> $ ./ffmpeg_g -y -hwaccel d3d11va -hwaccel_device 0 -

> >>>>>> hwaccel_output_format d3d11 -i ~/bbb_1080_264.mp4 -an -c:v

> >> h264_amf

> >>>>>> out.mp4 ...

> >>>>>> [AVHWDeviceContext @ 000000000270e120] Created on device

> >> 1002:665f

> >>>>>> (AMD Radeon (TM) R7 360 Series).

> >>>>>> ...

> >>>>>> [h264_amf @ 00000000004dcd80] amf_shared: avctx-

> >hw_frames_ctx

> >>>> has

> >>>>>> non-AMD device, switching to default

> >>>>>>

> >>>>>> It's then comedically slow in this state (about 2fps), but works

> >>>>>> fine when the decode is in software.

> >>>>>

> >>>>> Is it possible that you also have iGPU not disabled and it is used

> >>>>> for

> >>>> decoding as adapter 0?

> >>>>

> >>>> There is an integrated GPU, but it's currently completely disabled.

> >>>> (I made

> >>>> <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-

> >>>> November/219795.html> to check that the device was definitely

> >>>> right.)

> >>>>

> >>>>> Can you provide a log from dxdiag.exe?

> >>>>

> >>>> <http://ixia.jkqxz.net/~mrt/DxDiag.txt>

> >>>>

> >>>>> If AMF created own DX device then submission logic an speed is the

> >>>>> same

> >>>> as from SW decoder.

> >>>>> It would be interesting to see a short GPUVIEW log.

> >>>>

> >>>> My Windows knowledge is insufficient to get that immediately, but

> >>>> if you think it's useful I can look into it?

> >>>

> >>> I think I know what is going on. You are on Win7. In Win7 D3D11VA

> >>> API is

> >> not available from MSFT.

> >>> AMF will fall into DX9 based encoding submission and this is why the

> >> message was produced.

> >>> The AMF performance should be the same on DX9 but I don’t know how

> >>> decoding is done without D3D11VA support.

> >>> GPUVIEW is not really needed if my assumptions are correct.

> >>

> >> Ah, that would make sense.  Maybe detect it and fail earlier with a

> >> helpful message - the current "not an AMD device" is wrong in this case.

> >>

> >> Decode via D3D11 does work for me on Windows 7 with both AMD and

> >> Intel; I don't know anything about how, though.  (I don't really care

> >> about Windows 7 - this was just a set of parts mashed together into a

> >> working machine for testing, the Windows 7 install is inherited from

> >> elsewhere.)

> >

> > I run this in Win7.  What I see is the decoding does go via D3D11VA.

> > The support comes with Platform Update. But AMF encoder works on Win7

> > via D3D9 only. That explains the performance hit: In D3D11 to copy video

> output HW accelerator copies frame via staging texture.

> > If I use for decoding DXVA2 it is faster because staging texture is not

> needed.

> > I am thinking to connect dxva2 acceleration with AMF encoder but

> > probably in the next phase.

> > I've added more precise logging.

> >

> >>

> >>>>>>>>> +    { "filler_data",    "Filler Data Enable",

> >> OFFSET(filler_data),

> >>>>>>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>>>>>>>> +    { "vbaq",           "Enable VBAQ",

> >>>> OFFSET(enable_vbaq),

> >>>>>>>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

> >>>>>>>>> +    { "frame_skipping", "Rate Control Based Frame Skip",

> >>>>>>>> OFFSET(skip_frame),         AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE

> },

> >>>>>>>>> +

> >>>>>>>>> +    /// QP Values

> >>>>>>>>> +    { "qp_i",           "Quantization Parameter for I-Frame",

> >>>> OFFSET(qp_i),

> >>>>>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> >>>>>>>>> +    { "qp_p",           "Quantization Parameter for P-Frame",

> >>>>>> OFFSET(qp_p),

> >>>>>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> >>>>>>>>> +    { "qp_b",           "Quantization Parameter for B-Frame",

> >>>>>> OFFSET(qp_b),

> >>>>>>>> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE },

> >>>>>>>>> +

> >>>>>>>>> +    /// Pre-Pass, Pre-Analysis, Two-Pass

> >>>>>>>>> +    { "preanalysis",    "Pre-Analysis Mode",

> >>>>>> OFFSET(preanalysis),

> >>>>>>>> AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE, NULL },

> >>>>>>>>> +

> >>>>>>>>> +    /// Maximum Access Unit Size

> >>>>>>>>> +    { "max_au_size",    "Maximum Access Unit Size for rate control

> >> (in

> >>>>>> bits)",

> >>>>>>>> OFFSET(max_au_size),        AV_OPT_TYPE_INT, { .i64 = 0 }, 0,

> >> INT_MAX,

> >>>> VE

> >>>>>> },

> >>>>>>>>

> >>>>>>>> Can you explain more about what this option does?  I don't seem

> >>>>>>>> to be able to get it to do anything - e.g. setting -max_au_size

> >>>>>>>> 80000 with 30fps CBR 1M (which should be easily achievable)

> >>>>>>>> still makes packets of more than 80000

> >>>>>>>> bits.)

> >>>>>>>>

> >>>>>>>

> >>>>>>> It means maximum frame size in bits, and it should be used

> >>>>>>> together with enforce_hrd enabled.  I tested, it works after the

> >>>>>>> related fix for

> >>>>>> enforce_hrd.

> >>>>>>> I added  dependency handling.

> >>>>>>

> >>>>>> $ ./ffmpeg_g -y -nostats -i ~/bbb_1080_264.mp4 -an -c:v h264_amf

> >>>>>> -bsf:v trace_headers -frames:v 1000 -enforce_hrd 1 -b:v 1M

> >>>>>> -maxrate 1M - max_au_size 80000 out.mp4 2>&1 | grep 'Packet: [0-

> 9]\{5\}'

> >>>>>> [AVBSFContext @ 00000000029d7f40] Packet: 11426 bytes, key

> frame,

> >>>>>> pts 128000, dts 128000.

> >>>>>> [AVBSFContext @ 00000000029d7f40] Packet: 17623 bytes, key

> frame,

> >>>>>> pts 192000, dts 192000.

> >>>>>> [AVBSFContext @ 00000000029d7f40] Packet: 23358 bytes, pts

> >>>>>> 249856, dts 249856.

> >>>>>>

> >>>>>> (That is, packets bigger than the supposed 80000-bit maximum.)

> >>>> Expected?

> >>>>>

> >>>>> No, this is not expected. I tried the exact command line and did

> >>>>> not get packages more then 80000 bits. Sorry to ask but did you

> >>>>> apply the

> >>>> change in amfenc.h?

> >>>>

> >>>> I used the most recent patch on the list,

> >>>> <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-

> >>>> November/219757.html>.  (Required a bit of fixup to apply, as

> >>>> Michael already noted.)

> >>>

> >>> Yes, I will submit the update today but I cannot repro large packets.

> >>> Can you just check if you get the change:

> >>>

> >>> - typedef     amf_uint16          amf_bool;

> >>> + typedef     amf_uint8          amf_bool;

> >>

> >> Yes, I have that change.

> >>

> >> Could it be a difference in support for the particular card I am

> >> using (Bonaire / GCN 2, so several generations old now), or will that

> >> be the same across all of them?

> >>

> >

> > I got a different clip and reproduced the issue. We discussed this with our

> main "rate control" guy.

> > Basically, this parameter cannot guarantee the frame size in a complex

> > scene case when it is combined with relatively low bit rate value  and

> relatively low max AU size value.

> > To confirm this it would be great if you could share your output stream so

> we verify that this is the case.

> > (or input stream).

> 

> Input:

> <http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1

> 080p_60fps_normal.mp4>

> Output: <http://ixia.jkqxz.net/~mrt/amf_max_au_size.mp4>

> 

> Looking at the transition on frame 976, the output quality is pretty bad, but

> not really bad enough to merit the failure - the macroblock QPs are only

> 37/38, and go higher on following frames.


Yes I see this but AMF default max QP is 46  for transcoding mode and on 
frame #976 there is scene change and encoder did reach the limit:
from Vega analyzer for this frame: max QP = 46, min QP = 37.
We can alternate the defaults in ffmpeg codec if desired.
Default settings in the encoder:
Transcoding: min= 18 max=46
All other modes: min=22 max = 48

> 

> - Mark

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Thanks,
Mikhail
diff mbox

Patch

diff --git a/Changelog b/Changelog
index 6592d86..f0d22fa 100644
--- a/Changelog
+++ b/Changelog
@@ -6,7 +6,8 @@  version <next>:
 - Dropped support for OpenJPEG versions 2.0 and below. Using OpenJPEG now
   requires 2.1 (or later) and pkg-config.
 - VDA dropped (use VideoToolbox instead)
-
+- AMF H.264 encoder
+- AMF HEVC encoder
 
 version 3.4:
 - deflicker video filter
diff --git a/compat/amd/amfsdkenc.h b/compat/amd/amfsdkenc.h
new file mode 100644
index 0000000..0d48451
--- /dev/null
+++ b/compat/amd/amfsdkenc.h
@@ -0,0 +1,1753 @@ 
+// 
+// MIT license 
+// 
+// Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+// Reduced AMF API
+//
+// Full version of AMF SDK and the latest version of this file 
+// can be found at https://github.com/GPUOpen-LibrariesAndSDKs/AMF
+
+#ifndef __AMF_SDK_Enc_h__
+#define __AMF_SDK_Enc_h__
+#pragma once
+
+//-----------------------------------------------------------------------------
+// Platform.h
+//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------
+// export declaration
+//----------------------------------------------------------------------------------------------
+#ifdef _WIN32
+#if defined(AMF_CORE_STATIC)
+#define AMF_CORE_LINK
+#else
+#if defined(AMF_CORE_EXPORTS)
+#define AMF_CORE_LINK __declspec(dllexport)
+#else
+#define AMF_CORE_LINK __declspec(dllimport)
+#endif
+#endif
+#else // #ifdef _WIN32
+#define AMF_CORE_LINK
+#endif // #ifdef _WIN32
+
+#define AMF_MACRO_STRING2(x) #x
+#define AMF_MACRO_STRING(x) AMF_MACRO_STRING2(x)
+
+#define AMF_TODO(_todo) (__FILE__ "(" AMF_MACRO_STRING(__LINE__) "): TODO: "_todo)
+
+
+#if defined(__GNUC__) || defined(__clang__)
+#define AMF_ALIGN(n) __attribute__((aligned(n)))
+#elif defined(_MSC_VER) || defined(__INTEL_COMPILER)
+#define AMF_ALIGN(n) __declspec(align(n))
+#else
+#define AMF_ALIGN(n)
+//     #error Need to define AMF_ALIGN
+#endif
+
+#include <stdio.h>
+#include <stdint.h>
+
+#if defined(_WIN32)
+
+
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
+#define AMF_STD_CALL            __stdcall
+#define AMF_CDECL_CALL          __cdecl
+#define AMF_FAST_CALL           __fastcall
+#if defined(__GNUC__) || defined(__clang__)
+#define AMF_INLINE              inline
+#define AMF_FORCEINLINE         inline
+#else
+#define AMF_INLINE              __inline
+#define AMF_FORCEINLINE         __forceinline
+#endif
+#define AMF_NO_VTABLE           __declspec(novtable)
+
+#define AMFPRId64   "I64d"
+#define LPRId64    L"I64d"
+
+#define AMFPRIud64   "Iu64d"
+#define LPRIud64    L"Iu64d"
+
+#define AMFPRIx64   "I64x"
+#define LPRIx64    L"I64x"
+
+#else // !WIN32 - Linux and Mac
+
+#define AMF_STD_CALL
+#define AMF_CDECL_CALL
+#define AMF_FAST_CALL
+#if defined(__GNUC__) || defined(__clang__)
+#define AMF_INLINE              inline
+#define AMF_FORCEINLINE         inline
+#else
+#define AMF_INLINE              __inline__
+#define AMF_FORCEINLINE         __inline__
+#endif
+#define AMF_NO_VTABLE           
+
+#if !defined(AMFPRId64)
+#define AMFPRId64    "lld"
+#define LPRId64     L"lld"
+
+#define AMFPRIud64    "ulld"
+#define LPRIud64     L"ulld"
+
+#define AMFPRIx64    "llx"
+#define LPRIx64     L"llx"
+#endif
+
+#endif // WIN32
+
+
+#if defined(_MSC_VER)
+#define AMF_WEAK __declspec( selectany ) 
+#elif defined (__GCC__) || defined(__clang__)//GCC or CLANG
+#define AMF_WEAK __attribute__((weak))
+#endif
+
+#define amf_countof(x) (sizeof(x) / sizeof(x[0]))
+
+//-------------------------------------------------------------------------------------------------
+// basic data types
+//-------------------------------------------------------------------------------------------------
+typedef     int64_t             amf_int64;
+typedef     int32_t             amf_int32;
+typedef     int16_t             amf_int16;
+typedef     int8_t              amf_int8;
+
+typedef     uint64_t            amf_uint64;
+typedef     uint32_t            amf_uint32;
+typedef     uint16_t            amf_uint16;
+typedef     uint8_t             amf_uint8;
+typedef     size_t              amf_size;
+
+typedef     void*               amf_handle;
+typedef     double              amf_double;
+typedef     float               amf_float;
+
+typedef     void                amf_void;
+
+#if defined(__cplusplus)
+typedef     bool                amf_bool;
+#else
+typedef     amf_uint16          amf_bool;
+#define     true                1 
+#define     false               0 
+#endif
+
+typedef     long                amf_long;
+typedef     int                 amf_int;
+typedef     unsigned long       amf_ulong;
+typedef     unsigned int        amf_uint;
+
+typedef     amf_int64           amf_pts;     // in 100 nanosecs
+
+#define AMF_SECOND          10000000L    // 1 second in 100 nanoseconds
+
+#define AMF_MIN(a, b) ((a) < (b) ? (a) : (b))
+#define AMF_MAX(a, b) ((a) > (b) ? (a) : (b))
+
+#if defined(_WIN32)
+#define PATH_SEPARATOR_WSTR         L"\\"
+#define PATH_SEPARATOR_WCHAR        L'\\'
+#elif defined(__linux) // Linux
+#define PATH_SEPARATOR_WSTR          L"/"
+#define PATH_SEPARATOR_WCHAR         L'/'
+#endif
+
+typedef struct AMFRect
+{
+    amf_int32 left;
+    amf_int32 top;
+    amf_int32 right;
+    amf_int32 bottom;
+} AMFRect;
+
+AMF_INLINE struct AMFRect AMFConstructRect(amf_int32 left, amf_int32 top, amf_int32 right, amf_int32 bottom)
+{
+    struct AMFRect object = { left, top, right, bottom };
+    return object;
+}
+
+typedef struct AMFSize
+{
+    amf_int32 width;
+    amf_int32 height;
+} AMFSize;
+
+AMF_INLINE struct AMFSize AMFConstructSize(amf_int32 width, amf_int32 height)
+{
+    struct AMFSize object = { width, height };
+    return object;
+}
+
+typedef struct AMFPoint
+{
+    amf_int32 x;
+    amf_int32 y;
+} AMFPoint;
+
+AMF_INLINE struct AMFPoint AMFConstructPoint(amf_int32 x, amf_int32 y)
+{
+    struct AMFPoint object = { x, y };
+    return object;
+}
+
+typedef struct AMFRate
+{
+    amf_uint32 num;
+    amf_uint32 den;
+} AMFRate;
+
+AMF_INLINE struct AMFRate AMFConstructRate(amf_uint32 num, amf_uint32 den)
+{
+    struct AMFRate object = { num, den };
+    return object;
+}
+
+typedef struct AMFRatio
+{
+    amf_uint32 num;
+    amf_uint32 den;
+} AMFRatio;
+
+AMF_INLINE struct AMFRatio AMFConstructRatio(amf_uint32 num, amf_uint32 den)
+{
+    struct AMFRatio object = { num, den };
+    return object;
+}
+
+#pragma pack(push, 1)
+#if defined(_MSC_VER)
+#pragma warning( push )
+#endif
+#if defined(WIN32)
+#if defined(_MSC_VER)
+#pragma warning(disable : 4200)
+#pragma warning(disable : 4201)
+#endif
+#endif
+typedef struct AMFColor
+{
+    union
+    {
+        struct
+        {
+            amf_uint8 r;
+            amf_uint8 g;
+            amf_uint8 b;
+            amf_uint8 a;
+        };
+        amf_uint32 rgba;
+    };
+} AMFColor;
+#if defined(_MSC_VER)
+#pragma warning( pop )
+#endif
+#pragma pack(pop)
+
+
+AMF_INLINE struct AMFColor AMFConstructColor(amf_uint8 r, amf_uint8 g, amf_uint8 b, amf_uint8 a)
+{
+    struct AMFColor object;
+    object.r = r;
+    object.g = g;
+    object.b = b;
+    object.a = a;
+    return object;
+}
+
+#if defined(_WIN32)
+#include <combaseapi.h>
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+    // allocator
+    AMF_INLINE void* AMF_CDECL_CALL amf_variant_alloc(amf_size count)
+    {
+        return CoTaskMemAlloc(count);
+    }
+    AMF_INLINE void AMF_CDECL_CALL amf_variant_free(void* ptr)
+    {
+        CoTaskMemFree(ptr);
+    }
+#if defined(__cplusplus)
+}
+#endif
+
+#else // defined(_WIN32)
+#include <stdlib.h>
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+    // allocator
+    AMF_INLINE void* AMF_CDECL_CALL amf_variant_alloc(amf_size count)
+    {
+        return malloc(count);
+    }
+    AMF_INLINE void AMF_CDECL_CALL amf_variant_free(void* ptr)
+    {
+        free(ptr);
+    }
+#if defined(__cplusplus)
+}
+#endif
+#endif // defined(_WIN32)
+
+
+typedef struct AMFGuid
+{
+    amf_uint32 data1;
+    amf_uint16 data2;
+    amf_uint16 data3;
+    amf_uint8 data41;
+    amf_uint8 data42;
+    amf_uint8 data43;
+    amf_uint8 data44;
+    amf_uint8 data45;
+    amf_uint8 data46;
+    amf_uint8 data47;
+    amf_uint8 data48;
+} AMFGuid;
+
+//-----------------------------------------------------------------------------
+// Version.h
+//-----------------------------------------------------------------------------
+#define AMF_MAKE_FULL_VERSION(VERSION_MAJOR, VERSION_MINOR, VERSION_RELEASE, VERSION_BUILD_NUM)    ( ((amf_uint64)(VERSION_MAJOR) << 48ull) | ((amf_uint64)(VERSION_MINOR) << 32ull) | ((amf_uint64)(VERSION_RELEASE) << 16ull)  | (amf_uint64)(VERSION_BUILD_NUM))
+
+#define AMF_GET_MAJOR_VERSION(x)      ((x >> 48ull) & 0xFFFF)
+#define AMF_GET_MINOR_VERSION(x)      ((x >> 32ull) & 0xFFFF)
+#define AMF_GET_SUBMINOR_VERSION(x)   ((x >> 16ull) & 0xFFFF)
+#define AMF_GET_BUILD_VERSION(x)      ((x >>  0ull) & 0xFFFF)
+
+#define AMF_VERSION_MAJOR       1
+#define AMF_VERSION_MINOR       4
+#define AMF_VERSION_RELEASE     4
+#define AMF_VERSION_BUILD_NUM   0
+
+#define AMF_FULL_VERSION AMF_MAKE_FULL_VERSION(AMF_VERSION_MAJOR, AMF_VERSION_MINOR, AMF_VERSION_RELEASE, AMF_VERSION_BUILD_NUM)
+
+//-----------------------------------------------------------------------------
+// Result.h
+//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------
+// result codes
+//----------------------------------------------------------------------------------------------
+
+typedef enum AMF_RESULT
+{
+    AMF_OK                                   = 0,
+    AMF_FAIL                                    ,
+
+// common errors
+    AMF_UNEXPECTED                              ,
+
+    AMF_ACCESS_DENIED                           ,
+    AMF_INVALID_ARG                             ,
+    AMF_OUT_OF_RANGE                            ,
+
+    AMF_OUT_OF_MEMORY                           ,
+    AMF_INVALID_POINTER                         ,
+
+    AMF_NO_INTERFACE                            ,
+    AMF_NOT_IMPLEMENTED                         ,
+    AMF_NOT_SUPPORTED                           ,
+    AMF_NOT_FOUND                               ,
+
+    AMF_ALREADY_INITIALIZED                     ,
+    AMF_NOT_INITIALIZED                         ,
+
+    AMF_INVALID_FORMAT                          ,// invalid data format
+
+    AMF_WRONG_STATE                             ,
+    AMF_FILE_NOT_OPEN                           ,// cannot open file
+
+// device common codes
+    AMF_NO_DEVICE                               ,
+
+// device directx
+    AMF_DIRECTX_FAILED                          ,
+// device opencl 
+    AMF_OPENCL_FAILED                           ,
+// device opengl 
+    AMF_GLX_FAILED                              ,//failed to use GLX
+// device XV 
+    AMF_XV_FAILED                               , //failed to use Xv extension
+// device alsa
+    AMF_ALSA_FAILED                             ,//failed to use ALSA
+
+// component common codes
+
+    //result codes
+    AMF_EOF                                     ,
+    AMF_REPEAT                                  ,
+    AMF_INPUT_FULL                              ,//returned by AMFComponent::SubmitInput if input queue is full
+    AMF_RESOLUTION_CHANGED                      ,//resolution changed client needs to Drain/Terminate/Init
+    AMF_RESOLUTION_UPDATED                      ,//resolution changed in adaptive mode. New ROI will be set on output on newly decoded frames
+
+    //error codes
+    AMF_INVALID_DATA_TYPE                       ,//invalid data type
+    AMF_INVALID_RESOLUTION                      ,//invalid resolution (width or height)
+    AMF_CODEC_NOT_SUPPORTED                     ,//codec not supported
+    AMF_SURFACE_FORMAT_NOT_SUPPORTED            ,//surface format not supported
+    AMF_SURFACE_MUST_BE_SHARED                  ,//surface should be shared (DX11: (MiscFlags & D3D11_RESOURCE_MISC_SHARED) == 0, DX9: No shared handle found)
+
+// component video decoder
+    AMF_DECODER_NOT_PRESENT                     ,//failed to create the decoder
+    AMF_DECODER_SURFACE_ALLOCATION_FAILED       ,//failed to create the surface for decoding
+    AMF_DECODER_NO_FREE_SURFACES                ,
+
+// component video encoder
+    AMF_ENCODER_NOT_PRESENT                     ,//failed to create the encoder
+
+// component video processor
+
+// component video conveter
+
+// component dem
+    AMF_DEM_ERROR                               ,
+    AMF_DEM_PROPERTY_READONLY                   ,
+    AMF_DEM_REMOTE_DISPLAY_CREATE_FAILED        ,
+    AMF_DEM_START_ENCODING_FAILED               ,
+    AMF_DEM_QUERY_OUTPUT_FAILED                 ,
+
+// component TAN
+    AMF_TAN_CLIPPING_WAS_REQUIRED               , // Resulting data was truncated to meet output type's value limits.
+    AMF_TAN_UNSUPPORTED_VERSION                 , // Not supported version requested, solely for TANCreateContext().
+
+    AMF_NEED_MORE_INPUT                         ,//returned by AMFComponent::SubmitInput did not produce buffer
+} AMF_RESULT;
+
+
+//-----------------------------------------------------------------------------
+// Interface.h
+//-----------------------------------------------------------------------------
+#define AMF_DECLARE_IID(name, _data1, _data2, _data3, _data41, _data42, _data43, _data44, _data45, _data46, _data47, _data48) \
+        AMF_INLINE static const AMFGuid IID_##name(void) \
+        { \
+            AMFGuid uid = {_data1, _data2, _data3, _data41, _data42, _data43, _data44, _data45, _data46, _data47, _data48}; \
+            return uid; \
+        }
+AMF_DECLARE_IID(AMFInterface, 0x9d872f34, 0x90dc, 0x4b93, 0xb6, 0xb2, 0x6c, 0xa3, 0x7c, 0x85, 0x25, 0xdb)
+typedef struct AMFInterface AMFInterface;
+
+typedef struct AMFInterfaceVtbl
+{
+    // AMFInterface interface
+    amf_long(AMF_STD_CALL *Acquire)(AMFInterface* pThis);
+    amf_long(AMF_STD_CALL *Release)(AMFInterface* pThis);
+    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFInterface* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
+} AMFInterfaceVtbl;
+
+struct AMFInterface
+{
+    const AMFInterfaceVtbl *pVtbl;
+};
+
+//-----------------------------------------------------------------------------
+// Variant.h
+//-----------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------------------------
+// variant types
+//----------------------------------------------------------------------------------------------
+typedef enum AMF_VARIANT_TYPE
+{
+    AMF_VARIANT_EMPTY = 0,
+
+    AMF_VARIANT_BOOL = 1,
+    AMF_VARIANT_INT64 = 2,
+    AMF_VARIANT_DOUBLE = 3,
+
+    AMF_VARIANT_RECT = 4,
+    AMF_VARIANT_SIZE = 5,
+    AMF_VARIANT_POINT = 6,
+    AMF_VARIANT_RATE = 7,
+    AMF_VARIANT_RATIO = 8,
+    AMF_VARIANT_COLOR = 9,
+
+    AMF_VARIANT_STRING = 10,  // value is char*
+    AMF_VARIANT_WSTRING = 11,  // value is wchar_t*
+    AMF_VARIANT_INTERFACE = 12,  // value is AMFInterface*
+} AMF_VARIANT_TYPE;
+//----------------------------------------------------------------------------------------------
+// variant struct
+//----------------------------------------------------------------------------------------------
+typedef struct AMFVariantStruct
+{
+    AMF_VARIANT_TYPE            type;
+    union
+    {
+        amf_bool                boolValue;
+        amf_int64               int64Value;
+        amf_double              doubleValue;
+        char*                   stringValue;
+        wchar_t*                wstringValue;
+        AMFInterface*           pInterface;
+        struct AMFRect          rectValue;
+        struct AMFSize          sizeValue;
+        struct AMFPoint         pointValue;
+        struct AMFRate          rateValue;
+        struct AMFRatio         ratioValue;
+        struct AMFColor         colorValue;
+    };
+} AMFVariantStruct;
+
+#define AMF_VARIANT_RETURN_IF_INVALID_POINTER(p) \
+       { \
+            if(p == NULL) \
+                    { \
+                 return AMF_INVALID_POINTER; \
+            } \
+       }
+
+static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantInit(AMFVariantStruct* pVariant)
+{
+    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pVariant);
+    pVariant->type = AMF_VARIANT_EMPTY;
+    return AMF_OK;
+}
+
+static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantClear(AMFVariantStruct* pVariant)
+{
+    AMF_RESULT errRet = AMF_OK;
+    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pVariant);
+
+    switch (pVariant->type)
+    {
+    case AMF_VARIANT_STRING:
+        amf_variant_free(pVariant->stringValue);
+        pVariant->type = AMF_VARIANT_EMPTY;
+        break;
+
+    case AMF_VARIANT_WSTRING:
+        amf_variant_free(pVariant->wstringValue);
+        pVariant->type = AMF_VARIANT_EMPTY;
+        break;
+
+    case AMF_VARIANT_INTERFACE:
+        if (pVariant->pInterface != NULL)
+        {
+#if defined(__cplusplus)
+            pVariant->pInterface->Release();
+#else
+            pVariant->pInterface->pVtbl->Release(pVariant->pInterface);
+#endif
+            pVariant->pInterface = NULL;
+        }
+        pVariant->type = AMF_VARIANT_EMPTY;
+        break;
+
+    default:
+        pVariant->type = AMF_VARIANT_EMPTY;
+        break;
+    }
+    return errRet;
+}
+//-------------------------------------------------------------------------------------------------
+static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignBool(AMFVariantStruct* pDest, amf_bool value)
+{
+    AMF_RESULT errRet = AMF_OK;
+    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
+
+    errRet = AMFVariantClear(pDest);
+    if (errRet == AMF_OK)
+    {
+        pDest->type = AMF_VARIANT_BOOL;
+        pDest->boolValue = value;
+    }
+    return errRet;
+}
+//-------------------------------------------------------------------------------------------------
+static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignInt64(AMFVariantStruct* pDest, amf_int64 value)
+{
+    AMF_RESULT errRet = AMF_OK;
+    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
+
+    errRet = AMFVariantClear(pDest);
+    if (errRet == AMF_OK)
+    {
+        pDest->type = AMF_VARIANT_INT64;
+        pDest->int64Value = value;
+    }
+    return errRet;
+}
+//-------------------------------------------------------------------------------------------------
+static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignDouble(AMFVariantStruct* pDest, amf_double value)
+{
+    AMF_RESULT errRet = AMF_OK;
+    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
+
+    errRet = AMFVariantClear(pDest);
+    if (errRet == AMF_OK)
+    {
+        pDest->type = AMF_VARIANT_DOUBLE;
+        pDest->doubleValue = value;
+    }
+    return errRet;
+}
+//-------------------------------------------------------------------------------------------------
+static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignSize(AMFVariantStruct* pDest, const AMFSize* value)
+{
+    AMF_RESULT errRet = AMF_OK;
+    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
+
+    errRet = AMFVariantClear(pDest);
+    if (errRet == AMF_OK)
+    {
+        pDest->type = AMF_VARIANT_SIZE;
+        pDest->sizeValue = *value;
+    }
+    return errRet;
+}
+//-------------------------------------------------------------------------------------------------
+static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignPoint(AMFVariantStruct* pDest, const AMFPoint* value)
+{
+    AMF_RESULT errRet = AMF_OK;
+    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
+
+    errRet = AMFVariantClear(pDest);
+    if (errRet == AMF_OK)
+    {
+        pDest->type = AMF_VARIANT_POINT;
+        pDest->pointValue = *value;
+    }
+    return errRet;
+}
+//-------------------------------------------------------------------------------------------------
+static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignRate(AMFVariantStruct* pDest, const AMFRate* value)
+{
+    AMF_RESULT errRet = AMF_OK;
+    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
+
+    errRet = AMFVariantClear(pDest);
+    if (errRet == AMF_OK)
+    {
+        pDest->type = AMF_VARIANT_RATE;
+        pDest->rateValue = *value;
+    }
+    return errRet;
+}
+//-------------------------------------------------------------------------------------------------
+static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignRatio(AMFVariantStruct* pDest, const AMFRatio* value)
+{
+    AMF_RESULT errRet = AMF_OK;
+    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
+
+    errRet = AMFVariantClear(pDest);
+    if (errRet == AMF_OK)
+    {
+        pDest->type = AMF_VARIANT_RATIO;
+        pDest->ratioValue = *value;
+    }
+    return errRet;
+}
+//-------------------------------------------------------------------------------------------------
+static AMF_INLINE AMF_RESULT AMF_CDECL_CALL AMFVariantAssignColor(AMFVariantStruct* pDest, const AMFColor* value)
+{
+    AMF_RESULT errRet = AMF_OK;
+    AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
+
+    errRet = AMFVariantClear(pDest);
+    if (errRet == AMF_OK)
+    {
+        pDest->type = AMF_VARIANT_COLOR;
+        pDest->colorValue = *value;
+    }
+    return errRet;
+}
+
+//-----------------------------------------------------------------------------
+// PropertyStorage.h
+//-----------------------------------------------------------------------------
+typedef struct AMFPropertyStorageObserver AMFPropertyStorageObserver;
+typedef struct AMFPropertyStorage AMFPropertyStorage;
+
+#define AMF_ASSIGN_PROPERTY_DATA(res, varType, pThis, name, val ) \
+    { \
+        AMFVariantStruct var = {0}; \
+        AMFVariantAssign##varType(&var, val); \
+        res = pThis->pVtbl->SetProperty(pThis, name, var ); \
+    }
+#define AMF_ASSIGN_PROPERTY_TYPE(res, varType, dataType , pThis, name, val )  AMF_ASSIGN_PROPERTY_DATA(res, varType, pThis, name, (dataType)val)
+
+#define AMF_ASSIGN_PROPERTY_INT64(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_TYPE(res, Int64, amf_int64, pThis, name, val)
+#define AMF_ASSIGN_PROPERTY_DOUBLE(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_TYPE(res, Double, amf_double, pThis, name, val)
+#define AMF_ASSIGN_PROPERTY_BOOL(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_TYPE(res, Bool, amf_bool, pThis, name, val)
+#define AMF_ASSIGN_PROPERTY_RECT(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_DATA(res, Rect, pThis, name, &val)
+#define AMF_ASSIGN_PROPERTY_SIZE(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_DATA(res, Size, pThis, name, &val)
+#define AMF_ASSIGN_PROPERTY_POINT(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_DATA(res, Point, pThis, name, &val)
+#define AMF_ASSIGN_PROPERTY_RATE(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_DATA(res, Rate, pThis, name, &val)
+#define AMF_ASSIGN_PROPERTY_RATIO(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_DATA(res, Ratio, pThis, name, &val)
+#define AMF_ASSIGN_PROPERTY_COLOR(res, pThis, name, val ) AMF_ASSIGN_PROPERTY_DATA(res, Color, pThis, name, &val)
+
+//-----------------------------------------------------------------------------
+// PropertyStorageEx.h
+//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------
+typedef enum AMF_PROPERTY_CONTENT_ENUM
+{
+    AMF_PROPERTY_CONTENT_DEFAULT = 0,
+    AMF_PROPERTY_CONTENT_XML,               // m_eType is AMF_VARIANT_STRING
+
+    AMF_PROPERTY_CONTENT_FILE_OPEN_PATH,    // m_eType AMF_VARIANT_WSTRING
+    AMF_PROPERTY_CONTENT_FILE_SAVE_PATH     // m_eType AMF_VARIANT_WSTRING
+} AMF_PROPERTY_CONTENT_ENUM;
+//----------------------------------------------------------------------------------------------
+typedef enum AMF_PROPERTY_ACCESS_TYPE
+{
+    AMF_PROPERTY_ACCESS_PRIVATE = 0,
+    AMF_PROPERTY_ACCESS_READ = 0x1,
+    AMF_PROPERTY_ACCESS_WRITE = 0x2,
+    AMF_PROPERTY_ACCESS_READ_WRITE = (AMF_PROPERTY_ACCESS_READ | AMF_PROPERTY_ACCESS_WRITE),
+    AMF_PROPERTY_ACCESS_WRITE_RUNTIME = 0x4,
+    AMF_PROPERTY_ACCESS_FULL = 0xFF,
+} AMF_PROPERTY_ACCESS_TYPE;
+//----------------------------------------------------------------------------------------------
+typedef struct AMFEnumDescriptionEntry
+{
+    amf_int             value;
+    const wchar_t*      name;
+} AMFEnumDescriptionEntry;
+//----------------------------------------------------------------------------------------------
+typedef amf_uint32 AMF_PROPERTY_CONTENT_TYPE;
+
+typedef struct AMFPropertyInfo
+{
+    const wchar_t*                  name;
+    const wchar_t*                  desc;
+    AMF_VARIANT_TYPE                type;
+    AMF_PROPERTY_CONTENT_TYPE       contentType;
+
+    AMFVariantStruct                defaultValue;
+    AMFVariantStruct                minValue;
+    AMFVariantStruct                maxValue;
+    AMF_PROPERTY_ACCESS_TYPE        accessType;
+    const AMFEnumDescriptionEntry*  pEnumDescription;
+} AMFPropertyInfo;
+//-----------------------------------------------------------------------------
+// Data.h
+//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------
+typedef enum AMF_DATA_TYPE
+{
+    AMF_DATA_BUFFER = 0,
+    AMF_DATA_SURFACE = 1,
+    AMF_DATA_AUDIO_BUFFER = 2,
+    AMF_DATA_USER = 1000,
+    // all extensions will be AMF_DATA_USER+i
+} AMF_DATA_TYPE;
+//----------------------------------------------------------------------------------------------
+typedef enum AMF_MEMORY_TYPE
+{
+    AMF_MEMORY_UNKNOWN = 0,
+    AMF_MEMORY_HOST = 1,
+    AMF_MEMORY_DX9 = 2,
+    AMF_MEMORY_DX11 = 3,
+    AMF_MEMORY_OPENCL = 4,
+    AMF_MEMORY_OPENGL = 5,
+    AMF_MEMORY_XV = 6,
+    AMF_MEMORY_GRALLOC = 7,
+    AMF_MEMORY_COMPUTE_FOR_DX9 = 8,
+    AMF_MEMORY_COMPUTE_FOR_DX11 = 9,
+} AMF_MEMORY_TYPE;
+
+//----------------------------------------------------------------------------------------------
+typedef enum AMF_DX_VERSION
+{
+    AMF_DX9 = 90,
+    AMF_DX9_EX = 91,
+    AMF_DX11_0 = 110,
+    AMF_DX11_1 = 111
+} AMF_DX_VERSION;
+
+typedef struct AMFData AMFData;
+AMF_DECLARE_IID(AMFData, 0xa1159bf6, 0x9104, 0x4107, 0x8e, 0xaa, 0xc5, 0x3d, 0x5d, 0xba, 0xc5, 0x11)
+
+typedef struct AMFDataVtbl
+{
+    // AMFInterface interface
+    amf_long(AMF_STD_CALL *Acquire)(AMFData* pThis);
+    amf_long(AMF_STD_CALL *Release)(AMFData* pThis);
+    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFData* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
+
+    // AMFPropertyStorage interface
+    AMF_RESULT(AMF_STD_CALL *SetProperty)(AMFData* pThis, const wchar_t* name, AMFVariantStruct value);
+    AMF_RESULT(AMF_STD_CALL *GetProperty)(AMFData* pThis, const wchar_t* name, AMFVariantStruct* pValue);
+    amf_bool(AMF_STD_CALL *HasProperty)(AMFData* pThis, const wchar_t* name);
+    amf_size(AMF_STD_CALL *GetPropertyCount)(AMFData* pThis);
+    AMF_RESULT(AMF_STD_CALL *GetPropertyAt)(AMFData* pThis, amf_size index, wchar_t* name, amf_size nameSize, AMFVariantStruct* pValue);
+    AMF_RESULT(AMF_STD_CALL *Clear)(AMFData* pThis);
+    AMF_RESULT(AMF_STD_CALL *AddTo)(AMFData* pThis, AMFPropertyStorage* pDest, amf_bool overwrite, amf_bool deep);
+    AMF_RESULT(AMF_STD_CALL *CopyTo)(AMFData* pThis, AMFPropertyStorage* pDest, amf_bool deep);
+    void                (AMF_STD_CALL *AddObserver)(AMFData* pThis, AMFPropertyStorageObserver* pObserver);
+    void                (AMF_STD_CALL *RemoveObserver)(AMFData* pThis, AMFPropertyStorageObserver* pObserver);
+
+    // AMFData interface
+
+    AMF_MEMORY_TYPE(AMF_STD_CALL *GetMemoryType)(AMFData* pThis);
+
+    AMF_RESULT(AMF_STD_CALL *Duplicate)(AMFData* pThis, AMF_MEMORY_TYPE type, AMFData** ppData);
+    AMF_RESULT(AMF_STD_CALL *Convert)(AMFData* pThis, AMF_MEMORY_TYPE type); // optimal interop if possilble. Copy through host memory if needed
+    AMF_RESULT(AMF_STD_CALL *Interop)(AMFData* pThis, AMF_MEMORY_TYPE type); // only optimal interop if possilble. No copy through host memory for GPU objects
+
+    AMF_DATA_TYPE(AMF_STD_CALL *GetDataType)(AMFData* pThis);
+
+    amf_bool(AMF_STD_CALL *IsReusable)(AMFData* pThis);
+
+    void                (AMF_STD_CALL *SetPts)(AMFData* pThis, amf_pts pts);
+    amf_pts(AMF_STD_CALL *GetPts)(AMFData* pThis);
+    void                (AMF_STD_CALL *SetDuration)(AMFData* pThis, amf_pts duration);
+    amf_pts(AMF_STD_CALL *GetDuration)(AMFData* pThis);
+
+} AMFDataVtbl;
+
+struct AMFData
+{
+    const AMFDataVtbl *pVtbl;
+};
+//-----------------------------------------------------------------------------
+// Plane.h
+//-----------------------------------------------------------------------------
+//---------------------------------------------------------------------------------------------
+typedef enum AMF_PLANE_TYPE
+{
+    AMF_PLANE_UNKNOWN = 0,
+    AMF_PLANE_PACKED = 1,             // for all packed formats: BGRA, YUY2, etc
+    AMF_PLANE_Y = 2,
+    AMF_PLANE_UV = 3,
+    AMF_PLANE_U = 4,
+    AMF_PLANE_V = 5,
+} AMF_PLANE_TYPE;
+
+//---------------------------------------------------------------------------------------------
+// AMFPlane interface
+//---------------------------------------------------------------------------------------------
+AMF_DECLARE_IID(AMFPlane, 0xbede1aa6, 0xd8fa, 0x4625, 0x94, 0x65, 0x6c, 0x82, 0xc4, 0x37, 0x71, 0x2e)
+typedef struct AMFPlane AMFPlane;
+typedef struct AMFPlaneVtbl
+{
+    // AMFInterface interface
+    amf_long(AMF_STD_CALL *Acquire)(AMFPlane* pThis);
+    amf_long(AMF_STD_CALL *Release)(AMFPlane* pThis);
+    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFPlane* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
+
+    // AMFPlane interface
+    AMF_PLANE_TYPE(AMF_STD_CALL *GetType)(AMFPlane* pThis);
+    void*               (AMF_STD_CALL *GetNative)(AMFPlane* pThis);
+    amf_int32(AMF_STD_CALL *GetPixelSizeInBytes)(AMFPlane* pThis);
+    amf_int32(AMF_STD_CALL *GetOffsetX)(AMFPlane* pThis);
+    amf_int32(AMF_STD_CALL *GetOffsetY)(AMFPlane* pThis);
+    amf_int32(AMF_STD_CALL *GetWidth)(AMFPlane* pThis);
+    amf_int32(AMF_STD_CALL *GetHeight)(AMFPlane* pThis);
+    amf_int32(AMF_STD_CALL *GetHPitch)(AMFPlane* pThis);
+    amf_int32(AMF_STD_CALL *GetVPitch)(AMFPlane* pThis);
+    amf_bool(AMF_STD_CALL *IsTiled)(AMFPlane* pThis);
+
+} AMFPlaneVtbl;
+
+struct AMFPlane
+{
+    const AMFPlaneVtbl *pVtbl;
+};
+//-----------------------------------------------------------------------------
+// Buffer.h
+//-----------------------------------------------------------------------------
+#if defined(_MSC_VER)
+#pragma warning( push )
+#pragma warning(disable : 4263)
+#pragma warning(disable : 4264)
+#endif
+
+typedef struct AMFBuffer AMFBuffer;
+typedef struct AMFBufferObserver AMFBufferObserver;
+
+AMF_DECLARE_IID(AMFBuffer, 0xb04b7248, 0xb6f0, 0x4321, 0xb6, 0x91, 0xba, 0xa4, 0x74, 0xf, 0x9f, 0xcb)
+
+typedef struct AMFBufferVtbl
+{
+    // AMFInterface interface
+    amf_long(AMF_STD_CALL *Acquire)(AMFBuffer* pThis);
+    amf_long(AMF_STD_CALL *Release)(AMFBuffer* pThis);
+    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFBuffer* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
+
+    // AMFPropertyStorage interface
+    AMF_RESULT(AMF_STD_CALL *SetProperty)(AMFBuffer* pThis, const wchar_t* name, AMFVariantStruct value);
+    AMF_RESULT(AMF_STD_CALL *GetProperty)(AMFBuffer* pThis, const wchar_t* name, AMFVariantStruct* pValue);
+    amf_bool(AMF_STD_CALL *HasProperty)(AMFBuffer* pThis, const wchar_t* name);
+    amf_size(AMF_STD_CALL *GetPropertyCount)(AMFBuffer* pThis);
+    AMF_RESULT(AMF_STD_CALL *GetPropertyAt)(AMFBuffer* pThis, amf_size index, wchar_t* name, amf_size nameSize, AMFVariantStruct* pValue);
+    AMF_RESULT(AMF_STD_CALL *Clear)(AMFBuffer* pThis);
+    AMF_RESULT(AMF_STD_CALL *AddTo)(AMFBuffer* pThis, AMFPropertyStorage* pDest, amf_bool overwrite, amf_bool deep);
+    AMF_RESULT(AMF_STD_CALL *CopyTo)(AMFBuffer* pThis, AMFPropertyStorage* pDest, amf_bool deep);
+    void                (AMF_STD_CALL *AddObserver)(AMFBuffer* pThis, AMFPropertyStorageObserver* pObserver);
+    void                (AMF_STD_CALL *RemoveObserver)(AMFBuffer* pThis, AMFPropertyStorageObserver* pObserver);
+
+    // AMFData interface
+
+    AMF_MEMORY_TYPE(AMF_STD_CALL *GetMemoryType)(AMFBuffer* pThis);
+
+    AMF_RESULT(AMF_STD_CALL *Duplicate)(AMFBuffer* pThis, AMF_MEMORY_TYPE type, AMFData** ppData);
+    AMF_RESULT(AMF_STD_CALL *Convert)(AMFBuffer* pThis, AMF_MEMORY_TYPE type); // optimal interop if possilble. Copy through host memory if needed
+    AMF_RESULT(AMF_STD_CALL *Interop)(AMFBuffer* pThis, AMF_MEMORY_TYPE type); // only optimal interop if possilble. No copy through host memory for GPU objects
+
+    AMF_DATA_TYPE(AMF_STD_CALL *GetDataType)(AMFBuffer* pThis);
+
+    amf_bool(AMF_STD_CALL *IsReusable)(AMFBuffer* pThis);
+
+    void                (AMF_STD_CALL *SetPts)(AMFBuffer* pThis, amf_pts pts);
+    amf_pts(AMF_STD_CALL *GetPts)(AMFBuffer* pThis);
+    void                (AMF_STD_CALL *SetDuration)(AMFBuffer* pThis, amf_pts duration);
+    amf_pts(AMF_STD_CALL *GetDuration)(AMFBuffer* pThis);
+
+    // AMFBuffer interface
+
+    AMF_RESULT(AMF_STD_CALL *SetSize)(AMFBuffer* pThis, amf_size newSize);
+    amf_size(AMF_STD_CALL *GetSize)(AMFBuffer* pThis);
+    void*               (AMF_STD_CALL *GetNative)(AMFBuffer* pThis);
+
+    // Observer management
+    void                (AMF_STD_CALL *AddObserver_Buffer)(AMFBuffer* pThis, AMFBufferObserver* pObserver);
+    void                (AMF_STD_CALL *RemoveObserver_Buffer)(AMFBuffer* pThis, AMFBufferObserver* pObserver);
+
+} AMFBufferVtbl;
+
+struct AMFBuffer
+{
+    const AMFBufferVtbl *pVtbl;
+};
+
+//-----------------------------------------------------------------------------
+// AudioBuffer.h
+//-----------------------------------------------------------------------------
+typedef enum AMF_AUDIO_FORMAT
+{
+    AMFAF_UNKNOWN = -1,
+    AMFAF_U8 = 0,               // amf_uint8
+    AMFAF_S16 = 1,               // amf_int16
+    AMFAF_S32 = 2,               // amf_int32
+    AMFAF_FLT = 3,               // amf_float
+    AMFAF_DBL = 4,               // amf_double
+
+    AMFAF_U8P = 5,               // amf_uint8
+    AMFAF_S16P = 6,               // amf_int16
+    AMFAF_S32P = 7,               // amf_int32
+    AMFAF_FLTP = 8,               // amf_float
+    AMFAF_DBLP = 9,               // amf_double
+    AMFAF_FIRST = AMFAF_U8,
+    AMFAF_LAST = AMFAF_DBLP,
+} AMF_AUDIO_FORMAT;
+
+typedef struct AMFAudioBuffer AMFAudioBuffer;
+typedef struct AMFAudioBufferObserver AMFAudioBufferObserver;
+//-----------------------------------------------------------------------------
+// Surface.h
+//-----------------------------------------------------------------------------
+
+typedef enum AMF_SURFACE_FORMAT
+{
+    AMF_SURFACE_UNKNOWN = 0,
+    AMF_SURFACE_NV12,               ///< 1 - planar Y width x height + packed UV width/2 x height/2 - 8 bit per component
+    AMF_SURFACE_YV12,               ///< 2 - planar Y width x height + V width/2 x height/2 + U width/2 x height/2 - 8 bit per component
+    AMF_SURFACE_BGRA,               ///< 3 - packed - 8 bit per component
+    AMF_SURFACE_ARGB,               ///< 4 - packed - 8 bit per component
+    AMF_SURFACE_RGBA,               ///< 5 - packed - 8 bit per component
+    AMF_SURFACE_GRAY8,              ///< 6 - single component - 8 bit
+    AMF_SURFACE_YUV420P,            ///< 7 - planar Y width x height + U width/2 x height/2 + V width/2 x height/2 - 8 bit per component
+    AMF_SURFACE_U8V8,               ///< 8 - double component - 8 bit per component
+    AMF_SURFACE_YUY2,               ///< 9 - YUY2: Byte 0=8-bit Y'0; Byte 1=8-bit Cb; Byte 2=8-bit Y'1; Byte 3=8-bit Cr
+    AMF_SURFACE_P010,               ///< 10- planar Y width x height + packed UV width/2 x height/2 - 10 bit per component (16 allocated, upper 10 bits are used)
+    AMF_SURFACE_RGBA_F16,           ///< 11 - packed - 16 bit per component float
+
+    AMF_SURFACE_FIRST = AMF_SURFACE_NV12,
+    AMF_SURFACE_LAST = AMF_SURFACE_RGBA_F16
+} AMF_SURFACE_FORMAT;
+
+//----------------------------------------------------------------------------------------------
+// frame type
+//----------------------------------------------------------------------------------------------
+typedef enum AMF_FRAME_TYPE
+{
+    // flags
+    AMF_FRAME_STEREO_FLAG = 0x10000000,
+    AMF_FRAME_LEFT_FLAG = AMF_FRAME_STEREO_FLAG | 0x20000000,
+    AMF_FRAME_RIGHT_FLAG = AMF_FRAME_STEREO_FLAG | 0x40000000,
+    AMF_FRAME_BOTH_FLAG = AMF_FRAME_LEFT_FLAG | AMF_FRAME_RIGHT_FLAG,
+    AMF_FRAME_INTERLEAVED_FLAG = 0x01000000,
+    AMF_FRAME_FIELD_FLAG = 0x02000000,
+    AMF_FRAME_EVEN_FLAG = 0x04000000,
+    AMF_FRAME_ODD_FLAG = 0x08000000,
+
+    // values
+    AMF_FRAME_UNKNOWN = -1,
+    AMF_FRAME_PROGRESSIVE = 0,
+
+    AMF_FRAME_INTERLEAVED_EVEN_FIRST = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_EVEN_FLAG,
+    AMF_FRAME_INTERLEAVED_ODD_FIRST = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_ODD_FLAG,
+    AMF_FRAME_FIELD_SINGLE_EVEN = AMF_FRAME_FIELD_FLAG | AMF_FRAME_EVEN_FLAG,
+    AMF_FRAME_FIELD_SINGLE_ODD = AMF_FRAME_FIELD_FLAG | AMF_FRAME_ODD_FLAG,
+
+    AMF_FRAME_STEREO_LEFT = AMF_FRAME_LEFT_FLAG,
+    AMF_FRAME_STEREO_RIGHT = AMF_FRAME_RIGHT_FLAG,
+    AMF_FRAME_STEREO_BOTH = AMF_FRAME_BOTH_FLAG,
+
+    AMF_FRAME_INTERLEAVED_EVEN_FIRST_STEREO_LEFT = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_EVEN_FLAG | AMF_FRAME_LEFT_FLAG,
+    AMF_FRAME_INTERLEAVED_EVEN_FIRST_STEREO_RIGHT = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_EVEN_FLAG | AMF_FRAME_RIGHT_FLAG,
+    AMF_FRAME_INTERLEAVED_EVEN_FIRST_STEREO_BOTH = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_EVEN_FLAG | AMF_FRAME_BOTH_FLAG,
+
+    AMF_FRAME_INTERLEAVED_ODD_FIRST_STEREO_LEFT = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_ODD_FLAG | AMF_FRAME_LEFT_FLAG,
+    AMF_FRAME_INTERLEAVED_ODD_FIRST_STEREO_RIGHT = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_ODD_FLAG | AMF_FRAME_RIGHT_FLAG,
+    AMF_FRAME_INTERLEAVED_ODD_FIRST_STEREO_BOTH = AMF_FRAME_INTERLEAVED_FLAG | AMF_FRAME_ODD_FLAG | AMF_FRAME_BOTH_FLAG,
+} AMF_FRAME_TYPE;
+
+typedef struct AMFSurface AMFSurface;
+typedef struct AMFSurfaceObserver AMFSurfaceObserver;
+
+typedef struct AMFSurfaceObserverVtbl
+{
+    void                (AMF_STD_CALL *OnSurfaceDataRelease)(AMFSurfaceObserver* pThis, AMFSurface* pSurface);
+} AMFSurfaceObserverVtbl;
+
+struct AMFSurfaceObserver
+{
+    const AMFSurfaceObserverVtbl *pVtbl;
+};
+
+AMF_DECLARE_IID(AMFSurface, 0x3075dbe3, 0x8718, 0x4cfa, 0x86, 0xfb, 0x21, 0x14, 0xc0, 0xa5, 0xa4, 0x51)
+typedef struct AMFSurfaceVtbl
+{
+    // AMFInterface interface
+    amf_long(AMF_STD_CALL *Acquire)(AMFSurface* pThis);
+    amf_long(AMF_STD_CALL *Release)(AMFSurface* pThis);
+    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFSurface* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
+
+    // AMFPropertyStorage interface
+    AMF_RESULT(AMF_STD_CALL *SetProperty)(AMFSurface* pThis, const wchar_t* name, AMFVariantStruct value);
+    AMF_RESULT(AMF_STD_CALL *GetProperty)(AMFSurface* pThis, const wchar_t* name, AMFVariantStruct* pValue);
+    amf_bool(AMF_STD_CALL *HasProperty)(AMFSurface* pThis, const wchar_t* name);
+    amf_size(AMF_STD_CALL *GetPropertyCount)(AMFSurface* pThis);
+    AMF_RESULT(AMF_STD_CALL *GetPropertyAt)(AMFSurface* pThis, amf_size index, wchar_t* name, amf_size nameSize, AMFVariantStruct* pValue);
+    AMF_RESULT(AMF_STD_CALL *Clear)(AMFSurface* pThis);
+    AMF_RESULT(AMF_STD_CALL *AddTo)(AMFSurface* pThis, AMFPropertyStorage* pDest, amf_bool overwrite, amf_bool deep);
+    AMF_RESULT(AMF_STD_CALL *CopyTo)(AMFSurface* pThis, AMFPropertyStorage* pDest, amf_bool deep);
+    void                (AMF_STD_CALL *AddObserver)(AMFSurface* pThis, AMFPropertyStorageObserver* pObserver);
+    void                (AMF_STD_CALL *RemoveObserver)(AMFSurface* pThis, AMFPropertyStorageObserver* pObserver);
+
+    // AMFData interface
+
+    AMF_MEMORY_TYPE(AMF_STD_CALL *GetMemoryType)(AMFSurface* pThis);
+
+    AMF_RESULT(AMF_STD_CALL *Duplicate)(AMFSurface* pThis, AMF_MEMORY_TYPE type, AMFData** ppData);
+    AMF_RESULT(AMF_STD_CALL *Convert)(AMFSurface* pThis, AMF_MEMORY_TYPE type); // optimal interop if possilble. Copy through host memory if needed
+    AMF_RESULT(AMF_STD_CALL *Interop)(AMFSurface* pThis, AMF_MEMORY_TYPE type); // only optimal interop if possilble. No copy through host memory for GPU objects
+
+    AMF_DATA_TYPE(AMF_STD_CALL *GetDataType)(AMFSurface* pThis);
+
+    amf_bool(AMF_STD_CALL *IsReusable)(AMFSurface* pThis);
+
+    void                (AMF_STD_CALL *SetPts)(AMFSurface* pThis, amf_pts pts);
+    amf_pts(AMF_STD_CALL *GetPts)(AMFSurface* pThis);
+    void                (AMF_STD_CALL *SetDuration)(AMFSurface* pThis, amf_pts duration);
+    amf_pts(AMF_STD_CALL *GetDuration)(AMFSurface* pThis);
+
+    // AMFSurface interface
+
+    AMF_SURFACE_FORMAT(AMF_STD_CALL *GetFormat)(AMFSurface* pThis);
+
+    // do not store planes outside. should be used together with Surface
+    amf_size(AMF_STD_CALL *GetPlanesCount)(AMFSurface* pThis);
+    AMFPlane*           (AMF_STD_CALL *GetPlaneAt)(AMFSurface* pThis, amf_size index);
+    AMFPlane*           (AMF_STD_CALL *GetPlane)(AMFSurface* pThis, AMF_PLANE_TYPE type);
+
+    AMF_FRAME_TYPE(AMF_STD_CALL *GetFrameType)(AMFSurface* pThis);
+    void                (AMF_STD_CALL *SetFrameType)(AMFSurface* pThis, AMF_FRAME_TYPE type);
+
+    AMF_RESULT(AMF_STD_CALL *SetCrop)(AMFSurface* pThis, amf_int32 x, amf_int32 y, amf_int32 width, amf_int32 height);
+    AMF_RESULT(AMF_STD_CALL *CopySurfaceRegion)(AMFSurface* pThis, AMFSurface* pDest, amf_int32 dstX, amf_int32 dstY, amf_int32 srcX, amf_int32 srcY, amf_int32 width, amf_int32 height);
+
+
+    // Observer management
+    void                (AMF_STD_CALL *AddObserver_Surface)(AMFSurface* pThis, AMFSurfaceObserver* pObserver);
+    void                (AMF_STD_CALL *RemoveObserver_Surface)(AMFSurface* pThis, AMFSurfaceObserver* pObserver);
+
+} AMFSurfaceVtbl;
+
+struct AMFSurface
+{
+    const AMFSurfaceVtbl *pVtbl;
+};
+
+#define   AMFTextureArrayIndexGUIDDef { 0x28115527, 0xe7c3, 0x4b66,{ 0x99, 0xd3, 0x4f, 0x2a, 0xe6, 0xb4, 0x7f, 0xaf } }
+
+//-----------------------------------------------------------------------------
+// Component.h
+//-----------------------------------------------------------------------------
+AMF_DECLARE_IID(AMFComponent, 0x8b51e5e4, 0x455d, 0x4034, 0xa7, 0x46, 0xde, 0x1b, 0xed, 0xc3, 0xc4, 0x6)
+typedef struct AMFComponent AMFComponent;
+typedef struct AMFContext AMFContext;
+typedef struct AMFIOCaps AMFIOCaps;
+typedef struct AMFCaps AMFCaps;
+
+typedef struct AMFDataAllocatorCB AMFDataAllocatorCB;
+typedef struct AMFComponentOptimizationCallback AMFComponentOptimizationCallback;
+
+typedef struct AMFComponentVtbl
+{
+    // AMFInterface interface
+    amf_long(AMF_STD_CALL *Acquire)(AMFComponent* pThis);
+    amf_long(AMF_STD_CALL *Release)(AMFComponent* pThis);
+    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFComponent* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
+
+    // AMFPropertyStorage interface
+    AMF_RESULT(AMF_STD_CALL *SetProperty)(AMFComponent* pThis, const wchar_t* name, AMFVariantStruct value);
+    AMF_RESULT(AMF_STD_CALL *GetProperty)(AMFComponent* pThis, const wchar_t* name, AMFVariantStruct* pValue);
+    amf_bool(AMF_STD_CALL *HasProperty)(AMFComponent* pThis, const wchar_t* name);
+    amf_size(AMF_STD_CALL *GetPropertyCount)(AMFComponent* pThis);
+    AMF_RESULT(AMF_STD_CALL *GetPropertyAt)(AMFComponent* pThis, amf_size index, wchar_t* name, amf_size nameSize, AMFVariantStruct* pValue);
+    AMF_RESULT(AMF_STD_CALL *Clear)(AMFComponent* pThis);
+    AMF_RESULT(AMF_STD_CALL *AddTo)(AMFComponent* pThis, AMFPropertyStorage* pDest, amf_bool overwrite, amf_bool deep);
+    AMF_RESULT(AMF_STD_CALL *CopyTo)(AMFComponent* pThis, AMFPropertyStorage* pDest, amf_bool deep);
+    void                (AMF_STD_CALL *AddObserver)(AMFComponent* pThis, AMFPropertyStorageObserver* pObserver);
+    void                (AMF_STD_CALL *RemoveObserver)(AMFComponent* pThis, AMFPropertyStorageObserver* pObserver);
+
+    // AMFPropertyStorageEx interface
+
+    amf_size(AMF_STD_CALL *GetPropertiesInfoCount)(AMFComponent* pThis);
+    AMF_RESULT(AMF_STD_CALL *GetPropertyInfoAt)(AMFComponent* pThis, amf_size index, const AMFPropertyInfo** ppInfo);
+    AMF_RESULT(AMF_STD_CALL *GetPropertyInfo)(AMFComponent* pThis, const wchar_t* name, const AMFPropertyInfo** ppInfo);
+    AMF_RESULT(AMF_STD_CALL *ValidateProperty)(AMFComponent* pThis, const wchar_t* name, AMFVariantStruct value, AMFVariantStruct* pOutValidated);
+
+    // AMFComponent interface
+
+    AMF_RESULT(AMF_STD_CALL *Init)(AMFComponent* pThis, AMF_SURFACE_FORMAT format, amf_int32 width, amf_int32 height);
+    AMF_RESULT(AMF_STD_CALL *ReInit)(AMFComponent* pThis, amf_int32 width, amf_int32 height);
+    AMF_RESULT(AMF_STD_CALL *Terminate)(AMFComponent* pThis);
+    AMF_RESULT(AMF_STD_CALL *Drain)(AMFComponent* pThis);
+    AMF_RESULT(AMF_STD_CALL *Flush)(AMFComponent* pThis);
+
+    AMF_RESULT(AMF_STD_CALL *SubmitInput)(AMFComponent* pThis, AMFData* pData);
+    AMF_RESULT(AMF_STD_CALL *QueryOutput)(AMFComponent* pThis, AMFData** ppData);
+    AMFContext* (AMF_STD_CALL *GetContext)(AMFComponent* pThis);
+    AMF_RESULT(AMF_STD_CALL *SetOutputDataAllocatorCB)(AMFComponent* pThis, AMFDataAllocatorCB* callback);
+
+    AMF_RESULT(AMF_STD_CALL *GetCaps)(AMFComponent* pThis, AMFCaps** ppCaps);
+    AMF_RESULT(AMF_STD_CALL *Optimize)(AMFComponent* pThis, AMFComponentOptimizationCallback* pCallback);
+} AMFComponentVtbl;
+
+struct AMFComponent
+{
+    const AMFComponentVtbl *pVtbl;
+};
+
+//-----------------------------------------------------------------------------
+// Context.h
+//-----------------------------------------------------------------------------
+typedef struct AMFCompute AMFCompute;
+typedef struct AMFComputeFactory AMFComputeFactory;
+typedef struct AMFComputeDevice AMFComputeDevice;
+typedef struct AMFContext AMFContext;
+AMF_DECLARE_IID(AMFContext, 0xa76a13f0, 0xd80e, 0x4fcc, 0xb5, 0x8, 0x65, 0xd0, 0xb5, 0x2e, 0xd9, 0xee)
+
+typedef struct AMFContextVtbl
+{
+    // AMFInterface interface
+    amf_long(AMF_STD_CALL *Acquire)(AMFContext* pThis);
+    amf_long(AMF_STD_CALL *Release)(AMFContext* pThis);
+    enum AMF_RESULT(AMF_STD_CALL *QueryInterface)(AMFContext* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
+
+    // AMFInterface AMFPropertyStorage
+
+    AMF_RESULT(AMF_STD_CALL *SetProperty)(AMFContext* pThis, const wchar_t* name, AMFVariantStruct value);
+    AMF_RESULT(AMF_STD_CALL *GetProperty)(AMFContext* pThis, const wchar_t* name, AMFVariantStruct* pValue);
+    amf_bool(AMF_STD_CALL *HasProperty)(AMFContext* pThis, const wchar_t* name);
+    amf_size(AMF_STD_CALL *GetPropertyCount)(AMFContext* pThis);
+    AMF_RESULT(AMF_STD_CALL *GetPropertyAt)(AMFContext* pThis, amf_size index, wchar_t* name, amf_size nameSize, AMFVariantStruct* pValue);
+    AMF_RESULT(AMF_STD_CALL *Clear)(AMFContext* pThis);
+    AMF_RESULT(AMF_STD_CALL *AddTo)(AMFContext* pThis, AMFPropertyStorage* pDest, amf_bool overwrite, amf_bool deep);
+    AMF_RESULT(AMF_STD_CALL *CopyTo)(AMFContext* pThis, AMFPropertyStorage* pDest, amf_bool deep);
+    void                (AMF_STD_CALL *AddObserver)(AMFContext* pThis, AMFPropertyStorageObserver* pObserver);
+    void                (AMF_STD_CALL *RemoveObserver)(AMFContext* pThis, AMFPropertyStorageObserver* pObserver);
+
+    // AMFContext interface
+
+    // Cleanup
+    AMF_RESULT(AMF_STD_CALL *Terminate)(AMFContext* pThis);
+
+    // DX9
+    AMF_RESULT(AMF_STD_CALL *InitDX9)(AMFContext* pThis, void* pDX9Device);
+    void*               (AMF_STD_CALL *GetDX9Device)(AMFContext* pThis, AMF_DX_VERSION dxVersionRequired);
+    AMF_RESULT(AMF_STD_CALL *LockDX9)(AMFContext* pThis);
+    AMF_RESULT(AMF_STD_CALL *UnlockDX9)(AMFContext* pThis);
+    // DX11
+    AMF_RESULT(AMF_STD_CALL *InitDX11)(AMFContext* pThis, void* pDX11Device, AMF_DX_VERSION dxVersionRequired);
+    void*               (AMF_STD_CALL *GetDX11Device)(AMFContext* pThis, AMF_DX_VERSION dxVersionRequired);
+    AMF_RESULT(AMF_STD_CALL *LockDX11)(AMFContext* pThis);
+    AMF_RESULT(AMF_STD_CALL *UnlockDX11)(AMFContext* pThis);
+
+    // OpenCL
+    AMF_RESULT(AMF_STD_CALL *InitOpenCL)(AMFContext* pThis, void* pCommandQueue);
+    void*               (AMF_STD_CALL *GetOpenCLContext)(AMFContext* pThis);
+    void*               (AMF_STD_CALL *GetOpenCLCommandQueue)(AMFContext* pThis);
+    void*               (AMF_STD_CALL *GetOpenCLDeviceID)(AMFContext* pThis);
+    AMF_RESULT(AMF_STD_CALL *GetOpenCLComputeFactory)(AMFContext* pThis, AMFComputeFactory **ppFactory); // advanced compute - multiple queries
+    AMF_RESULT(AMF_STD_CALL *InitOpenCLEx)(AMFContext* pThis, AMFComputeDevice *pDevice);
+    AMF_RESULT(AMF_STD_CALL *LockOpenCL)(AMFContext* pThis);
+    AMF_RESULT(AMF_STD_CALL *UnlockOpenCL)(AMFContext* pThis);
+
+    // OpenGL
+    AMF_RESULT(AMF_STD_CALL *InitOpenGL)(AMFContext* pThis, amf_handle hOpenGLContext, amf_handle hWindow, amf_handle hDC);
+    amf_handle(AMF_STD_CALL *GetOpenGLContext)(AMFContext* pThis);
+    amf_handle(AMF_STD_CALL *GetOpenGLDrawable)(AMFContext* pThis);
+    AMF_RESULT(AMF_STD_CALL *LockOpenGL)(AMFContext* pThis);
+    AMF_RESULT(AMF_STD_CALL *UnlockOpenGL)(AMFContext* pThis);
+    // XV - Linux
+    AMF_RESULT(AMF_STD_CALL *InitXV)(AMFContext* pThis, void* pXVDevice);
+    void*               (AMF_STD_CALL *GetXVDevice)(AMFContext* pThis);
+    AMF_RESULT(AMF_STD_CALL *LockXV)(AMFContext* pThis);
+    AMF_RESULT(AMF_STD_CALL *UnlockXV)(AMFContext* pThis);
+
+    // Gralloc - Android
+    AMF_RESULT(AMF_STD_CALL *InitGralloc)(AMFContext* pThis, void* pGrallocDevice);
+    void*               (AMF_STD_CALL *GetGrallocDevice)(AMFContext* pThis);
+    AMF_RESULT(AMF_STD_CALL *LockGralloc)(AMFContext* pThis);
+    AMF_RESULT(AMF_STD_CALL *UnlockGralloc)(AMFContext* pThis);
+    // Allocation
+    AMF_RESULT(AMF_STD_CALL *AllocBuffer)(AMFContext* pThis, AMF_MEMORY_TYPE type, amf_size size, AMFBuffer** ppBuffer);
+    AMF_RESULT(AMF_STD_CALL *AllocSurface)(AMFContext* pThis, AMF_MEMORY_TYPE type, AMF_SURFACE_FORMAT format, amf_int32 width, amf_int32 height, AMFSurface** ppSurface);
+    AMF_RESULT(AMF_STD_CALL *AllocAudioBuffer)(AMFContext* pThis, AMF_MEMORY_TYPE type, AMF_AUDIO_FORMAT format, amf_int32 samples, amf_int32 sampleRate, amf_int32 channels,
+        AMFAudioBuffer** ppAudioBuffer);
+
+    // Wrap existing objects
+    AMF_RESULT(AMF_STD_CALL *CreateBufferFromHostNative)(AMFContext* pThis, void* pHostBuffer, amf_size size, AMFBuffer** ppBuffer, AMFBufferObserver* pObserver);
+    AMF_RESULT(AMF_STD_CALL *CreateSurfaceFromHostNative)(AMFContext* pThis, AMF_SURFACE_FORMAT format, amf_int32 width, amf_int32 height, amf_int32 hPitch, amf_int32 vPitch, void* pData,
+        AMFSurface** ppSurface, AMFSurfaceObserver* pObserver);
+    AMF_RESULT(AMF_STD_CALL *CreateSurfaceFromDX9Native)(AMFContext* pThis, void* pDX9Surface, AMFSurface** ppSurface, AMFSurfaceObserver* pObserver);
+    AMF_RESULT(AMF_STD_CALL *CreateSurfaceFromDX11Native)(AMFContext* pThis, void* pDX11Surface, AMFSurface** ppSurface, AMFSurfaceObserver* pObserver);
+    AMF_RESULT(AMF_STD_CALL *CreateSurfaceFromOpenGLNative)(AMFContext* pThis, AMF_SURFACE_FORMAT format, amf_handle hGLTextureID, AMFSurface** ppSurface, AMFSurfaceObserver* pObserver);
+    AMF_RESULT(AMF_STD_CALL *CreateSurfaceFromGrallocNative)(AMFContext* pThis, amf_handle hGrallocSurface, AMFSurface** ppSurface, AMFSurfaceObserver* pObserver);
+    AMF_RESULT(AMF_STD_CALL *CreateSurfaceFromOpenCLNative)(AMFContext* pThis, AMF_SURFACE_FORMAT format, amf_int32 width, amf_int32 height, void** pClPlanes,
+        AMFSurface** ppSurface, AMFSurfaceObserver* pObserver);
+    AMF_RESULT(AMF_STD_CALL *CreateBufferFromOpenCLNative)(AMFContext* pThis, void* pCLBuffer, amf_size size, AMFBuffer** ppBuffer);
+
+    // Access to AMFCompute interface - AMF_MEMORY_OPENCL, AMF_MEMORY_COMPUTE_FOR_DX9, AMF_MEMORY_COMPUTE_FOR_DX11 are currently supported
+    AMF_RESULT(AMF_STD_CALL *GetCompute)(AMFContext* pThis, AMF_MEMORY_TYPE eMemType, AMFCompute** ppCompute);
+
+} AMFContextVtbl;
+
+struct AMFContext
+{
+    const AMFContextVtbl *pVtbl;
+};
+
+//-----------------------------------------------------------------------------
+// Debug.h 
+//-----------------------------------------------------------------------------
+
+typedef struct AMFDebug AMFDebug;
+typedef struct AMFDebugVtbl
+{
+    // AMFDebug interface
+    void               (AMF_STD_CALL *EnablePerformanceMonitor)(AMFDebug* pThis, amf_bool enable);
+    amf_bool(AMF_STD_CALL *PerformanceMonitorEnabled)(AMFDebug* pThis);
+    void               (AMF_STD_CALL *AssertsEnable)(AMFDebug* pThis, amf_bool enable);
+    amf_bool(AMF_STD_CALL *AssertsEnabled)(AMFDebug* pThis);
+} AMFDebugVtbl;
+
+struct AMFDebug
+{
+    const AMFDebugVtbl *pVtbl;
+};
+
+//-----------------------------------------------------------------------------
+// Trace.h 
+//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------
+// trace levels
+//----------------------------------------------------------------------------------------------
+#define AMF_TRACE_ERROR     0
+#define AMF_TRACE_WARNING   1
+#define AMF_TRACE_INFO      2 // default in sdk
+#define AMF_TRACE_DEBUG     3
+#define AMF_TRACE_TRACE     4
+
+#define AMF_TRACE_TEST      5
+#define AMF_TRACE_NOLOG     100
+
+//----------------------------------------------------------------------------------------------
+// available trace writers
+//----------------------------------------------------------------------------------------------
+#define AMF_TRACE_WRITER_CONSOLE            L"Console"
+#define AMF_TRACE_WRITER_DEBUG_OUTPUT       L"DebugOutput"
+#define AMF_TRACE_WRITER_FILE               L"File"
+
+
+typedef struct AMFTraceWriter AMFTraceWriter;
+
+typedef struct AMFTraceWriterVtbl
+{
+    // AMFTraceWriter interface
+    void (AMF_CDECL_CALL *Write)(AMFTraceWriter* pThis, const wchar_t* scope, const wchar_t* message);
+    void (AMF_CDECL_CALL *Flush)(AMFTraceWriter* pThis);
+} AMFTraceWriterVtbl;
+
+struct AMFTraceWriter
+{
+    const AMFTraceWriterVtbl *pVtbl;
+};
+typedef struct AMFTrace AMFTrace;
+
+typedef struct AMFTraceVtbl
+{
+    // AMFTrace interface
+    void               (AMF_STD_CALL *TraceW)(AMFTrace* pThis, const wchar_t* src_path, amf_int32 line, amf_int32 level, const wchar_t* scope, amf_int32 countArgs, const wchar_t* format, ...);
+    void               (AMF_STD_CALL *Trace)(AMFTrace* pThis, const wchar_t* src_path, amf_int32 line, amf_int32 level, const wchar_t* scope, const wchar_t* message, va_list* pArglist);
+
+    amf_int32(AMF_STD_CALL *SetGlobalLevel)(AMFTrace* pThis, amf_int32 level);
+    amf_int32(AMF_STD_CALL *GetGlobalLevel)(AMFTrace* pThis);
+
+    amf_bool(AMF_STD_CALL *EnableWriter)(AMFTrace* pThis, const wchar_t* writerID, amf_bool enable);
+    amf_bool(AMF_STD_CALL *WriterEnabled)(AMFTrace* pThis, const wchar_t* writerID);
+    AMF_RESULT(AMF_STD_CALL *TraceEnableAsync)(AMFTrace* pThis, amf_bool enable);
+    AMF_RESULT(AMF_STD_CALL *TraceFlush)(AMFTrace* pThis);
+    AMF_RESULT(AMF_STD_CALL *SetPath)(AMFTrace* pThis, const wchar_t* path);
+    AMF_RESULT(AMF_STD_CALL *GetPath)(AMFTrace* pThis, wchar_t* path, amf_size* pSize);
+    amf_int32(AMF_STD_CALL *SetWriterLevel)(AMFTrace* pThis, const wchar_t* writerID, amf_int32 level);
+    amf_int32(AMF_STD_CALL *GetWriterLevel)(AMFTrace* pThis, const wchar_t* writerID);
+    amf_int32(AMF_STD_CALL *SetWriterLevelForScope)(AMFTrace* pThis, const wchar_t* writerID, const wchar_t* scope, amf_int32 level);
+    amf_int32(AMF_STD_CALL *GetWriterLevelForScope)(AMFTrace* pThis, const wchar_t* writerID, const wchar_t* scope);
+
+    amf_int32(AMF_STD_CALL *GetIndentation)(AMFTrace* pThis);
+    void                (AMF_STD_CALL *Indent)(AMFTrace* pThis, amf_int32 addIndent);
+
+    void                (AMF_STD_CALL *RegisterWriter)(AMFTrace* pThis, const wchar_t* writerID, AMFTraceWriter* pWriter, amf_bool enable);
+    void                (AMF_STD_CALL *UnregisterWriter)(AMFTrace* pThis, const wchar_t* writerID);
+
+    const wchar_t*      (AMF_STD_CALL *GetResultText)(AMFTrace* pThis, AMF_RESULT res);
+    const wchar_t*      (AMF_STD_CALL *SurfaceGetFormatName)(AMFTrace* pThis, const AMF_SURFACE_FORMAT eSurfaceFormat);
+    AMF_SURFACE_FORMAT(AMF_STD_CALL *SurfaceGetFormatByName)(AMFTrace* pThis, const wchar_t* name);
+
+    const wchar_t* const (AMF_STD_CALL *GetMemoryTypeName)(AMFTrace* pThis, const AMF_MEMORY_TYPE memoryType);
+    AMF_MEMORY_TYPE(AMF_STD_CALL *GetMemoryTypeByName)(AMFTrace* pThis, const wchar_t* name);
+
+    const wchar_t* const (AMF_STD_CALL *GetSampleFormatName)(AMFTrace* pThis, const AMF_AUDIO_FORMAT eFormat);
+    AMF_AUDIO_FORMAT(AMF_STD_CALL *GetSampleFormatByName)(AMFTrace* pThis, const wchar_t* name);
+} AMFTraceVtbl;
+
+struct AMFTrace
+{
+    const AMFTraceVtbl *pVtbl;
+};
+//-----------------------------------------------------------------------------
+// Factory.h
+//-----------------------------------------------------------------------------
+typedef struct AMFPrograms AMFPrograms;
+
+typedef struct AMFFactory AMFFactory;
+
+typedef struct AMFFactoryVtbl
+{
+    AMF_RESULT(AMF_STD_CALL *CreateContext)(AMFFactory* pThis, AMFContext** ppContext);
+    AMF_RESULT(AMF_STD_CALL *CreateComponent)(AMFFactory* pThis, AMFContext* pContext, const wchar_t* id, AMFComponent** ppComponent);
+    AMF_RESULT(AMF_STD_CALL *SetCacheFolder)(AMFFactory* pThis, const wchar_t* path);
+    const wchar_t*      (AMF_STD_CALL *GetCacheFolder)(AMFFactory* pThis);
+    AMF_RESULT(AMF_STD_CALL *GetDebug)(AMFFactory* pThis, AMFDebug** ppDebug);
+    AMF_RESULT(AMF_STD_CALL *GetTrace)(AMFFactory* pThis, AMFTrace** ppTrace);
+    AMF_RESULT(AMF_STD_CALL *GetPrograms)(AMFFactory* pThis, AMFPrograms** ppPrograms);
+} AMFFactoryVtbl;
+
+struct AMFFactory
+{
+    const AMFFactoryVtbl *pVtbl;
+};
+
+#define AMF_INIT_FUNCTION_NAME             "AMFInit"
+#define AMF_QUERY_VERSION_FUNCTION_NAME    "AMFQueryVersion"
+
+typedef AMF_RESULT(AMF_CDECL_CALL *AMFInit_Fn)(amf_uint64 version, AMFFactory **ppFactory);
+typedef AMF_RESULT(AMF_CDECL_CALL *AMFQueryVersion_Fn)(amf_uint64 *pVersion);
+
+#if defined(_M_AMD64)
+#define AMF_DLL_NAME    L"amfrt64.dll"
+#define AMF_DLL_NAMEA   "amfrt64.dll"
+#else
+#define AMF_DLL_NAME    L"amfrt32.dll"
+#define AMF_DLL_NAMEA   "amfrt32.dll"
+#endif
+
+
+//-----------------------------------------------------------------------------
+// VideoEncoderVCE.h
+//-----------------------------------------------------------------------------
+#define AMFVideoEncoderVCE_AVC L"AMFVideoEncoderVCE_AVC"
+#define AMFVideoEncoderVCE_SVC L"AMFVideoEncoderVCE_SVC"
+
+enum AMF_VIDEO_ENCODER_USAGE_ENUM
+{
+    AMF_VIDEO_ENCODER_USAGE_TRANSCONDING = 0,
+    AMF_VIDEO_ENCODER_USAGE_ULTRA_LOW_LATENCY,
+    AMF_VIDEO_ENCODER_USAGE_LOW_LATENCY,
+    AMF_VIDEO_ENCODER_USAGE_WEBCAM
+};
+
+enum AMF_VIDEO_ENCODER_PROFILE_ENUM
+{
+    AMF_VIDEO_ENCODER_PROFILE_UNKNOWN = 0,
+    AMF_VIDEO_ENCODER_PROFILE_BASELINE = 66,
+    AMF_VIDEO_ENCODER_PROFILE_MAIN = 77,
+    AMF_VIDEO_ENCODER_PROFILE_HIGH = 100,
+    AMF_VIDEO_ENCODER_PROFILE_CONSTRAINED_BASELINE = 256,
+    AMF_VIDEO_ENCODER_PROFILE_CONSTRAINED_HIGH = 257,
+};
+
+enum AMF_VIDEO_ENCODER_SCANTYPE_ENUM
+{
+    AMF_VIDEO_ENCODER_SCANTYPE_PROGRESSIVE = 0,
+    AMF_VIDEO_ENCODER_SCANTYPE_INTERLACED
+};
+
+enum AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_ENUM
+{
+    AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP = 0,
+    AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR,
+    AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR,
+    AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR
+};
+
+enum AMF_VIDEO_ENCODER_QUALITY_PRESET_ENUM
+{
+    AMF_VIDEO_ENCODER_QUALITY_PRESET_BALANCED = 0,
+    AMF_VIDEO_ENCODER_QUALITY_PRESET_SPEED,
+    AMF_VIDEO_ENCODER_QUALITY_PRESET_QUALITY
+};
+
+enum AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_ENUM
+{
+    AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_NONE = 0,
+    AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_FRAME,
+    AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_TOP_FIELD,
+    AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_BOTTOM_FIELD
+};
+
+enum AMF_VIDEO_ENCODER_PICTURE_TYPE_ENUM
+{
+    AMF_VIDEO_ENCODER_PICTURE_TYPE_NONE = 0,
+    AMF_VIDEO_ENCODER_PICTURE_TYPE_SKIP,
+    AMF_VIDEO_ENCODER_PICTURE_TYPE_IDR,
+    AMF_VIDEO_ENCODER_PICTURE_TYPE_I,
+    AMF_VIDEO_ENCODER_PICTURE_TYPE_P,
+    AMF_VIDEO_ENCODER_PICTURE_TYPE_B
+};
+
+enum AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_ENUM
+{
+    AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_IDR,
+    AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_I,
+    AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_P,
+    AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_B
+};
+
+enum AMF_VIDEO_ENCODER_PREENCODE_MODE_ENUM
+{
+    AMF_VIDEO_ENCODER_PREENCODE_DISABLED = 0,
+    AMF_VIDEO_ENCODER_PREENCODE_ENABLED = 1,
+};
+
+enum AMF_VIDEO_ENCODER_CODING_ENUM
+{
+    AMF_VIDEO_ENCODER_UNDEFINED = 0, // BASELINE = CALV; MAIN, HIGH = CABAC
+    AMF_VIDEO_ENCODER_CABAC,
+    AMF_VIDEO_ENCODER_CALV,
+
+};
+
+
+// Static properties - can be set before Init()
+
+#define AMF_VIDEO_ENCODER_FRAMESIZE                             L"FrameSize"                // AMFSize; default = 0,0; Frame size
+#define AMF_VIDEO_ENCODER_FRAMERATE                             L"FrameRate"                // AMFRate; default = depends on usage; Frame Rate 
+
+#define AMF_VIDEO_ENCODER_EXTRADATA                             L"ExtraData"                // AMFInterface* - > AMFBuffer*; SPS/PPS buffer in Annex B format - read-only
+#define AMF_VIDEO_ENCODER_USAGE                                 L"Usage"                    // amf_int64(AMF_VIDEO_ENCODER_USAGE_ENUM); default = N/A; Encoder usage type. fully configures parameter set. 
+#define AMF_VIDEO_ENCODER_PROFILE                               L"Profile"                  // amf_int64(AMF_VIDEO_ENCODER_PROFILE_ENUM) ; default = AMF_VIDEO_ENCODER_PROFILE_MAIN;  H264 profile
+#define AMF_VIDEO_ENCODER_PROFILE_LEVEL                         L"ProfileLevel"             // amf_int64; default = 42; H264 profile level
+#define AMF_VIDEO_ENCODER_MAX_LTR_FRAMES                        L"MaxOfLTRFrames"           // amf_int64; default = 0; Max number of LTR frames
+#define AMF_VIDEO_ENCODER_SCANTYPE                              L"ScanType"                 // amf_int64(AMF_VIDEO_ENCODER_SCANTYPE_ENUM); default = AMF_VIDEO_ENCODER_SCANTYPE_PROGRESSIVE; indicates input stream type
+#define AMF_VIDEO_ENCODER_MAX_NUM_REFRAMES                      L"MaxNumRefFrames"          // amf_int64; Maximum number of reference frames
+#define AMF_VIDEO_ENCODER_ASPECT_RATIO                          L"AspectRatio"              // AMFRatio; default = 1, 1
+#define AMF_VIDEO_ENCODER_FULL_RANGE_COLOR                      L"FullRangeColor"           // bool; default = false; inidicates that YUV input is (0,255) 
+#define AMF_VIDEO_ENCODER_RATE_CONTROL_PREANALYSIS_ENABLE       L"RateControlPreanalysisEnable"     // amf_int64(AMF_VIDEO_ENCODER_PREENCODE_MODE_ENUM); default =  AMF_VIDEO_ENCODER_PREENCODE_DISABLED; controls Pre-analysis assisted rate control 
+
+// Quality preset property
+#define AMF_VIDEO_ENCODER_QUALITY_PRESET                        L"QualityPreset"            // amf_int64(AMF_VIDEO_ENCODER_QUALITY_PRESET_ENUM); default = depends on USAGE; Quality Preset 
+
+
+// Dynamic properties - can be set at any time
+
+// Rate control properties
+#define AMF_VIDEO_ENCODER_B_PIC_DELTA_QP                        L"BPicturesDeltaQP"         // amf_int64; default = depends on USAGE; B-picture Delta
+#define AMF_VIDEO_ENCODER_REF_B_PIC_DELTA_QP                    L"ReferenceBPicturesDeltaQP"// amf_int64; default = depends on USAGE; Reference B-picture Delta
+
+#define AMF_VIDEO_ENCODER_ENFORCE_HRD                           L"EnforceHRD"               // bool; default = depends on USAGE; Enforce HRD
+#define AMF_VIDEO_ENCODER_FILLER_DATA_ENABLE                    L"FillerDataEnable"         // bool; default = false; Filler Data Enable
+#define AMF_VIDEO_ENCODER_ENABLE_VBAQ                           L"EnableVBAQ"               // bool; default = depends on USAGE; Enable VBAQ
+
+
+#define AMF_VIDEO_ENCODER_VBV_BUFFER_SIZE                       L"VBVBufferSize"            // amf_int64; default = depends on USAGE; VBV Buffer Size in bits
+#define AMF_VIDEO_ENCODER_INITIAL_VBV_BUFFER_FULLNESS           L"InitialVBVBufferFullness" // amf_int64; default =  64; Initial VBV Buffer Fullness 0=0% 64=100%
+
+#define AMF_VIDEO_ENCODER_MAX_AU_SIZE                           L"MaxAUSize"                // amf_int64; default = 60; Max AU Size in bits
+
+#define AMF_VIDEO_ENCODER_MIN_QP                                L"MinQP"                    // amf_int64; default = depends on USAGE; Min QP; range = 0-51
+#define AMF_VIDEO_ENCODER_MAX_QP                                L"MaxQP"                    // amf_int64; default = depends on USAGE; Max QP; range = 0-51
+#define AMF_VIDEO_ENCODER_QP_I                                  L"QPI"                      // amf_int64; default = 22; I-frame QP; range = 0-51
+#define AMF_VIDEO_ENCODER_QP_P                                  L"QPP"                      // amf_int64; default = 22; P-frame QP; range = 0-51
+#define AMF_VIDEO_ENCODER_QP_B                                  L"QPB"                      // amf_int64; default = 22; B-frame QP; range = 0-51
+#define AMF_VIDEO_ENCODER_TARGET_BITRATE                        L"TargetBitrate"            // amf_int64; default = depends on USAGE; Target bit rate in bits
+#define AMF_VIDEO_ENCODER_PEAK_BITRATE                          L"PeakBitrate"              // amf_int64; default = depends on USAGE; Peak bit rate in bits
+#define AMF_VIDEO_ENCODER_RATE_CONTROL_SKIP_FRAME_ENABLE        L"RateControlSkipFrameEnable"   // bool; default =  depends on USAGE; Rate Control Based Frame Skip 
+#define AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD                   L"RateControlMethod"        // amf_int64(AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_ENUM); default = depends on USAGE; Rate Control Method 
+
+// Picture control properties
+#define AMF_VIDEO_ENCODER_HEADER_INSERTION_SPACING              L"HeaderInsertionSpacing"   // amf_int64; default = depends on USAGE; Header Insertion Spacing; range 0-1000
+#define AMF_VIDEO_ENCODER_B_PIC_PATTERN                         L"BPicturesPattern"         // amf_int64; default = 3; B-picture Pattern (number of B-Frames)
+#define AMF_VIDEO_ENCODER_DE_BLOCKING_FILTER                    L"DeBlockingFilter"         // bool; default = depends on USAGE; De-blocking Filter
+#define AMF_VIDEO_ENCODER_B_REFERENCE_ENABLE                    L"BReferenceEnable"         // bool; default = true; Enable Refrence to B-frames
+#define AMF_VIDEO_ENCODER_IDR_PERIOD                            L"IDRPeriod"                // amf_int64; default = depends on USAGE; IDR Period in frames
+#define AMF_VIDEO_ENCODER_INTRA_REFRESH_NUM_MBS_PER_SLOT        L"IntraRefreshMBsNumberPerSlot" // amf_int64; default = depends on USAGE; Intra Refresh MBs Number Per Slot in Macroblocks
+#define AMF_VIDEO_ENCODER_SLICES_PER_FRAME                      L"SlicesPerFrame"           // amf_int64; default = 1; Number of slices Per Frame 
+#define AMF_VIDEO_ENCODER_CABAC_ENABLE                          L"CABACEnable"              // amf_int64(AMF_VIDEO_ENCODER_CODING_ENUM) default = AMF_VIDEO_ENCODER_UNDEFINED
+
+// Motion estimation
+#define AMF_VIDEO_ENCODER_MOTION_HALF_PIXEL                     L"HalfPixel"                // bool; default= true; Half Pixel 
+#define AMF_VIDEO_ENCODER_MOTION_QUARTERPIXEL                   L"QuarterPixel"             // bool; default= true; Quarter Pixel
+
+// SVC
+#define AMF_VIDEO_ENCODER_NUM_TEMPORAL_ENHANCMENT_LAYERS        L"NumOfTemporalEnhancmentLayers" // amf_int64; default = 0; range = 0, min(2, caps->GetMaxNumOfTemporalLayers()) number of temporal enhancment Layers (SVC)
+
+// Per-submittion properties - can be set on input surface interface
+#define AMF_VIDEO_ENCODER_END_OF_SEQUENCE                       L"EndOfSequence"            // bool; default = false; generate end of sequence
+#define AMF_VIDEO_ENCODER_END_OF_STREAM                         L"EndOfStream"              // bool; default = false; generate end of stream
+#define AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE                    L"ForcePictureType"         // amf_int64(AMF_VIDEO_ENCODER_PICTURE_TYPE_ENUM); default = AMF_VIDEO_ENCODER_PICTURE_TYPE_NONE; generate particular picture type
+#define AMF_VIDEO_ENCODER_INSERT_AUD                            L"InsertAUD"                // bool; default = false; insert AUD
+#define AMF_VIDEO_ENCODER_INSERT_SPS                            L"InsertSPS"                // bool; default = false; insert SPS
+#define AMF_VIDEO_ENCODER_INSERT_PPS                            L"InsertPPS"                // bool; default = false; insert PPS
+#define AMF_VIDEO_ENCODER_PICTURE_STRUCTURE                     L"PictureStructure"         // amf_int64(AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_ENUM); default = AMF_VIDEO_ENCODER_PICTURE_STRUCTURE_FRAME; indicate picture type
+#define AMF_VIDEO_ENCODER_MARK_CURRENT_WITH_LTR_INDEX           L"MarkCurrentWithLTRIndex"  // //amf_int64; default = N/A; Mark current frame with LTR index
+#define AMF_VIDEO_ENCODER_FORCE_LTR_REFERENCE_BITFIELD          L"ForceLTRReferenceBitfield"// amf_int64; default = 0; force LTR bit-field 
+
+// properties set by encoder on output buffer interface
+#define AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE                      L"OutputDataType"           // amf_int64(AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_ENUM); default = N/A
+#define AMF_VIDEO_ENCODER_OUTPUT_MARKED_LTR_INDEX               L"MarkedLTRIndex"           //amf_int64; default = -1; Marked LTR index
+#define AMF_VIDEO_ENCODER_OUTPUT_REFERENCED_LTR_INDEX_BITFIELD  L"ReferencedLTRIndexBitfield" // amf_int64; default = 0; referenced LTR bit-field 
+
+
+#define AMF_VIDEO_ENCODER_HDCP_COUNTER                          L"HDCPCounter"              //  const void*
+
+// Properties for multi-instance cloud gaming
+#define AMF_VIDEO_ENCODER_MAX_INSTANCES                         L"EncoderMaxInstances"      //  amf_uint32; default = 1; max number of encoder instances
+#define AMF_VIDEO_ENCODER_MULTI_INSTANCE_MODE                   L"MultiInstanceMode"        //  bool; default = false;
+#define AMF_VIDEO_ENCODER_CURRENT_QUEUE                         L"MultiInstanceCurrentQueue"//  amf_uin32; default = 0; 
+
+// VCE Encoder capabilities - exposed in AMFCaps interface
+#define AMF_VIDEO_ENCODER_CAP_MAX_BITRATE                       L"MaxBitrate"               // amf_int64; Maximum bit rate in bits
+#define AMF_VIDEO_ENCODER_CAP_NUM_OF_STREAMS                    L"NumOfStreams"             // amf_int64; maximum number of encode streams supported 
+#define AMF_VIDEO_ENCODER_CAP_MAX_PROFILE                       L"MaxProfile"               // AMF_VIDEO_ENCODER_PROFILE_ENUM
+#define AMF_VIDEO_ENCODER_CAP_MAX_LEVEL                         L"MaxLevel"                 // amf_int64 maximum profile level
+#define AMF_VIDEO_ENCODER_CAP_BFRAMES                           L"BFrames"                  // bool  is B-Frames supported
+#define AMF_VIDEO_ENCODER_CAP_MIN_REFERENCE_FRAMES              L"MinReferenceFrames"       // amf_int64 minimum number of reference frames
+#define AMF_VIDEO_ENCODER_CAP_MAX_REFERENCE_FRAMES              L"MaxReferenceFrames"       // amf_int64 maximum number of reference frames
+#define AMF_VIDEO_ENCODER_CAP_MAX_TEMPORAL_LAYERS               L"MaxTemporalLayers"        // amf_int64 maximum number of temporal layers
+#define AMF_VIDEO_ENCODER_CAP_FIXED_SLICE_MODE                  L"FixedSliceMode"           // bool  is fixed slice mode supported
+#define AMF_VIDEO_ENCODER_CAP_NUM_OF_HW_INSTANCES               L"NumOfHwInstances"         // amf_int64 number of HW encoder instances
+
+//-----------------------------------------------------------------------------
+// VideoEncoderHEVC.h
+//-----------------------------------------------------------------------------
+#define AMFVideoEncoder_HEVC L"AMFVideoEncoderHW_HEVC"
+
+enum AMF_VIDEO_ENCODER_HEVC_USAGE_ENUM
+{
+    AMF_VIDEO_ENCODER_HEVC_USAGE_TRANSCONDING = 0,
+    AMF_VIDEO_ENCODER_HEVC_USAGE_ULTRA_LOW_LATENCY,
+    AMF_VIDEO_ENCODER_HEVC_USAGE_LOW_LATENCY,
+    AMF_VIDEO_ENCODER_HEVC_USAGE_WEBCAM
+};
+
+enum AMF_VIDEO_ENCODER_HEVC_PROFILE_ENUM
+{
+    AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN = 1
+};
+
+enum AMF_VIDEO_ENCODER_HEVC_TIER_ENUM
+{
+    AMF_VIDEO_ENCODER_HEVC_TIER_MAIN = 0,
+    AMF_VIDEO_ENCODER_HEVC_TIER_HIGH = 1
+};
+
+enum AMF_VIDEO_ENCODER_LEVEL_ENUM
+{
+    AMF_LEVEL_1 = 30,
+    AMF_LEVEL_2 = 60,
+    AMF_LEVEL_2_1 = 63,
+    AMF_LEVEL_3 = 90,
+    AMF_LEVEL_3_1 = 93,
+    AMF_LEVEL_4 = 120,
+    AMF_LEVEL_4_1 = 123,
+    AMF_LEVEL_5 = 150,
+    AMF_LEVEL_5_1 = 153,
+    AMF_LEVEL_5_2 = 156,
+    AMF_LEVEL_6 = 180,
+    AMF_LEVEL_6_1 = 183,
+    AMF_LEVEL_6_2 = 186
+};
+
+enum AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_ENUM
+{
+    AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CONSTANT_QP = 0,
+    AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR,
+    AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR,
+    AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CBR
+};
+
+enum AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_ENUM
+{
+    AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_NONE = 0,
+    AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_SKIP,
+    AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_IDR,
+    AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_I,
+    AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_P
+};
+
+enum AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE_ENUM
+{
+    AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE_IDR,
+    AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE_I,
+    AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE_P
+};
+
+enum AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_ENUM
+{
+    AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_QUALITY = 0,
+    AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_BALANCED = 5,
+    AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED = 10
+};
+
+enum AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE_ENUM
+{
+    AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE_NONE = 0,
+    AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE_GOP_ALIGNED,
+    AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE_IDR_ALIGNED
+};
+
+
+
+// Static properties - can be set before Init()
+#define AMF_VIDEO_ENCODER_HEVC_FRAMESIZE                            L"HevcFrameSize"                // AMFSize; default = 0,0; Frame size
+
+#define AMF_VIDEO_ENCODER_HEVC_USAGE                                L"HevcUsage"                    // amf_int64(AMF_VIDEO_ENCODER_HEVC_USAGE_ENUM); default = N/A; Encoder usage type. fully configures parameter set. 
+#define AMF_VIDEO_ENCODER_HEVC_PROFILE                              L"HevcProfile"                  // amf_int64(AMF_VIDEO_ENCODER_HEVC_PROFILE_ENUM) ; default = AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN;
+#define AMF_VIDEO_ENCODER_HEVC_TIER                                 L"HevcTier"                     // amf_int64(AMF_VIDEO_ENCODER_HEVC_TIER_ENUM) ; default = AMF_VIDEO_ENCODER_HEVC_TIER_MAIN;
+#define AMF_VIDEO_ENCODER_HEVC_PROFILE_LEVEL                        L"HevcProfileLevel"             // amf_int64 (AMF_VIDEO_ENCODER_LEVEL_ENUM, default depends on HW capabilities); 
+#define AMF_VIDEO_ENCODER_HEVC_MAX_LTR_FRAMES                       L"HevcMaxOfLTRFrames"           // amf_int64; default = 0; Max number of LTR frames
+#define AMF_VIDEO_ENCODER_HEVC_MAX_NUM_REFRAMES                     L"HevcMaxNumRefFrames"          // amf_int64; default = 1; Maximum number of reference frames
+#define AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET                       L"HevcQualityPreset"            // amf_int64(AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_ENUM); default = depends on USAGE; Quality Preset 
+#define AMF_VIDEO_ENCODER_HEVC_EXTRADATA                            L"HevcExtraData"                // AMFInterface* - > AMFBuffer*; SPS/PPS buffer - read-only
+#define AMF_VIDEO_ENCODER_HEVC_ASPECT_RATIO                         L"HevcAspectRatio"              // AMFRatio; default = 1, 1
+
+// Picture control properties
+#define AMF_VIDEO_ENCODER_HEVC_NUM_GOPS_PER_IDR                     L"HevcGOPSPerIDR"               // amf_int64; default = 60; The frequency to insert IDR as start of a GOP. 0 means no IDR will be inserted.
+#define AMF_VIDEO_ENCODER_HEVC_GOP_SIZE                             L"HevcGOPSize"                  // amf_int64; default = 60; GOP Size, in frames
+#define AMF_VIDEO_ENCODER_HEVC_DE_BLOCKING_FILTER_DISABLE           L"HevcDeBlockingFilter"         // bool; default = depends on USAGE; De-blocking Filter
+#define AMF_VIDEO_ENCODER_HEVC_SLICES_PER_FRAME                     L"HevcSlicesPerFrame"           // amf_int64; default = 1; Number of slices Per Frame 
+#define AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE                L"HevcHeaderInsertionMode"      // amf_int64(AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE_ENUM); default = NONE
+
+// Rate control properties
+#define AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD                  L"HevcRateControlMethod"        // amf_int64(AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_MODE_ENUM); default = depends on USAGE; Rate Control Method 
+#define AMF_VIDEO_ENCODER_HEVC_FRAMERATE                            L"HevcFrameRate"                // AMFRate; default = depends on usage; Frame Rate 
+#define AMF_VIDEO_ENCODER_HEVC_VBV_BUFFER_SIZE                      L"HevcVBVBufferSize"            // amf_int64; default = depends on USAGE; VBV Buffer Size in bits
+#define AMF_VIDEO_ENCODER_HEVC_INITIAL_VBV_BUFFER_FULLNESS          L"HevcInitialVBVBufferFullness" // amf_int64; default =  64; Initial VBV Buffer Fullness 0=0% 64=100%
+#define AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_PREANALYSIS_ENABLE      L"HevcRateControlPreAnalysisEnable"  // bool; default =  depends on USAGE; enable Pre-analysis assisted rate control 
+#define AMF_VIDEO_ENCODER_HEVC_ENABLE_VBAQ                          L"HevcEnableVBAQ"               // // bool; default = depends on USAGE; Enable auto VBAQ
+
+// Motion estimation
+#define AMF_VIDEO_ENCODER_HEVC_MOTION_HALF_PIXEL                    L"HevcHalfPixel"                // bool; default= true; Half Pixel 
+#define AMF_VIDEO_ENCODER_HEVC_MOTION_QUARTERPIXEL                  L"HevcQuarterPixel"             // bool; default= true; Quarter Pixel
+
+// Dynamic properties - can be set at any time
+
+// Rate control properties
+#define AMF_VIDEO_ENCODER_HEVC_ENFORCE_HRD                          L"HevcEnforceHRD"               // bool; default = depends on USAGE; Enforce HRD
+#define AMF_VIDEO_ENCODER_HEVC_FILLER_DATA_ENABLE                   L"HevcFillerDataEnable"         // bool; default = depends on USAGE; Enforce HRD
+#define AMF_VIDEO_ENCODER_HEVC_TARGET_BITRATE                       L"HevcTargetBitrate"            // amf_int64; default = depends on USAGE; Target bit rate in bits
+#define AMF_VIDEO_ENCODER_HEVC_PEAK_BITRATE                         L"HevcPeakBitrate"              // amf_int64; default = depends on USAGE; Peak bit rate in bits
+
+#define AMF_VIDEO_ENCODER_HEVC_MAX_AU_SIZE                          L"HevcMaxAUSize"                // amf_int64; default = 60; Max AU Size in bits
+
+#define AMF_VIDEO_ENCODER_HEVC_MIN_QP_I                             L"HevcMinQP_I"                  // amf_int64; default = depends on USAGE; Min QP; range = 
+#define AMF_VIDEO_ENCODER_HEVC_MAX_QP_I                             L"HevcMaxQP_I"                  // amf_int64; default = depends on USAGE; Max QP; range = 
+#define AMF_VIDEO_ENCODER_HEVC_MIN_QP_P                             L"HevcMinQP_P"                  // amf_int64; default = depends on USAGE; Min QP; range = 
+#define AMF_VIDEO_ENCODER_HEVC_MAX_QP_P                             L"HevcMaxQP_P"                  // amf_int64; default = depends on USAGE; Max QP; range = 
+
+#define AMF_VIDEO_ENCODER_HEVC_QP_I                                 L"HevcQP_I"                     // amf_int64; default = 26; P-frame QP; range = 0-51
+#define AMF_VIDEO_ENCODER_HEVC_QP_P                                 L"HevcQP_P"                     // amf_int64; default = 26; P-frame QP; range = 0-51
+
+#define AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_SKIP_FRAME_ENABLE       L"HevcRateControlSkipFrameEnable" // bool; default =  depends on USAGE; Rate Control Based Frame Skip 
+
+
+
+// Per-submittion properties - can be set on input surface interface
+#define AMF_VIDEO_ENCODER_HEVC_END_OF_SEQUENCE                      L"HevcEndOfSequence"            // bool; default = false; generate end of sequence
+#define AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE                   L"HevcForcePictureType"         // amf_int64(AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_ENUM); default = AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_NONE; generate particular picture type
+#define AMF_VIDEO_ENCODER_HEVC_INSERT_AUD                           L"HevcInsertAUD"                // bool; default = false; insert AUD
+#define AMF_VIDEO_ENCODER_HEVC_INSERT_HEADER                        L"HevcInsertHeader"             // bool; default = false; insert header(SPS, PPS, VPS)
+
+#define AMF_VIDEO_ENCODER_HEVC_MARK_CURRENT_WITH_LTR_INDEX          L"HevcMarkCurrentWithLTRIndex"  // amf_int64; default = N/A; Mark current frame with LTR index
+#define AMF_VIDEO_ENCODER_HEVC_FORCE_LTR_REFERENCE_BITFIELD         L"HevcForceLTRReferenceBitfield"// amf_int64; default = 0; force LTR bit-field 
+
+// Properties set by encoder on output buffer interface
+#define AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE                     L"HevcOutputDataType"           // amf_int64(AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE_ENUM); default = N/A
+#define AMF_VIDEO_ENCODER_HEVC_OUTPUT_MARKED_LTR_INDEX              L"HevcMarkedLTRIndex"           // amf_int64; default = -1; Marked LTR index
+#define AMF_VIDEO_ENCODER_HEVC_OUTPUT_REFERENCED_LTR_INDEX_BITFIELD L"HevcReferencedLTRIndexBitfield"// amf_int64; default = 0; referenced LTR bit-field 
+
+// HEVC Encoder capabilities - exposed in AMFCaps interface
+#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_BITRATE                      L"HevcMaxBitrate"               // amf_int64; Maximum bit rate in bits
+#define AMF_VIDEO_ENCODER_HEVC_CAP_NUM_OF_STREAMS                   L"HevcNumOfStreams"             // amf_int64; maximum number of encode streams supported 
+#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_PROFILE                      L"HevcMaxProfile"               // amf_int64(AMF_VIDEO_ENCODER_HEVC_PROFILE_ENUM)
+#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_TIER                         L"HevcMaxTier"                  // amf_int64(AMF_VIDEO_ENCODER_HEVC_TIER_ENUM) maximum profile tier 
+#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_LEVEL                        L"HevcMaxLevel"                 // amf_int64 maximum profile level
+#define AMF_VIDEO_ENCODER_HEVC_CAP_MIN_REFERENCE_FRAMES             L"HevcMinReferenceFrames"       // amf_int64 minimum number of reference frames
+#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_REFERENCE_FRAMES             L"HevcMaxReferenceFrames"       // amf_int64 maximum number of reference frames
+
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+
+#endif // __AMF_SDK_Enc_h__
diff --git a/configure b/configure
index 0e1ccaa..9ce8361 100755
--- a/configure
+++ b/configure
@@ -303,6 +303,7 @@  External library support:
   --disable-zlib           disable zlib [autodetect]
 
   The following libraries provide various hardware acceleration features:
+  --disable-amf            disable AMF video encoding code [autodetect]
   --disable-audiotoolbox   disable Apple AudioToolbox code [autodetect]
   --disable-cuda           disable dynamically linked Nvidia CUDA code [autodetect]
   --enable-cuda-sdk        enable CUDA features that require the CUDA SDK [no]
@@ -1641,6 +1642,7 @@  EXTERNAL_LIBRARY_LIST="
 "
 
 HWACCEL_AUTODETECT_LIBRARY_LIST="
+    amf
     audiotoolbox
     crystalhd
     cuda
@@ -2785,12 +2787,15 @@  scale_npp_filter_deps="cuda libnpp"
 scale_cuda_filter_deps="cuda_sdk"
 thumbnail_cuda_filter_deps="cuda_sdk"
 
+amf_deps_any="dlopen LoadLibrary"
+
 nvenc_deps="cuda"
 nvenc_deps_any="libdl LoadLibrary"
 nvenc_encoder_deps="nvenc"
 
 h263_v4l2m2m_decoder_deps="v4l2_m2m h263_v4l2_m2m"
 h263_v4l2m2m_encoder_deps="v4l2_m2m h263_v4l2_m2m"
+h264_amf_encoder_deps="amf"
 h264_crystalhd_decoder_select="crystalhd h264_mp4toannexb_bsf h264_parser"
 h264_cuvid_decoder_deps="cuda cuvid"
 h264_cuvid_decoder_select="h264_mp4toannexb_bsf"
@@ -2809,6 +2814,7 @@  h264_vaapi_encoder_deps="VAEncPictureParameterBufferH264"
 h264_vaapi_encoder_select="cbs_h264 vaapi_encode"
 h264_v4l2m2m_decoder_deps="v4l2_m2m h264_v4l2_m2m"
 h264_v4l2m2m_encoder_deps="v4l2_m2m h264_v4l2_m2m"
+hevc_amf_encoder_deps="amf"
 hevc_cuvid_decoder_deps="cuda cuvid"
 hevc_cuvid_decoder_select="hevc_mp4toannexb_bsf"
 hevc_mediacodec_decoder_deps="mediacodec"
@@ -6305,6 +6311,18 @@  else
     disable cuda cuvid nvenc
 fi
 
+if enabled x86; then
+    case $target_os in
+        mingw32*|mingw64*|win32|win64|cygwin*)
+            ;;
+        *)
+            disable  amf
+            ;;
+    esac
+else
+    disable amf
+fi
+
 enabled nvenc &&
     check_cc -I$source_path <<EOF || disable nvenc
 #include "compat/nvenc/nvEncodeAPI.h"
@@ -6313,6 +6331,13 @@  void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_PRESET_HQ_GUID } };
 int main(void) { return 0; }
 EOF
 
+enabled amf &&
+    check_cc -I$source_path <<EOF || disable amf
+#include "compat/amd/amfsdkenc.h"
+AMFFactory *factory;
+int main(void) { return 0; }
+EOF
+
 # Funny iconv installations are not unusual, so check it after all flags have been set
 if enabled libc_iconv; then
     check_func_headers iconv.h iconv
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index bc4d7da..5ac13d1 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -50,6 +50,7 @@  OBJS = allcodecs.o                                                      \
 # subsystems
 OBJS-$(CONFIG_AANDCTTABLES)            += aandcttab.o
 OBJS-$(CONFIG_AC3DSP)                  += ac3dsp.o ac3.o ac3tab.o
+OBJS-$(CONFIG_AMF)                     += amfenc.o
 OBJS-$(CONFIG_AUDIO_FRAME_QUEUE)       += audio_frame_queue.o
 OBJS-$(CONFIG_AUDIODSP)                += audiodsp.o
 OBJS-$(CONFIG_BLOCKDSP)                += blockdsp.o
@@ -326,6 +327,7 @@  OBJS-$(CONFIG_H263_ENCODER)            += mpeg4videoenc.o mpeg4video.o  \
                                           h263.o ituh263enc.o flvenc.o h263data.o
 OBJS-$(CONFIG_H263_V4L2M2M_DECODER)    += v4l2_m2m_dec.o
 OBJS-$(CONFIG_H263_V4L2M2M_ENCODER)    += v4l2_m2m_enc.o
+OBJS-$(CONFIG_H264_AMF_ENCODER)        += amfenc_h264.o
 OBJS-$(CONFIG_H264_DECODER)            += h264dec.o h264_cabac.o h264_cavlc.o \
                                           h264_direct.o h264_loopfilter.o  \
                                           h264_mb.o h264_picture.o \
@@ -347,6 +349,7 @@  OBJS-$(CONFIG_H264_V4L2M2M_DECODER)    += v4l2_m2m_dec.o
 OBJS-$(CONFIG_H264_V4L2M2M_ENCODER)    += v4l2_m2m_enc.o
 OBJS-$(CONFIG_HAP_DECODER)             += hapdec.o hap.o
 OBJS-$(CONFIG_HAP_ENCODER)             += hapenc.o hap.o
+OBJS-$(CONFIG_HEVC_AMF_ENCODER)        += amfenc_hevc.o
 OBJS-$(CONFIG_HEVC_DECODER)            += hevcdec.o hevc_mvs.o \
                                           hevc_cabac.o hevc_refs.o hevcpred.o    \
                                           hevcdsp.o hevc_filter.o hevc_data.o
@@ -1056,6 +1059,7 @@  SKIPHEADERS-$(CONFIG_JNI)              += ffjni.h
 SKIPHEADERS-$(CONFIG_LIBVPX)           += libvpx.h
 SKIPHEADERS-$(CONFIG_LIBWEBP_ENCODER)  += libwebpenc_common.h
 SKIPHEADERS-$(CONFIG_MEDIACODEC)       += mediacodecdec_common.h mediacodec_surface.h mediacodec_wrapper.h mediacodec_sw_buffer.h
+SKIPHEADERS-$(CONFIG_AMF)              += amfenc.h
 SKIPHEADERS-$(CONFIG_NVENC)            += nvenc.h
 SKIPHEADERS-$(CONFIG_QSV)              += qsv.h qsv_internal.h
 SKIPHEADERS-$(CONFIG_QSVDEC)           += qsvdec.h
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 8369126..3d2299f 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -649,6 +649,7 @@  static void register_all(void)
      * above is available */
     REGISTER_ENCODER(H263_V4L2M2M,      h263_v4l2m2m);
     REGISTER_ENCDEC (LIBOPENH264,       libopenh264);
+    REGISTER_ENCODER(H264_AMF,          h264_amf);
     REGISTER_DECODER(H264_CUVID,        h264_cuvid);
     REGISTER_ENCODER(H264_NVENC,        h264_nvenc);
     REGISTER_ENCODER(H264_OMX,          h264_omx);
@@ -661,6 +662,7 @@  static void register_all(void)
     REGISTER_ENCODER(NVENC_H264,        nvenc_h264);
     REGISTER_ENCODER(NVENC_HEVC,        nvenc_hevc);
 #endif
+    REGISTER_ENCODER(HEVC_AMF,          hevc_amf);
     REGISTER_DECODER(HEVC_CUVID,        hevc_cuvid);
     REGISTER_DECODER(HEVC_MEDIACODEC,   hevc_mediacodec);
     REGISTER_ENCODER(HEVC_NVENC,        hevc_nvenc);
diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c
new file mode 100644
index 0000000..fcfbd20
--- /dev/null
+++ b/libavcodec/amfenc.c
@@ -0,0 +1,515 @@ 
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/avassert.h"
+#include "libavutil/imgutils.h"
+#include "libavutil/hwcontext.h"
+#include "libavutil/hwcontext_d3d11va.h"
+#include "libavutil/mem.h"
+#include "libavutil/pixdesc.h"
+#include "libavutil/time.h"
+
+#include "amfenc.h"
+#include "internal.h"
+
+#include <d3d11.h>
+
+#ifdef _WIN32
+#include "compat/w32dlfcn.h"
+#else
+#include <dlfcn.h>
+#endif
+
+#define FFMPEG_AMF_WRITER_ID L"ffmpeg_amf"
+
+#define PTS_PROP L"PtsProp"
+
+const enum AVPixelFormat ff_amf_pix_fmts[] = {
+    AV_PIX_FMT_NV12,
+    AV_PIX_FMT_YUV420P,
+    AV_PIX_FMT_D3D11,
+    AV_PIX_FMT_NONE
+};
+
+typedef struct FormatMap {
+    enum AVPixelFormat       av_format;
+    enum AMF_SURFACE_FORMAT  amf_format;
+} FormatMap;
+