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
2020-03-20h264dec: do not export the chroma sample location immediately on parsing the SPSAnton Khirnov
This SPS is not necessarily the one that will be used. Export the chroma location along with all the other SPS properties.
2020-03-14libavcodec, libpostproc: Remove outcommented START/STOP_TIMERAndreas Rheinhardt
as well as includes of libavutil/timer.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-10avcodec/h264: Fix poc_lsb in open gop contextNicolas Gaullier
When no IDR nor mmco_reset is found, prev_poc_lsb is undefined and shall not be assumed to be zero
2019-07-07avcodec/h264dec: set AVFrame decode_error_flags in case of decoding errorAmir Pauker
set AVFrame decode_error_flags in case h->slice_ctx->er.error_occurred is set after the call to ff_h264_execute_decode_slices. This allows the user to detect concealed decoding errors in the call to avcodec_receive_frame Signed-off-by: Amir Pauker <amir@livelyvideo.tv> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-24h2645_parse: Make ff_h2645_packet_split reference-compatibleAndreas Rheinhardt
This is in preparation for a patch for cbs_h2645. Now the packet's rbsp_buffer can be owned by an AVBuffer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
2018-10-26lavc/h264dec: don't error out when receiving multiple IDR slicesJosh de Kock
This error isn't particularly helpful as checking for mixed IDR/non-IDR NALUs would need to be done at a higher level to actually be accurate. Removing the error allows an API user to send individual slice NALUs (i.e. incomplete frames) so they can take advantage of slice threading. The ticket which this error was added for (#4408) no longer segfaults after removing this error (as the bug was likely fixed more properly elsewhere).
2018-09-07avcodec/h264dec: remove unnecessary checks in h264_decode_frameZhao Zhili
These conditions are checked again in is_extra(). This patch makes no functional changes. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-07avcodec/h264dec: check number of SPS in is_extraZhao Zhili
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-17h264: Support multi-field closed captions by using AVBufferRef and not ↵Kieran Kunhya
resetting per field Signed-off-by: Josh de Kock <joshdk@obe.tv>
2018-03-09lavc/videotoolbox: fix threaded decodingRodger Combs
AVHWAccel.end_frame can run on a worker thread. The assumption of the frame threading code is that the worker thread will change the AVFrame image data, not the AVFrame fields. So the AVFrame fields are not synced back to the main thread. But this breaks videotoolbox due to its special requirements (everything else is fine). It actually wants to update AVFrame fields. The actual videotoolbox frame is now stored in the dummy AVBufferRef, so it mimics what happens in non-videotoolbox cases. (Changing the AVBufferRef contents is a bit like changing the image data.) The post_process callback copies that reference to the proper AVFrame field. Based on a patch by wm4. Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-26h264: add AVOption to set x264_build defaultwm4
This provides a generic way to the API user to deal with files that either lack this SEI, or which have the SEI only in packets not passed to the decoder (such as the common case of the SEI being in the very firsat video packet, but decoding is started somewhere in the middle of the file). Bugs like 840b41b2a643fc8f0617c0370125a19c02c6b586 make this somewhat of a necessity. This intentionally uses the version in the SEI instead, if any is found.
2017-12-11h264dec: Remove mpeg4video.h header dependencyKieran Kunhya
2017-12-01avcodec/h264_sei: remove redundant prefix to H264SEIFramePacking fieldsJames Almer
Cosmetic change. Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-27lavc: Add hardware config metadata for decoders supporting hardware outputMark Thompson
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.
2017-11-14avcodec/h264: implement new decode_params callback for PPS/SPSAman Gupta
This callback will be used by the VideoToolbox H264 hwaccel so that it can receive SPS and PPS NALUs. VideoToolbox requires PPS changes to be fed into the decoder session, and for the session to be recreated when the SPS changes. Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-14avcodec/h264, videotoolbox: return AVERROR_INVALIDDATA when no frames are ↵Aman Gupta
produced The only reason videotoolbox wouldn't produce frames is if the data fed to it was invalid, so returning AVERROR_INVALIDDATA makes sense here. Further, it means AVERROR_EXTERNAL can be used in further commits to signal fatal VideoToolbox errors, letting the user know that they need to fallback to another decoder. Signed-off-by: Aman Gupta <aman@tmm1.net> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-08Merge commit '45c4bf3df03ef53ae61fa1473424d4ae024f22e4'James Almer
* commit '45c4bf3df03ef53ae61fa1473424d4ae024f22e4': h264dec: track the last seen value of x264_build Merged-by: James Almer <jamrial@gmail.com>
2017-10-24Merge commit 'dd343fd986459f467a2d1d70c26101dff1d47d68'James Almer
* commit 'dd343fd986459f467a2d1d70c26101dff1d47d68': lavu: Drop deprecated VDPAU pixel formats Merged-by: James Almer <jamrial@gmail.com>
2017-10-23Merge commit '5182a28b5de060c51c21b36053ab205bfbbbbe31'James Almer
* commit '5182a28b5de060c51c21b36053ab205bfbbbbe31': lavc: Drop deprecated global afd field Merged-by: James Almer <jamrial@gmail.com>
2017-10-22Merge commit '7b917041184874e7d7cba4450813de7e0bb28a33'James Almer
* commit '7b917041184874e7d7cba4450813de7e0bb28a33': lavc: Drop deprecated VDPAU codec capability Merged-by: James Almer <jamrial@gmail.com>
2017-10-04Merge commit '248dc5c1646dcdd96fe79761105c4ae889e711fd'James Almer
* commit '248dc5c1646dcdd96fe79761105c4ae889e711fd': h264dec: fix dropped initial SEI recovery point Merged-by: James Almer <jamrial@gmail.com>
2017-07-27h264dec: track the last seen value of x264_buildAnton Khirnov
Do not use the one in the SEI directly as that is reset at certain points. Inspired by patches from Michael Niedermayer <michaelni@gmx.at> and Anton Mitrofanov <BugMaster@narod.ru>. CC: libav-stable@libav.org
2017-07-07h264dec: remove unneeded prototypeRafaël Carré
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-26avcodec/h264dec: export cropping information instead of handling it internallyJames Almer
This merges commit c3e84820d67cb1d8cfb4196f9b43971308a81571 from libav, originally written by Anton Khirnov and skipped in fc63d5ceb357c4b760cb02772de0b50d0557140f. libavcodec/h264_picture.c | 3 --- libavcodec/h264_ps.c | 9 --------- libavcodec/h264_slice.c | 25 +++++++++++++++++++------ libavcodec/h264dec.c | 13 +------------ libavcodec/h264dec.h | 9 +++++---- 5 files changed, 25 insertions(+), 34 deletions(-)
2017-05-26avcodec/h264dec: be more explicit in handling container croppingJames Almer
This merges commit 4fded0480f20f4d7ca5e776a85574de34dfead14 from libav, originally written by Anton Khirnov and skipped in fc63d5ceb357c4b760cb02772de0b50d0557140f. libavcodec/h264_slice.c | 20 +++++++++++++------- libavcodec/h264dec.c | 3 +++ libavcodec/h264dec.h | 5 +++++ 3 files changed, 21 insertions(+), 7 deletions(-)
2017-05-05Merge commit 'f1af37b51033ad90e56a8d7dfcc366f2bd9d2fed'Clément Bœsch
* commit 'f1af37b51033ad90e56a8d7dfcc366f2bd9d2fed': h264dec: make ff_h264_decode_init() static Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-03-29h264: revert 1189af429211ac650aac730368a6cf5b23756605.Ronald S. Bultje
The patch introduces race conditions.
2017-03-21pthread_frame: ensure the threads don't run simultaneously with hwaccelAnton Khirnov
Merges Libav commit 8dfba25c. Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-03-15lavc/h264dec: use OFFSET macroMatthieu Bouron
2017-03-12h264dec: initialize field_started to 0 on each decode callAnton Khirnov
It might be incorrectly set to 1 if the previous call exited with an error. Bug-Id: 1019 CC: libav-stable@libav.org
2017-03-07avcodec/h264, videotoolbox: fix crash after VT decoder failsAman Gupta
The way videotoolbox hooks in as a hwaccel is pretty hacky. The VT decode API is not invoked until end_frame(), so alloc_frame() returns a dummy frame with a 1-byte buffer. When end_frame() is eventually called, the dummy buffer is replaced with the actual decoded data from VTDecompressionSessionDecodeFrame(). When the VT decoder fails, the frame returned to the h264 decoder from alloc_frame() remains invalid and should not be used. Before 9747219958060d8c4f697df62e7f172c2a77e6c7, it was accidentally being returned all the way up to the API user. After that commit, the dummy frame was unref'd so the user received an error. However, since that commit, VT hwaccel failures started causing random segfaults in the h264 decoder. This happened more often on iOS where the VT implementation is more likely to throw errors on bitstream anomolies. A recent report of this issue can be see in http://ffmpeg.org/pipermail/libav-user/2016-November/009831.html The issue here is that the dummy frame is still referenced internally by the h264 decoder, as part of the reflist and cur_pic_ptr. Deallocating the frame causes assertions like this one to trip later on during decoding: Assertion h->cur_pic_ptr->f->buf[0] failed at src/libavcodec/h264_slice.c:1340 With this commit, we leave the dummy 1-byte frame intact, but avoid returning it to the user. This reverts commit 9747219958060d8c4f697df62e7f172c2a77e6c7. Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-02-24h264dec: fix dropped initial SEI recovery pointJohn Stebbins
2017-01-31golomb: Convert to the new bitstream readerDiego Biurrun
2017-01-31Merge commit '76f7e70aa04fc5dbef5242b11cbf8fe4499f61d4'Clément Bœsch
* commit '76f7e70aa04fc5dbef5242b11cbf8fe4499f61d4': h264dec: handle zero-sized NAL units in get_last_needed_nal() See 641dccc2aa5e0bf6b3c06998f9a7f24a5cf725e7 Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-01-27avcodec/h264dec: Clear ref_count on slice header processing failureMichael Niedermayer
Fixes using freed memory Introduced in 744801989099df26e90b00062c645969c5347533 Fixes: 471/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_H264_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-24Merge commit '38efff92f1ef81f3de20ff0460ec7b70c253d714'Clément Bœsch
* commit '38efff92f1ef81f3de20ff0460ec7b70c253d714': FATE: add a test for H.264 with two fields per packet h264: fix decoding multiple fields per packet with slice threads This merge includes two commits because the FATE test was useful in order to make proper testing. The merge gets rid of the now unused: - SLICE_SINGLETHREAD and SLICE_SKIPED macros - max_contexts - "again" label in decode_nal_units() This commit also includes the fix from d3e4d406b. Thanks to wm4 and Michael Niedermayer for their testing. Merged-by: Clément Bœsch <u@pkh.me> Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2017-01-24avcodec/h264dec: Fix regression with "make fate-h264-attachment-631 THREADS=8"Michael Niedermayer
This treats the case of no slices like no frames which it basically is. The field is added to the context as other nal related fields are also there and passing the has_slices field per *arguments is ugly and not consistent Found-by: ubitux Approved-by: ubitux Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-22avcodec/error_resilience: Optimize motion recovery code by using blcok listsMichael Niedermayer
This makes the code 7 times faster with the testcase from libfuzzer and should reduce the amount of timeouts we hit in automated fuzzing. (for example 438/fuzz-2-ffmpeg_VIDEO_AV_CODEC_ID_RV40_fuzzer) The code is also faster with more realistic input though the difference is small here as that is far from the worst cases the fuzzers pick out Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-20lavc/h264dec: re-indent after previous commitMatthieu Bouron
2017-01-20lavc/h264dec: make sure a slice is decoded before finishing setupMatthieu Bouron
Fixes regression in fate-h264-attachment-631 with THREADS=8 introduced by bdbbb8f11edbf10add874508c5125c174d8939be.
2017-01-18lavc/h264dec: remove flush goto in decode callbackClément Bœsch
2017-01-17Merge commit 'f450cc7bc595155bacdb9f5d2414a076ccf81b4a'Matthieu Bouron
* commit 'f450cc7bc595155bacdb9f5d2414a076ccf81b4a': h264: eliminate decode_postinit() Also includes fixes from 1f7b4f9abc and e344e65109. Original patch replace H264Context.next_output_pic (H264Picture *) by H264Context.output_frame (AVFrame *). This change is discarded as it is incompatible with the frame reconstruction and motion vectors display code which needs the extra information from the H264Picture. Merged-by: Clément Bœsch <u@pkh.me> Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2017-01-16lavc/h264dec: reconstruct and debug flush frames as wellClément Bœsch
2017-01-12h264dec: export cropping information instead of handling it internallyAnton Khirnov
2017-01-12h264dec: be more explicit in handling container croppingAnton Khirnov
The current condition can trigger in cases where it shouldn't, with unexpected results. Make sure that: - container cropping is really based on the original dimensions from the caller - those dimenions are discarded on size change The code is still quite hacky and eventually should be deprecated and removed, with the decision about which cropping is used delegated to the caller.
2017-01-09h264dec: make ff_h264_decode_init() staticAnton Khirnov
It is not called from outside h264dec.c anymore.
2016-12-19h264dec: make sure to only end a field if it has been startedAnton Khirnov
Calling ff_h264_field_end() when the per-field state is not properly initialized leads to all kinds of undefined behaviour. CC: libav-stable@libav.org Bug-Id: 977 978 992
2016-12-19pthread_frame: ensure the threads don't run simultaneously with hwaccelAnton Khirnov
2016-10-02h264dec: support broken files with mp4 extradata/annex b dataAnton Khirnov
Bug-Id: 966
2016-08-23lavc/h264dec: Improve "Increasing reorder buffer" message loglevel.Carl Eugen Hoyos
Do not show the message for the first frame by default, show a warning if increasing is necessary in the middle of the stream.