1. 20 Apr, 2019 1 commit
  2. 10 Dec, 2018 1 commit
  3. 30 Oct, 2018 1 commit
  4. 27 Oct, 2018 1 commit
    • James Almer's avatar
      Revert "decode: copy the output parameters from the last bsf in the chain back... · cacb62f9
      James Almer authored
      Revert "decode: copy the output parameters from the last bsf in the chain back to the AVCodecContext"
      
      This reverts commit 662558f9.
      
      The avcodec_parameters_to_context() call was freeing and reallocating
      AVCodecContext->extradata, essentially taking ownership of it, which according
      to the doxy is user owned. This is an API break and has produces crashes in
      some library users like Firefox.
      Revert until a better solution is found to internally propagate the filtered
      extradata back into the decoder context.
      Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
      cacb62f9
  5. 24 Oct, 2018 1 commit
  6. 17 Aug, 2018 4 commits
  7. 19 Jul, 2018 1 commit
  8. 15 Jun, 2018 1 commit
  9. 05 Apr, 2018 1 commit
  10. 03 Apr, 2018 1 commit
    • wm4's avatar
      avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL · d6fc031c
      wm4 authored
      PSEUDOPAL pixel formats are not paletted, but carried a palette with the
      intention of allowing code to treat unpaletted formats as paletted. The
      palette simply mapped the byte values to the resulting RGB values,
      making it some sort of LUT for RGB conversion.
      
      It was used for 1 byte formats only: RGB4_BYTE, BGR4_BYTE, RGB8, BGR8,
      GRAY8. The first 4 are awfully obscure, used only by some ancient bitmap
      formats. The last one, GRAY8, is more common, but its treatment is
      grossly incorrect. It considers full range GRAY8 only, so GRAY8 coming
      from typical Y video planes was not mapped to the correct RGB values.
      This cannot be fixed, because AVFrame.color_range can be freely changed
      at runtime, and there is nothing to ensure the pseudo palette is
      updated.
      
      Also, nothing actually used the PSEUDOPAL palette data, except xwdenc
      (trivially changed in the previous commit). All other code had to treat
      it as a special case, just to ignore or to propagate palette data.
      
      In conclusion, this was just a very strange old mechnaism that has no
      real justification to exist anymore (although it may have been nice and
      useful in the past). Now it's an artifact that makes the API harder to
      use: API users who allocate their own pixel data have to be aware that
      they need to allocate the palette, or FFmpeg will crash on them in
      _some_ situations. On top of this, there was no API to allocate the
      pseuo palette outside of av_frame_get_buffer().
      
      This patch not only deprecates AV_PIX_FMT_FLAG_PSEUDOPAL, but also makes
      the pseudo palette optional. Nothing accesses it anymore, though if it's
      set, it's propagated. It's still allocated and initialized for
      compatibility with API users that rely on this feature. But new API
      users do not need to allocate it. This was an explicit goal of this
      patch.
      
      Most changes replace AV_PIX_FMT_FLAG_PSEUDOPAL with FF_PSEUDOPAL. I
      first tried #ifdefing all code, but it was a mess. The FF_PSEUDOPAL
      macro reduces the mess, and still allows defining FF_API_PSEUDOPAL to 0.
      
      Passes FATE with FF_API_PSEUDOPAL enabled and disabled. In addition,
      FATE passes with FF_API_PSEUDOPAL set to 1, but with allocation
      functions manually changed to not allocating a palette.
      d6fc031c
  11. 25 Mar, 2018 1 commit
    • wm4's avatar
      avcodec: add a subcharenc mode that disables UTF-8 check · b7d0d912
      wm4 authored
      This is for applications which want to explicitly check for invalid
      UTF-8 manually, and take actions that are better than dropping invalid
      subtitles silently. (It's pretty much silent because sporadic avcodec
      error messages are so common that you can't reasonably display them in a
      prominent and meaningful way in a application GUI.)
      b7d0d912
  12. 14 Feb, 2018 1 commit
  13. 11 Feb, 2018 2 commits
    • 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
    • Mark Thompson's avatar
      lavc: Add support for increasing hardware frame pool sizes · 5b145290
      Mark Thompson authored
      AVCodecContext.extra_hw_frames is added to the size of hardware frame
      pools created by libavcodec for APIs which require fixed-size pools.
      This allows the user to keep references to a greater number of frames
      after decode, which may be necessary for some use-cases.
      
      It is also added to the initial_pool_size value returned by
      avcodec_get_hw_frames_parameters() if a fixed-size pool is required.
      5b145290
  14. 19 Dec, 2017 2 commits
    • Mark Thompson's avatar
      2117725d
    • Mark Thompson's avatar
      lavc: Use hardware config information in ff_get_format() · 39056b52
      Mark Thompson authored
      This removes the dependency that hardware pixel formats previously had on
      AVHWAccel instances, meaning only those which actually do something need
      exist after this patch.
      
      Also updates avcodec_default_get_format() to be able to choose hardware
      formats if either a matching device has been supplied or no additional
      external configuration is required, and avcodec_get_hw_frames_parameters()
      to use the hardware config rather than searching the old hwaccel list.
      39056b52
  15. 09 Dec, 2017 1 commit
    • James Cowgill's avatar
      avcodec/decode: reset codec on receiving packet after EOF in compat_decode · 02ba4b91
      James Cowgill authored
      In commit 061a0c14 ("decode: restructure the core decoding code"), the
      deprecated avcodec_decode_* APIs were reworked so that they called into the
      new avcodec_send_packet / avcodec_receive_frame API. This had the side effect
      of prohibiting sending new packets containing data after a drain
      packet, but in previous versions of FFmpeg this "worked" and some
      applications relied on it.
      
      To restore some compatibility, reset the codec if we receive a new non-drain
      packet using the old API after draining has completed. While this does
      not give the same behaviour as the old API did, in the majority of cases
      it works and it does not require changes to any other part of the decoding
      code.
      
      Fixes ticket #6775
      Signed-off-by: 's avatarJames Cowgill <jcowgill@debian.org>
      Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
      02ba4b91
  16. 26 Nov, 2017 2 commits
    • Mark Thompson's avatar
      3a71bcc2
    • Mark Thompson's avatar
      lavc: Use hardware config information in ff_get_format() · 67e81d79
      Mark Thompson authored
      This removes the dependency that hardware pixel formats previously had on
      AVHWAccel instances, meaning only those which actually do something need
      exist after this patch.
      
      Also updates avcodec_default_get_format() to be able to choose hardware
      formats if either a matching device has been supplied or no additional
      external configuration is required, and avcodec_get_hw_frames_parameters()
      to use the hardware config rather than searching the old hwaccel list.
      
      The FF_CODEC_CAP_HWACCEL_REQUIRE_CLASS mechanism is deleted because it
      no longer does anything (the codec already contains the pointers to the
      matching hwaccels).
      67e81d79
  17. 11 Nov, 2017 1 commit
  18. 10 Nov, 2017 5 commits
  19. 30 Oct, 2017 1 commit
  20. 23 Oct, 2017 1 commit
  21. 22 Oct, 2017 1 commit
  22. 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
  23. 28 Sep, 2017 1 commit
  24. 04 Sep, 2017 1 commit
  25. 08 Aug, 2017 1 commit
  26. 26 Jul, 2017 5 commits