Commit Graph

96715 Commits

Author SHA1 Message Date
Martin Storsjö e8cbdb9adb libfdk-aacdec: Allow explicitly disabling the DRC reference level option
Previously, it was always left in the automatic mode, if the option
was set to the only special (negative) value. Now there's two separate
special values for this option, -1 for automatic (metadata based)
and -2 for explicitly disabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-02-11 11:40:13 +02:00
Martin Storsjö 5835adee24 libfdk-aacdec: Use the decoder's default level limiter settings
It was disabled by default in 2dbd35b00c
as it added delay, but now we compensate for the delay properly
by offsetting timestamps.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-02-11 11:40:09 +02:00
Martin Storsjö 0f2b6594fc libfdk-aacdec: Apply the decoder's output delay on timestamps
The delay is normally zero when the level limiter is disabled,
but if enabled, there's a small delay.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-02-11 11:39:44 +02:00
Andreas Rheinhardt dd81f73946 avformat/mpjpegdec: Remove redundant initializations
The AVPacket destined for a demuxer's output has already been
initialized before it reaches the demuxer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-11 00:15:19 +01:00
Andreas Rheinhardt 212077eda4 avfilter/vf_dedot: Fix leak of AVFrame if making it writable fails
Even in this scenario, the frame still contains references to data that
won't be freed if the frame isn't unreferenced. And the AVFrame itself
will leak, too.

Fixes Coverity issue #1441422.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-11 00:03:44 +01:00
Andreas Rheinhardt 6a67d518d6 avformat: Remove unnecessary av_packet_unref()
Since bae8844e the packet will always be unreferenced when a demuxer
returns an error, so that a lot of calls to av_packet_unref() in lots of
demuxers are now redundant and can be removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-10 22:41:38 +01:00
Paul B Mahol bbea268aa8 avformat/tty: fix last timestamp for fate 2020-02-10 16:47:03 +01:00
Paul B Mahol e63a66416f avfilter/vf_thumbnail: fix possible crash on error 2020-02-10 15:46:42 +01:00
Paul B Mahol 32bc0e0444 avfilter/vf_thumbnail: add timeline support 2020-02-10 15:46:42 +01:00
Ting Fu fc6a5883d6 libswscale/x86/yuv2rgb: add ssse3 version
Tested using this command:
/ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \
-vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null

The fps increase from 389 to 640 on Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz

Signed-off-by: Ting Fu <ting.fu@intel.com>
2020-02-10 15:08:33 +01:00
Paul B Mahol 767e95d560 avformat/tty: add seeking support 2020-02-10 15:04:14 +01:00
Paul B Mahol 9216ad2e46 avformat/tty: make probing strict for first 8 bytes 2020-02-10 15:04:14 +01:00
Andreas Rheinhardt 5ad1c1a18a avcodec/cbs_jpeg: Use memcpy when writing pictures
This is possible because the size of a scan header is always a multiple
of a byte.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-02-09 22:36:50 +00:00
Andreas Rheinhardt ce920f4793 avcodec/cbs_mpeg2: Treat slices without data as invalid
They are spec-incompliant.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-09 23:33:18 +01:00
Michael Niedermayer b1aecad9ea avcodec/dpcm: Fix integer overflow in AV_CODEC_ID_GREMLIN_DPCM
Fixes: signed integer overflow: -2147479324 + -32568 cannot be represented in type 'int'
Fixes: 20103/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GREMLIN_DPCM_fuzzer-5667667579240448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-09 23:33:18 +01:00
Michael Niedermayer b8a0be9352 avcodec/wmalosslessdec: Fix integer overflow with sliding in padding bits
Fixes: signed integer overflow: -53716100 * 256 cannot be represented in type 'int'
Fixes: 20143/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5716604000403456

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-09 23:33:18 +01:00
Michael Niedermayer 5584c0bb94 avcodec/wmalosslessdec: Fix loop in revert_acfilter()
Fixes: out of array read
Fixes: 20059/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5691776237305856

No testcase except the fuzzed one.

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-09 23:33:18 +01:00
Michael Niedermayer cce37a22bc avcodec/mvha: Check remaining bits in VLC decode loop
Fixes: timeout (252sec -> 170msec)
Fixes: 20023/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MVHA_fuzzer-5681192565473280

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-09 23:33:18 +01:00
Michael Niedermayer a98eeb0c1e avcodec/agm: YUV420 without DCT needs even dimensions
Fixes: out of array access
Fixes: 19892/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5707525924323328

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-09 23:33:18 +01:00
Gautam Ramakrishnan da399e2135 libswscale/utils.c: Fix bug #8255
Bug #8255 points out a double free error in libwscale/utils.c file.
The double free is because the pointer to cascaded_context of an
sw_context is not set to NULL after freeing it. When the sw_context
is later freed, sws_freeContext is called on the cascaded_context,
causing a double free.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-09 23:33:18 +01:00
Michael Niedermayer 5c151e1491 avcodec/agm: Test remaining data in decode_raw_intra_rgb()
Fixes: Timeout (270sec -> 25ms)
Fixes: 20485/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5636954207289344

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>
2020-02-09 23:33:18 +01:00
Michael Niedermayer 87d54a6239 avformat/tty: Fix division by 0 in probe
Fixes: division by zero
Fixes: 20436/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5763229752229888
Fixes: 20503/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4841641154445312

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>
2020-02-09 23:33:18 +01:00
Michael Niedermayer c9c958051c libavcodec/mvha: Check height before applying median predictor
Fixes: out of array read
Fixes: 20495/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MVHA_fuzzer-5711179129552896

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>
2020-02-09 23:33:18 +01:00
Michael Niedermayer b0eec1391e avcodec/midivid: Check vector index
Fixes: out of array read
Fixes: 20494/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MVDV_fuzzer-5681452423577600

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>
2020-02-09 23:33:18 +01:00
Andreas Rheinhardt ac5d5046c8 avcodec/cbs: Fix potential double-free when adding unit fails
ff_cbs_insert_unit_data() has two modes of operation: It can insert a
unit with a newly created reference to an already existing AVBuffer; or
it can take a buffer and create an AVBuffer for it. Said buffer will
then become owned by the unit lateron.

A potential memleak/double-free exists in the second case, because if
creating the AVBuffer fails, the function immediately returns, but when
it fails lateron, the supplied buffer will be freed. The caller has no
way to distinguish between these two outcomes. The only such caller
(cbs_jpeg_split_fragment() in cbs_jpeg.c) opted for a potential
double-free.

This commit changes this by explicitly stating that a non-refcounted
buffer will be freed on error. The aforementioned caller has been
brought in line with this.

Fixes CID 1452623.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-02-09 22:23:29 +00:00
Paul B Mahol 1e6cef6861 avfilter/vf_fade: fix color fading for planar rgb 2020-02-09 22:50:07 +01:00
Paul B Mahol 06db1bef4c avfilter/vf_fade: add >8 bit support for black and alpha fade 2020-02-09 22:28:59 +01:00
Mark Thompson 48b102c5a6 doc/ffmpeg: Document device selection for Vulkan 2020-02-09 20:36:45 +00:00
Mark Thompson 593106ff47 lavfi/vf_*_vaapi: Fix error case
Fixes CID 1452400, 1452416, 1452550, 1452590, 1452760.
2020-02-09 20:36:45 +00:00
Mark Thompson f130b22119 lavfi/vf_deshake_opencl: Avoid propagating uninitialised data
Fixes CID 1452753.
2020-02-09 20:36:45 +00:00
Mark Thompson e1b5620b62 lavc/vp9_raw_reorder_bsf: Fix operator ordering
Fixes CID 1413024.
2020-02-09 20:36:44 +00:00
Mark Thompson 177a90b1a3 lavc/vaapi_encode: Fix leak in error case
Fixes CID 1442564.
2020-02-09 20:36:44 +00:00
Mark Thompson 5392982241 lavc/h265_metadata_bsf: Fix parameter ordering
Fixes CID 1452433.
2020-02-09 20:36:44 +00:00
Mark Thompson bf0ab6e9c4 lavc/cbs_h2645: Add missing newlines in log messages 2020-02-09 20:36:44 +00:00
Marton Balint cbf2a9bfac avutil/log: add support for multibyte console log for win32
Fixes ticket #5398.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-09 20:31:44 +01:00
Marton Balint 31acaa1ec6 avutil/log: add support for forced ANSI colors on win32
To make behavior the same as non-win32 code when the standard error is
redirected. Also restructure the code a bit.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-09 20:31:44 +01:00
Marton Balint 1b34c0690f avutil/log: fix detecting console mode on Win32
A redirected stderr can still have a valid handle.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-09 20:31:44 +01:00
Marton Balint bad8feb5e6 avutil/log: factorize ansi_fputs
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-09 20:31:44 +01:00
Marton Balint 2b496c90cd avutil/log: drop support for NO_COLOR environment variable
Deprecated for more than 9 years now.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-09 20:31:44 +01:00
Sitan Liu a61bcb9083 libavcodec/amfenc_hevc.c: Fix Maximum Reference Frames option on AMF HEVC. 2020-02-09 15:42:45 +00:00
Sitan Liu c96837043e libavcodec/amfenc_hevc.c: Fix Profile level option on AMF HEVC. 2020-02-09 15:42:45 +00:00
Paul B Mahol 53a485cd37 avfilter/af_afftfilt: fix memory leaks on error 2020-02-09 15:49:09 +01:00
Paul B Mahol 2174a315b4 avfilter/af_afffilt: fix crash on error 2020-02-09 15:42:48 +01:00
Paul B Mahol 283e755734 avfilter/vf_xfade: add diagonal smooth transitions 2020-02-09 12:59:56 +01:00
Paul B Mahol 3f24e744ad avfilter/af_asoftclip: add support for commands 2020-02-09 10:59:20 +01:00
Paul B Mahol d842998183 avfilter/af_asoftclip: add slice threading support 2020-02-09 10:47:43 +01:00
Lynne 9b9f441ab3 doc/APIchanges: fix vulkan hwcontext date 2020-02-08 23:32:46 +00:00
Lynne d500eff3cc lavu/tx: mention FFT output is not normalized
Not even FFTW's output is normalized.
This should prevent at least some users from complaining that doing a forward
transform followed by an inverse transform has a mismatching output to the
original input.
2020-02-08 23:11:29 +00:00
Martin Storsjö 5181f491ee checkasm: sbrdsp: Fix a spurious test failure by calculating a better epsilon for sum_square
Signed-off-by: Martin Storsjö <martin@martin.st>
2020-02-08 23:00:21 +02:00
Paul B Mahol 3750e36aa8 avfilter/vf_alphamerge: add AVClass to private context 2020-02-08 21:54:45 +01:00