summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/svq3: Reject dx/dy beyond 16bitMichael Niedermayer2017-05-03
| | | | | | The code does use 16bit sized arrays later so larger deltas would not work Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/svq3: Increase offsets to prevent integer overflowsMichael Niedermayer2017-05-03
| | | | | | | Fixes: 1280/clusterfuzz-testcase-minimized-6102353767825408 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/jpeg2000dec: Fix jp2 inner atom size used for overread checks.Carl Eugen Hoyos2017-05-03
|
* avcodec/decode: also check for FF_CODEC_CAP_SETS_PKT_DTS in audio decodersJames Almer2017-05-02
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/decode: do not treat discarded frames as eof when drainingMuhammad Faiz2017-05-03
| | | | | | | | Fix fate failures: make fate-mov THREADS=32 Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* avcodec/internal: update FF_CODEC_CAP_SETS_PKT_DTS doxyJames Almer2017-05-01
| | | | The code it refers to was moved to decode.c in 00fb745a10a151791ce2e49ba3e463bd17ea9251
* lavc/mips/iirfilter_mips: Include config.h.Carl Eugen Hoyos2017-05-01
| | | | | Fixes the following warning: libavcodec/mips/iirfilter_mips.c:57:5: warning: "HAVE_INLINE_ASM" is not defined
* lavc/mips/hevc_idct_msa: Add missing const qualifier.Carl Eugen Hoyos2017-05-01
| | | | | Fixes many warnings: initialization discards 'const' qualifier from pointer target type
* avcodec/indeo2: Check remaining bits in ir2_decode_plane()Michael Niedermayer2017-05-01
| | | | | | | | Fixes: 1290/clusterfuzz-testcase-minimized-5815578902134784 Fixes: timeout Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vp3: Check remaining bits in unpack_dct_coeffs()Michael Niedermayer2017-05-01
| | | | | | | | | Decreases the time spend decoding junk. May fix: 1283/clusterfuzz-testcase-minimized-6221126759874560 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/bmp: Use ff_set_dimensions()Michael Niedermayer2017-05-01
| | | | | | | | | Fixes out of memory Fixes: 1282/clusterfuzz-testcase-minimized-5400131681648640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/exr : fix piz uncompress on big endianMartin Vignali2017-05-01
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/options: do a more thorough clean up in avcodec_copy_context()James Almer2017-04-30
| | | | | | | | | Free coded_frame, coded_side_data and unref hw_device_ctx to prevent potential leaks. Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/options: factorize avcodec_copy_context() cleanup codeJames Almer2017-04-30
| | | | | | Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/pthread_frame, decode: allow errors to happen on drainingMuhammad Faiz2017-04-30
| | | | | | | | | | | | | | | So, all frames and errors are correctly reported in order. Also limit the numbers of error during draining to prevent infinite loop. This fix fate failure with THREADS>=4: make fate-h264-attachment-631 THREADS=4 This also reverts a755b725ec1d657609c8bd726ce37e7cf193d03f. Suggested-by: wm4, Ronald S. Bultje, Marton Balint Reviewed-by: w4 <nfxjfg@googlemail.com> Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* libvpxenc: allow aq-mode 4 (equator360)James Zern2017-04-28
| | | | | | | this was added in 1.6.0 Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Zern <jzern@google.com>
* opus_pvq: use function pointers for recursionRostislav Pehlivanov2017-04-27
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec/opus_pvq: fix recursive inlining compilation failuresJames Almer2017-04-27
| | | | They were introduced by f16180f44859587e0211170bd82b1bfd26f24b5a
* avcodec/mdec: Fix runtime error: left shift of negative value -127Michael Niedermayer2017-04-27
| | | | | | | | Fixes undefined behavior Fixes: 1275/clusterfuzz-testcase-minimized-6718162017976320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/x86/vc1dsp_init: Fix build failure with --disable-optimizations and ↵Michael Niedermayer2017-04-27
| | | | | | | | | clang compilers doing DCE at -O0 do not necessarily understand "complex" boolean expressions Build succeeds with this change, this was the only failure Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/exr : fix float to uint16 conversion for negative float valueMartin Vignali2017-04-27
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* opus_pvq: merge band encoding and decoding into one functionRostislav Pehlivanov2017-04-27
| | | | | | | | | | | Most code between the 2 functions was duplicated which made keeping both in sync difficult. This also fixes some discovered issues with encoding (incorrect TF switching buffers) and reduces stack usage (reuse the already allocated CeltFrame->scratch buffer for the quantized coefficients). Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opus_pvq: remove outdated/incorrect comments and redundant variablesRostislav Pehlivanov2017-04-26
| | | | | | Removes the last style issues with opus_pvq.c Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opus_pvq: minor cleanupsRostislav Pehlivanov2017-04-26
| | | | | | | | Removes unneeded variables, renames confusing and innacurate variables and rewrites and slightly optimizes hadamard interleave/deinterleave functions. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec/nvenc: surface allocation reductionBen Chang2017-04-26
| | | | | | | | | | | | | | | | This patch aims to reduce the number of input/output surfaces NVENC allocates per session. Previous default sets allocated surfaces to 32 (unless there is user specified param or lookahead involved). Having large number of surfaces consumes extra video memory (esp for higher resolution encoding). The patch changes the surfaces calculation for default, B-frames, lookahead scenario respectively. The other change involves surface selection. Previously, if a session allocates x surfaces, only x-1 surfaces are used (due to combination of output delay and lock toggle logic). To prevent unused surfaces, changing surface rotation to using predefined fifo. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* lavc/hevcdec: fix invalid use of ff_get_format()Clément Bœsch2017-04-26
| | | | | | Regression since 76cc100afba25308eaa909acd8804cc0b42057f6. Spotted-by: James Almer <jamrial@gmail.com>
* Merge commit '373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a'Clément Bœsch2017-04-26
|\ | | | | | | | | | | | | * commit '373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a': hevcdec: do not set decoder-global SPS prematurely Merged-by: Clément Bœsch <u@pkh.me>
| * hevcdec: do not set decoder-global SPS prematurelyAnton Khirnov2016-12-19
| | | | | | | | | | | | | | | | It should only be set after the decoder state has been fully initialized for using that SPS. Fixes possible invalid reads on get_format() failure. CC: libav-stable@libav.org
* | Merge commit '2425d7329fdccfa9954faba748f3865151354f0c'Clément Bœsch2017-04-26
|\| | | | | | | | | | | | | * commit '2425d7329fdccfa9954faba748f3865151354f0c': arm64: replace 'bic' with immediate with 'and' with inverted immediate Merged-by: Clément Bœsch <u@pkh.me>
| * arm64: replace 'bic' with immediate with 'and' with inverted immediateJanne Grunau2016-12-14
| | | | | | | | | | | | The former is not an official pseudo instruction although gas and llvm's internal assembler support it. Fixes a build error with xcode 6.2 reported by Memphiz on github.
* | Merge commit 'ea7ee4b4e381e0fa731458de0cbf740430eeb013'Clément Bœsch2017-04-26
|\| | | | | | | | | | | | | * commit 'ea7ee4b4e381e0fa731458de0cbf740430eeb013': ppc: Centralize compiler-specific altivec.h #include handling in one place Merged-by: Clément Bœsch <u@pkh.me>
| * ppc: Centralize compiler-specific altivec.h #include handling in one placeDiego Biurrun2016-12-14
| | | | | | | | Also move #includes into canonical order where appropriate.
* | Merge commit '39929e55eb13eeb8dfbe1bc99301fecf6b8942dd'Clément Bœsch2017-04-26
|\| | | | | | | | | | | | | * commit '39929e55eb13eeb8dfbe1bc99301fecf6b8942dd': ppc: hevcdsp: Use shorthands for vector types Merged-by: Clément Bœsch <u@pkh.me>
| * ppc: hevcdsp: Use shorthands for vector typesDiego Biurrun2016-12-14
| | | | | | | | This is more consistent and fixes compilation with clang.
* | Merge commit '554e55bbf0e4a3640a784cb512b816e776c56333'Clément Bœsch2017-04-26
|\| | | | | | | | | | | | | * commit '554e55bbf0e4a3640a784cb512b816e776c56333': decode.h: Add missing headers to fix standalone compilation Merged-by: Clément Bœsch <u@pkh.me>
| * decode.h: Add missing headers to fix standalone compilationDiego Biurrun2016-12-14
| |
| * pthread_frame: use better memory orders for frame progressWan-Teh Chang2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves commit 59c70227405c214b29971e6272f3a3ff6fcce3d0. In ff_thread_report_progress(), the fast code path can load progress[field] with the relaxed memory order, and the slow code path can store progress[field] with the release memory order. These changes are mainly intended to avoid confusion when one inspects the source code. They are unlikely to have measurable performance improvement. ff_thread_report_progress() and ff_thread_await_progress() form a pair. ff_thread_await_progress() reads progress[field] with the acquire memory order (in the fast code path). Therefore, one expects to see ff_thread_report_progress() write progress[field] with the matching release memory order. In the fast code path in ff_thread_report_progress(), the atomic load of progress[field] doesn't need the acquire memory order because the calling thread is trying to make the data it just decoded visible to the other threads, rather than trying to read the data decoded by other threads. In ff_thread_get_buffer(), initialize progress[0] and progress[1] using atomic_init(). Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * h264_slice: Wait for refs to be available before we use them in error ↵Derek Buitenhuis2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | concealment This could happen when there was a frame number gap and frame threading was used. Debugging-by: Ronald S. Bultje <rsbultje@gmail.com> Debugging-by: Justin Ruggles <justin.ruggles@gmail.com> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> CC:libav-stable@libav.org Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '86157e6db2c7a9222f77fa7e7f50fb9aebc3aa81'Clément Bœsch2017-04-26
|\| | | | | | | | | | | | | | | | | | | | | * commit '86157e6db2c7a9222f77fa7e7f50fb9aebc3aa81': hevc: decouple calling get_format() from exporting the SPS parameters See 786032cad8ecabe577d9cff0356da6e9e9488a2d (which has been reverted and replaced with Anton's version to reduce diffs between the two projects). Merged-by: Clément Bœsch <u@pkh.me>
| * hevc: decouple calling get_format() from exporting the SPS parametersAnton Khirnov2016-12-14
| | | | | | | | | | This makes sure ff_get_format() does not get called unnecessarily from update_thread_context().
* | Merge commit '730c02326094bcfb1fa67f10a7e7b22f03f5a88f'Clément Bœsch2017-04-25
|\| | | | | | | | | | | | | * commit '730c02326094bcfb1fa67f10a7e7b22f03f5a88f': binkaudio: switch to the new send/receive API Merged-by: Clément Bœsch <u@pkh.me>
| * binkaudio: switch to the new send/receive APIAnton Khirnov2016-12-14
| | | | | | | | | | | | It is more natural for this codec and allows to avoid awkward constructs like "consuming 0 bytes from input". Also, keep a reference to the input packet to avoid unnecessary copying.
| * vp9: split superframes in the filtering stage before actual decodingAnton Khirnov2016-12-14
| | | | | | | | | | Significantly increases the efficiency of frame threading, since individual frames in a superframe can now be decoded in parallel.
* | avcodec/crystalhd: Another attempt at using mpeg4_unpack_bframes bsfPhilip Langdale2017-04-23
| | | | | | | | | | | | | | | | | | | | I tried doing this before, but it resulted in weird behaviour with certain samples. I want to say I think I've got it sorted out now, and the new autobsf stuff makes it trivial to turn on. The native support for packed bframes is buggy and I think buggy in ways beyond what I already try to account for, so this should be a net improvements.
* | avcodec/crystalhd: Explicitly set frame pts at all timesPhilip Langdale2017-04-23
| | | | | | | | | | | | | | | | | | | | | | Previously, the pts value was initialised to AV_NOPTS_VALUE and so it was not necessary to always set it. Now, with the new-new decode API, this is no longer true. I'm not sure why I avoided setting the pts when the decoder value was also AV_NOPTS_VALUE - it clearly wouldn't have changed anything previously, but here we are. Failing to do this, means the frame pts will be some random uninitalised value.
* | decode: Initialize ret before using itVittorio Giovara2017-04-23
| | | | | | | | | | | | | | libavcodec/decode.c:608:9: warning: variable 'ret' is used uninitialized whenever 'if' condition is false (cherry picked from libav commit efddf2c09aed7400c73ecf327f86a4d0452b94b5)
* | avcodec/movtextenc: Ignore unmatched closing style tagsPhilip Langdale2017-04-23
| | | | | | | | | | | | | | | | The existing code will segfault if a closing tag shows up when there was never an opening tag. This isn't a well formed style, but it's also not a reason to crash. Fixes: https://trac.ffmpeg.org/ticket/6303
* | avcodec/crystalhd: Switch to the new generic filtering mechanismPhilip Langdale2017-04-23
| | | | | | | | | | This lets us drop all the code for handling the mp4toannexb conversion.
* | avcodec/decode: also update consumed bytes on last_pkt_props->sizeJames Almer2017-04-23
| |
* | avcodec/dnxhd_parser: fix parsing interlaced video, simplify codePaul B Mahol2017-04-23
| | | | | | | | | | | | | | | | There appears to be no need to treat interlaced videos differently, also that code is flawed, as for at least one input cur_field would be always 0. Signed-off-by: Paul B Mahol <onemda@gmail.com>