Commit Graph

109110 Commits

Author SHA1 Message Date
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
Aidan MacDonald
a4405cc0cc avcodec/dvdsub_parser: Fix length check for short packets
The DVD subtitle parser handles two types of packets: "normal"
packets with a 16-bit length, and HD-DVD packets that set the
16-bit length to 0 and encode a 32-bit length in the next four
bytes. This implies that HD-DVD packets are at least six bytes
long, but the code didn't actually verify this.

The faulty length check results in an out of bounds read for
zero-length "normal" packets that occur in the input, which are
only 2 bytes long, but get misinterpreted as an HD-DVD packet.
When this happens the parser reads packet_len from beyond the
end of the input buffer. The subtitle stream is not correctly
decoded after this point due to the garbage packet_len.

Fixing this is pretty simple: fix the length check so packets
less than 6 bytes long will not be mistakenly parsed as HD-DVD
packets.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-11-16 08:41:14 +01:00
James Almer
b119b3da1e fftools/ffprobe: support 2D arrays in print_list_fmt()
Should fix undefined behavior.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-15 23:18:48 -03:00
Martijn van Beurden
bf6c500cff
libavcodec/flacenc: Enable sample rates > 655350 Hz
Also, make use of the full sample rate code table

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-11-15 22:59:11 +01:00
Paul B Mahol
752039a9eb avfilter/af_surround: add support for commands 2022-11-15 19:52:38 +01:00
Paul B Mahol
64031c5e65 avfilter/af_surround: add focus option
And improve angle option handling.
2022-11-15 19:52:38 +01:00
Niklas Haas
c0b93c4f8b avfilter/vf_libplacebo: support all supported pixfmts
This is done only to the inputs, not the outputs, because we always
output vulkan hwframes.

Doing so also requires keeping track of backing textures for non-hwdec
formats, but is otherwise a mostly straightforward change to the format
query function. Special care needs to be taken to avoid crashing on
older libplacebo due to AV_PIX_FMT_RGBF32LE et al.
2022-11-15 16:47:55 +01:00
Niklas Haas
be13812a23 avfilter/vf_libplacebo: init vulkan device in query_format
Instead of doing it ad-hoc in `filter_frame`. This is not a huge change
on its own, but paves the way for adding support for more formats in the
future, in particular formats other than AV_PIX_FMT_VULKAN.
2022-11-15 16:47:55 +01:00
Cosmin Stejerean
3b375a0c5c lavfi/vf_dnn_processing.c: Fix missing AV_PIX_FMT_GRAY8
Has been removed by mistake in 2003e32f62, readd it to the switch cases.

Signed-off-by: Thilo Borgmann <thilo.borgmann@mail.de>
2022-11-15 13:42:58 +01:00
Paul B Mahol
52f7adfbde avfilter/af_surround: add forgotten null pointer check 2022-11-15 10:42:30 +01:00
Paul B Mahol
11d744343f avfilter/af_surround: avoid using doubles 2022-11-15 10:42:30 +01:00
Timo Rothenpieler
eb1e359a14 avcodec/nvenc: use provided constant for max extradata size 2022-11-15 01:32:56 +01:00
Timo Rothenpieler
c7a60124e3 avcodec/nvenc: add forgotten X2RGB10 formats to 10-bit-list 2022-11-14 23:10:20 +01:00
Paul B Mahol
9bbd3b3b17 avfilter/af_surround: check that upmix func ptr is valid 2022-11-14 22:20:44 +01:00
Paul B Mahol
e0fbf89939 avfilter/af_surround: speed up slice threading for stereo upmixing
And add stereo->octagonal/8.0 upmix.
2022-11-14 22:04:14 +01:00
Michael Niedermayer
104b516a13
avcodec/bonk: step cannot become 0 without overflowing which is undefined
also the original reference code does not contain a 0 check

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-11-14 21:52:51 +01:00
Michael Niedermayer
5df8c300a9
avcodec/bonk: actual_run seems not able to become negative
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-11-14 21:52:51 +01:00
Michael Niedermayer
00b489b168
avcodec/bonk: Remove special 32bit case from read_uint_max()
This case seems not to match the reference decoder and it also
seems not reachable

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-11-14 21:52:51 +01:00
bwang30
3ab11dc5bb libavfilter/x86/vf_convolution: add sobel filter optimization and unit test with intel AVX512 VNNI
This commit enabled assembly code with intel AVX512 VNNI and added unit test for sobel filter

sobel_c: 4537
sobel_avx512icl 2136

Signed-off-by: bwang30 <bin.wang@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-11-14 10:04:16 +08:00
Paul B Mahol
2d25f33a7e avcodec/smcenc: unbreak skip blocks for inter coding
When using frames with different linesize.
2022-11-13 00:52:19 +01:00
Paul B Mahol
163f1949ed avcodec/smcenc: more y<height checks to fix invalid reads 2022-11-13 00:19:57 +01:00
Paul B Mahol
31e1b614f6 avcodec/rpzaenc: stop assuming prev and current frame linesize match 2022-11-13 00:19:57 +01:00
rcombs
5d7de322d4 lavc: bump micro version
Needed after adding an AVOption in 9a4b318286
2022-11-12 13:40:45 -06:00
rcombs
9a4b318286 lavc/libaribb24: add default_profile option
This allows decoding of streams that don't have a profile tagged
(e.g. ones that were remuxed improperly).
2022-11-12 13:38:05 -06:00
James Almer
84fe53f6e1 avutil/hwcontext_cuda: fix compilation without Vulkan after last commit
Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-12 15:54:53 -03:00
James Almer
f4aa5c275f avutil/hwcontext_cuda: fix mixed declarations and code warning
Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-12 15:52:10 -03:00
Paul B Mahol
92f9b28ed8 avcodec/rpzaenc: stop accessing out of bounds frame 2022-11-12 16:15:57 +01:00
Paul B Mahol
13c1310975 avcodec/smcenc: stop accessing out of bounds frame 2022-11-12 15:23:11 +01:00
Andreas Rheinhardt
bfab87a61d avfilter/vf_fftdnoiz: Check return value of av_tx_init()
Should fix Coverity issue #1500329.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-12 13:36:31 +01:00
Andreas Rheinhardt
c787eab395 avfilter/af_afir: Check return value of av_tx_init()
Should fix Coverity issue #1516762.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-12 13:35:45 +01:00
Andreas Rheinhardt
36d0550bc9 avfilter/vf_fftfilt: Check return value of av_tx_init()
Should fix Coverity issue #1516765.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-12 13:33:58 +01:00
Andreas Rheinhardt
b6fcf3a617 avfilter/af_surround: Check return value of av_tx_init()
Should fix Coverity issue #1516766.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-12 13:24:35 +01:00
Peter Ross
b653352bd8 avcodec/siren: indent 2022-11-12 11:23:04 +11:00
Andreas Rheinhardt
c124981b79 avutil/cast5: Avoid undefined shift of uint32_t by 32 places
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-11 12:24:23 +01:00
Andreas Rheinhardt
e2d397a9ef avcodec/mpeg4data: Move ff_mpeg4_resync_prefix to its only user
This array is only ever useful to a decoder.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-11 12:24:23 +01:00
Andreas Rheinhardt
f56ca21dd4 avcodec/h261dec: Don't update block_index unnecessarily
block_index is write-only for the H.261 decoder, so
don't update it by calling ff_update_block_index().
Instead use a function of our own to set/update dest.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-11 12:24:23 +01:00
Andreas Rheinhardt
e559f8428f avcodec: Remove unnecessary fft, dct inclusions
Also remove some internal.h inclusions which have been
unnecessarily added recently.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-11 12:22:47 +01:00
Michael Niedermayer
8e59e72041
avcodec/bonk: steplet cannot become negative
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-11-10 21:14:23 +01:00