[PATCH] d3d11.idl: add the basic interfaces to enable video decoding

Steve Lhomme robux4 at videolabs.io
Mon May 11 07:33:39 CDT 2015


Arf, sorry for all the noise. This patch compiles but doesn't run fine.
I'll investigate.

On Mon, May 11, 2015 at 2:02 PM, Steve Lhomme <robux4 at videolabs.io> wrote:
> ---
>  include/d3d11.idl | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 168 insertions(+)
>
> diff --git a/include/d3d11.idl b/include/d3d11.idl
> index 3726d32..79db53f 100644
> --- a/include/d3d11.idl
> +++ b/include/d3d11.idl
> @@ -2125,6 +2125,174 @@ interface ID3D11Device : IUnknown
>      UINT GetExceptionMode();
>  }
>
> +typedef enum D3D11_VDOV_DIMENSION
> +{
> +    D3D11_VDOV_DIMENSION_UNKNOWN = 0,
> +    D3D11_VDOV_DIMENSION_TEXTURE2D
> +} 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;
> +
> +    union
> +    {
> +        D3D11_TEX2D_VDOV Texture2D;
> +    };
> +} D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC;
> +
> +[
> +    object,
> +    local,
> +    uuid(c2931aea-2a85-4f20-860f-fba1fd256e18)
> +]
> +interface ID3D11VideoDecoderOutputView : ID3D11View
> +{
> +    void GetDesc( [out] D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc);
> +}
> +
> +[
> +    object,
> +    local,
> +    uuid(3c9c5b51-995d-48d1-9b8d-fa5caeded65c)
> +]
> +interface ID3D11VideoDecoder : ID3D11DeviceChild
> +{
> +}
> +
> +typedef enum D3D11_VIDEO_DECODER_BUFFER_TYPE
> +{
> +    D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS = 0,
> +    D3D11_VIDEO_DECODER_BUFFER_MACROBLOCK_CONTROL,
> +    D3D11_VIDEO_DECODER_BUFFER_RESIDUAL_DIFFERENCE,
> +    D3D11_VIDEO_DECODER_BUFFER_DEBLOCKING_CONTROL,
> +    D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX,
> +    D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL,
> +    D3D11_VIDEO_DECODER_BUFFER_BITSTREAM,
> +    D3D11_VIDEO_DECODER_BUFFER_MOTION_VECTOR,
> +    D3D11_VIDEO_DECODER_BUFFER_FILM_GRAIN
> +} D3D11_VIDEO_DECODER_BUFFER_TYPE;
> +
> +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;
> +    BOOL PartialEncryption;
> +    D3D11_ENCRYPTED_BLOCK_INFO EncryptedBlockInfo;
> +} D3D11_VIDEO_DECODER_BUFFER_DESC;
> +
> +[
> +    object,
> +    local,
> +    uuid(61f21c45-3c0e-4a74-9cea-67100d9ad5e4)
> +]
> +interface ID3D11VideoContext : ID3D11DeviceChild
> +{
> +    HRESULT GetDecoderBuffer(
> +        [in] ID3D11VideoDecoder *pDecoder,
> +        [in] D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType,
> +        [out] UINT *pBufferSize,
> +        [out] void **ppBuffer);
> +    HRESULT ReleaseDecoderBuffer(
> +        [in] ID3D11VideoDecoder *pDecoder,
> +        [in] D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType);
> +    HRESULT DecoderBeginFrame(
> +        [in] ID3D11VideoDecoder *pDecoder,
> +        [in] ID3D11VideoDecoderOutputView *pVideoDecoderOutputView,
> +        [in] UINT ContentKeySize,
> +        [in] const void *pContentKey);
> +    HRESULT DecoderEndFrame(
> +        [in] ID3D11VideoDecoder *pDecoder);
> +    HRESULT SubmitDecoderBuffers(
> +        [in] ID3D11VideoDecoder *pDecoder,
> +        [in] UINT NumBuffers,
> +        [in] const D3D11_VIDEO_DECODER_BUFFER_DESC *pBufferDesc);
> +}
> +
> +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;
> +
> +[
> +    object,
> +    local,
> +    uuid(10ec4d5b-975a-4689-b9e4-d0aac30fe333)
> +]
> +interface ID3D11VideoDevice : IUnknown
> +{
> +    HRESULT CreateVideoDecoder(
> +        [in] const D3D11_VIDEO_DECODER_DESC *pVideoDesc,
> +        [in] const D3D11_VIDEO_DECODER_CONFIG *pConfig,
> +        [out] ID3D11VideoDecoder **ppVideoDecoder);
> +    UINT GetVideoDecoderProfileCount(void);
> +    HRESULT GetVideoDecoderProfile(
> +        [in] UINT Index,
> +        [out] GUID *pDecoderProfile);
> +    HRESULT CheckVideoDecoderFormat(
> +        [in] const GUID *pDecoderProfile,
> +        [in] DXGI_FORMAT Format,
> +        [out] BOOL *pSupported);
> +    HRESULT CreateVideoDecoderOutputView(
> +        [in] ID3D11Resource *pResource,
> +        [in] const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *pDesc,
> +        [out] ID3D11VideoDecoderOutputView **ppVideoDecoderOutputView);
> +    HRESULT GetVideoDecoderConfigCount(
> +        [in] const D3D11_VIDEO_DECODER_DESC *pDesc,
> +        [out] UINT *pCount);
> +    HRESULT GetVideoDecoderConfig(
> +        [in] const D3D11_VIDEO_DECODER_DESC *pDesc,
> +        [in] UINT Index,
> +        [out] D3D11_VIDEO_DECODER_CONFIG *pConfig);
> +}
> +
>  typedef enum D3D11_CREATE_DEVICE_FLAG {
>      D3D11_CREATE_DEVICE_SINGLETHREADED  = 0x0001,
>      D3D11_CREATE_DEVICE_DEBUG           = 0x0002,
> --
> 2.4.0
>
>
>



More information about the wine-devel mailing list