1. 20 Dec, 2017 1 commit
  2. 19 Dec, 2017 2 commits
  3. 14 Dec, 2017 2 commits
    • wm4's avatar
      avcodec: add metadata to identify wrappers and hardware decoders · b945fed6
      wm4 authored
      Explicitly identify decoder/encoder wrappers with a common name. This
      saves API users from guessing by the name suffix. For example, they
      don't have to guess that "h264_qsv" is the h264 QSV implementation, and
      instead they can just check the AVCodec .codec and .wrapper_name fields.
      
      Explicitly mark AVCodec entries that are hardware decoders or most
      likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing
      API users listing hardware decoders in a more generic way. The proposed
      AVCodecHWConfig does not provide this information fully, because it's
      concerned with decoder configuration, not information about the fact
      whether the hardware is used or not.
      
      AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software
      implementations in case the hardware is not capable.
      
      Based on a patch by Philip Langdale <philipl@overt.org>.
      
      Merges Libav commit 47687a2f.
      b945fed6
    • wm4's avatar
      avcodec: add metadata to identify wrappers and hardware decoders · 47687a2f
      wm4 authored
      Explicitly identify decoder/encoder wrappers with a common name. This
      saves API users from guessing by the name suffix. For example, they
      don't have to guess that "h264_qsv" is the h264 QSV implementation, and
      instead they can just check the AVCodec .codec and .wrapper_name fields.
      
      Explicitly mark AVCodec entries that are hardware decoders or most
      likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing
      API users listing hardware decoders in a more generic way. The proposed
      AVCodecHWConfig does not provide this information fully, because it's
      concerned with decoder configuration, not information about the fact
      whether the hardware is used or not.
      
      AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software
      implementations in case the hardware is not capable.
      
      Based on a patch by Philip Langdale <philipl@overt.org>.
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      47687a2f
  4. 26 Nov, 2017 2 commits
  5. 13 Jun, 2017 1 commit
  6. 29 Mar, 2017 1 commit
  7. 02 Dec, 2016 1 commit
  8. 02 Oct, 2016 1 commit
  9. 11 Sep, 2016 1 commit
  10. 21 Jun, 2016 2 commits
  11. 04 May, 2016 1 commit
  12. 30 Apr, 2016 8 commits
  13. 12 Apr, 2016 1 commit
  14. 28 Jan, 2016 3 commits
    • wm4's avatar
      mmaldec: limit internal buffering · 14a90c9e
      wm4 authored
      This uses a new MMAL feature, which limits the number of extra frames
      that can be buffered within the decoder. VIDEO_MAX_NUM_CALLBACKS can
      be defined as positive or negative number. Positive numbers are
      absolute, and can lead to deadlocks if the user underestimates the
      number of required buffers. Negative numbers specify the number of extra
      buffers, e.g. -1 means no extra buffer, (-1-N) means N extra buffers.
      
      Set a gratuitous default of -11 (N=10). This is much lower than the
      firmware default, which appears to be 96.
      
      This is backwards compatible, but needs a symbol only present in newer
      firmware headers. (It's an enum item, so it requires a check in
      configure.)
      14a90c9e
    • wm4's avatar
      mmaldec: support MPEG-4 · 7b1b53f3
      wm4 authored
      I guess this means part 2 in both cases. Not sure which profiles exactly
      are actually supported properly.
      7b1b53f3
    • wm4's avatar
      mmaldec: print the MMAL format FourCC automatically · d27a12cb
      wm4 authored
      Slight simplification. The result is the same. Also, change the
      wording of the message as requested in patch review.
      d27a12cb
  15. 10 Nov, 2015 1 commit
  16. 07 Nov, 2015 2 commits
    • wm4's avatar
      mmaldec: correct package buffering accounting · a55fbfa4
      wm4 authored
      The assert in ffmmal_stop_decoder() could trigger sometimes. The
      packets_buffered counter was indeed not correctly maintained, and
      packets were not subtracted from it if they were still in the waiting
      queue.
      
      For some reason, this happened especially with VC-1.
      a55fbfa4
    • wm4's avatar
      mmaldec: add vc1 decoding support · b07cbf67
      wm4 authored
      b07cbf67
  17. 22 Oct, 2015 1 commit
  18. 21 Oct, 2015 1 commit
  19. 05 Oct, 2015 1 commit
  20. 04 Oct, 2015 2 commits
    • wm4's avatar
      mmaldec: be more tolerant against MMAL not returning decoded output · 39f01e34
      wm4 authored
      In some situations, MMAL won't return a decoded frame for certain input
      frames. This can happen if a frame fails to decode, or if a packet does
      not actually contain a complete frame. In these situations, we would
      deadlock (or actually timeout) waiting for an expected output frame,
      which is not ideal. On the other hand, there are situations where we
      definitely have to block to avoid deadlocks. (This mess is a
      consequence of trying to map MMAL's asynchronous and flexible
      dataflow to libavcodec, which is more static and rigid.)
      
      Solve this by doing a blocking wait only if the amount of buffered data
      is too big. The whole purpose of the blocking wait is to avoid excessive
      buffering of input data, so we can skip it if it appears to be low. The
      consequence is that libavcodec can gracefully return no frame to the
      API user.
      
      We want to track the number of full packets to make our heuristic work.
      But MMAL buffers are fixed-size, requiring splitting large packets. This
      is why the previous commit is needed. We use the ..._FRAME_END flag to
      remember packet boundaries, but MMAL does not preserve these buffer
      flags when returning buffers to the user.
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      39f01e34
    • wm4's avatar
      mmaldec: refactor to have more context per MMAL input buffer · 65db4899
      wm4 authored
      The next commit needs 1 bit of additional information per MMAL buffer
      sent to the MMAL input port. This information will be needed when the
      buffer is recycled (i.e. returned by the input port's callback).
      Normally, we could use MMAL_BUFFER_HEADER_FLAG_USER0, but that is
      unexpectedly not preserved.
      
      Do this by storing a pointer to FFBufferEntry in the MMAL buffer's
      user data, instead of an AVBufferRef. This also changes the lifetime
      of FFBufferEntry.
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      65db4899
  21. 24 Sep, 2015 3 commits
  22. 12 Sep, 2015 2 commits
    • wm4's avatar
      mmaldec: fix pkt_dts determination · 99404597
      wm4 authored
      This also drops setting the frame->pts field. This is usually not set by
      decoders, so this would be an inconsistency that's at worst a danger to
      the API user.
      
      It appears the buffer->dts field is normally not set by the MMAL
      decoder, so don't use it. If it's ever going to be set by MMAL, we
      don't know whether the value will be what we want.
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      99404597
    • wm4's avatar
      lavc: allow asynchronous decoders to return correct pkt_dts values · 87a051f9
      wm4 authored
      The generic code in utils.c sets the AVFrame.pkt_dts field from the
      packet it was supposedly decoded. This does not have to be true for a
      fully asynchronous decoder like mmaldec. It could be overwritten with an
      incorrect value. Even if the decoder doesn't determine the DTS (but sets
      it to AV_NOPTS_VALUE), it's impossible to determine a correct value in
      utils.c.
      
      Decoders can now be marked with FF_CODEC_CAP_SETS_PKT_DTS, in which case
      utils.c won't overwrite the field. The decoders are expected to set this
      field (even if they only set it to AV_NOPTS_VALUE).
      Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
      87a051f9