]> git.sesse.net Git - ffmpeg/log
ffmpeg
3 years agoavformat/mspdec: Microsoft Paint (MSP) demuxer
Peter Ross [Thu, 8 Oct 2020 10:04:58 +0000 (21:04 +1100)]
avformat/mspdec: Microsoft Paint (MSP) demuxer

Signed-off-by: Peter Ross <pross@xvid.org>
3 years agoavcodec/msp2dec: Microsoft Paint (MSP) version 2 decoder
Peter Ross [Thu, 8 Oct 2020 10:04:58 +0000 (21:04 +1100)]
avcodec/msp2dec: Microsoft Paint (MSP) version 2 decoder

Signed-off-by: Peter Ross <pross@xvid.org>
3 years agohwcontext_vulkan: wait and signal semaphores when transferring to CUDA
Lynne [Sat, 5 Dec 2020 22:51:47 +0000 (23:51 +0100)]
hwcontext_vulkan: wait and signal semaphores when transferring to CUDA

Same as when downloading. Not sure why this isn't done, probably
because the CUDA code predates the sync mechanism we settled on.

3 years agofate: add a test for HDR10+ metadata in HEVC
Mohammad Izadi [Mon, 23 Nov 2020 21:29:37 +0000 (13:29 -0800)]
fate: add a test for HDR10+ metadata in HEVC

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agofftools/ffprobe: add support for HDR10+ metadata
Mohammad Izadi [Mon, 23 Nov 2020 21:29:36 +0000 (13:29 -0800)]
fftools/ffprobe: add support for HDR10+ metadata

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/vf_showinfo: add support for HDR10+ metadata
Mohammad Izadi [Mon, 23 Nov 2020 21:29:35 +0000 (13:29 -0800)]
avfilter/vf_showinfo: add support for HDR10+ metadata

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/hevc_sei: add support for HDR10+ metadata
Mohammad Izadi [Mon, 23 Nov 2020 21:29:34 +0000 (13:29 -0800)]
avcodec/hevc_sei: add support for HDR10+ metadata

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/af_afreqshift: add level option
Paul B Mahol [Sat, 5 Dec 2020 13:44:14 +0000 (14:44 +0100)]
avfilter/af_afreqshift: add level option

3 years agoavfilter: add asubcut filter
Paul B Mahol [Mon, 30 Nov 2020 08:49:03 +0000 (09:49 +0100)]
avfilter: add asubcut filter

3 years agolibavformat/mov.c: export vendor id as metadata
Thierry Foucu [Wed, 18 Nov 2020 20:09:37 +0000 (12:09 -0800)]
libavformat/mov.c: export vendor id as metadata

3 years agoavformat/rtsp: prefer to use MAX_URL_SIZE for url and command buffer
Limin Wang [Sun, 15 Nov 2020 02:45:15 +0000 (10:45 +0800)]
avformat/rtsp: prefer to use MAX_URL_SIZE for url and command buffer

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
3 years agoavutil/opt: add AV_OPT_FLAG_DEPRECATED option
Limin Wang [Thu, 19 Nov 2020 14:13:55 +0000 (22:13 +0800)]
avutil/opt: add AV_OPT_FLAG_DEPRECATED option

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
3 years agoavdevice/decklink: remove the duplicated warning message
Limin Wang [Sun, 29 Nov 2020 00:07:46 +0000 (08:07 +0800)]
avdevice/decklink: remove the duplicated warning message

 ./ffmpeg -list_devices true -f decklink -i dummy
[Blackmagic DeckLink indev @ 0x2f96d00] The "list_devices" option is deprecated: list available devices
[decklink @ 0x2f96400] The -list_devices option is deprecated and will be removed. Please use ffmpeg -sources decklink instead.
->
[Blackmagic DeckLink indev @ 0x306ed00] The "list_devices" option is deprecated: use ffmpeg -sources decklink instead

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
3 years agoavcodec/av1dec: Fix leak in case of failure
Andreas Rheinhardt [Fri, 4 Dec 2020 17:09:48 +0000 (18:09 +0100)]
avcodec/av1dec: Fix leak in case of failure

A reference to an AV1RawFrameHeader and consequently the
AV1RawFrameHeader itself and everything it has a reference to leak
if the hardware has no AV1 decoding capabilities or if some other error
happens. It happens e.g. in the cbs-av1-av1-1-b8-02-allintra FATE-test;
it has just been masked because the return value of ffmpeg (which
indicates failure when using Valgrind or ASAN) is ignored when doing
tests of type md5.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/cdgraphics: Check frame before clearing
Michael Niedermayer [Fri, 4 Dec 2020 00:07:04 +0000 (01:07 +0100)]
avcodec/cdgraphics: Check frame before clearing

Fixes: null pointer dereference
Fixes: 27730/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDGRAPHICS_fuzzer-6212402236096512
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mpc8: Check remaining space in mpc8_parse_seektable()
Michael Niedermayer [Fri, 30 Oct 2020 20:50:32 +0000 (21:50 +0100)]
avformat/mpc8: Check remaining space in mpc8_parse_seektable()

Fixes: Fixes infinite loop
Fixes: 26704/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-6327056939614208
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/wavdec: Check for EOF in cues reading
Michael Niedermayer [Sun, 1 Nov 2020 21:18:49 +0000 (22:18 +0100)]
avformat/wavdec: Check for EOF in cues reading

Fixes: Timeout (>20sec -> 1ms)
Fixes: 26793/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-5674966852567040
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/vqf: Check len for COMM chunks
Michael Niedermayer [Sun, 1 Nov 2020 19:20:02 +0000 (20:20 +0100)]
avformat/vqf: Check len for COMM chunks

Fixes: Infinite loop
Fixes: 26696/clusterfuzz-testcase-minimized-ffmpeg_dem_VQF_fuzzer-5648269168082944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mov: Use av_sat_add64() in mov_read_sidx()
Michael Niedermayer [Sat, 31 Oct 2020 11:06:21 +0000 (12:06 +0100)]
avformat/mov: Use av_sat_add64() in mov_read_sidx()

This avoids a potential integer overflow, no testcase is known

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mov: Avoid overflow in end computation in mov_read_custom()
Michael Niedermayer [Sat, 31 Oct 2020 11:01:50 +0000 (12:01 +0100)]
avformat/mov: Avoid overflow in end computation in mov_read_custom()

Fixes: signed integer overflow: 18 + 9223372036854775799 cannot be represented in type 'long'
Fixes: 26731/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5696846019952640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/id3v2: Sanity check tlen before alloc and uncompress
Michael Niedermayer [Sat, 7 Nov 2020 20:39:21 +0000 (21:39 +0100)]
avformat/id3v2: Sanity check tlen before alloc and uncompress

Fixes: Timeout (>20sec -> 65ms)
Fixes: 26896/clusterfuzz-testcase-minimized-ffmpeg_dem_DAUD_fuzzer-5691024049176576
Fixes: 27627/clusterfuzz-testcase-minimized-ffmpeg_dem_AEA_fuzzer-4907019324358656
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/af_arnndn: add mix option
Paul B Mahol [Fri, 4 Dec 2020 22:50:57 +0000 (23:50 +0100)]
avfilter/af_arnndn: add mix option

Mostly useful to listen to actual noise.

3 years agoavfilter/vf_v360: fix several problems with 'perspective' output
Michael Koch [Fri, 4 Dec 2020 18:43:26 +0000 (19:43 +0100)]
avfilter/vf_v360: fix several problems with 'perspective' output

The image center wasn't preserved, the output image was mirror reversed,
and rotations were made around wrong axes.
I did also remove the vector normalization, because it's sure that the vector
is already normalized if it's calculated from sin() and cos() terms.

3 years agoavcodec/ffwavesynth: Mark decoder as init-threadsafe
Andreas Rheinhardt [Sun, 29 Nov 2020 22:18:19 +0000 (23:18 +0100)]
avcodec/ffwavesynth: Mark decoder as init-threadsafe

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/utils: Remove ff_codec_open2_recursive()
Andreas Rheinhardt [Fri, 27 Nov 2020 00:12:01 +0000 (01:12 +0100)]
avcodec/utils: Remove ff_codec_open2_recursive()

This function existed to enable codecs with non-threadsafe init functions
to initialize other codecs despite the fact that normally no two codecs
with non-threadsafe init functions can be initialized at the same time
(there is a mutex guarding this). Yet there are no users of this
function any more as all users have been made thread-safe (switching
away from ff_codec_open2_recursive() was required for this as said
function requires the caller to hold the lock to the mutex guarding the
initializations and this is only true for codecs with the
FF_CODEC_CAP_INIT_THREADSAFE flag unset); so remove it.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/tiff: Make decoder init-threadsafe
Andreas Rheinhardt [Fri, 27 Nov 2020 00:09:04 +0000 (01:09 +0100)]
avcodec/tiff: Make decoder init-threadsafe

The only thing that stands in the way of adding the
FF_CODEC_CAP_INIT_THREADSAFE flag to the TIFF decoder is its usage
of ff_codec_open2_recursive(): This function requires its caller to hold
the lock for the mutex that guards initialization of AVCodecContexts
whose codecs have a non-threadsafe init function and only callers whose
codec does not have the FF_CODEC_CAP_INIT_THREADSAFE flag set hold said
lock (the others don't need to care about said lock). But one can set
the flag if one switches to avcodec_open2() at the same time.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/faxcompr: Make ff_ccitt_unpack_init() thread-safe
Andreas Rheinhardt [Fri, 27 Nov 2020 00:05:25 +0000 (01:05 +0100)]
avcodec/faxcompr: Make ff_ccitt_unpack_init() thread-safe

This will allow to make the TIFF decoder's init function thread-safe.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/smvjpegdec: Make decoder init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 23:25:44 +0000 (00:25 +0100)]
avcodec/smvjpegdec: Make decoder init-threadsafe

The only thing that stands in the way of adding the
FF_CODEC_CAP_INIT_THREADSAFE flag to the SMV JPEG decoder is its usage
of ff_codec_open2_recursive(): This function requires its caller to hold
the lock for the mutex that guards initialization of AVCodecContexts
whose codecs have a non-threadsafe init function and only callers whose
codec does not have the FF_CODEC_CAP_INIT_THREADSAFE flag set hold said
lock (the others don't need to care about said lock). But one can set
the flag if one switches to avcodec_open2() at the same time.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/cri: Make decoder init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 22:59:39 +0000 (23:59 +0100)]
avcodec/cri: Make decoder init-threadsafe

The only thing that stands in the way of adding the
FF_CODEC_CAP_INIT_THREADSAFE flag to the Cintel RAW decoder is its usage
of ff_codec_open2_recursive(): This function requires its caller to hold
the lock for the mutex that guards initialization of AVCodecContexts
whose codecs have a non-threadsafe init function and only callers whose
codec does not have the FF_CODEC_CAP_INIT_THREADSAFE flag set hold said
lock (the others don't need to care about said lock). But one can set
the flag if one switches to avcodec_open2() at the same time.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec: Fix invalid uses of ff_codec_open2_recursive()
Andreas Rheinhardt [Thu, 26 Nov 2020 22:16:04 +0000 (23:16 +0100)]
avcodec: Fix invalid uses of ff_codec_open2_recursive()

Normally no two codecs with FF_CODEC_CAP_INIT_THREADSAFE unset
can be initialized at the same time: a mutex in avcodec_open2()
ensures this. This implies that one cannot simply open a codec
with a non-threadsafe init-function from the init function of
a codec whose own init function is not threadsafe either as the child
codec couldn't acquire the lock.

ff_codec_open2_recursive() exists to get around this limitation:
If the init function of the child codec to be initialized is not
thread-safe, the mutex is unlocked, the child is initialized and
the mutex is locked again. This of course has as a prerequisite that
the parent AVCodecContext actually holds the lock, i.e. that the
parent codec's init function is not thread-safe. If it is, then one
can (and has to) just use avcodec_open2() directly (if the child's
init function is not thread-safe, then avcodec_open2() will have to
acquire the mutex itself (and potentially wait for it), so that it is
perfectly fine for an otherwise thread-safe init function to open
a codec with a potentially non-thread-safe init function via
avcodec_open2()).

Yet several of the users of ff_codec_open2_recursive() have the
FF_CODEC_CAP_INIT_THREADSAFE flag set; this only worked because
all the child codecs' init functions were thread-safe themselves
so that ff_codec_open2_recursive() didn't touch the mutex at all.
But of course the real solution to this is to directly use
avcodec_open2().

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/mxpegdec: Fix memleaks upon init failure
Andreas Rheinhardt [Thu, 26 Nov 2020 21:16:13 +0000 (22:16 +0100)]
avcodec/mxpegdec: Fix memleaks upon init failure

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/mjpegdec: Fix memleak upon init failure
Andreas Rheinhardt [Thu, 26 Nov 2020 20:54:54 +0000 (21:54 +0100)]
avcodec/mjpegdec: Fix memleak upon init failure

This affected all decoders that used ff_mjpeg_decode_init() as init
function; and it also affected decoders that open jpeg decoders via
ff_codec_open2_recursive() as well as MxPEG.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/smc: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 18:22:52 +0000 (19:22 +0100)]
avcodec/smc: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/sipr: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 18:22:15 +0000 (19:22 +0100)]
avcodec/sipr: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/shorten: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 18:18:04 +0000 (19:18 +0100)]
avcodec/shorten: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/sgirledec: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 18:16:32 +0000 (19:16 +0100)]
avcodec/sgirledec: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/sgienc: Combine av_log() statements
Andreas Rheinhardt [Thu, 26 Nov 2020 18:15:16 +0000 (19:15 +0100)]
avcodec/sgienc: Combine av_log() statements

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/sgienc: Mark encoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 18:09:46 +0000 (19:09 +0100)]
avcodec/sgienc: Mark encoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/sgidec: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 18:07:20 +0000 (19:07 +0100)]
avcodec/sgidec: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/tmv: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 18:02:28 +0000 (19:02 +0100)]
avcodec/tmv: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/ulti: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 17:56:06 +0000 (18:56 +0100)]
avcodec/ulti: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/ws-snd1: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 17:53:24 +0000 (18:53 +0100)]
avcodec/ws-snd1: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/xxan: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 17:12:54 +0000 (18:12 +0100)]
avcodec/xxan: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/xxan: Cleanup generically on init failure
Andreas Rheinhardt [Thu, 26 Nov 2020 17:11:29 +0000 (18:11 +0100)]
avcodec/xxan: Cleanup generically on init failure

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/xsubenc: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 17:08:38 +0000 (18:08 +0100)]
avcodec/xsubenc: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/xsubdec: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 16:52:44 +0000 (17:52 +0100)]
avcodec/xsubdec: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/xl: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 16:48:29 +0000 (17:48 +0100)]
avcodec/xl: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/xfacedec: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 16:46:01 +0000 (17:46 +0100)]
avcodec/xfacedec: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/xan: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 16:44:38 +0000 (17:44 +0100)]
avcodec/xan: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/xan: Cleanup generically on init failure
Andreas Rheinhardt [Thu, 26 Nov 2020 16:43:48 +0000 (17:43 +0100)]
avcodec/xan: Cleanup generically on init failure

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/yuv4dec: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 16:40:17 +0000 (17:40 +0100)]
avcodec/yuv4dec: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/y41penc: Mark encoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 16:38:43 +0000 (17:38 +0100)]
avcodec/y41penc: Mark encoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/y41pdec: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 16:38:23 +0000 (17:38 +0100)]
avcodec/y41pdec: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/yop: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 16:15:51 +0000 (17:15 +0100)]
avcodec/yop: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/cljrdec: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 16:11:03 +0000 (17:11 +0100)]
avcodec/cljrdec: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/loco: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 15:50:44 +0000 (16:50 +0100)]
avcodec/loco: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/pcm: Mark decoders as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 15:40:42 +0000 (16:40 +0100)]
avcodec/pcm: Mark decoders as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/pcm: Make encoders init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 15:37:31 +0000 (16:37 +0100)]
avcodec/pcm: Make encoders init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/adpcmenc: Mark encoders as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 13:31:06 +0000 (14:31 +0100)]
avcodec/adpcmenc: Mark encoders as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/adpcm: Mark decoders as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 13:26:17 +0000 (14:26 +0100)]
avcodec/adpcm: Mark decoders as init-threadsafe

They don't modify any global state

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/cdtoons: Mark decoder as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 13:24:00 +0000 (14:24 +0100)]
avcodec/cdtoons: Mark decoder as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/a64multienc: Mark encoders as init-threadsafe
Andreas Rheinhardt [Thu, 26 Nov 2020 13:15:01 +0000 (14:15 +0100)]
avcodec/a64multienc: Mark encoders as init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavfilter/af_stereotools: add support for commands
Paul B Mahol [Fri, 4 Dec 2020 14:37:43 +0000 (15:37 +0100)]
avfilter/af_stereotools: add support for commands

3 years agoavfilter/af_stereotools: add timeline support
Paul B Mahol [Fri, 4 Dec 2020 14:22:06 +0000 (15:22 +0100)]
avfilter/af_stereotools: add timeline support

3 years agoavfilter/af_stereotools: add two more modes
Paul B Mahol [Fri, 4 Dec 2020 10:53:34 +0000 (11:53 +0100)]
avfilter/af_stereotools: add two more modes

3 years agofftools/cmdutils: also print warnings when using -sinks and -sources
Marton Balint [Thu, 8 Oct 2020 20:26:09 +0000 (22:26 +0200)]
fftools/cmdutils: also print warnings when using -sinks and -sources

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavdevice/decklink: warn about too old decklink API version
Marton Balint [Thu, 8 Oct 2020 19:31:24 +0000 (21:31 +0200)]
avdevice/decklink: warn about too old decklink API version

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavdevice/decklink_enc: simplify usage of buffercount type
Marton Balint [Thu, 8 Oct 2020 21:12:24 +0000 (23:12 +0200)]
avdevice/decklink_enc: simplify usage of buffercount type

Also remove some leftover declaration of CreateDeckLinkIteratorInstance().

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavdevice/decklink_dec: add support for 50/60 fps timecode
Marton Balint [Sat, 5 Sep 2020 21:29:24 +0000 (23:29 +0200)]
avdevice/decklink_dec: add support for 50/60 fps timecode

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavutil/timecode: add av_timecode_init_from_components
Marton Balint [Sat, 5 Sep 2020 21:04:28 +0000 (23:04 +0200)]
avutil/timecode: add av_timecode_init_from_components

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavutil/timecode: allow drop frame timecodes for multiples of 30000/1001 fps
Marton Balint [Sat, 5 Sep 2020 20:45:52 +0000 (22:45 +0200)]
avutil/timecode: allow drop frame timecodes for multiples of 30000/1001 fps

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavutil/film_grain_params: fix doxy for ar_coeff_* fields
James Almer [Thu, 3 Dec 2020 16:25:21 +0000 (13:25 -0300)]
avutil/film_grain_params: fix doxy for ar_coeff_* fields

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/pthread_slice: Don't use static variable, fix race
Andreas Rheinhardt [Sat, 28 Nov 2020 22:23:22 +0000 (23:23 +0100)]
avcodec/pthread_slice: Don't use static variable, fix race

ff_slice_thread_init() uses a static variable to hold a function
pointer, although the value of said pointer needn't be saved between
different runs of this function at all.

The reason for this being so is probably that said pointer points to
a static function (if used); but storage class specifiers like "static"
are not part of the type of an object and so including it in the pointer
declaration is wrong (anyway, "static" means different things in both
contexts: for the function declaration it affects linkage, for the
variable storage duration).

Using a static variable here can lead to races, e.g. when initializing
VP9 (for which said function pointer was added) and H.264 with slice
threading. The latter has the FF_CODEC_CAP_INIT_THREADSAFE flag set and
is therefore unaffected by the lock guarding initializations of
decoders.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/mpeg12enc: Disallow using MPEG-2 intra VLC table for mpeg1video
Andreas Rheinhardt [Tue, 24 Nov 2020 14:32:04 +0000 (15:32 +0100)]
avcodec/mpeg12enc: Disallow using MPEG-2 intra VLC table for mpeg1video

Using MPEG-2 intra VLC tables is spec-incompliant for MPEG-1 and given
that an MPEG-1 bitstream can't signal whether MPEG-2 intra VLC tables
have been used the output is broken. Therefore this option is removed
immediately without any deprecation period.

Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavfilter/af_acrossover: add per output band gain
Paul B Mahol [Wed, 2 Dec 2020 12:48:32 +0000 (13:48 +0100)]
avfilter/af_acrossover: add per output band gain

3 years agoavutil/avsscanf: fix possible overreads when dealing with %c or %s
Paul B Mahol [Wed, 2 Dec 2020 12:46:22 +0000 (13:46 +0100)]
avutil/avsscanf: fix possible overreads when dealing with %c or %s

3 years agoavfilter/af_acrossover: remove pointless allocation of static size
Paul B Mahol [Wed, 2 Dec 2020 11:38:29 +0000 (12:38 +0100)]
avfilter/af_acrossover: remove pointless allocation of static size

3 years agoavfilter/af_acrossover: document roll-off of each filter order
Paul B Mahol [Wed, 2 Dec 2020 11:28:01 +0000 (12:28 +0100)]
avfilter/af_acrossover: document roll-off of each filter order

3 years agoavfilter/af_acrossover: move coefficients and state to simple arrays
Paul B Mahol [Tue, 1 Dec 2020 10:34:50 +0000 (11:34 +0100)]
avfilter/af_acrossover: move coefficients and state to simple arrays

3 years agoavfilter/af_anequalizer: add timeline and slice support
Paul B Mahol [Tue, 1 Dec 2020 17:38:11 +0000 (18:38 +0100)]
avfilter/af_anequalizer: add timeline and slice support

3 years agoavcodec/cbs_h2645: remove dead code in cbs_h2645_replace_ps()
James Almer [Tue, 29 Sep 2020 14:20:48 +0000 (11:20 -0300)]
avcodec/cbs_h2645: remove dead code in cbs_h2645_replace_ps()

Missed in 0720e15c0330f0f101c02d5c2c6548e964079f6d. PS units are now guaranteed
to always be reference counter.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/cbs_av1: ensure Sequence Header unit content is always reference counted
James Almer [Tue, 29 Sep 2020 14:14:07 +0000 (11:14 -0300)]
avcodec/cbs_av1: ensure Sequence Header unit content is always reference counted

Prevents a NULL pointer dereference.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/vaapi_av1: read film grain param values from AV1Frames
James Almer [Mon, 30 Nov 2020 16:42:31 +0000 (13:42 -0300)]
avcodec/vaapi_av1: read film grain param values from AV1Frames

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/dxva2_av1: read film grain param values from AV1Frames
James Almer [Wed, 25 Nov 2020 20:53:23 +0000 (17:53 -0300)]
avcodec/dxva2_av1: read film grain param values from AV1Frames

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/nvdec_av1: read film grain param values from AV1Frames
James Almer [Wed, 25 Nov 2020 20:05:33 +0000 (17:05 -0300)]
avcodec/nvdec_av1: read film grain param values from AV1Frames

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/av1dec: infer and store film grain param values in AV1Frame
James Almer [Wed, 25 Nov 2020 20:02:56 +0000 (17:02 -0300)]
avcodec/av1dec: infer and store film grain param values in AV1Frame

They are not always coded in the bistream for each frame. In some cases, the
values need to be taken from a reference frame.

See section 6.8.20 from the AV1 spec.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/cbs_av1: split film grain param fields into their own struct
James Almer [Wed, 25 Nov 2020 19:56:51 +0000 (16:56 -0300)]
avcodec/cbs_av1: split film grain param fields into their own struct

Cosmetic change in preparation for the following patches.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoRevert "avcodec/nvdec_av1: fix setting film grain parameters for frames with update_g...
James Almer [Wed, 25 Nov 2020 19:29:34 +0000 (16:29 -0300)]
Revert "avcodec/nvdec_av1: fix setting film grain parameters for frames with update_grain == 0"

This reverts commit f9eec6298387fe72cd8035ff45276cfc3da784a8.

This does not effectively cover all cases. The values for some frames need
to be inferred by the decoder.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/af_agate: add support for commands and timeline
Paul B Mahol [Mon, 30 Nov 2020 20:40:52 +0000 (21:40 +0100)]
avfilter/af_agate: add support for commands and timeline

3 years agoavfilter/af_acrossover: remove unneeded emms_c() calls
Paul B Mahol [Mon, 30 Nov 2020 13:50:34 +0000 (14:50 +0100)]
avfilter/af_acrossover: remove unneeded emms_c() calls

3 years agoavfilter/af_acrossover: unroll biquad_process loop
Paul B Mahol [Mon, 30 Nov 2020 13:20:45 +0000 (14:20 +0100)]
avfilter/af_acrossover: unroll biquad_process loop

Makes code significantly faster for higher orders.

3 years agoavfilter/af_acrossover: use fdsp for inverter
Paul B Mahol [Mon, 30 Nov 2020 12:45:08 +0000 (13:45 +0100)]
avfilter/af_acrossover: use fdsp for inverter

3 years agoavfilter/af_acrossover: always align nb_samples for fdsp call
Paul B Mahol [Sun, 29 Nov 2020 21:08:35 +0000 (22:08 +0100)]
avfilter/af_acrossover: always align nb_samples for fdsp call

3 years agoavfilter/af_asupercut: add float sample format support
Paul B Mahol [Sun, 29 Nov 2020 20:33:52 +0000 (21:33 +0100)]
avfilter/af_asupercut: add float sample format support

3 years agoavcodec/hevc_cabac: Limit value in coeff_abs_level_remaining_decode() tighter
Michael Niedermayer [Thu, 22 Oct 2020 22:24:01 +0000 (00:24 +0200)]
avcodec/hevc_cabac: Limit value in coeff_abs_level_remaining_decode() tighter

The max depth is 16bps, the max allowed coefficient depth is depth+6
Fixes: signed integer overflow: 1074266112 + 1073725439 cannot be represented in type 'int'
Fixes: 26493/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5657763331702784
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/cafdec: Check the return code from av_add_index_entry()
Michael Niedermayer [Thu, 22 Oct 2020 21:13:16 +0000 (23:13 +0200)]
avformat/cafdec: Check the return code from av_add_index_entry()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/cafdec: Check for EOF in index read loop
Michael Niedermayer [Tue, 17 Nov 2020 23:58:37 +0000 (00:58 +0100)]
avformat/cafdec: Check for EOF in index read loop

Fixes: OOM
Fixes: 27398/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-541296033975500
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/cafdec: Check that bytes_per_packet and frames_per_packet are non negative
Michael Niedermayer [Thu, 22 Oct 2020 21:08:13 +0000 (23:08 +0200)]
avformat/cafdec: Check that bytes_per_packet and frames_per_packet are non negative

These fields are not signed in the spec (1.0) so they cannot be negative
Changing bytes_per_packet to unsigned would not solve this as it is exported
as block_align which is signed

Fixes: Infinite loop
Fixes: 26492/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5632087614554112
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mpegts: Limit iterations of get_packet_size()
Michael Niedermayer [Thu, 22 Oct 2020 18:41:48 +0000 (20:41 +0200)]
avformat/mpegts: Limit iterations of get_packet_size()

This is a pathological case where the fuzzer provides only 2 bytes per iteration.

Fixes: Timeout (>30 -> 0.9sec)
Fixes: 26488/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTS_fuzzer-5911031077142528
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/notchlc: Check available space for luma block code and alpha code
Michael Niedermayer [Sat, 12 Sep 2020 15:05:04 +0000 (17:05 +0200)]
avcodec/notchlc: Check available space for luma block code and alpha code

Fixes: Timeout (too long -> 2sec)
Fixes: 25439/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NOTCHLC_fuzzer-5688211127664640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>