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
2017-11-27lavc: Deprecate av_hwaccel_next() and av_register_hwaccel()Mark Thompson
2017-11-27lavc: Add codec metadata to indicate hardware supportMark Thompson
2017-11-26libavcodec/utils.c: simplify avcodec locking with atomicsRostislav Pehlivanov
Also makes it more robust than using volatiles. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-11-26lavc/utils.c: use C11 atomics for entangled thread handlingRostislav Pehlivanov
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-11-15avcodec: deprecate getters and setters for AVCodecContext and AVCodec fieldsJames Almer
The fields can be accessed directly, so these are not needed anymore. Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-11avcodec: fix wrong duration of packets (dvd, bluray)Aleksandr Slobodeniuk
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-23avcodec: drop deprecated vismv optionJames Almer
Deprecated in 08/2014. Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-23Merge commit '48bb0da050329e5111b00a12dfc154b7e78fb3a3'James Almer
* commit '48bb0da050329e5111b00a12dfc154b7e78fb3a3': lavc: Drop deprecated way of setting audio delay on encode Merged-by: James Almer <jamrial@gmail.com>
2017-10-23Merge commit 'b3739599bda740ac12d3dde31a331b744df99123'James Almer
* commit 'b3739599bda740ac12d3dde31a331b744df99123': lavc: Drop deprecated emu edge functionality Merged-by: James Almer <jamrial@gmail.com>
2017-10-22Merge commit '6dca24cd1d570b806b5a3fdaef9d3c8608942a81'James Almer
* commit '6dca24cd1d570b806b5a3fdaef9d3c8608942a81': lavc: Drop deprecated way of setting codec dimensions Merged-by: James Almer <jamrial@gmail.com>
2017-10-22Merge commit '0337adfab5d14a17bf4d5060aa0425e4049a9862'James Almer
* commit '0337adfab5d14a17bf4d5060aa0425e4049a9862': lavc: Drop deprecated missing sample log function Merged-by: James Almer <jamrial@gmail.com>
2017-09-22Remove some unneeded casts of bit_rate.Carl Eugen Hoyos
2017-08-26lavc/utils: Calculate frame duration for little-endian G.726.Carl Eugen Hoyos
2017-08-23avcodec/utils: Fix signed integer overflow in rc_initial_buffer_occupancy ↵Vitaly Buka
initialization Signed integer overflow is undefined behavior. Detected with clang and -fsanitize=signed-integer-overflow Signed-off-by: Vitaly Buka <vitalybuka@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-23Merge commit '972c71e9cb63e24f57ee481e413199c7d88a8813'James Almer
* commit '972c71e9cb63e24f57ee481e413199c7d88a8813': lavc: add support for filtering packets before decoding Merged-by: James Almer <jamrial@gmail.com>
2017-04-23Merge commit '061a0c14bb5767bca72e3a7227ca400de439ba09'James Almer
* commit '061a0c14bb5767bca72e3a7227ca400de439ba09': decode: restructure the core decoding code CUVID decoder adapted by wm4. Merged-by: James Almer <jamrial@gmail.com>
2017-04-23Merge commit '549d0bdca53af7a6e0c612ab4b03baecf3a5878f'James Almer
* commit '549d0bdca53af7a6e0c612ab4b03baecf3a5878f': decode: be more explicit about storing the last packet properties Also copy pkt->size in extract_packet_props(), as it's needed for AVFrame.pkt_size Merged-by: James Almer <jamrial@gmail.com>
2017-04-17Merge commit '0309ddcfb25fd44883bfcdb07509eb4907576b97'Clément Bœsch
* commit '0309ddcfb25fd44883bfcdb07509eb4907576b97': lavc: handle MP3 in get_audio_frame_duration() Merged-by: Clément Bœsch <u@pkh.me>
2017-04-07Merge commit '3fe2a01df7f2c193805809f57b61d79607572351'James Almer
* commit '3fe2a01df7f2c193805809f57b61d79607572351': lavc: move decoding-related code from utils.c to a new file Merged-by: James Almer <jamrial@gmail.com>
2017-04-07Merge commit '328cd2b599bc2d0d38f3c12606fa2a66eeec016e'James Almer
* commit '328cd2b599bc2d0d38f3c12606fa2a66eeec016e': lavc: move encoding-related code from utils.c to a new file Merged-by: James Almer <jamrial@gmail.com>
2017-04-06lavc: Add Content Light Level side metadata found in HEVCSteve Lhomme
These data are necessary when transmitting HDR over HDMI. Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-06pthread_frame: allow per-field ThreadFrame owners.Ronald S. Bultje
This tries to handle cases where separate invocations of decode_frame() (each running in separate threads) write to respective fields in the same AVFrame->data[]. Having per-field owners makes interaction between readers (the referencing thread) and writers (the decoding thread) slightly more optimal if both accesses are field-based, since they will use the respective producer's thread objects (mutex/cond) instead of sharing the thread objects of the first field's producer. In practice, this fixes the following tsan-warning in fate-h264: WARNING: ThreadSanitizer: data race (pid=21615) Read of size 4 at 0x7d640000d9fc by thread T2 (mutexes: write M1006): #0 ff_thread_report_progress pthread_frame.c:569 (ffmpeg:x86_64+0x100f7cf54) [..] Previous write of size 4 at 0x7d640000d9fc by main thread (mutexes: write M1004): #0 update_context_from_user pthread_frame.c:335 (ffmpeg:x86_64+0x100f81abb)
2017-03-29lavc: fix usages of av_get_codec_tag_string()Clément Bœsch
2017-03-23lavc: Drop deprecated way of setting audio delay on encodeVittorio Giovara
Deprecated in 08/2014.
2017-03-23lavc: Drop deprecated emu edge functionalityVittorio Giovara
Deprecated in 01/2014.
2017-03-23lavc: Drop deprecated way of setting codec dimensionsVittorio Giovara
Deprecated in 10/2013.
2017-03-23lavc: Drop deprecated missing sample log functionVittorio Giovara
Deprecated in 01/2013.
2017-03-21avcodec: remove warning against using frame threading with hwaccelswm4
libavcodec now automatically serializes decoding for hwaccels which are not thread-safe. This means API users, which rely on the libavcodec native software fallback mechanism, can now simply enable threading without running into problems.
2017-03-21avcodec, avformat: deprecate anything related to side data mergingwm4
This patch deprecates anything that has to do with merging/splitting side data. Automatic side data merging (and splitting), as well as all API symbols involved in it, are removed completely. Two FF_API_ defines are dedicated to deprecating API symbols related to this: FF_API_MERGE_SD_API removes av_packet_split/merge_side_data in libavcodec, and FF_API_LAVF_KEEPSIDE_FLAG deprecates AVFMT_FLAG_KEEP_SIDE_DATA in libavformat. Since it was claimed that changing the default from merging side data to not doing it is an ABI change, there are two additional FF_API_ defines, which stop using the side data merging/splitting by default (and remove any code in avformat/avcodec doing this): FF_API_MERGE_SD in libavcodec, and FF_API_LAVF_MERGE_SD in libavformat. It is very much intended that FF_API_MERGE_SD and FF_API_LAVF_MERGE_SD are quickly defined to 0 in the next ABI bump, while the API symbols are retained for a longer time for the sake of compatibility. AVFMT_FLAG_KEEP_SIDE_DATA will (very much intentionally) do nothing for most of the time it will still be defined. Keep in mind that no code exists that actually tries to unset this flag for any reason, nor does such code need to exist. Code setting this flag explicitly will work as before. Thus it's ok for AVFMT_FLAG_KEEP_SIDE_DATA to do nothing once side data merging has been removed from libavformat. In order to avoid that anyone in the future does this incorrectly, here is a small guide how to update the internal code on bumps: - next ABI bump (probably soon): - define FF_API_LAVF_MERGE_SD to 0, and remove all code covered by it - define FF_API_MERGE_SD to 0, and remove all code covered by it - next API bump (typically two years in the future or so): - define FF_API_LAVF_KEEPSIDE_FLAG to 0, and remove all code covered by it - define FF_API_MERGE_SD_API to 0, and remove all code covered by it This forces anyone who actually wants packet side data to temporarily use deprecated API to get it all. If you ask me, this is batshit fucked up crazy, but it's how we roll. Making AVFMT_FLAG_KEEP_SIDE_DATA to be set by default was rejected as an ABI change, so I'm going all the way to get rid of this once and for all. Reviewed-by: James Almer <jamrial@gmail.com> Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-18Merge commit 'e9bfff1cc66c85b91b262c41e8aa5e8685606225'Clément Bœsch
* commit 'e9bfff1cc66c85b91b262c41e8aa5e8685606225': lavc: free buffer_frame/pkt on avcodec_open2() failure This commit is a noop, see 27adf9f9cdbc6f1dc0a1292dc97490eec6f2f068. Only reordered to reduce diff. Merged-by: Clément Bœsch <u@pkh.me>
2017-03-17avcodec: estimate output bitrate for uncompressed video codecsTobias Rapp
Allows to get a more realistic total bitrate (and estimated file size) in avi_write_header. Previously a static default value of 200k was assumed. Adds an internal helper function for bitrate guessing. Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-17avcodec: fix uninitialized variable readwm4
This cna happen if the user tries to call the new decode API for subtitles. Fixes CID 1402071.
2017-03-16lavc/internal: Constify AVPacket* in AVCodecInternal.Carl Eugen Hoyos
Fixes a gcc warning: libavcodec/utils.c:2244:26: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
2017-03-12Merge commit 'f65285aba0df7d46298abe0c945dfee05cbc6028'Clément Bœsch
* commit 'f65285aba0df7d46298abe0c945dfee05cbc6028': lavc: set sw_pix_fmt for hwaccel encoding Merged-by: Clément Bœsch <u@pkh.me>
2017-03-09aacdec: do not mutate input packet metadatawm4
Apparently the demuxer outputs the wrong padding for HE-AAC (based on the raw sample rate, or so). aacdec contains a hack to adjust the muxer padding accordingly before it's used to trim the decoder output. This modified the packet side data, which in combination with the old decoding API would change the packet the user passed to the decoder. This is clearly not allowed, and it breaks running some gapless fate tests with "-fflags +keepside" applied (without keepside, the packet metadata is typically newly allocated, essentially making a copy and not modifying the user's input packet). This should probably be fixed in the demuxer (and consequently also the muxer), but for now only fix the immediate problem. Regression since 946ed78f5f8 (2012).
2017-03-06avcodec: consider an error during decoder draining as EOFwm4
There is no reason that draining couldn't return an error or two. But some decoders don't handle this very well, and might always return an error. This can lead to API users getting into an infinite loop and burning CPU, because no progress is made and EOF is never returned. In fact, ffmpeg.c contains a hack against such a case. It is made unnecessary with this commit, and removed with the next one. (This particular error case seems to have been fixed since the hack was added, though.) This might lose frames if decoding returns errors during draining.
2017-02-24lavc/utils: Make second parameter to apply_param_change() const.Carl Eugen Hoyos
Fixes a compilation warning: passing argument 2 of ‘apply_param_change’ discards ‘const’ qualifier from pointer target type
2017-02-14lavc: Add device context field to AVCodecContextMark Thompson
For use by codec implementations which can allocate frames internally.
2017-02-13lavc: Add device context field to AVCodecContextMark Thompson
For use by codec implementations which can allocate frames internally.
2017-02-11lavc: use av_cpu_max_align() instead of hardcoding alignment requirementsAnton Khirnov
2017-02-03avcodec/utils: Fix memleak with subtitles and sidedataMichael Niedermayer
Fixes: 454/fuzz-3-ffmpeg_SUBTITLE_AV_CODEC_ID_MOV_TEXT_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-25avcodec/utils: correct align value for interplayMichael Niedermayer
Fixes out of array access Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-22avcodec: add pcm_f16le and pcm_f24le decoderPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-12-17lavc: Fix ticket 6024, truncated mode decodingPavel Koshevoy
The assumption that avcodec_send_packet makes regarding decoders consuming the entire packet is not true if the codec supports truncated decoding mode and the truncated flag is turned on. Steps to reproduce: ./ffmpeg_g -flags truncated \ -i "http://samples.ffmpeg.org/MPEG2/test-ebu-422.40000.pakets.ts" \ -c:v ffv1 -c:a copy -y /tmp/truncated.nut Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-14lavc: add support for filtering packets before decodingAnton Khirnov
2016-12-14decode: restructure the core decoding codeAnton Khirnov
Currently, the new decoding API is pretty much just a wrapper around the old deprecated one. This is problematic, since it interferes with making full use of the flexibility added by the new API. The old API should also be removed at some future point. Reorganize the code so that the new send_packet/receive_frame functions call the actual decoding directly and change the old deprecated avcodec_decode_* functions into wrappers around the new API. The new internal API for decoders is now changing as well. Before this commit, it mirrors the public API, so the decoders need to implement send_packet() and receive_frame() callbacks. This turns out to require awkward constructs in both the decoders and the generic code. After this commit, the decoders only implement the receive_frame() callback and call a new internal function, ff_decode_get_packet() to obtain input data, in the same manner to how the bitstream filters now work. avcodec will now always make a reference to the input packet, which means that non-refcounted input packets will be copied. Keeping the previous behaviour, where this copy could sometimes be avoided, would make the code significantly more complex and fragile for only dubious gains, since packets are typically small and everyone who cares about performance should use refcounted packets anyway.
2016-12-14decode: be more explicit about storing the last packet propertiesAnton Khirnov
The current code stores a pointer to the packet passed to the decoder, which is then used during get_buffer() for timestamps and side data passthrough. However, since this is a pointer to user data which we do not own, storing it is potentially dangerous. It is also ill defined for the new decoding API with split input/output. Fix this problem by making an explicit internally owned copy of the packet properties.
2016-12-14lavc: handle MP3 in get_audio_frame_duration()Anton Khirnov
2016-12-11avcodec: Add max_pixels optionsMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-07lavc: Add spherical packet side data APIVittorio Giovara
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>