Commit Graph

109147 Commits

Author SHA1 Message Date
Michael Niedermayer
0871cb9499
avcodec/vqcdec: Check for end of input in decode_vectors()
Fixes: Timeout
Fixes: 52695/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQC_fuzzer-4882310386548736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-11-20 21:23:57 +01:00
Michael Niedermayer
6634b6ae5f
avcodec/apac: reset buffer on error
Fixes: repeatly parsing the same data after each 1 byte packet
Fixes: Timeout
Fixes: 51943/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APAC_fuzzer-5779018251370496

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-11-20 21:23:35 +01:00
Christopher Degawa
96748ac54f avcodec/libsvtav1: only set max_buf_sz if both bitrate and rc_buf_sz is set
maximum_buffer_size_ms should only be set if both are specified or if
the user sets it through -svtav1-params buf-sz=val

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
2022-11-20 16:20:14 -03:00
Paul B Mahol
34eeb466fb avfilter/af_surround: fix possible out of array access 2022-11-19 19:35:23 +01:00
Hirokazu Honda
7f3e38bda8 avcodec/vp8: Fix wrong vpx_rac_is_end() check
The check of vpx_rac_is_end check(s) are added originally from
1afd246960. It causes a regression
of some vp8 stream. b6b9ac5698 fixes
the regression by a sort of band-aid way. This fixes the wrongness
of the original commit. vpx_rac_is_end() should be called against
the bool decoder for the vp8 headr context, not one for each
coefficient. Reference is vp8_dixie_tokens_process_row() in token.c
in spec 20.16.

Fixes: Ticket 8069
Fixes: regression of 1afd246960.
Fixes: b6b9ac5698

Co-authored-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2022-11-19 10:04:01 -05:00
Paul B Mahol
66afa361e8 avfilter/af_surround: refactor code
So support for new i/o layouts are more easily added.
2022-11-19 15:20:23 +01:00
Niklas Haas
46a4cc460e avfilter/vf_libplacebo: fix normalize_sar calculation
This previous expression multiplied a constant (outlink->h) that was
guaranteed to be 0 at this point, thus making it always a no-op.

Fix the calculation, and also properly reset the SAR to 1:1 as is now
necessary (the failure to do so previously hid this bug's existence).
2022-11-19 14:15:47 +01:00
Niklas Haas
05d390890a avfilter/vf_libplacebo: default to normalize_sar=0
As a result of a typo in the source code, this option was completely
non-functional. In order to fix it, without breaking the current default
behavior, explicitly change this default to 0.

This behavior is also consistent with how other scale filters behave by
default, so it's probably best to enshrine it anyways.
2022-11-19 14:15:19 +01:00
Paul B Mahol
3bcec58535 avfilter: fix av_tx_fn stride usage for complex inputs 2022-11-19 00:25:47 +01:00
Paul B Mahol
fced45fd95 avfilter/af_surround: improve LFE loudness 2022-11-18 21:51:10 +01:00
Paul B Mahol
52291d2ac8 avfilter/af_surround: implement smooth option/support 2022-11-18 21:51:10 +01:00
Paul B Mahol
3d33003d59 avfilter/af_surround: split factors calculations
From multiplication with magnitude.
2022-11-18 21:51:10 +01:00
Paul B Mahol
08b4c3d6d6 avfilter/af_surround: improve front center channel
Stops producing too loud output of front center channel in stereo upmix
by using average magnitude instead of square root of squared magnitudes.
2022-11-18 21:51:10 +01:00
Niklas Haas
12b4ab5d4d avfilter/vf_libplacebo: fix output format selection
After commit c0b93, it's possible that `ff_vk_filter_config_input` never
gets called, leading to `s->vkctx.input_format` being left unset. This
broke the format auto-selection logic in `libplacebo_config_output`,
resulting in a default to yuv420p, instead of defaulting to the input
format as intended.

Fixes: c0b93c4f8b
2022-11-18 16:14:23 +01:00
Niklas Haas
d1b14b4f0b avfilter/vf_libplacebo: suppress warning on older libplacebo
Move the declaration before the code.
2022-11-18 16:11:01 +01:00
Paul B Mahol
3e6816514c avfilter/af_surround: fix regression with channel i/o gain 2022-11-18 12:58:09 +01:00
Paul B Mahol
193270ee87 avfilter/avf_showspectrum: fix stride and set scale 2022-11-18 12:58:09 +01:00
Zhao Zhili
36a8d1e729 avcodec/libx265: fix build error
x265_sei is available since X265_BUILD 88. Bump required version
to 89 to fix the regression from commit 1f58503013, and remove a
conditional compilation.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-11-18 23:18:21 +08:00
Paul B Mahol
00409d81d9 avfilter/af_surround: simplify some code more 2022-11-18 00:53:51 +01:00
Christopher Degawa
1c6fd7d756 avcodec/libsvtav1: replace vbv_bufsize with maximum_buffer_size_ms
svt-av1 v1.2.0 has deprecated vbv_bufsize in favor of using
- maximum_buffer_size_ms (--buf-sz)
- starting_buffer_level_ms (--buf-initial-sz)
- optimal_buffer_level_ms (--buf-optimal-sz)

and vbv_bufsize has not been in use since svt-av1 v0.8.6

Signed-off-by: Christopher Degawa <christopher.degawa@intel.com>
2022-11-17 20:27:33 -03:00
Christopher Degawa
031f1561cd avcodec/libsvtav1: remove compressed_ten_bit_format and simplify alloc_buffer
compressed_ten_bit_format has been deprecated upstream and has no effect
and can be removed. Plus, technically it was never used in the first place
since it would require the app (ffmpeg) to set it and do additional
processing of the input frames.

Also simplify alloc_buffer by removing calculations relating to the
non-existant processing.

Signed-off-by: Christopher Degawa <christopher.degawa@intel.com>
2022-11-17 20:27:33 -03:00
Paul B Mahol
2e53376a9b avfilter/af_surround: add more layouts for stereo upmix 2022-11-17 20:27:31 +01:00
James Almer
63db6a02a7 avformat/concatdec: check that there's extradata before trying to copy it
The first argument for memcpy must not be NULL.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-17 10:53:20 -03:00
James Almer
cb925c0bc0 avformat/vpcc: parse bitstream data to get profile and bitdepth
Profile can be derived from values codecpar pixel format only with software
formats. For hardware formats, we're forced to parse a frame header to get
the required information.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-17 10:05:49 -03:00
Paul B Mahol
e9a67ababa avcodec/rpzaenc: count in packet size also fixed header 2022-11-17 13:54:52 +01:00
Paul B Mahol
4f6c06e8ff avfilter/af_firequalizer: switch to TX from lavu 2022-11-17 13:28:58 +01:00
Paul B Mahol
59b16355ec avfilter/avf_showspatial: switch to lavu TX
Also try harder to make output constant frame rate.
2022-11-17 12:37:22 +01:00
Paul B Mahol
24cd4c9661 avfilter/af_loudnorm: simplify query_formats() 2022-11-17 12:37:22 +01:00
Martin Storsjö
cc6312dd3b fate: Mark the tiff-zip-* tests as requiring zlib
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-11-17 13:23:14 +02:00
Anton Khirnov
6a3e174ad1 doc/developer.texi: refine the "contributing code" section
Drop the reference to directly committing code, because
- it is highly discouraged and very rarely done these days
- there is no good reason NOT to submit patches for review

Add a link to the development policy chapter.
2022-11-17 10:58:30 +01:00
Anton Khirnov
66871647dc doc/developer.texi: demote the "contributing" chapter to a section
It is very short and its main functions is linking to the
coding rules/submitting patches chapters.
2022-11-17 10:58:20 +01:00
Anton Khirnov
c0c492dd47 doc/developer.texi: extend the argument for submitting patches
Stop talking about commercial programs, since this applies to any
downstream user.
2022-11-17 10:57:37 +01:00
Anton Khirnov
26080d1542 doc/developer.texi: improve the introductory text
Remove confusing references to "external" vs. "internal" developers.
2022-11-17 10:56:48 +01:00
Anton Khirnov
b58264217b fftools/ffmpeg_mux_init: drop an always-false check
It cannot be true since 1959351aec. Effectively reverts 6a3833e141.
2022-11-17 10:52:58 +01:00
Anton Khirnov
13947aff3f fftools/ffmpeg_mux_init: use av_dict_iterate() where appropriate 2022-11-17 10:52:58 +01:00
Anton Khirnov
19e192eae6 fftools/ffmpeg_mux_init: do not call av{codec,format}_get_class() repeatedly 2022-11-17 10:52:58 +01:00
Anton Khirnov
52380a055b fftools/ffmpeg_mux_init: move validating codec avoptions to a separate function 2022-11-17 10:52:58 +01:00
Anton Khirnov
0fb7d111e8 fftools/ffmpeg: move OutputStream.max_frames to MuxStream
It no longer needs to be visible outside of the muxing code.
2022-11-17 10:52:58 +01:00
Anton Khirnov
25620b69e0 fftools/ffmpeg: stop handling max_frames in do_video_out()
Frame limiting is now handled using sync queues. This code prevents the
sync queue from triggering EOF, resulting in unnecessarily many frames
being decoded, filtered, and then discarded.

Found-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2022-11-17 10:52:58 +01:00
Anton Khirnov
6a8145a4b1 fftools/ffmpeg_mux_init: move more code from of_open() to create_streams()
Specificaly, the of_add_attachments() call (which can add attachment
streams to the output) and the check whether the output file contains
any streams. They both logically belong in create_streams().
2022-11-17 10:52:58 +01:00
Anton Khirnov
1b076556c6 fftools/ffmpeg: simplify ost_iter()
The inner loop never goes through more than 1 iteration, and so can be
replaced by an if().

Found-by: Andreas Rheinhardt
2022-11-17 10:52:58 +01:00
Paul B Mahol
07357e56a6 avfilter/avf_showspectrum: fix possible hang at EOF
May happen when using filter fps option.
2022-11-17 01:15:05 +01:00
Paul B Mahol
a640b2874a avfilter/af_surround: allow non-power of 2 win_size 2022-11-17 00:01:40 +01:00
Paul B Mahol
404c2955b1 avfilter/af_surround: move upmix before irdft 2022-11-16 20:40:04 +01:00
Paul B Mahol
d770403cac avfilter/af_surround: refactor some code 2022-11-16 20:40:04 +01:00
Anton Khirnov
822da7a317 fftools/ffmpeg: make demuxing with one file always blocking 2022-11-16 08:41:14 +01:00
Anton Khirnov
c15eb2773a fftools/ffmpeg_[de]mux: constify all uses of OptionsContext 2022-11-16 08:41:14 +01:00
Anton Khirnov
4119480681 fftools/ffmpeg_mux_init: stop using OptionsContext as storage in copy_metadata()
It should be input-only to this code. Will allow making it const in
future commits.
2022-11-16 08:41:14 +01:00
Anton Khirnov
3c7dd5ed37 fftools/ffmpeg_mux_init: drop a duplicated block in copy_metadata()
It does the same thing as the block right below it.
2022-11-16 08:41:14 +01:00
Mark Reid
15df8261be avcodec/tiff: add read support for compressed rgb floating point formats
floating point uses a slightly different predictor technique describe here
http://chriscox.org/TIFFTN3d1.pdf

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-11-16 08:41:14 +01:00