]> git.sesse.net Git - ffmpeg/log
ffmpeg
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>
3 years agoavfilter/af_asupercut: add order option
Paul B Mahol [Sun, 29 Nov 2020 13:06:44 +0000 (14:06 +0100)]
avfilter/af_asupercut: add order option

3 years agoavfilter/af_acrossover: split in correct spot
Paul B Mahol [Sun, 29 Nov 2020 09:39:13 +0000 (10:39 +0100)]
avfilter/af_acrossover: split in correct spot

Previously split was made in wrong (half of original) position.

3 years agoavfilter/af_acrossover: reduce memory usage
Paul B Mahol [Sun, 29 Nov 2020 09:12:26 +0000 (10:12 +0100)]
avfilter/af_acrossover: reduce memory usage

Split biquad coefficients from biquad state.

3 years agoavcodec/pafvideo: Cleanup generically on init failure
Andreas Rheinhardt [Fri, 27 Nov 2020 17:28:24 +0000 (18:28 +0100)]
avcodec/pafvideo: Cleanup generically on init failure

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/pnmenc: Mark encoders as init-threadsafe
Andreas Rheinhardt [Fri, 27 Nov 2020 13:33:22 +0000 (14:33 +0100)]
avcodec/pnmenc: Mark encoders as init-threadsafe

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/photocd: Mark decoder as init-threadsafe
Andreas Rheinhardt [Fri, 27 Nov 2020 13:23:19 +0000 (14:23 +0100)]
avcodec/photocd: Mark decoder as init-threadsafe

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/pcm-dvdenc: Mark encoder as init-threadsafe
Andreas Rheinhardt [Fri, 27 Nov 2020 13:18:00 +0000 (14:18 +0100)]
avcodec/pcm-dvdenc: Mark encoder as init-threadsafe

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/pcm-dvd: Mark decoder as init-threadsafe
Andreas Rheinhardt [Fri, 27 Nov 2020 13:16:13 +0000 (14:16 +0100)]
avcodec/pcm-dvd: Mark decoder as init-threadsafe

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/pafvideo: Mark decoder as init-threadsafe
Andreas Rheinhardt [Fri, 27 Nov 2020 13:10:44 +0000 (14:10 +0100)]
avcodec/pafvideo: Mark decoder as init-threadsafe

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/pafaudio: Mark decoder as init-threadsafe
Andreas Rheinhardt [Fri, 27 Nov 2020 13:04:45 +0000 (14:04 +0100)]
avcodec/pafaudio: Mark decoder as init-threadsafe

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/cdxl: Mark decoder as init-threadsafe
Andreas Rheinhardt [Fri, 27 Nov 2020 12:37:40 +0000 (13:37 +0100)]
avcodec/cdxl: Mark decoder as init-threadsafe

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/svq1dec: Make decoder init-threadsafe
Andreas Rheinhardt [Fri, 27 Nov 2020 02:29:12 +0000 (03:29 +0100)]
avcodec/svq1dec: Make decoder init-threadsafe

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/a64multienc: Fix memleak upon init failure
Andreas Rheinhardt [Thu, 26 Nov 2020 12:48:09 +0000 (13:48 +0100)]
avcodec/a64multienc: Fix memleak upon init failure

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavfilter/af_asubboost: make wet option apply to final output
Paul B Mahol [Sat, 28 Nov 2020 20:59:14 +0000 (21:59 +0100)]
avfilter/af_asubboost: make wet option apply to final output

Also changes some default values for options after this change.
This makes distinction between feedback and wet option.
Before they would produce same output if values were swapped.

3 years agoavfilter/avf_showfreqs: add group delay data mode
Paul B Mahol [Sat, 28 Nov 2020 19:43:14 +0000 (20:43 +0100)]
avfilter/avf_showfreqs: add group delay data mode

3 years agoavformat/rtspdec: fix potential mem leak in listen mode
Andriy Gelman [Fri, 27 Nov 2020 00:37:21 +0000 (19:37 -0500)]
avformat/rtspdec: fix potential mem leak in listen mode

Currently a repeating setup request (with the same stream id) will
simply overwrite rtp_handle/transport_priv without freeing the
resources first. This is fixed by closing the previous setup request.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
3 years agoavformat/rtspdec: show method request in log
Andriy Gelman [Fri, 27 Nov 2020 00:16:52 +0000 (19:16 -0500)]
avformat/rtspdec: show method request in log

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
3 years agoavfilter/af_acrossover: add option to adjust input gain
Paul B Mahol [Sat, 28 Nov 2020 14:54:10 +0000 (15:54 +0100)]
avfilter/af_acrossover: add option to adjust input gain

3 years agoavfilter/af_acrossover: really fix single-pole allpass coefficients
Paul B Mahol [Sat, 28 Nov 2020 13:37:06 +0000 (14:37 +0100)]
avfilter/af_acrossover: really fix single-pole allpass coefficients

Now LR2, LR6, LR10, LR14 and LR18 have really flat sum.

3 years agodoc/filters: mention when adenorm filter should be placed in graph
Paul B Mahol [Sat, 28 Nov 2020 12:02:13 +0000 (13:02 +0100)]
doc/filters: mention when adenorm filter should be placed in graph

3 years agoavfilter/af_acrossover: remove unecessary allpass calls
Paul B Mahol [Sat, 28 Nov 2020 11:49:25 +0000 (12:49 +0100)]
avfilter/af_acrossover: remove unecessary allpass calls

3 years agoavcodec/utils: Require a non zero channels unless AV_CODEC_CAP_CHANNEL_CONF is set
Michael Niedermayer [Wed, 9 Sep 2020 21:13:02 +0000 (23:13 +0200)]
avcodec/utils: Require a non zero channels unless AV_CODEC_CAP_CHANNEL_CONF is set

This avoids per codec checks for channels not being 0

Fixes: division by 0
Fixes: 25419/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FASTAUDIO_fuzzer-5632544761184256
Fixes: 25433/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FASTAUDIO_fuzzer-6215671900536832
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Suggested-by: Paul B Mahol <onemda@gmail.com>
See: [FFmpeg-devel] [PATCH 1/3] avcodec/fastaudio: Check channel
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec: Set AV_CODEC_CAP_CHANNEL_CONF in more decoders
Michael Niedermayer [Wed, 9 Sep 2020 21:12:32 +0000 (23:12 +0200)]
avcodec: Set AV_CODEC_CAP_CHANNEL_CONF in more decoders

Suggested-by: Paul B Mahol <onemda@gmail.com>
See: [FFmpeg-devel] [PATCH 1/3] avcodec/fastaudio: Check channels
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/af_aemphasis: add timeline/slice and commands support
Paul B Mahol [Fri, 27 Nov 2020 21:32:00 +0000 (22:32 +0100)]
avfilter/af_aemphasis: add timeline/slice and commands support

3 years agoavfilter/af_aemphasis: switch to planar sample format
Paul B Mahol [Fri, 27 Nov 2020 20:51:24 +0000 (21:51 +0100)]
avfilter/af_aemphasis: switch to planar sample format

3 years agodoc/filters: fix several errors/typos
Paul B Mahol [Fri, 27 Nov 2020 20:08:35 +0000 (21:08 +0100)]
doc/filters: fix several errors/typos

3 years agoavfilter/af_acrossover: add support for float sample format
Paul B Mahol [Fri, 27 Nov 2020 17:32:56 +0000 (18:32 +0100)]
avfilter/af_acrossover: add support for float sample format

3 years agoavcodec: deprecate thread_safe_callbacks
Anton Khirnov [Fri, 22 May 2020 13:59:46 +0000 (15:59 +0200)]
avcodec: deprecate thread_safe_callbacks

They add considerable complexity to frame-threading implementation,
which includes an unavoidably leaking error path, while the advantages
of this option to the users are highly dubious.

It should be always possible and desirable for the callers to make their
get_buffer2() implementation thread-safe, so deprecate this option.

3 years agoavfilter/af_acrossover: fix single pole allpass coefficients
Paul B Mahol [Fri, 27 Nov 2020 14:33:13 +0000 (15:33 +0100)]
avfilter/af_acrossover: fix single pole allpass coefficients

3 years agodoc/filters: document adenorm commands support
Paul B Mahol [Fri, 27 Nov 2020 13:34:13 +0000 (14:34 +0100)]
doc/filters: document adenorm commands support

3 years agodoc/filters: add acrossover examples
Paul B Mahol [Fri, 27 Nov 2020 13:27:06 +0000 (14:27 +0100)]
doc/filters: add acrossover examples

3 years agoavfilter/af_acrossover: improve quality for odd order butterworth
Paul B Mahol [Fri, 27 Nov 2020 11:42:58 +0000 (12:42 +0100)]
avfilter/af_acrossover: improve quality for odd order butterworth

3 years agoavfilter/avf_showfreqs: implement phase display
Paul B Mahol [Thu, 26 Nov 2020 22:26:04 +0000 (23:26 +0100)]
avfilter/avf_showfreqs: implement phase display

3 years agohwcontext_vulkan: reduce priority for PACK32 formats
Lynne [Fri, 27 Nov 2020 01:54:23 +0000 (02:54 +0100)]
hwcontext_vulkan: reduce priority for PACK32 formats

Due to some endian-dependent overlap, these should be used last.

3 years agoavutil/film_grain_params: add more details to some AVFilmGrainAOMParams fields
James Almer [Thu, 26 Nov 2020 20:29:35 +0000 (17:29 -0300)]
avutil/film_grain_params: add more details to some AVFilmGrainAOMParams fields

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agolavu/film_grain_params: fix typo in type enum
Lynne [Fri, 27 Nov 2020 01:12:10 +0000 (02:12 +0100)]
lavu/film_grain_params: fix typo in type enum

Ref: xkcd #1015

3 years agoavformat/mpc8: correct integer overflow in mpc8_parse_seektable()
Michael Niedermayer [Fri, 30 Oct 2020 20:50:32 +0000 (21:50 +0100)]
avformat/mpc8: correct integer overflow in mpc8_parse_seektable()

Fixes: signed integer overflow: -4683718486770919638 * 2 cannot be represented in type 'long'
Fixes: 26704/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-6327056939614208
Fixes: 27550/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-6259212652642304
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/mpc8: correct 32bit timestamp truncation
Michael Niedermayer [Tue, 3 Nov 2020 00:14:26 +0000 (01:14 +0100)]
avformat/mpc8: correct 32bit timestamp truncation

Fixes: left shift of 65536 by 15 places cannot be represented in type 'int'
Fixes: 26801/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-5164313092030464
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: Fix memleak in dref reading
Michael Niedermayer [Fri, 30 Oct 2020 20:44:12 +0000 (21:44 +0100)]
avformat/mov: Fix memleak in dref reading

Fixes: leak in mov_read_dref()
Fixes: 26698/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5638785444085760
Fixes: 27554/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6256643054239744
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: add asupercut filter
Paul B Mahol [Mon, 23 Nov 2020 17:45:54 +0000 (18:45 +0100)]
avfilter: add asupercut filter

3 years agoavfilter/af_acrossover: add missing allpass processing
Paul B Mahol [Thu, 26 Nov 2020 14:36:16 +0000 (15:36 +0100)]
avfilter/af_acrossover: add missing allpass processing

3 years agoavformat/flacenc: Fix memleak when writing attached pictures fails
Andreas Rheinhardt [Fri, 20 Nov 2020 16:36:39 +0000 (17:36 +0100)]
avformat/flacenc: Fix memleak when writing attached pictures fails

The FLAC muxer currently stores an attached picture corresponding to an
AVStream in AVStream.priv_data. The AVPacket contained therein is
unreferenced after it has been written. The AVPacket structure itself is
then freed generically as AVStream.priv_data.

And this can lead to memleaks if an attached picture is not written:
It might be because the trailer is never written or because writing
a previous attached picture failed in case error_recognition is set
to explode.

Therefore free the packets properly (i.e. with av_packet_free())
in the muxer's deinit function.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavfilter/af_acrossover: add missing inverter as last step
Paul B Mahol [Thu, 26 Nov 2020 12:13:42 +0000 (13:13 +0100)]
avfilter/af_acrossover: add missing inverter as last step

3 years agoavfilter/af_acrossover: simplify coefficients
Paul B Mahol [Thu, 26 Nov 2020 10:53:17 +0000 (11:53 +0100)]
avfilter/af_acrossover: simplify coefficients

3 years agoavfilter/af_acrossover: add even more orders
Paul B Mahol [Thu, 26 Nov 2020 10:19:51 +0000 (11:19 +0100)]
avfilter/af_acrossover: add even more orders

3 years agoavfilter/af_acrossover: use transposed direct II form
Paul B Mahol [Wed, 25 Nov 2020 21:23:50 +0000 (22:23 +0100)]
avfilter/af_acrossover: use transposed direct II form

3 years agoavfilter/af_acrossover: rewrite code so it performs faster
Paul B Mahol [Wed, 25 Nov 2020 21:01:53 +0000 (22:01 +0100)]
avfilter/af_acrossover: rewrite code so it performs faster

3 years agoavfilter/af_acrossover: add higher orders
Paul B Mahol [Wed, 25 Nov 2020 19:56:17 +0000 (20:56 +0100)]
avfilter/af_acrossover: add higher orders

3 years agodoc/filters: fix typo in overlay_cuda
Gyan Doshi [Thu, 26 Nov 2020 10:46:01 +0000 (16:16 +0530)]
doc/filters: fix typo in overlay_cuda

3 years agolibdav1d: correctly copy ar_coeffs_uv to our struct
Lynne [Wed, 25 Nov 2020 22:46:29 +0000 (23:46 +0100)]
libdav1d: correctly copy ar_coeffs_uv to our struct

Our struct is a [2][25], libdav1d's is a [2][25 + 3] so the last 3
v coefficients were missing.
Copy each plane's coefficients separately.

3 years agohwcontext_vulkan: optionally enable more functionality
Niklas Haas [Wed, 25 Nov 2020 11:50:33 +0000 (12:50 +0100)]
hwcontext_vulkan: optionally enable more functionality

These two extensions and two features are both optionally used by
libplacebo to speed up rendering, so it makes sense for libavutil to
automatically enable them as well.

3 years agohwcontext_vulkan: support additional pixel formats
Lynne [Mon, 23 Nov 2020 21:10:24 +0000 (22:10 +0100)]
hwcontext_vulkan: support additional pixel formats

We support every single packed format possible now.
There are some fringe leftover mappings which are uninteresting.

3 years agohwcontext_vulkan: fix incorrect A/0BGR mapping
Lynne [Mon, 23 Nov 2020 21:07:25 +0000 (22:07 +0100)]
hwcontext_vulkan: fix incorrect A/0BGR mapping

Vulkan formats with a PACK suffix define native endianess.
Vulkan formats without a PACK suffix are in bytestream order.

Pixel formats with a LE/BE suffix define endianess.
Pixel formats without LE/BE suffix are in bytestream order.

3 years agohwcontext_vulkan: simplify plane size calculations and support 4-plane formats
Lynne [Wed, 25 Nov 2020 21:32:48 +0000 (22:32 +0100)]
hwcontext_vulkan: simplify plane size calculations and support 4-plane formats

Needed to support YUVA.

3 years agohwcontext_vulkan: do not segfault when failing to init a AVHWFramesContext
Lynne [Wed, 25 Nov 2020 11:06:00 +0000 (12:06 +0100)]
hwcontext_vulkan: do not segfault when failing to init a AVHWFramesContext

frames_uninit is always called on failure, and the free_exec_ctx function
did not zero the pool when freeing it, so it resulted in a double free.

3 years agohwcontext_vulkan: always attempt to map host memory when transferring
Lynne [Tue, 24 Nov 2020 23:20:06 +0000 (00:20 +0100)]
hwcontext_vulkan: always attempt to map host memory when transferring

This relies on the fact that host memory is always going to be required
to be aligned to the platform's page size, which means we can adjust
the pointers when we map them to buffers and therefore skip an entire
copy. This has already had extensive testing in libplacebo without
problems, so its safe to use here as well.

Speeds up downloads and uploads on platforms which do not pool their
memory hugely, but less so on platforms that do.

We can pool the buffers ourselves, but that can come as a later patch
if necessary.

3 years agohwcontext_vulkan: check for memory size before choosing type
Lynne [Tue, 24 Nov 2020 22:36:08 +0000 (23:36 +0100)]
hwcontext_vulkan: check for memory size before choosing type

It makes allocation a bit more robust in case some weird device with
weird drivers which segments memory in weird ways appears.

3 years agohwcontext_vulkan: correctly access the p->extensions bitmask
Lynne [Tue, 24 Nov 2020 13:05:22 +0000 (14:05 +0100)]
hwcontext_vulkan: correctly access the p->extensions bitmask

Its a 64-bit bitfield being put directly into an int.

3 years agohwcontext_vulkan: unify download/upload functions
Lynne [Tue, 24 Nov 2020 12:36:23 +0000 (13:36 +0100)]
hwcontext_vulkan: unify download/upload functions

They were identical, save for variable names and order.

3 years agohwcontext_vulkan: add VkExternalMemoryBufferCreateInfo to imported buffers
Lynne [Sun, 22 Nov 2020 21:48:14 +0000 (22:48 +0100)]
hwcontext_vulkan: add VkExternalMemoryBufferCreateInfo to imported buffers

Its a validation layer thing.

3 years agohwcontext_vulkan: do not use uninitialized variables on errors in CUDA code
Lynne [Sun, 22 Nov 2020 21:56:33 +0000 (22:56 +0100)]
hwcontext_vulkan: do not use uninitialized variables on errors in CUDA code

3 years agolavfi/vulkan: allow calling glslang_uninit without a prior init
Lynne [Sun, 22 Nov 2020 22:08:33 +0000 (23:08 +0100)]
lavfi/vulkan: allow calling glslang_uninit without a prior init

Allows us to uninit cleanly.
This assert was also somewhat pointless as we assert every other
function, so another assert would be triggered long before this
one is.

3 years agohwcontext_drm: issue DMA_BUF_IOCTL_SYNC when mapping FDs
Lynne [Fri, 20 Nov 2020 17:23:42 +0000 (18:23 +0100)]
hwcontext_drm: issue DMA_BUF_IOCTL_SYNC when mapping FDs

This improves performance and helps a little when given FDs without
any synchronization fences.

3 years agolibdav1d: use film grain export flag to export AVFilmGrainParams side data
Lynne [Thu, 12 Nov 2020 11:48:20 +0000 (12:48 +0100)]
libdav1d: use film grain export flag to export AVFilmGrainParams side data

This patch is relatively straightforward with one exception:
the decoder option flag.
The option was introduced to troubleshoot but its existence is conflicting
and redundant now that we have a codec-generic flag.
Hence this patch deprecates it.

The way it interacts with AV_CODEC_EXPORT_DATA_FILM_GRAIN is as follows:

If filmgrain is unset and AV_CODEC_EXPORT_DATA_FILM_GRAIN is
present, disable film grain application and export side data.

If filmgrain is set to 0, disable film grain and export side data.

If filmgrain is set to 1, apply film grain but export side data if
the AV_CODEC_EXPORT_DATA_FILM_GRAIN flag is set. This may result in
double film grain application, but the user has requested it by setting
both.

3 years agolibavcodec: add a new AV_CODEC_EXPORT_DATA_FILM_GRAIN flag and option
Lynne [Thu, 12 Nov 2020 16:46:09 +0000 (17:46 +0100)]
libavcodec: add a new AV_CODEC_EXPORT_DATA_FILM_GRAIN flag and option

This introduces a new field to allow decoders to export their film grain
parameters.
Will be used by the next patch.

3 years agolibavutil: introduce AVFilmGrainParams side data
Lynne [Thu, 12 Nov 2020 11:44:30 +0000 (12:44 +0100)]
libavutil: introduce AVFilmGrainParams side data

This patch introduces a new frame side data type AVFilmGrainParams for use
with video codecs which support it.

It can save a lot of memory used for duplicate processed reference frames and
reduce copies when applying film grain during presentation.

3 years agoavfilter/af_arnndn: add timeline support
Paul B Mahol [Wed, 25 Nov 2020 12:36:57 +0000 (13:36 +0100)]
avfilter/af_arnndn: add timeline support

3 years agoavcodec/mpeg12enc: Reindentation
Andreas Rheinhardt [Tue, 24 Nov 2020 13:43:46 +0000 (14:43 +0100)]
avcodec/mpeg12enc: Reindentation

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/mpeg12enc: Use ff_thread_once() for static initializations
Andreas Rheinhardt [Tue, 24 Nov 2020 13:39:47 +0000 (14:39 +0100)]
avcodec/mpeg12enc: Use ff_thread_once() for static initializations

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/mpeg12enc: Always initialize MPEG-2 intra VLC table lengths
Andreas Rheinhardt [Tue, 24 Nov 2020 12:29:29 +0000 (13:29 +0100)]
avcodec/mpeg12enc: Always initialize MPEG-2 intra VLC table lengths

The MPEG-1/2 encoders initialize several tables once during the first
time one of the encoders is initialized; the table for MPEG-2 intra VLC
lengths is only initialized if it is used for this encoder instance.
This implies that if the first MPEG-1/2 encoder to be initialized does
not use it, it will never be initialized even if a later encoder
instance makes use of them. Fix this by initializing this table
unconditionally.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavfilter/vf_readeia608: add support for slice threads
Paul B Mahol [Tue, 24 Nov 2020 21:14:14 +0000 (22:14 +0100)]
avfilter/vf_readeia608: add support for slice threads

3 years agoavfilter/vf_readeia608: add support for commands
Paul B Mahol [Tue, 24 Nov 2020 19:52:22 +0000 (20:52 +0100)]
avfilter/vf_readeia608: add support for commands

3 years agoavfilter/vf_xfade: ensure metadata is copied to transition frames
Musee Ullah [Mon, 23 Nov 2020 19:52:01 +0000 (13:52 -0600)]
avfilter/vf_xfade: ensure metadata is copied to transition frames

I was having an issue where, using a filter chain of xfade -> ass, the
colors on the subtitles were incorrect only on the frames where xfade
was being used. This resolves that issue for me.

Signed-off-by: Musee Ullah <lae@lae.is>
3 years agoavfilter/af_biquads: make sure that biquad filter still works
Paul B Mahol [Tue, 24 Nov 2020 13:24:18 +0000 (14:24 +0100)]
avfilter/af_biquads: make sure that biquad filter still works

3 years agoavfilter/af_biquads: do not abort filtering on bogus options
Paul B Mahol [Tue, 24 Nov 2020 10:49:19 +0000 (11:49 +0100)]
avfilter/af_biquads: do not abort filtering on bogus options

Instead, continue returning unfiltered input.

3 years agoavcodec/mlpdec: Avoid code duplication when initializing VLCs
Andreas Rheinhardt [Fri, 20 Nov 2020 23:24:33 +0000 (00:24 +0100)]
avcodec/mlpdec: Avoid code duplication when initializing VLCs

Reviewed-by: Jai Luthra <me@jailuthra.in>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/mlpdec: Make decoders init-threadsafe
Andreas Rheinhardt [Fri, 20 Nov 2020 23:15:49 +0000 (00:15 +0100)]
avcodec/mlpdec: Make decoders init-threadsafe

Reviewed-by: Jai Luthra <me@jailuthra.in>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>