summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* swresample/audioconvert: Fix left shift of negative valueAndreas Rheinhardt2020-09-30
| | | | | | | Fixes ticket #8219. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/av1dec: call ff_cbs_flush() on decoder flushJames Almer2020-09-29
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/av1dec: fix check for active sequence headerJames Almer2020-09-29
| | | | | | We clear the AV1RawSequenceHeader pointer on flush, not the relevant AVBufferRef. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/av1dec: parse dimensions from the sequence header in extradataJames Almer2020-09-29
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_vp9: implement a CodedBitstreamType.flush() callbackJames Almer2020-09-29
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_h2645: implement CodedBitstreamType.flush() callbacksJames Almer2020-09-29
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_av1: implement a CodedBitstreamType.flush() callbackJames Almer2020-09-29
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs: add a flush callback to CodedBitstreamTypeJames Almer2020-09-29
| | | | | | Used to reset the codec's private internal state. Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_v360: stop using floats variables in xyz_to_octahedronPaul B Mahol2020-09-30
| | | | Use proper integer variables.
* avcodec/cuviddec: handle arbitrarily sized extradataTimo Rothenpieler2020-09-29
|
* avcodec/utils: Only call codec->close if init has been calledAndreas Rheinhardt2020-09-29
| | | | | | | | | | | | | | | | | | | | avcodec_open2() also called the AVCodec's close function if an error happened before init had ever been called if the AVCodec has the FF_CODEC_CAP_INIT_CLEANUP flag set. This is against the documentation of said flag: "The codec allows calling the close function for deallocation even if the init function returned a failure." E.g. the SVQ3 decoder is not ready to be closed if init has never been called. Fixes: NULL dereference Fixes: 25762/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SVQ3_fuzzer-5716279070294016 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* Revert "avfilter/setparams: add FF_FILTER_FLAG_HWFRAME_AWARE"Mark Thompson2020-09-29
| | | | | | | This reverts commit 5bbf58ab876279ca1a5a2f30563f271c99b93e62. The setparams filters are not hwframe aware, so the default context passthrough behaviour is needed to allow using them with hardware frames.
* avfilter/vf_v360: simplify input flippingPaul B Mahol2020-09-29
|
* avfilter/vf_v360: split maps into slicesPaul B Mahol2020-09-29
|
* dnn/native: add native support for denseMingyu Yin2020-09-29
| | | | Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
* libavcodec/videotoolboxenc: Fix crash when frame received after errorRick Kern2020-09-28
| | | | Signed-off-by: Rick Kern <kernrj@gmail.com>
* avcodec/videotoolboxenc: move pthread_cond_signal after add buffer to the queueTian Qi2020-09-28
| | | | | | | | | | | | | In the VT encoding insertion by FFmpeg, and vtenc_q_push is callback to add the encoded data to the singly linked list group in VTEncContext, and consumers are notified to fetch it. However, because it first informs consumers of pthread_cond_signal, and then inserts the data into the tail, there is a multi-thread safety hazard. Signed-off-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: Rick Kern <kernrj@gmail.com>
* avcodec/videotoolboxenc: don't wait when flushing dataTian Qi2020-09-28
| | | | | | | | | | because there is run in thread mode, few times will block the workflow at the wait, so check the status is flushing data, don't wait when flushing data. Signed-off-by: Tian Qi <tianqi@kuaishou.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: Rick Kern <kernrj@gmail.com>
* avcodec/videotoolboxenc: fix use after destroyZhao Zhili2020-09-28
| | | | | | The lock is used in clear_frame_queue(). Signed-off-by: Rick Kern <kernrj@gmail.com>
* avcodec/videotoolboxenc: fix align issueZhao Zhili2020-09-28
| | | | | | | | bool a53_cc is accessed as int: src/libavutil/opt.c:129:9: runtime error: store to misaligned address 0x7fbf454121a3 for type 'int', which requires 4 byte alignment Signed-off-by: Rick Kern <kernrj@gmail.com>
* avcodec/videotoolboxenc: Allow full range 10bit pixel format inputHarry Mallon2020-09-28
| | | | | Signed-off-by: Harry Mallon <harry.mallon@codex.online> Signed-off-by: Rick Kern <kernrj@gmail.com>
* avcodec/videotoolboxenc: Set profile (main/main10) on HEVC encodeHarry Mallon2020-09-28
| | | | | Signed-off-by: Harry Mallon <harry.mallon@codex.online> Signed-off-by: Rick Kern <kernrj@gmail.com>
* avcodec/mv30: Fix several integer overflows in idct_1d()Michael Niedermayer2020-09-29
| | | | | | | | Fixes: signed integer overflow: -1846510390 + -361755993 cannot be represented in type 'int' Fixes: 23941/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MV30_fuzzer-5654696631730176 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pgxdec: Fix invalid shift in write_frame_*Michael Niedermayer2020-09-29
| | | | | | | | Fixes: left shift of negative value -121 Fixes: 23911/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGX_fuzzer-4986800258154496 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: Fix segfault upon allocation errorAndreas Rheinhardt2020-09-28
| | | | | Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/iff: Check data_size not overflowing int64Michael Niedermayer2020-09-28
| | | | | | | | | Fixes: Infinite loop Fixes: 25844/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5660803318153216 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* pthread_frame: use av_buffer_replace() to simplify codeAnton Khirnov2020-09-28
|
* mpegvideo: use av_buffer_replace() to simplify codeAnton Khirnov2020-09-28
|
* hevcdec: use av_buffer_replace() to simplify codeAnton Khirnov2020-09-28
|
* lavu/buffer: add a convenience function for replacing buffersAnton Khirnov2020-09-28
| | | | | | | A common pattern e.g. in libavcodec is replacing/updating buffer references: unref old one, ref new one. This function allows simplifying such code and avoiding unnecessary refs+unrefs if the references are already equivalent.
* avfilter/setparams: add FF_FILTER_FLAG_HWFRAME_AWAREPavel Koshevoy2020-09-27
| | | | | Allow setparams to be used with hw backed frames and avoid an assertion failure in avfilter_config_links.
* lavf/hls: add AC-3/EAC-3 to allowed extensions file listJun Zhao2020-09-28
| | | | | | | | | | Add AC-3/EAC-3 to allowed extensions file list. From HTTP Live Streaming 2nd Edition draft-pantos-hls-rfc8216bis-07 section 3.1.3.Packed Audio, HLS demuxer need to support MP3/AC-3/EAC-3. Reviewd-by: Steven Liu <liuqi05@kuaishou.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* examples/muxing: misc style fixesJun Zhao2020-09-28
| | | | | | | misc style fixes. Reviewed-by: Steven Liu <liuqi05@kuaishou.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avfilter/vf_v360: add octahedron formatPaul B Mahol2020-09-27
|
* vf_colorspace: Added linear trc.Andrew Klaassen2020-09-27
| | | | | | | | This patch adds the coefficients for the linear gamma function (1,0,1,0) to the colorspace filter. Signed-off-by: Andrew Klaassen <clawsoon@yahoo.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avcodec: add Argonaut Games Video decoderPaul B Mahol2020-09-27
|
* tests/fate-run: Always overwrite output files for md5 testsAndreas Rheinhardt2020-09-27
| | | | | | | | Otherwise the result of such tests will not accurately reflect the current state. Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/argo_brp: use header frame countsZane van Iperen2020-09-27
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_brp: allow v1.1 ASF streams to have a non-22050 sample rate in ↵Zane van Iperen2020-09-27
| | | | | | | | | | | | | | | | certain circumstances It seems that in files where the BASF block isn't first, v1.1 ASF streams are allowed to be non-22050. Either this format is really inconsistent, or FX Fighter and Croc just ignored the sample rate field, requiring the v1.1 restriction in the first place. This bumps the version to 1.2 in these streams so they're not "corrected". Found in Alien Odyssey games files in: ./GRAPHICS/COMMBUNK/{{COMADD1,COMM2_{1,2,3E},COMM3_{2,3,4,5,6}},FADE{1,2}}.BRP Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_brp: cosmeticsZane van Iperen2020-09-27
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_brp: handle the case where the BASF block isn't the firstZane van Iperen2020-09-27
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_brp: support MASK streamsZane van Iperen2020-09-27
| | | | | | We can't actually use them though. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/argo_{asf,brp}: fix potential segfault in ff_argo_asf_fill_stream()Zane van Iperen2020-09-27
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/v4l2_buffers: remove unused function argumentAndriy Gelman2020-09-26
| | | | Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avfilter/vf_histogram: add slide modes for thistogramPaul B Mahol2020-09-26
|
* avcodec/fraps: Use cached bitstream readerAndreas Rheinhardt2020-09-26
| | | | | | | | | | | | | | | This proved beneficial for performance: For the sample [1] the number of decicycles in one decode call decreased from 155851561 to 108158037 for Clang 10 and from 168270467 to 128847479 for GCC 9.3. For x86-32 compiled with GCC 9.3 and run on an x64 Haswell the number increased from 158405517 to 202215769, so that the cached bitstream reader is only enabled if HAVE_FAST_64BIT is set. These values are the average of 10 runs each looping five times over the input. [1]: samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2593/fraps_flv1_decoding_errors.avi Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/fraps: Use unchecked bitstream readerAndreas Rheinhardt2020-09-26
| | | | | | | | | | | | | | | | | The fraps decoder already checked for overreads manually (and errored out in this scenario), yet it still enabled implicit checks, leading to worse performance and more code size. This commit disables the implicit bitstream reader checks. For the sample [1] this improves performance from 195105896 to 155851561 decicycles for Clang 10 and from 222801887 to 168270467 decicycles when compiled with GCC 9.3. These values are the average of 10 runs each looping ten times over the input. [1]: samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2593/fraps_flv1_decoding_errors.avi Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/utvideo: Move stuff only used by Ut encoder to Ut encoderAndreas Rheinhardt2020-09-26
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/utvideo: Remove unused arrayAndreas Rheinhardt2020-09-26
| | | | | | | Unused since 3594788b713e76449eda0bc9d64b38258c86a594. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/utvideodec: Avoid qsort when creating Huffman tablesAndreas Rheinhardt2020-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ut video format uses Huffman trees which are only implicitly coded in the bitstream: Only the lengths of the codes are coded, the rest has to be inferred by the decoder according to the rule that the longer codes are to the left of shorter codes in the tree and on each level the symbols are descending from left to right. Because longer codes are to the left of shorter codes, one needs to know how many non-leaf nodes there are on each level in order to know the code of the next left-most leaf (which belongs to the highest symbol on that level). The current code does this by sorting the entries to be ascending according to length and (for entries with the same length) ascending according to their symbols. This array is then traversed in reverse order, so that the lowest level is dealt with first, so that the number of non-leaf nodes of the next higher level is known when processing said level. But this can also be calculated without sorting: Simply count how many leaf nodes there are on each level. Then one can calculate the number of non-leaf nodes on each level iteratively from the lowest level upwards: It is just half the number of nodes of the level below. This improves performance: For the sample from ticket #4044 the amount of decicycles for one call to build_huff() decreased from 1055489 to 446310 for Clang 10 and from 1080306 to 535155 for GCC 9. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>