Search code examples
h.264directx-11hardware-accelerationdxva

Decoding H264 stream with ID3D11VideoDecoder


I'm trying to decode (and render) H264 raw stream with DirectX11 and interface https://msdn.microsoft.com/en-us/library/windows/desktop/hh447766%28v=vs.85%29.aspx . Unfortunately I got stuck at sumbitting DXVA PictureParameters buffer: namely ID3D11VideoContext::SubmitDecoderBuffers always returns E_FAIL. This is very enigmatic, is there somewhere an example of using this interface to decode H264 bitstream becasue from error code E_FAIL I might never be able to conclude what I'm doing wrong? Such example would be very helpful.


Solution

  • Currently, i don't think there are some sample with ID3D11VideoContext for the h264 decoding. But there are some with IDirectXVideoDecoder (DirectX9).

    UPDATE

    The source code from MPC-BE is a good start. (Under src->filters->transform->MPCVideoDec).

    (Ffmpeg has some use of ID3D11VideoContext, but it is not fully detailed).

    EDIT

    See my response : How do I use Hardware accelerated video/H.264 decoding with directx 11 and windows 7?