summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avcodec/hapdec: Change compressed_offset to unsigned 32bitMichael Niedermayer2021-02-20
| | | | | | | | | | | Fixes: out of array access Fixes: 29345/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5401813482340352 Fixes: 30745/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5762798221131776 Suggested-by: Anton Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libvpxenc: optimize parsing vpx_svc_ref_frame_configWonkap Jang2021-02-19
| | | | | | | | Getting rid of unnecessary use of AVDictionary object in parsing vpx_svc_ref_frame_config. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: James Zern <jzern@google.com>
* fftools/ffplay: reindent and some minor cosmeticsMarton Balint2021-02-19
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffplay: use av_packet_alloc() to allocate packetsMarton Balint2021-02-19
| | | | | | Heavily based on a patch by James Almer. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffplay: use context AVPacket in decoder_decode_frame()Marton Balint2021-02-19
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffplay: get rid of flush_pktMarton Balint2021-02-19
| | | | | | The packet serial can be used instead to detect when a flush is needed. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/cfhdenc: use pts instead of frame numberPaul B Mahol2021-02-19
| | | | Makes encodes bitexact with different number of threads.
* avfilter/vf_ssim: add slice threadingPaul B Mahol2021-02-19
|
* avfilter/vf_psnr: add support for slice threadingPaul B Mahol2021-02-19
|
* avcodec/indeo3: add support for more dimensionsPaul B Mahol2021-02-19
| | | | Fixes #6581
* tests/checkasm/sw_scale: use memset() to fill ditherJames Almer2021-02-19
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* checkasm/sw_scale: properly initialize src_pixer and filter_coeff buffersAlan Kelly2021-02-19
| | | | | | Fixes valgrind uninitialised value warnings. Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_vif: Remove superfluous ';'Andreas Rheinhardt2021-02-19
| | | | | | | | Inside a function a superfluous ';' is just a null-statement; yet outside it is invalid, even though compilers happen to accept them. They (at least GCC and Clang) only warn about this when on -pedantic. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mpegenc: Forward error codeAndreas Rheinhardt2021-02-19
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mpegenc: Avoid adding invalid packet to queueAndreas Rheinhardt2021-02-19
| | | | | | Do this by moving the check before the allocation. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mpegenc: Fix leak in case trailer is never writtenAndreas Rheinhardt2021-02-19
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mpegenc: Ensure packet queue stays validAndreas Rheinhardt2021-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MPEG-PS muxer uses a custom queue of custom packets. To keep track of it, it has a pointer (named predecode_packet) to the head of the queue and a pointer to where the next packet is to be added (it points to the next-pointer of the last element of the queue); furthermore, there is also a pointer that points into the queue (called premux_packet). The exact behaviour was as follows: If premux_packet was NULL when a packet is received, it is taken to mean that the old queue is empty and a new queue is started. premux_packet will point to the head of said queue and the next_packet-pointer points to its next pointer. If predecode_packet is NULL, it will also made to point to the newly allocated element. But if premux_packet is NULL and predecode_packet is not, then there will be two queues with head elements premux_packet and predecode_packet. Yet only elements reachable from predecode_packet are ever freed, so the premux_packet queue leaks. Worse yet, when the predecode_packet queue will be eventually exhausted, predecode_packet will be made to point into the other queue and when predecode_packet will be freed, the next pointer of the preceding element of the queue will still point to the element just freed. This element might very well be still reachable from premux_packet which leads to use-after-frees lateron. This happened in the tickets mentioned below. Fix this by never creating two queues in the first place by checking for predecode_packet to know whether the queue is empty. If premux_packet is NULL, then it is set to the newly allocated element of the queue. Fixes tickets #6887, #8188 and #8266. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avutil/video_enc_params: Check for truncation before creating bufferAndreas Rheinhardt2021-02-19
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avutil/video_enc_params: Combine overflow checksAndreas Rheinhardt2021-02-19
| | | | | | | | | | | This patch also fixes a -Wtautological-constant-out-of-range-compare warning from Clang and a -Wtype-limits warning from GCC on systems where size_t is 64bits and unsigned 32bits. The reason for this seems to be that variable (whose value derives from sizeof() and can therefore be known at compile-time) is used instead of using sizeof() directly in the comparison. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* swscale/x86/yuv2yuvX: use the movsxdifnidn helper macroJames Almer2021-02-18
| | | | | | Simplifies code Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/x86/yuv2yuvX: use movq to load 8 bytes in all non-AVX2 functionsJames Almer2021-02-18
| | | | | | mova expands to movq on non-XMM functions Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/x86/yuv2yuvX: use the SPLATW helper macroJames Almer2021-02-18
| | | | | | Simplifies code Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/x86/swscale: fix mix of inline and external function definitionsJames Almer2021-02-18
| | | | | | This includes removing pointless static function forward declarations. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/aarch64: add HEVC sao_band NEONJosh Dekker2021-02-18
| | | | | | Only works for 8x8. Signed-off-by: Josh Dekker <josh@itanimul.li>
* lavc/aarch64: add HEVC idct_dc NEONJosh Dekker2021-02-18
| | | | Signed-off-by: Josh Dekker <josh@itanimul.li>
* lavc/aarch64: port HEVC add_residual NEONReimar Döffinger2021-02-18
| | | | | | Speedup is fairly small, around 1.5%, but these are fairly simple. Signed-off-by: Josh Dekker <josh@itanimul.li>
* lavc/aarch64: port HEVC SIMD idct NEONReimar Döffinger2021-02-18
| | | | | | | | | | | | Makes SIMD-optimized 8x8 and 16x16 idcts for 8 and 10 bit depth available on aarch64. For a UHD HDR (10 bit) sample video these were consuming the most time and this optimization reduced overall decode time from 19.4s to 16.4s, approximately 15% speedup. Test sample was the first 300 frames of "LG 4K HDR Demo - New York.ts", running on Apple M1. Signed-off-by: Josh Dekker <josh@itanimul.li>
* avcodec: add initial exr image encoderPaul B Mahol2021-02-18
|
* dnn_backend_openvino.c: allow out_frame as NULL for analytic caseTing Fu2021-02-18
|
* dnn: add color conversion for analytic caseGuo, Yejun2021-02-18
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn_interface.h: add enum DNNColorOrderGuo, Yejun2021-02-18
| | | | | | | | the data type and order together decide the color format, we could not use AVPixelFormat directly because not all the possible formats are covered by it. Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn: add function type for modelGuo, Yejun2021-02-18
| | | | | | | | So the backend knows the usage of model is for frame processing, detect, classify, etc. Each function type has different behavior in backend when handling the input/output data of the model. Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn: extract common functions used by different filtersGuo, Yejun2021-02-18
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn_backend_openvino.c: fix multi-thread issue for async executionGuo, Yejun2021-02-18
| | | | | | | | | once we mark done for the task in function infer_completion_callback, the task is possible to be release in function ff_dnn_get_async_result_ov in another thread just after it, so we need to record request queue first, instead of using task->ov_model->request_queue later. Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn_backend_openvino.c: fix mismatch between ffmpeg(NHWC) and openvino(NCHW)Guo, Yejun2021-02-18
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* swscale/x86/swscale: fix compilation with old yasmJames Almer2021-02-17
| | | | | | Where AVX2 may not be supported. Signed-off-by: James Almer <jamrial@gmail.com>
* checkasm/sw_scale: use av_free() instead of free()James Almer2021-02-17
| | | | | | Fixes crashes on Win64 Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_pseudocolor: Add missing bracesMark Thompson2021-02-17
| | | | The array inside a structure needs two levels of braces.
* swscale: move yuv2yuvX_sse3 to yasm, unrolls main loopAlan Kelly2021-02-17
| | | | And other small optimizations for ~20% speedup.
* x86/vf_gblur: fix reg name in UNIX64 prologueJames Almer2021-02-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_gblur: add missing arch checkJames Almer2021-02-17
| | | | | | | Removed by mistake in 2b4da1cb8c2984b37e5c912e103a1b8b734e7c1f where it should have been replaced instead. Signed-off-by: James Almer <jamrial@gmail.com>
* checkasm/vf_gblur: add a test for postscale_sliceJames Almer2021-02-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* checkasm/vf_gblur: split off the horiz_slice test into its own functionJames Almer2021-02-17
| | | | | | Will come in handy for the following commit. Signed-off-by: James Almer <jamrial@gmail.com>
* x86/vf_gblur: fix postscale_slice prologueJames Almer2021-02-17
| | | | | | | x86_32 ABI does not pass float arguments directly on xmm regs, and the Win64 ABI uses only the first four regs for this purpose. Signed-off-by: James Almer <jamrial@gmail.com>
* lavfi/drawtext: ignore final LF of textfile.Nicolas George2021-02-17
| | | | | | | | | | A standard text file ends with a final LF. Without this change, it is interpreted as an empty final line, and visible with the box option. The current behavior can be achieved by actually having an empty line at the end of the file. Fix trac ticket #7948.
* avformat/ircamdec: use lrintf() for roundingPaul B Mahol2021-02-16
|
* lavc/aacdec_template: Fix 7.1 decoding with default strictness.KM2021-02-16
| | | | | Broken in 4d9b9c5e Fixes ticket #9057.
* avformat/mxfenc: Discard audio until valid video has been receivedAndreas Rheinhardt2021-02-16
| | | | | | | | | | | | | Normally, video packets are muxed before audio packets for mxf (there is a dedicated interleave function for this); furthermore the first (video) packet triggers writing the actual header. Yet when the first video packet fails the checks performed on it, it will be an audio packet that leads to writing the header and codec_ul (a value set based upon properties of the bitstream which necessitates actually inspecting packets) may be wrong. Therefore this commit discards audio packets until a valid video packet has been received. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* tests/fate-run.sh: Don't overlook errors from md5 testsAndreas Rheinhardt2021-02-16
| | | | | | | | | | | The md5 test up until now ignored errors from ffmpeg (the cli) and just md5'ed whatever ffmpeg has output; while testing scenarios in which ffmpeg fails has its merits, errors should not be overlooked by default; doing so also reduces the effectiveness of sanitizers as errors from them are ignored. This has happened with a memleak in the AV1 decoder. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fate/mxf: Fix d10-user-comments testAndreas Rheinhardt2021-02-16
| | | | | | | | | | | | | | | | | | | | | | | | The mxf_d10 muxer is very picky regarding the input it accepts: The only video accepted is MPEG-2 with absolutely constant bitrate, i.e. all packets need to have exactly the same size; and only a few bitrates are accepted. The sample file used did not abide by this: Writing the first packet (a video packet) errors out and afterwards an audio packet from the muxing queue has been written. That's all besides metadata (which this test is about). The FFmpeg cli returned an error, but said error has been ignored by the md5 test. This commit changes the test to actually send a compliant stream to the muxer, so that it does not error out; furthermore, the test is changed to explicitly check the metadata instead of it only being implicitly included in the md5 checksum. The compliant stream is created by our encoder at runtime. Finally, the test now also covers writing user-specified product/company/version identification. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>