1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

100155 Commits

Author SHA1 Message Date
Andreas Rheinhardt
85e1d469af avcodec/xan: Cleanup generically on init failure
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04 15:46:46 +01:00
Andreas Rheinhardt
13f10dc15e avcodec/yuv4dec: Mark decoder as init-threadsafe
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04 15:46:46 +01:00
Andreas Rheinhardt
ced33a2cde avcodec/y41penc: Mark encoder as init-threadsafe
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04 15:46:46 +01:00
Andreas Rheinhardt
b509692c62 avcodec/y41pdec: Mark decoder as init-threadsafe
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04 15:46:46 +01:00
Andreas Rheinhardt
c53f39abc3 avcodec/yop: Mark decoder as init-threadsafe
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04 15:46:46 +01:00
Andreas Rheinhardt
b143f8c26a avcodec/cljrdec: Mark decoder as init-threadsafe
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04 15:46:46 +01:00
Andreas Rheinhardt
a6bed40865 avcodec/loco: Mark decoder as init-threadsafe
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04 15:46:46 +01:00
Andreas Rheinhardt
5ff030f922 avcodec/pcm: Mark decoders as init-threadsafe
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04 15:46:46 +01:00
Andreas Rheinhardt
5634ce234a avcodec/pcm: Make encoders init-threadsafe
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04 15:46:46 +01:00
Andreas Rheinhardt
6643eaaa30 avcodec/adpcmenc: Mark encoders as init-threadsafe
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04 15:46:46 +01:00
Andreas Rheinhardt
87a5d9821f 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>
2020-12-04 15:46:46 +01:00
Andreas Rheinhardt
868368aa38 avcodec/cdtoons: Mark decoder as init-threadsafe
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04 15:46:46 +01:00
Andreas Rheinhardt
6d4b969515 avcodec/a64multienc: Mark encoders as init-threadsafe
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04 15:46:45 +01:00
Paul B Mahol
51f8848e36 avfilter/af_stereotools: add support for commands 2020-12-04 15:40:42 +01:00
Paul B Mahol
eebf19ccd8 avfilter/af_stereotools: add timeline support 2020-12-04 15:40:42 +01:00
Paul B Mahol
456146356a avfilter/af_stereotools: add two more modes 2020-12-04 11:58:31 +01:00
Marton Balint
87c1b74233 fftools/cmdutils: also print warnings when using -sinks and -sources
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-12-03 18:32:57 +01:00
Marton Balint
a6f6726a81 avdevice/decklink: warn about too old decklink API version
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-12-03 18:32:57 +01:00
Marton Balint
acaf6c625b avdevice/decklink_enc: simplify usage of buffercount type
Also remove some leftover declaration of CreateDeckLinkIteratorInstance().

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-12-03 18:32:57 +01:00
Marton Balint
ff373bb4a8 avdevice/decklink_dec: add support for 50/60 fps timecode
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-12-03 18:32:57 +01:00
Marton Balint
eca12f4d5a avutil/timecode: add av_timecode_init_from_components
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-12-03 18:32:54 +01:00
Marton Balint
2d90d51c56 avutil/timecode: allow drop frame timecodes for multiples of 30000/1001 fps
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-12-03 18:32:13 +01:00
James Almer
53b4550bdd avutil/film_grain_params: fix doxy for ar_coeff_* fields
Signed-off-by: James Almer <jamrial@gmail.com>
2020-12-03 13:25:21 -03:00
Andreas Rheinhardt
0639f5c294 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>
2020-12-02 16:11:50 +01:00
Andreas Rheinhardt
4e26520039 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>
2020-12-02 15:38:15 +01:00
Paul B Mahol
0c8a0d3a56 avfilter/af_acrossover: add per output band gain 2020-12-02 13:54:53 +01:00
Paul B Mahol
13df9bfbcb avutil/avsscanf: fix possible overreads when dealing with %c or %s 2020-12-02 13:54:53 +01:00
Paul B Mahol
b0298ad4e5 avfilter/af_acrossover: remove pointless allocation of static size 2020-12-02 13:54:53 +01:00
Paul B Mahol
0a5ff19643 avfilter/af_acrossover: document roll-off of each filter order 2020-12-02 12:30:10 +01:00
Paul B Mahol
ba6e2a2d05 avfilter/af_acrossover: move coefficients and state to simple arrays 2020-12-01 18:42:57 +01:00
Paul B Mahol
aa3566a8ee avfilter/af_anequalizer: add timeline and slice support 2020-12-01 18:42:28 +01:00
James Almer
c35cf9fe53 avcodec/cbs_h2645: remove dead code in cbs_h2645_replace_ps()
Missed in 0720e15c03. PS units are now guaranteed
to always be reference counter.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-12-01 13:21:23 -03:00
James Almer
233a99e191 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>
2020-12-01 12:31:58 -03:00
James Almer
052b4c3481 avcodec/vaapi_av1: read film grain param values from AV1Frames
Signed-off-by: James Almer <jamrial@gmail.com>
2020-11-30 19:12:39 -03:00
James Almer
6aa45a2769 avcodec/dxva2_av1: read film grain param values from AV1Frames
Signed-off-by: James Almer <jamrial@gmail.com>
2020-11-30 19:12:39 -03:00
James Almer
003aeeb3f6 avcodec/nvdec_av1: read film grain param values from AV1Frames
Signed-off-by: James Almer <jamrial@gmail.com>
2020-11-30 19:12:39 -03:00
James Almer
eee7ba8dba 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>
2020-11-30 19:12:39 -03:00
James Almer
aea80e2273 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>
2020-11-30 19:12:39 -03:00
James Almer
e4c3ec3e00 Revert "avcodec/nvdec_av1: fix setting film grain parameters for frames with update_grain == 0"
This reverts commit f9eec62983.

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>
2020-11-30 19:12:39 -03:00
Paul B Mahol
da83673c8b avfilter/af_agate: add support for commands and timeline 2020-11-30 21:42:09 +01:00
Paul B Mahol
62a0368fb4 avfilter/af_acrossover: remove unneeded emms_c() calls 2020-11-30 14:53:14 +01:00
Paul B Mahol
ca0900bc6e avfilter/af_acrossover: unroll biquad_process loop
Makes code significantly faster for higher orders.
2020-11-30 14:53:14 +01:00
Paul B Mahol
6100a01a7a avfilter/af_acrossover: use fdsp for inverter 2020-11-30 13:45:59 +01:00
Paul B Mahol
263b98bbbd avfilter/af_acrossover: always align nb_samples for fdsp call 2020-11-29 22:10:26 +01:00
Paul B Mahol
400b9ee731 avfilter/af_asupercut: add float sample format support 2020-11-29 21:44:37 +01:00
Michael Niedermayer
7cf852b03c 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>
2020-11-29 16:10:56 +01:00
Michael Niedermayer
9dc3301745 avformat/cafdec: Check the return code from av_add_index_entry()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-11-29 16:10:56 +01:00
Michael Niedermayer
eb46939e3a 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>
2020-11-29 16:10:55 +01:00
Michael Niedermayer
5eed718087 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>
2020-11-29 16:10:55 +01:00
Michael Niedermayer
4bdb7966fa 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>
2020-11-29 16:10:55 +01:00