1. 13 Apr, 2018 1 commit
  2. 11 Feb, 2018 1 commit
    • Mark Thompson's avatar
      lavc: Add per-thread surfaces in get_hw_frame_parameters() · cad739da
      Mark Thompson authored
      This number is definitely required when frame threading is enabled, so
      add it here rather than forcing all users to handle it themselves.
      
      DXVA2 contained this addition in specific code as well (therefore being
      added twice in the internal case) - just remove it from there.
      cad739da
  3. 19 Oct, 2017 1 commit
    • wm4's avatar
      lavc: external hardware frame pool initialization · b46a77f1
      wm4 authored
      This adds a new API, which allows the API user to query the required
      AVHWFramesContext parameters. This also reduces code duplication across
      the hwaccels by introducing ff_decode_get_hw_frames_ctx(), which uses
      the new API function. It takes care of initializing the hw_frames_ctx
      if needed, and does additional error handling and API usage checking.
      
      Support for VDA and Cuvid missing.
      Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
      b46a77f1
  4. 22 Jul, 2017 1 commit
  5. 10 Jul, 2017 1 commit
    • wm4's avatar
      dxva: DXVA2_ModeHEVC_VLD_Main10 does not support Main · c64da19b
      wm4 authored
      This mode apparently does not support decoding of HEVC Main (8 bit).
      With D3D11 and Intel drivers on Windows 10 I get green corruption, while
      using DXVA2_ModeHEVC_VLD_Main works.
      c64da19b
  6. 27 Jun, 2017 7 commits
    • wm4's avatar
      dxva: verbose-log decoder GUID list · f0bcedaf
      wm4 authored
      Helpful for debugging.
      
      Merges Libav commit 068eaa53.
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      f0bcedaf
    • wm4's avatar
      dxva: support DXGI_FORMAT_420_OPAQUE decoding · 8d7fdba7
      wm4 authored
      Some devices (some phones, apparently) will support only this opaque
      format. Of course this won't work with CLI, because copying data
      directly is not supported.
      
      Automatic frame allocation (setting AVCodecContext.hw_device_ctx) does
      not support this mode, even if it's the only supported mode. But since
      opaque surfaces are generally less useful, that's probably ok.
      
      Merges Libav commit 5030e385.
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      8d7fdba7
    • wm4's avatar
      dxva: fix some warnings · 39f201a0
      wm4 authored
      Some existed since forever, some are new.
      
      The cast in get_surface() is silly, but unless we change the av_log
      function signature, or all callers of ff_dxva2_get_surface_index(), it's
      needed to remove the const warning.
      
      Merges Libav commit 752ddb45.
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      39f201a0
    • wm4's avatar
      dxva: add declarative profile checks · e2afcc33
      wm4 authored
      Make supported codec profiles part of each dxva_modes entry. Every DXVA2
      mode is representative for a codec with a subset of supported profiles,
      so reflecting that in dxva_modes seems appropriate.
      
      In practice, this will more strictly check MPEG2 profiles, will stop
      relying on the surface format checks for selecting the correct HEVC
      profile, and remove the verbose messages for mismatching H264/HEVC
      profiles. Instead of the latter, it will now print the more nebulous "No
      decoder device for codec found" verbose message.
      
      This also respects AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH. Move the
      Main10 HEVC entry before the normal one to make this work better.
      
      Originally inspired by VLC's code.
      
      Merges Libav commit 70e5e7c0.
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      e2afcc33
    • wm4's avatar
      dxva: add support for new dxva2 and d3d11 hwaccel APIs · 70143a39
      wm4 authored
      This also adds support to avconv (which is trivial due to the new
      hwaccel API being generic enough).
      
      The new decoder setup code in dxva2.c is significantly based on work by
      Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites.
      
      Merges Libav commit f9e7a2f9.
      Also adds untested VP9 support.
      The check for DXVA2 COBJs is removed. Just update your MinGW to
      something newer than a 5 year old release.
      Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
      70143a39
    • wm4's avatar
      dxva: move d3d11 locking/unlocking to functions · 5659f740
      wm4 authored
      I want to make it non-mandatory to set a mutex in the D3D11 device
      context, and replacing it with user callbacks seems like the best
      solution. This is preparation for it. Also makes the code slightly more
      readable.
      
      Merges Libav commit 831cfe10.
      Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
      5659f740
    • wm4's avatar
      dxva: preparations for new hwaccel API · ab28108a
      wm4 authored
      The actual hwaccel code will need to access an internal context instead
      of avctx->hwaccel_context, so add a new DXVA_CONTEXT() macro, that will
      dispatch between the "old" external and the new internal context.
      
      Also, the new API requires a new D3D11 pixfmt, so all places which check
      for the pixfmt need to be adjusted. Introduce a ff_dxva2_is_d3d11()
      function, which does the check.
      
      Merges Libav commit 4dec101a.
      Adds changes to vp9 over the Libav patch.
      Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
      ab28108a
  7. 26 Jun, 2017 4 commits
    • wm4's avatar
      dxva: verbose-log decoder GUID list · 068eaa53
      wm4 authored
      Helpful for debugging.
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      068eaa53
    • wm4's avatar
      dxva: support DXGI_FORMAT_420_OPAQUE decoding · 5030e385
      wm4 authored
      Some devices (some phones, apparently) will support only this opaque
      format. Of course this won't work with CLI, because copying data
      directly is not supported.
      
      Automatic frame allocation (setting AVCodecContext.hw_device_ctx) does
      not support this mode, even if it's the only supported mode. But since
      opaque surfaces are generally less useful, that's probably ok.
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      5030e385
    • wm4's avatar
      dxva: fix some warnings · 752ddb45
      wm4 authored
      Some existed since forever, some are new.
      
      The cast in get_surface() is silly, but unless we change the av_log
      function signature, or all callers of ff_dxva2_get_surface_index(), it's
      needed to remove the const warning.
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      752ddb45
    • wm4's avatar
      dxva: add declarative profile checks · 70e5e7c0
      wm4 authored
      Make supported codec profiles part of each dxva_modes entry. Every DXVA2
      mode is representative for a codec with a subset of supported profiles,
      so reflecting that in dxva_modes seems appropriate.
      
      In practice, this will more strictly check MPEG2 profiles, will stop
      relying on the surface format checks for selecting the correct HEVC
      profile, and remove the verbose messages for mismatching H264/HEVC
      profiles. Instead of the latter, it will now print the more nebulous "No
      decoder device for codec found" verbose message.
      
      This also respects AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH. Move the
      Main10 HEVC entry before the normal one to make this work better.
      
      Originally inspired by VLC's code.
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      70e5e7c0
  8. 08 Jun, 2017 3 commits
    • wm4's avatar
      dxva: add support for new dxva2 and d3d11 hwaccel APIs · f9e7a2f9
      wm4 authored
      This also adds support to avconv (which is trivial due to the new
      hwaccel API being generic enough).
      
      The new decoder setup code in dxva2.c is significantly based on work by
      Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites.
      Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
      f9e7a2f9
    • wm4's avatar
      dxva: move d3d11 locking/unlocking to functions · 831cfe10
      wm4 authored
      I want to make it non-mandatory to set a mutex in the D3D11 device
      context, and replacing it with user callbacks seems like the best
      solution. This is preparation for it. Also makes the code slightly more
      readable.
      Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
      831cfe10
    • wm4's avatar
      dxva: preparations for new hwaccel API · 4dec101a
      wm4 authored
      The actual hwaccel code will need to access an internal context instead
      of avctx->hwaccel_context, so add a new DXVA_CONTEXT() macro, that will
      dispatch between the "old" external and the new internal context.
      
      Also, the new API requires a new D3D11 pixfmt, so all places which check
      for the pixfmt need to be adjusted. Introduce a ff_dxva2_is_d3d11()
      function, which does the check.
      Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
      4dec101a
  9. 16 Jan, 2017 1 commit
  10. 12 Jan, 2017 1 commit
  11. 08 Jan, 2017 1 commit
  12. 05 Jan, 2017 1 commit
  13. 29 Nov, 2016 1 commit
  14. 07 Nov, 2016 1 commit
  15. 20 Oct, 2016 1 commit
  16. 10 Oct, 2016 1 commit
  17. 05 Oct, 2016 1 commit
    • Steve Lhomme's avatar
      d3d11va: Use the proper decoding slice index · be630b1e
      Steve Lhomme authored
      The decoding buffer index expected by D3D11VA is the one from the
      ID3D11Texture2D not the one from the ID3D11VideoDecoderOutputView array
      in AVD3D11VAContext.
      
      Otherwise, when providing decoder slices that do not start from 0,
      pictures appear in bogus order. For an invalid index crashes and
      image corruption can occur.
      Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
      be630b1e
  18. 11 Jul, 2016 1 commit
  19. 17 Jun, 2016 1 commit
  20. 17 Sep, 2015 1 commit
  21. 13 Sep, 2015 1 commit
  22. 01 Jun, 2015 1 commit
  23. 26 May, 2015 1 commit
  24. 25 May, 2015 2 commits
  25. 31 Mar, 2014 1 commit
  26. 17 Mar, 2014 1 commit
  27. 21 Jan, 2014 2 commits