Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-10-07Merge commit '32c8359093d1ff4f45ed19518b449b3ac3769d27'Hendrik Leppkes
* commit '32c8359093d1ff4f45ed19518b449b3ac3769d27': lavc: export the timestamps when decoding in AVFrame.pts Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-09-12libavcodec/mmaldec.c: set AVFrame interlaced_frame and top_field_first, ↵Jens Ziller
AVCodecContext framerate Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-21lavc: export the timestamps when decoding in AVFrame.ptsAnton Khirnov
Currently it's exported as AVFrame.pkt_pts, which is also the only use for that field. The reason it is done like this is that lavc used to export various codec-specific "timing" information in AVFrame.pts, which is not done anymore. Since it is confusing to the callers to have a separate field which is used only for decoder timestamps and nothing else, deprecate pkt_pts and use just AVFrame.pts everywhere.
2016-06-21lavc/mmaldec: reduce some diffs with Libav missed in previous skipped mergesClément Bœsch
2016-06-21Merge commit '74beead9bd596180bcac6108548fc0a86d8eb4ae'Clément Bœsch
* commit '74beead9bd596180bcac6108548fc0a86d8eb4ae': mmaldec: limit internal buffering See 14a90c9ef09a4b046500dceab5ca1875e330a376 The introduction of the MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS check is merged. Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-05-11Merge commit 'b8e899f4bf5f09900aa71552112d32a5566b6baf'Derek Buitenhuis
* commit 'b8e899f4bf5f09900aa71552112d32a5566b6baf': mmaldec: Use imgutils.h for copying frames Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-04cosmetics: Fix spelling mistakesVittorio Giovara
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-04-30mmaldec: limit internal bufferingwm4
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.) Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-04-30mmaldec: print the MMAL format FourCC automaticallywm4
Slight simplification. The result is the same. Also, change the wording of the message as requested in patch review. Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-04-30mmaldec: send only a single EOS packet on flushingwm4
Fixes apparent mmal_port_disable() freezes in ffmmal_stop_decoder() when calling ffmmal_decode() with flush semantics a large number of times in a row. Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-04-30mmaldec: correct package buffering accountingwm4
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. Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-04-30mmaldec: add vc1 decoding supportwm4
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-04-30mmaldec: Add mpeg2 decoding supportJulian Scheel
Register mmaldec as mpeg2 decoder. Supporting mpeg2 in mmaldec is just a matter of setting the correct MMAL_ENCODING on the input port. To ease the addition of further supported mmal codecs a macro is introduced to generate the decoder and decoder class structs. Signed-off-by: Julian Scheel <julian@jusst.de> Signed-off-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-04-30mmaldec: Fix avpriv_atomic_get usageJulian Scheel
There is no avpriv_atomic_get, instead avpriv_atomic_int_get is to be used for integers. This fixes building mmaldec. Signed-off-by: Julian Scheel <julian@jusst.de> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-04-30mmaldec: Use av_assert0() instead of assert()Michael Niedermayer
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-04-12mmaldec: Use imgutils.h for copying framesMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-01-28mmaldec: limit internal bufferingwm4
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.)
2016-01-28mmaldec: support MPEG-4wm4
I guess this means part 2 in both cases. Not sure which profiles exactly are actually supported properly.
2016-01-28mmaldec: print the MMAL format FourCC automaticallywm4
Slight simplification. The result is the same. Also, change the wording of the message as requested in patch review.
2015-11-10mmaldec: send only a single EOS packet on flushingwm4
Fixes apparent mmal_port_disable() freezes in ffmmal_stop_decoder() when calling ffmmal_decode() with flush semantics a large number of times in a row.
2015-11-07mmaldec: correct package buffering accountingwm4
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.
2015-11-07mmaldec: add vc1 decoding supportwm4
2015-10-22mmaldec: Add mpeg2 decoding supportJulian Scheel
Register mmaldec as mpeg2 decoder. Supporting mpeg2 in mmaldec is just a matter of setting the correct MMAL_ENCODING on the input port. To ease the addition of further supported mmal codecs a macro is introduced to generate the decoder and decoder class structs. Signed-off-by: Julian Scheel <julian@jusst.de> Signed-off-by: wm4 <nfxjfg@googlemail.com>
2015-10-21mmaldec: Fix avpriv_atomic_get usageJulian Scheel
There is no avpriv_atomic_get, instead avpriv_atomic_int_get is to be used for integers. This fixes building mmaldec. Signed-off-by: Julian Scheel <julian@jusst.de> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-05avcodec/mmaldec: Use av_assert0() instead of assert()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-05Merge commit '39f01e346cab464ef6c0d4ec58cc13b7123e60d8'Hendrik Leppkes
* commit '39f01e346cab464ef6c0d4ec58cc13b7123e60d8': mmaldec: be more tolerant against MMAL not returning decoded output Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-05Merge commit '65db4899fa8790049bec3af16ecdb75dd81051fd'Hendrik Leppkes
* commit '65db4899fa8790049bec3af16ecdb75dd81051fd': mmaldec: refactor to have more context per MMAL input buffer Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-04mmaldec: be more tolerant against MMAL not returning decoded outputwm4
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: Luca Barbato <lu_zero@gentoo.org>
2015-10-04mmaldec: refactor to have more context per MMAL input bufferwm4
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: Luca Barbato <lu_zero@gentoo.org>
2015-09-26Merge commit 'a9b8c638cfe2f82191db65e3e3a39f3b35df81f5'Hendrik Leppkes
* commit 'a9b8c638cfe2f82191db65e3e3a39f3b35df81f5': mmal: Fix AVBufferRef usage Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-26Merge commit '49623f531972be5dc2dd8c1b4b8748cad7c424ff'Hendrik Leppkes
* commit '49623f531972be5dc2dd8c1b4b8748cad7c424ff': mmal: Remove setting extradata on input format Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-26Merge commit 'f290e48d86e10f34b5ddc519127636bcebec7c43'Hendrik Leppkes
* commit 'f290e48d86e10f34b5ddc519127636bcebec7c43': mmal: drop the h264 BSF Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-24mmal: Fix AVBufferRef usagewm4
AVBufferRef.data and AVPacket.data don't need to have the same value. AVPacket could point anywhere into the buffer. Likewise, the sizes don't need to be the same. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-24mmal: Remove setting extradata on input formatwm4
This works only for extradata sizes up to 128 bytes. Additionally, I could never actually see it doing anything. The new code using MMAL_BUFFER_HEADER_FLAG_CONFIG now takes care of this. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-24mmal: drop the h264 BSFwm4
We can send mp4-style data directly. But for some reason, this requires sending the extradata as buffer with MMAL_BUFFER_HEADER_FLAG_CONFIG set. Reuse the infrastructure for sending AVPackets to do this. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12mmaldec: fix pkt_dts determinationwm4
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: Luca Barbato <lu_zero@gentoo.org>
2015-09-12lavc: allow asynchronous decoders to return correct pkt_dts valueswm4
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: Luca Barbato <lu_zero@gentoo.org>
2015-09-12mmaldec: disable timestamp interpolationwm4
This MMAL feature fills in missing timestamps from the framerate set on the input port. This is generally unwanted, since libavcodec decoders merely pass through timestamps without ever "fixing" them. The framerate is also unknown, and even the timebase doesn't have to be set. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12mmaldec: fix problems with flush logicwm4
Don't try to do a blocking wait for MMAL output if we haven't even sent a single real packet, but only flush packets. Obviously we can't expect to get anything back. Additionally, don't send a flush packet to MMAL in the same case. It appears the MMAL decoder will sometimes hang in mmal_vc_port_disable() (called from ffmmal_close_decoder()), waiting for a reply from the GPU which never arrives. Either MMAL disallows sending flush packets without preceding real data, or it's a MMAL bug. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12mmaldec: hack against buffering problems on broken inputwm4
I can't come up with a nice way to handle this. It's hard to keep the lock-stepped input/output in this case. You can't predict whether the MMAL decoder will output a picture (because it's asynchronous), so you have to assume in general that any packet could produce 0 or 1 frames. You can't continue to write input packets to the decoder, because then you might get too many output frames, which you can't get rid of because the lavc decoding API does not allow the decoder to return an output frame without consuming an input frame (except when flushing). The ideal fix is a M:N decoding API (preferably asynchronous), which would make this code potentially much cleaner. For now, this hack will do. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12Merge commit '99404597201911de90cff2ef85f2d44176d39147'Hendrik Leppkes
* commit '99404597201911de90cff2ef85f2d44176d39147': mmaldec: fix pkt_dts determination Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-12Merge commit '87a051f97633010f71dfc1d23d806856499bf231'Hendrik Leppkes
* commit '87a051f97633010f71dfc1d23d806856499bf231': lavc: allow asynchronous decoders to return correct pkt_dts values Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-12Merge commit 'b7ab6e18eecad43593ad2a0e9fc9eba7f24751cb'Hendrik Leppkes
* commit 'b7ab6e18eecad43593ad2a0e9fc9eba7f24751cb': mmaldec: disable timestamp interpolation Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-08-11mmaldec: fix problems with flush logicwm4
Don't try to do a blocking wait for MMAL output if we haven't even sent a single real packet, but only flush packets. Obviously we can't expect to get anything back. Additionally, don't send a flush packet to MMAL in the same case. It appears the MMAL decoder will sometimes hang in mmal_vc_port_disable() (called from ffmmal_close_decoder()), waiting for a reply from the GPU which never arrives. Either MMAL disallows sending flush packets without preceding real data, or it's a MMAL bug.
2015-08-11mmaldec: do not mutate user's AVCodecContext extradata fieldwm4
2015-08-11mmaldec: hack against buffering problems on broken inputwm4
I can't come up with a nice way to handle this. It's hard to keep the lock-stepped input/output in this case. You can't predict whether the MMAL decoder will output a picture (because it's asynchronous), so you have to assume in general that any packet could produce 0 or 1 frames. You can't continue to write input packets to the decoder, because then you might get too many output frames, which you can't get rid of because the lavc decoding API does not allow the decoder to return an output frame without consuming an input frame (except when flushing). The ideal fix is a M:N decoding API (preferably asynchronous), which would make this code potentially much cleaner. For now, this hack will do.
2015-07-27Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer
* commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27lavc: AV-prefix all codec capabilitiesVittorio Giovara
Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-04-14Merge commit '49e531ff4706279c7eed774f2c8b896942924ce2'Michael Niedermayer
* commit '49e531ff4706279c7eed774f2c8b896942924ce2': mmal: Reference MMAL VC lib explicitly Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14Merge commit '2de7650451d90520135d8cf6f96caa0658824208'Michael Niedermayer
* commit '2de7650451d90520135d8cf6f96caa0658824208': mmal: Move system headers before local headers Merged-by: Michael Niedermayer <michaelni@gmx.at>