module external.directx.d3d12video;

/*-------------------------------------------------------------------------------------
 *
 * Copyright (c) Microsoft Corporation
 *
 *-------------------------------------------------------------------------------------*/
// DirectX 12 Video Header translation from d3d12video.h
// Latest update: Windows 10, version 1809

public import external.directx.d3d12;

mixin(uuid!(ID3D12VideoDecoderHeap, "0946B7C9", "EBF6", "4047", ["BB", "73", "86", "83", "E2", "7D", "BB", "1F"]));
extern (C++) interface ID3D12VideoDecoderHeap : ID3D12Pageable
{
    D3D12_VIDEO_DECODER_HEAP_DESC GetDesc();
}

mixin(uuid!(ID3D12VideoDevice, "1F052807", "0B46", "4ACC", ["8A", "89", "36", "4F", "79", "37", "18", "A4"]));
extern (C++) interface ID3D12VideoDevice : IUnknown
{
    HRESULT QueryInterface(REFIID riid, void** ppvObject);
    ULONG AddRef();
    ULONG Release();
    HRESULT CheckFeatureSupport(D3D12_FEATURE_VIDEO FeatureVideo, void* pFeatureSupportData, uint FeatureSupportDataSize);
    HRESULT CreateVideoDecoder(const D3D12_VIDEO_DECODER_DESC* pDesc, REFIID riid, void** ppVideoDecoder);
    HRESULT CreateVideoDecoderHeap(const D3D12_VIDEO_DECODER_HEAP_DESC* pVideoDecoderHeapDesc, REFIID riid, void** ppVideoDecoderHeap);
    HRESULT CreateVideoProcessor(uint NodeMask, const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC* pOutputStreamDesc, uint NumInputStreamDescs, const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC* pInputStreamDescs, REFIID riid, void** ppVideoProcessor);
}

mixin(uuid!(ID3D12VideoDecoder, "C59B6BDC", "7720", "4074", ["A1", "36", "17", "A1", "56", "03", "74", "70"]));
extern (C++) interface ID3D12VideoDecoder : ID3D12Pageable
{
    D3D12_VIDEO_DECODER_DESC GetDesc();
}

mixin(uuid!(ID3D12VideoProcessor, "304FDB32", "BEDE", "410A", ["85", "45", "94", "3A", "C6", "A4", "61", "38"]));
extern (C++) interface ID3D12VideoProcessor : ID3D12Pageable
{
    uint GetNodeMask();
    uint GetNumInputStreamDescs();
    HRESULT GetInputStreamDescs(uint NumInputStreamDescs, D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC* pInputStreamDescs);
    D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC GetOutputStreamDesc();
}

mixin(uuid!(ID3D12VideoDecodeCommandList, "3B60536E", "AD29", "4E64", ["A2", "69", "F8", "53", "83", "7E", "5E", "53"]));
extern (C++) interface ID3D12VideoDecodeCommandList : ID3D12CommandList
{
    HRESULT Close();
    HRESULT Reset(ID3D12CommandAllocator* pAllocator);
    void ClearState();
    void ResourceBarrier(uint NumBarriers, const D3D12_RESOURCE_BARRIER* pBarriers);
    void DiscardResource(ID3D12Resource* pResource, const D3D12_DISCARD_REGION* pRegion);
    void BeginQuery(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint Index);
    void EndQuery(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint Index);
    void ResolveQueryData(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint StartIndex, uint NumQueries, ID3D12Resource* pDestinationBuffer, ulong AlignedDestinationBufferOffset);
    void SetPredication(ID3D12Resource* pBuffer, ulong AlignedBufferOffset, D3D12_PREDICATION_OP Operation);
    void SetMarker(uint Metadata, const void* pData, uint Size);
    void BeginEvent(uint Metadata, const void* pData, uint Size);
    void EndEvent();
    void DecodeFrame(ID3D12VideoDecoder* pDecoder, const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS* pOutputArguments, const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS* pInputArguments);
    void WriteBufferImmediate(uint Count, const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER* pParams, const D3D12_WRITEBUFFERIMMEDIATE_MODE* pModes);
}

mixin(uuid!(ID3D12VideoProcessCommandList, "AEB2543A", "167F", "4682", ["AC", "C8", "D1", "59", "ED", "4A", "62", "09"]));
extern (C++) interface ID3D12VideoProcessCommandList : ID3D12CommandList
{
    HRESULT Close();
    HRESULT Reset(ID3D12CommandAllocator* pAllocator);
    void ClearState();
    void ResourceBarrier(uint NumBarriers, const D3D12_RESOURCE_BARRIER* pBarriers);
    void DiscardResource(ID3D12Resource* pResource, const D3D12_DISCARD_REGION* pRegion);
    void BeginQuery(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint Index);
    void EndQuery(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint Index);
    void ResolveQueryData(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint StartIndex, uint NumQueries, ID3D12Resource* pDestinationBuffer, ulong AlignedDestinationBufferOffset);
    void SetPredication(ID3D12Resource* pBuffer, ulong AlignedBufferOffset, D3D12_PREDICATION_OP Operation);
    void SetMarker(uint Metadata, const void* pData, uint Size);
    void BeginEvent(uint Metadata, const void* pData, uint Size);
    void EndEvent();
    void ProcessFrames(ID3D12VideoProcessor* pVideoProcessor, const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS* pOutputArguments, uint NumInputStreams, const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS* pInputArguments);
    void WriteBufferImmediate(uint Count, const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER* pParams, const D3D12_WRITEBUFFERIMMEDIATE_MODE* pModes);
}

mixin(uuid!(ID3D12VideoDecodeCommandList1, "D52F011B", "B56E", "453C", ["A0", "5A", "A7", "F3", "11", "C8", "F4", "72"]));
extern (C++) interface ID3D12VideoDecodeCommandList1 : ID3D12VideoDecodeCommandList
{
    void DecodeFrame1(ID3D12VideoDecoder* pDecoder, const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1* pOutputArguments, const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS* pInputArguments);
}

mixin(uuid!(ID3D12VideoProcessCommandList1, "542C5C4D", "7596", "434F", ["8C", "93", "4E", "FA", "67", "66", "F2", "67"]));
extern (C++) interface ID3D12VideoProcessCommandList1 : ID3D12VideoProcessCommandList
{
    void ProcessFrames1(ID3D12VideoProcessor* pVideoProcessor, const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS* pOutputArguments, uint NumInputStreams, const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1* pInputArguments);
}

alias D3D12_VIDEO_FIELD_TYPE = uint;
enum : D3D12_VIDEO_FIELD_TYPE
{
    D3D12_VIDEO_FIELD_TYPE_NONE = 0,
    D3D12_VIDEO_FIELD_TYPE_INTERLACED_TOP_FIELD_FIRST = 1,
    D3D12_VIDEO_FIELD_TYPE_INTERLACED_BOTTOM_FIELD_FIRST = 2
}
alias D3D12_VIDEO_FRAME_STEREO_FORMAT = uint;
enum : D3D12_VIDEO_FRAME_STEREO_FORMAT
{
    D3D12_VIDEO_FRAME_STEREO_FORMAT_NONE = 0,
    D3D12_VIDEO_FRAME_STEREO_FORMAT_MONO = 1,
    D3D12_VIDEO_FRAME_STEREO_FORMAT_HORIZONTAL = 2,
    D3D12_VIDEO_FRAME_STEREO_FORMAT_VERTICAL = 3,
    D3D12_VIDEO_FRAME_STEREO_FORMAT_SEPARATE = 4
}
struct D3D12_VIDEO_FORMAT
{
    DXGI_FORMAT Format;
    DXGI_COLOR_SPACE_TYPE ColorSpace;
}

struct D3D12_VIDEO_SAMPLE
{
    uint Width;
    uint Height;
    D3D12_VIDEO_FORMAT Format;
}

alias D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE = uint;
enum : D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE
{
    D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE_NONE = 0,
    D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE_FIELD_BASED = 1
}
alias D3D12_FEATURE_VIDEO = uint;
enum : D3D12_FEATURE_VIDEO
{
    D3D12_FEATURE_VIDEO_DECODE_SUPPORT = 0,
    D3D12_FEATURE_VIDEO_DECODE_PROFILES = 1,
    D3D12_FEATURE_VIDEO_DECODE_FORMATS = 2,
    D3D12_FEATURE_VIDEO_DECODE_CONVERSION_SUPPORT = 3,
    D3D12_FEATURE_VIDEO_PROCESS_SUPPORT = 5,
    D3D12_FEATURE_VIDEO_PROCESS_MAX_INPUT_STREAMS = 6,
    D3D12_FEATURE_VIDEO_PROCESS_REFERENCE_INFO = 7,
    D3D12_FEATURE_VIDEO_DECODER_HEAP_SIZE = 8,
    D3D12_FEATURE_VIDEO_PROCESSOR_SIZE = 9,
    D3D12_FEATURE_VIDEO_DECODE_PROFILE_COUNT = 10,
    D3D12_FEATURE_VIDEO_DECODE_FORMAT_COUNT = 11,
    D3D12_FEATURE_VIDEO_ARCHITECTURE = 17,
    D3D12_FEATURE_VIDEO_DECODE_HISTOGRAM = 18
}
alias D3D12_BITSTREAM_ENCRYPTION_TYPE = uint;
enum : D3D12_BITSTREAM_ENCRYPTION_TYPE
{
    D3D12_BITSTREAM_ENCRYPTION_TYPE_NONE = 0
}
struct D3D12_VIDEO_DECODE_CONFIGURATION
{
    GUID DecodeProfile;
    D3D12_BITSTREAM_ENCRYPTION_TYPE BitstreamEncryption;
    D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE InterlaceType;
}

struct D3D12_VIDEO_DECODER_DESC
{
    uint NodeMask;
    D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
}

struct D3D12_VIDEO_DECODER_HEAP_DESC
{
    uint NodeMask;
    D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
    uint DecodeWidth;
    uint DecodeHeight;
    DXGI_FORMAT Format;
    DXGI_RATIONAL FrameRate;
    uint BitRate;
    uint MaxDecodePictureBufferCount;
}

struct D3D12_VIDEO_SIZE_RANGE
{
    uint MaxWidth;
    uint MaxHeight;
    uint MinWidth;
    uint MinHeight;
}

alias D3D12_VIDEO_PROCESS_FILTER = uint;
enum : D3D12_VIDEO_PROCESS_FILTER
{
    D3D12_VIDEO_PROCESS_FILTER_BRIGHTNESS = 0,
    D3D12_VIDEO_PROCESS_FILTER_CONTRAST = 1,
    D3D12_VIDEO_PROCESS_FILTER_HUE = 2,
    D3D12_VIDEO_PROCESS_FILTER_SATURATION = 3,
    D3D12_VIDEO_PROCESS_FILTER_NOISE_REDUCTION = 4,
    D3D12_VIDEO_PROCESS_FILTER_EDGE_ENHANCEMENT = 5,
    D3D12_VIDEO_PROCESS_FILTER_ANAMORPHIC_SCALING = 6,
    D3D12_VIDEO_PROCESS_FILTER_STEREO_ADJUSTMENT = 7
}
alias D3D12_VIDEO_PROCESS_FILTER_FLAGS = uint;
enum : D3D12_VIDEO_PROCESS_FILTER_FLAGS
{
    D3D12_VIDEO_PROCESS_FILTER_FLAG_NONE = 0,
    D3D12_VIDEO_PROCESS_FILTER_FLAG_BRIGHTNESS = (1 << D3D12_VIDEO_PROCESS_FILTER_BRIGHTNESS),
    D3D12_VIDEO_PROCESS_FILTER_FLAG_CONTRAST = (1 << D3D12_VIDEO_PROCESS_FILTER_CONTRAST),
    D3D12_VIDEO_PROCESS_FILTER_FLAG_HUE = (1 << D3D12_VIDEO_PROCESS_FILTER_HUE),
    D3D12_VIDEO_PROCESS_FILTER_FLAG_SATURATION = (1 << D3D12_VIDEO_PROCESS_FILTER_SATURATION),
    D3D12_VIDEO_PROCESS_FILTER_FLAG_NOISE_REDUCTION = (1 << D3D12_VIDEO_PROCESS_FILTER_NOISE_REDUCTION),
    D3D12_VIDEO_PROCESS_FILTER_FLAG_EDGE_ENHANCEMENT = (1 << D3D12_VIDEO_PROCESS_FILTER_EDGE_ENHANCEMENT),
    D3D12_VIDEO_PROCESS_FILTER_FLAG_ANAMORPHIC_SCALING = (1 << D3D12_VIDEO_PROCESS_FILTER_ANAMORPHIC_SCALING),
    D3D12_VIDEO_PROCESS_FILTER_FLAG_STEREO_ADJUSTMENT = (1 << D3D12_VIDEO_PROCESS_FILTER_STEREO_ADJUSTMENT)
}
alias D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS = uint;
enum : D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS
{
    D3D12_VIDEO_PROCESS_DEINTERLACE_FLAG_NONE = 0,
    D3D12_VIDEO_PROCESS_DEINTERLACE_FLAG_BOB = 0x1,
    D3D12_VIDEO_PROCESS_DEINTERLACE_FLAG_CUSTOM = 0x80000000
}
struct D3D12_VIDEO_PROCESS_ALPHA_BLENDING
{
    bool Enable;
    float Alpha;
}

struct D3D12_VIDEO_PROCESS_LUMA_KEY
{
    bool Enable;
    float Lower;
    float Upper;
}

struct D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC
{
    DXGI_FORMAT Format;
    DXGI_COLOR_SPACE_TYPE ColorSpace;
    DXGI_RATIONAL SourceAspectRatio;
    DXGI_RATIONAL DestinationAspectRatio;
    DXGI_RATIONAL FrameRate;
    D3D12_VIDEO_SIZE_RANGE SourceSizeRange;
    D3D12_VIDEO_SIZE_RANGE DestinationSizeRange;
    bool EnableOrientation;
    D3D12_VIDEO_PROCESS_FILTER_FLAGS FilterFlags;
    D3D12_VIDEO_FRAME_STEREO_FORMAT StereoFormat;
    D3D12_VIDEO_FIELD_TYPE FieldType;
    D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS DeinterlaceMode;
    bool EnableAlphaBlending;
    D3D12_VIDEO_PROCESS_LUMA_KEY LumaKey;
    uint NumPastFrames;
    uint NumFutureFrames;
    bool EnableAutoProcessing;
}

alias D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE = uint;
enum : D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE
{
    D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_OPAQUE = 0,
    D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_BACKGROUND = 1,
    D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_DESTINATION = 2,
    D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_SOURCE_STREAM = 3
}
struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC
{
    DXGI_FORMAT Format;
    DXGI_COLOR_SPACE_TYPE ColorSpace;
    D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE AlphaFillMode;
    uint AlphaFillModeSourceStreamIndex;
    float[4] BackgroundColor;
    DXGI_RATIONAL FrameRate;
    bool EnableStereo;
}

alias D3D12_VIDEO_DECODE_TIER = uint;
enum : D3D12_VIDEO_DECODE_TIER
{
    D3D12_VIDEO_DECODE_TIER_NOT_SUPPORTED = 0,
    D3D12_VIDEO_DECODE_TIER_1 = 1,
    D3D12_VIDEO_DECODE_TIER_2 = 2,
    D3D12_VIDEO_DECODE_TIER_3 = 3
}
alias D3D12_VIDEO_DECODE_SUPPORT_FLAGS = uint;
enum : D3D12_VIDEO_DECODE_SUPPORT_FLAGS
{
    D3D12_VIDEO_DECODE_SUPPORT_FLAG_NONE = 0,
    D3D12_VIDEO_DECODE_SUPPORT_FLAG_SUPPORTED = 0x1
}
alias D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS = uint;
enum : D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS
{
    D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_NONE = 0,
    D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_HEIGHT_ALIGNMENT_MULTIPLE_32_REQUIRED = 0x1,
    D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_POST_PROCESSING_SUPPORTED = 0x2,
    D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_REFERENCE_ONLY_ALLOCATIONS_REQUIRED = 0x4,
    D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_ALLOW_RESOLUTION_CHANGE_ON_NON_KEY_FRAME = 0x8
}
alias D3D12_VIDEO_DECODE_STATUS = uint;
enum : D3D12_VIDEO_DECODE_STATUS
{
    D3D12_VIDEO_DECODE_STATUS_OK = 0,
    D3D12_VIDEO_DECODE_STATUS_CONTINUE = 1,
    D3D12_VIDEO_DECODE_STATUS_CONTINUE_SKIP_DISPLAY = 2,
    D3D12_VIDEO_DECODE_STATUS_RESTART = 3
}
alias D3D12_VIDEO_DECODE_ARGUMENT_TYPE = uint;
enum : D3D12_VIDEO_DECODE_ARGUMENT_TYPE
{
    D3D12_VIDEO_DECODE_ARGUMENT_TYPE_PICTURE_PARAMETERS = 0,
    D3D12_VIDEO_DECODE_ARGUMENT_TYPE_INVERSE_QUANTIZATION_MATRIX = 1,
    D3D12_VIDEO_DECODE_ARGUMENT_TYPE_SLICE_CONTROL = 2,
    D3D12_VIDEO_DECODE_ARGUMENT_TYPE_MAX_VALID = 3
}
struct D3D12_FEATURE_DATA_VIDEO_DECODE_SUPPORT
{
    uint NodeIndex;
    D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
    uint Width;
    uint Height;
    DXGI_FORMAT DecodeFormat;
    DXGI_RATIONAL FrameRate;
    uint BitRate;
    D3D12_VIDEO_DECODE_SUPPORT_FLAGS SupportFlags;
    D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS ConfigurationFlags;
    D3D12_VIDEO_DECODE_TIER DecodeTier;
}

struct D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILE_COUNT
{
    uint NodeIndex;
    uint ProfileCount;
}

struct D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILES
{
    uint NodeIndex;
    uint ProfileCount;
    GUID* pProfiles;
}

struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT
{
    uint NodeIndex;
    D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
    uint FormatCount;
}

struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS
{
    uint NodeIndex;
    D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
    uint FormatCount;
    DXGI_FORMAT* pOutputFormats;
}

struct D3D12_FEATURE_DATA_VIDEO_ARCHITECTURE
{
    bool IOCoherent;
}

alias D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT = uint;
enum : D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT
{
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_Y = 0,
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_U = 1,
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_V = 2,
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_R = 0,
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_G = 1,
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_B = 2,
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_A = 3
}
alias D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS = uint;
enum : D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS
{
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_NONE = 0,
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_Y = (1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_Y),
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_U = (1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_U),
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_V = (1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_V),
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_R = (1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_R),
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_G = (1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_G),
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_B = (1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_B),
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_A = (1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_A)
}
struct D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM
{
    uint NodeIndex;
    GUID DecodeProfile;
    uint Width;
    uint Height;
    DXGI_FORMAT DecodeFormat;
    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS Components;
    uint BinCount;
    uint CounterBitDepth;
}

alias D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS = uint;
enum : D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS
{
    D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAG_NONE = 0,
    D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAG_SUPPORTED = 0x1
}
alias D3D12_VIDEO_SCALE_SUPPORT_FLAGS = uint;
enum : D3D12_VIDEO_SCALE_SUPPORT_FLAGS
{
    D3D12_VIDEO_SCALE_SUPPORT_FLAG_NONE = 0,
    D3D12_VIDEO_SCALE_SUPPORT_FLAG_POW2_ONLY = 0x1,
    D3D12_VIDEO_SCALE_SUPPORT_FLAG_EVEN_DIMENSIONS_ONLY = 0x2
}
struct D3D12_VIDEO_SCALE_SUPPORT
{
    D3D12_VIDEO_SIZE_RANGE OutputSizeRange;
    D3D12_VIDEO_SCALE_SUPPORT_FLAGS Flags;
}

struct D3D12_FEATURE_DATA_VIDEO_DECODE_CONVERSION_SUPPORT
{
    uint NodeIndex;
    D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
    D3D12_VIDEO_SAMPLE DecodeSample;
    D3D12_VIDEO_FORMAT OutputFormat;
    DXGI_RATIONAL FrameRate;
    uint BitRate;
    D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS SupportFlags;
    D3D12_VIDEO_SCALE_SUPPORT ScaleSupport;
}

struct D3D12_FEATURE_DATA_VIDEO_DECODER_HEAP_SIZE
{
    D3D12_VIDEO_DECODER_HEAP_DESC VideoDecoderHeapDesc;
    ulong MemoryPoolL0Size;
    ulong MemoryPoolL1Size;
}

struct D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE
{
    uint NodeMask;
    const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC* pOutputStreamDesc;
    uint NumInputStreamDescs;
    const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC* pInputStreamDescs;
    ulong MemoryPoolL0Size;
    ulong MemoryPoolL1Size;
}

struct D3D12_QUERY_DATA_VIDEO_DECODE_STATISTICS
{
    ulong Status;
    ulong NumMacroblocksAffected;
    DXGI_RATIONAL FrameRate;
    uint BitRate;
}

struct D3D12_VIDEO_DECODE_SUB_SAMPLE_MAPPING_BLOCK
{
    uint ClearSize;
    uint EncryptedSize;
}

struct D3D12_VIDEO_DECODE_FRAME_ARGUMENT
{
    D3D12_VIDEO_DECODE_ARGUMENT_TYPE Type;
    uint Size;
    void* pData;
}

struct D3D12_VIDEO_DECODE_REFERENCE_FRAMES
{
    uint NumTexture2Ds;
    ID3D12Resource** ppTexture2Ds;
    uint* pSubresources;
    ID3D12VideoDecoderHeap** ppHeaps;
}

struct D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM
{
    ID3D12Resource* pBuffer;
    ulong Offset;
    ulong Size;
}

struct D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS
{
    bool Enable;
    ID3D12Resource* pReferenceTexture2D;
    uint ReferenceSubresource;
    DXGI_COLOR_SPACE_TYPE OutputColorSpace;
    DXGI_COLOR_SPACE_TYPE DecodeColorSpace;
}

struct D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS
{
    uint NumFrameArguments;
    D3D12_VIDEO_DECODE_FRAME_ARGUMENT[10] FrameArguments;
    D3D12_VIDEO_DECODE_REFERENCE_FRAMES ReferenceFrames;
    D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM CompressedBitstream;
    ID3D12VideoDecoderHeap* pHeap;
}

struct D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS
{
    ID3D12Resource* pOutputTexture2D;
    uint OutputSubresource;
    D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS ConversionArguments;
}

alias D3D12_VIDEO_PROCESS_FEATURE_FLAGS = uint;
enum : D3D12_VIDEO_PROCESS_FEATURE_FLAGS
{
    D3D12_VIDEO_PROCESS_FEATURE_FLAG_NONE = 0,
    D3D12_VIDEO_PROCESS_FEATURE_FLAG_ALPHA_FILL = 0x1,
    D3D12_VIDEO_PROCESS_FEATURE_FLAG_LUMA_KEY = 0x2,
    D3D12_VIDEO_PROCESS_FEATURE_FLAG_STEREO = 0x4,
    D3D12_VIDEO_PROCESS_FEATURE_FLAG_ROTATION = 0x8,
    D3D12_VIDEO_PROCESS_FEATURE_FLAG_FLIP = 0x10,
    D3D12_VIDEO_PROCESS_FEATURE_FLAG_ALPHA_BLENDING = 0x20,
    D3D12_VIDEO_PROCESS_FEATURE_FLAG_PIXEL_ASPECT_RATIO = 0x40
}
alias D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS = uint;
enum : D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS
{
    D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_NONE = 0,
    D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_DENOISE = 0x1,
    D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_DERINGING = 0x2,
    D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_EDGE_ENHANCEMENT = 0x4,
    D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_COLOR_CORRECTION = 0x8,
    D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_FLESH_TONE_MAPPING = 0x10,
    D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_IMAGE_STABILIZATION = 0x20,
    D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_SUPER_RESOLUTION = 0x40,
    D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_ANAMORPHIC_SCALING = 0x80,
    D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_CUSTOM = 0x80000000
}
alias D3D12_VIDEO_PROCESS_ORIENTATION = uint;
enum : D3D12_VIDEO_PROCESS_ORIENTATION
{
    D3D12_VIDEO_PROCESS_ORIENTATION_DEFAULT = 0,
    D3D12_VIDEO_PROCESS_ORIENTATION_FLIP_HORIZONTAL = 1,
    D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_90 = 2,
    D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_90_FLIP_HORIZONTAL = 3,
    D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_180 = 4,
    D3D12_VIDEO_PROCESS_ORIENTATION_FLIP_VERTICAL = 5,
    D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_270 = 6,
    D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_270_FLIP_HORIZONTAL = 7
}
alias D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS = uint;
enum : D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS
{
    D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_NONE = 0,
    D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_FRAME_DISCONTINUITY = 0x1,
    D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_FRAME_REPEAT = 0x2
}
struct D3D12_VIDEO_PROCESS_FILTER_RANGE
{
    int Minimum;
    int Maximum;
    int Default;
    float Multiplier;
}

alias D3D12_VIDEO_PROCESS_SUPPORT_FLAGS = uint;
enum : D3D12_VIDEO_PROCESS_SUPPORT_FLAGS
{
    D3D12_VIDEO_PROCESS_SUPPORT_FLAG_NONE = 0,
    D3D12_VIDEO_PROCESS_SUPPORT_FLAG_SUPPORTED = 0x1
}
struct D3D12_FEATURE_DATA_VIDEO_PROCESS_SUPPORT
{
    uint NodeIndex;
    D3D12_VIDEO_SAMPLE InputSample;
    D3D12_VIDEO_FIELD_TYPE InputFieldType;
    D3D12_VIDEO_FRAME_STEREO_FORMAT InputStereoFormat;
    DXGI_RATIONAL InputFrameRate;
    D3D12_VIDEO_FORMAT OutputFormat;
    D3D12_VIDEO_FRAME_STEREO_FORMAT OutputStereoFormat;
    DXGI_RATIONAL OutputFrameRate;
    D3D12_VIDEO_PROCESS_SUPPORT_FLAGS SupportFlags;
    D3D12_VIDEO_SCALE_SUPPORT ScaleSupport;
    D3D12_VIDEO_PROCESS_FEATURE_FLAGS FeatureSupport;
    D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS DeinterlaceSupport;
    D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS AutoProcessingSupport;
    D3D12_VIDEO_PROCESS_FILTER_FLAGS FilterSupport;
    D3D12_VIDEO_PROCESS_FILTER_RANGE[32] FilterRangeSupport;
}

struct D3D12_FEATURE_DATA_VIDEO_PROCESS_MAX_INPUT_STREAMS
{
    uint NodeIndex;
    uint MaxInputStreams;
}

struct D3D12_FEATURE_DATA_VIDEO_PROCESS_REFERENCE_INFO
{
    uint NodeIndex;
    D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS DeinterlaceMode;
    D3D12_VIDEO_PROCESS_FILTER_FLAGS Filters;
    D3D12_VIDEO_PROCESS_FEATURE_FLAGS FeatureSupport;
    DXGI_RATIONAL InputFrameRate;
    DXGI_RATIONAL OutputFrameRate;
    bool EnableAutoProcessing;
    uint PastFrames;
    uint FutureFrames;
}

struct D3D12_VIDEO_PROCESS_REFERENCE_SET
{
    uint NumPastFrames;
    ID3D12Resource** ppPastFrames;
    uint* pPastSubresources;
    uint NumFutureFrames;
    ID3D12Resource** ppFutureFrames;
    uint* pFutureSubresources;
}

struct D3D12_VIDEO_PROCESS_TRANSFORM
{
    D3D12_RECT SourceRectangle;
    D3D12_RECT DestinationRectangle;
    D3D12_VIDEO_PROCESS_ORIENTATION Orientation;
}

struct D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE
{
    uint OutputIndex;
    uint InputFrameOrField;
}

struct D3D12_VIDEO_PROCESS_INPUT_STREAM
{
    ID3D12Resource* pTexture2D;
    uint Subresource;
    D3D12_VIDEO_PROCESS_REFERENCE_SET ReferenceSet;
}

struct D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS
{
    D3D12_VIDEO_PROCESS_INPUT_STREAM[2] InputStream;
    D3D12_VIDEO_PROCESS_TRANSFORM Transform;
    D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS Flags;
    D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE RateInfo;
    int[32] FilterLevels;
    D3D12_VIDEO_PROCESS_ALPHA_BLENDING AlphaBlending;
}

struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM
{
    ID3D12Resource* pTexture2D;
    uint Subresource;
}

struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS
{
    D3D12_VIDEO_PROCESS_OUTPUT_STREAM[2] OutputStream;
    D3D12_RECT TargetRectangle;
}

struct D3D12_VIDEO_DECODE_OUTPUT_HISTOGRAM
{
    ulong Offset;
    ID3D12Resource* pBuffer;
}

struct D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS1
{
    bool Enable;
    ID3D12Resource* pReferenceTexture2D;
    uint ReferenceSubresource;
    DXGI_COLOR_SPACE_TYPE OutputColorSpace;
    DXGI_COLOR_SPACE_TYPE DecodeColorSpace;
    uint OutputWidth;
    uint OutputHeight;
}

struct D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1
{
    ID3D12Resource* pOutputTexture2D;
    uint OutputSubresource;
    D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS1 ConversionArguments;
    D3D12_VIDEO_DECODE_OUTPUT_HISTOGRAM[4] Histograms;
}

struct D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1
{
    D3D12_VIDEO_PROCESS_INPUT_STREAM[2] InputStream;
    D3D12_VIDEO_PROCESS_TRANSFORM Transform;
    D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS Flags;
    D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE RateInfo;
    int[32] FilterLevels;
    D3D12_VIDEO_PROCESS_ALPHA_BLENDING AlphaBlending;
    D3D12_VIDEO_FIELD_TYPE FieldType;
}
