1. 04 Aug, 2019 2 commits
    • Stefan Schoenefeld's avatar
      ad97be9f
    • Stefan Schoenefeld's avatar
      avcodec/h263dec: fix hwaccel decoding · 39a5c0ac
      Stefan Schoenefeld authored
      Recently we encountered an issue when decoding a h.263 file:
      
      FFmpeg will freeze when decoding h.263 video with NVDEC. Turns out this is not directly related to NVDEC but is a problem that shows with several other HW decoders like VDPAU, though the exact kind of error is different (either error messages or freezing[1]). The root cause is that ff_thread_finish_setup() is called twice per frame from ff_h263_decode_frame(). This is not supported by ff_thread_finish_setup() and specifically checked for and warned against in the functions code. The issue is also specific to hw accelerated decoding only as the second call to ff_thread_finish_setup() is only issued when hw acceleration is on. The fix is simple: add a check that the first call is only send when hw acceleration is off, and the second call only when hw acceleration is on (see attached patch). This works fine as far as I was able to test with vdpau and nvdec/nvcuvid hw decoding. The patch also adds NVDEC to the hw config list if available.
      
      I also noticed a secondary issue when browsing through the code which is that, according to documentation, ff_thread_finish_setup() should only be called if the codec implements update_thread_context(), which h263dec does not. The patch does not address this and I'm not sure any action needs to be taken here at all.
      
      [1] This is depending on whether or not the hw decoder sets the  HWACCEL_CAPS_ASYNC_SAFE flag
      Signed-off-by: 's avatarTimo Rothenpieler <timo@rothenpieler.org>
      39a5c0ac
  2. 05 May, 2019 1 commit
  3. 11 Mar, 2019 1 commit
  4. 12 Jul, 2018 1 commit
  5. 04 Jul, 2018 1 commit
  6. 30 May, 2018 1 commit
  7. 04 May, 2018 1 commit
  8. 25 Apr, 2018 1 commit
  9. 02 Apr, 2018 1 commit
  10. 19 Dec, 2017 1 commit
    • Mark Thompson's avatar
      lavc: Add hardware config metadata for decoders supporting hardware output · 2fcb0090
      Mark Thompson authored
      This includes a pointer to the associated hwaccel for decoders using
      hwaccels - these will be used later to implement the hwaccel setup
      without needing a global list.
      
      Also added is a new file listing all hwaccels as external declarations -
      this will be used later to generate the hwaccel list at configure time.
      2fcb0090
  11. 26 Nov, 2017 1 commit
    • Mark Thompson's avatar
      lavc: Add hardware config metadata for decoders supporting hardware output · 758fbc54
      Mark Thompson authored
      This includes a pointer to the associated hwaccel for decoders using
      hwaccels - these will be used later to implement the hwaccel setup
      without needing a global list.
      
      Also added is a new file listing all hwaccels as external declarations -
      this will be used later to generate the hwaccel list at configure time.
      758fbc54
  12. 20 Nov, 2017 1 commit
    • Philip Langdale's avatar
      avcodec: Implement mpeg4 nvdec hwaccel · 6b77a10e
      Philip Langdale authored
      This was predictably nightmarish, given how ridiculous mpeg4 is.
      I had to stare at the cuvid parser output for a long time to work
      out what each field was supposed to be, and even then, I still don't
      fully understand some of them. Particularly:
      
      vop_coded: If I'm reading the decoder correctly, this flag will always
                 be 1 as the decoder will not pass the hwaccel any frame
                 where it is not 1.
      divx_flags: There's obviously no documentation on what the possible
                  flags are. I simply observed that this is '0' for a
                  normal bitstream and '5' for packed b-frames.
      gmc_enabled: I had a number of guesses as to what this mapped to.
                   I picked the condition I did based on when the cuvid
                   parser was setting flag.
      
      Also note that as with the vdpau hwaccel, the decoder needs to
      consume the entire frame and not the slice.
      6b77a10e
  13. 19 Jun, 2017 1 commit
  14. 21 Mar, 2017 1 commit
  15. 21 Jan, 2017 1 commit
  16. 19 Dec, 2016 1 commit
  17. 15 Dec, 2016 1 commit
  18. 04 May, 2016 1 commit
  19. 19 Mar, 2016 1 commit
  20. 27 Jan, 2016 1 commit
  21. 30 Oct, 2015 1 commit
  22. 04 Oct, 2015 1 commit
  23. 19 Aug, 2015 1 commit
  24. 18 Aug, 2015 1 commit
  25. 03 Aug, 2015 1 commit
  26. 27 Jul, 2015 2 commits
  27. 08 Jun, 2015 1 commit
  28. 31 May, 2015 1 commit
  29. 26 May, 2015 1 commit
    • Philip Langdale's avatar
      avcodec/vdpau: Re-factor pre-hwaccel helper functions into separate header · 9ae766d1
      Philip Langdale authored
      h264.h and hevc.h are mutually exclusive due to defining some of the same
      names. As such, we need to avoid forcing h264.h to be included if we want
      hevc decode acceleration to be possible.
      
      However, some of the pre-hwaccel helper functions need h264.h. To avoid
      messy collisions, let's move the declaration of all those helpers to
      a separate header which we will exclude for the hevc support (which will
      be hwaccel-only).
      Signed-off-by: 's avatarPhilip Langdale <philipl@overt.org>
      9ae766d1
  30. 22 May, 2015 3 commits
  31. 17 May, 2015 1 commit
  32. 08 May, 2015 1 commit
  33. 28 Apr, 2015 1 commit
  34. 19 Apr, 2015 1 commit
  35. 04 Apr, 2015 1 commit
  36. 27 Jan, 2015 1 commit