Commit Graph

107317 Commits

Author SHA1 Message Date
Paul B Mahol afc7679c89 avcodec/mace: fix some style issues 2022-06-16 10:23:30 +02:00
Paul B Mahol d39f9feddc avfilter: add virtualbass filter 2022-06-16 10:23:30 +02:00
Gyan Doshi 557a1a8af2 doc/APIchanges: add missing marker for release 5.0 2022-06-16 12:52:24 +05:30
Andreas Rheinhardt 2c882f4708 avcodec/exif: Move tag_list out of header
It is only used by exif.c (and e.g. EXIF_TAG_NAME_LENGTH
is an implementation detail anyway).
Also remove the sentinel, as it is used in conjunction
with FF_ARRAY_ELEMS.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-15 04:58:14 +02:00
Andreas Rheinhardt ca2c60b060 swresample/noise_shaping_data: Remove unused tables
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-15 04:58:14 +02:00
Andreas Rheinhardt 40e6575aa3 all: Replace if (ARCH_FOO) checks by #if ARCH_FOO
This is more spec-compliant because it does not rely
on dead-code elimination by the compiler. Especially
MSVC has problems with this, as can be seen in
https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296373.html
or
https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/297022.html

This commit does not eliminate every instance where we rely
on dead code elimination: It only tackles branching to
the initialization of arch-specific dsp code, not e.g. all
uses of CONFIG_ and HAVE_ checks. But maybe it is already
enough to compile FFmpeg with MSVC with whole-programm-optimizations
enabled (if one does not disable too many components).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-15 04:56:37 +02:00
Michael Niedermayer e5f6707a7b avformat/ape: more bits in size for less overflows
Fixes: signed integer overflow: 2147483647 + 3 cannot be represented in type 'int'
Fixes: 46184/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-4678059519770624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-06-14 16:46:28 +02:00
Michael Niedermayer b97e58da44 avcodec/binkaudio: Clear state on EAGAIN
Its not supported to maintain a frame as receive_frame() argument
over multiple calls
Fixes: store to null pointer of type 'FFTSample' (aka 'float')
Fixes: 46231/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINKAUDIO_DCT_fuzzer-6276566037954560
Fixes: ACDC.smo

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-06-14 16:46:28 +02:00
Michael Niedermayer 9274fb2532 avformat/mov: Non overflowing ambisonic order check
Fixes: signed integer overflow: 536870913 * 536870913 cannot be represented in type 'int'
Fixes: 45862/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4730373768085504

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-06-14 16:46:28 +02:00
Zane van Iperen 9874baf2cd doc/APIchanges: add missing uuid and csp entries
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2022-06-13 22:04:36 -03:00
Zane van Iperen ff59ecc4de avutil: bump version after UUID changes
Forgot to bump after 76e95daa08.

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2022-06-13 22:01:28 -03:00
Andreas Rheinhardt 0e8a5ded7e swresample/resample: Remove unnecessary emms_c
The last MMX code in swresample has just been removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-14 01:28:29 +02:00
Andreas Rheinhardt dd61d6489b swresample/x86/resample: Remove obsolete MMXEXT functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT, SSE and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2). So given that the only systems which benefit
from the MMXEXT resamplers (which are overridden by SSE2)
are truely ancient 32bit x86s they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-14 01:28:29 +02:00
Andreas Rheinhardt 4e51e48ebd swresample/x86/rematrix: Remove obsolete MMX functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-14 01:28:29 +02:00
Andreas Rheinhardt 2b94f23b06 swresample/x86/audio_convert: Remove obsolete MMX functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-14 01:28:29 +02:00
Andreas Rheinhardt 55fc2c5a89 swresample/resample: Properly empty MMX state
There is a x86-32 MMXEXT implementation for resampling
planar 16bit data. multiple_resample() therefore calls
emms_c() if it thinks that this needed. And this is bad:

1. It is a maintenance nightmare because changes to the
x86 resample DSP code would necessitate changes to the check
whether to call emms_c().
2. The return value of av_get_cpu_flags() does not tell
whether the MMX DSP functions are in use, as they could
have been overridden by av_force_cpu_flags().
3. The MMX DSP functions will never be overridden in case of
an x86-32 build with --disable-sse2. In this scenario lots of
resampling tests (like swr-resample_exact_lin_async-s16p-8000-48000)
fail because the cpuflags indicate that SSE2 is available
(presuming that the test is run on a CPU with SSE2).
4. The check includes a call to av_get_cpu_flags(). This is not
optimized away for arches other than x86-32.
5. The check takes about as much time as emms_c() itself,
making it pointless.

This commit therefore removes the check and calls emms_c()
unconditionally (it is a no-op for non-x86).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-14 01:28:29 +02:00
Stefano Sabatini ff07492cd8 ffprobe: add -o option
This enables printing to a resource specified with -o OUTPUT.

In case the output is not specified, prints to stdout as usual.

Address issue: http://trac.ffmpeg.org/ticket/8024

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-13 22:42:55 +02:00
Stefano Sabatini 7cae3d8b76 lavf/avio: add avio_vprintf()
This new function makes it possible to use avio_printf() functionality from
a function taking a variable list of arguments.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-13 22:42:55 +02:00
Pierre-Anthony Lemieux 4d45f5acbd
avfilter/showinfo: refactor to use avutil/uuid 2022-06-12 18:34:38 +10:00
Pierre-Anthony Lemieux 751549af9b
avformat/imf: refactor to use avutil/uuid 2022-06-12 18:34:37 +10:00
Pierre-Anthony Lemieux 1fd6758178
avformat/smoothstreamingenc: refactor to use avutil/uuid 2022-06-12 18:34:37 +10:00
Pierre-Anthony Lemieux a2c1a439b3
avformat/mov: refactor to use avutil/uuid 2022-06-12 18:34:37 +10:00
Pierre-Anthony Lemieux 7c2f029ede
avutil/tests/uuid: add uuid tests 2022-06-12 18:34:37 +10:00
Zane van Iperen 76e95daa08
avutil/uuid: add utility library for manipulating UUIDs as specified in RFC 4122
Co-authored-by: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2022-06-12 18:34:28 +10:00
Marton Balint 843c4346b1 doc/ffmpeg: fix typo in VCD creation example
Fixes ticket #9753.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-12 09:35:50 +05:30
Andreas Rheinhardt 8678b75bda avcodec/x86/h264_qpel_8bit: Remove unused function
Namely ff_avg_h264_qpel8or16_hv1_lowpass_op_mmxext. It seems to exist
since 610e00b359 (a function like this
already existed before that commit, but it was static and
av_always_inline and was therefore not present in the actual binaries).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-11 22:43:20 +02:00
Andreas Rheinhardt 1799e27020 avcodec/x86/rv34dsp: Remove unused ff_rv34_idct_dc_mmxext
Forgotten in 9ba9c34024.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-11 22:43:20 +02:00
Andreas Rheinhardt 50a8cbb23e avcodec/x86/fpel: Remove unused ff_avg_pixels4_mmx
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-11 22:43:19 +02:00
Andreas Rheinhardt 1cb038a7d5 avcodec/videodsp: Make ff_emulated_edge_mc_16 static
Only ff_emulated_edge_mc_8() is used outside of lavc/videodsp.c.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-11 22:42:29 +02:00
Andreas Rheinhardt ae2dd5d42b avcodec/v4l2_m2m: Remove unused ff_v4l2_m2m_codec_full_reinit
Unused since df701ed0b5.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-11 16:29:07 +02:00
Andreas Rheinhardt 324545d02f avcodec/hevcdec: Make ff_hevc_pel_weight static
Only used here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-11 16:29:07 +02:00
Andreas Rheinhardt 5eee930726 avcodec/x86/hevcdsp_init: Remove unnecessary inclusion of get_bits.h
This file does not use anything from get_bits.h at all;
furthermore hevcdsp.h now includes get_bits.h itself.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-11 16:29:07 +02:00
Andreas Rheinhardt 03cbec7bdc avcodec/x86/qpeldsp: Remove unused ff_put_no_rnd_pixels16_l2_3dnow
qpeldsp does not use 3dnow, it is MMXEXT-only.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-11 16:29:07 +02:00
Matt Oliver dd5a0302d5 avcodec/libx264: Set min build version to 158 for msvc
Was "[PATCH] libx264: Do not explicitly set X264_API_IMPORTS"

Setting X264_API_IMPORTS only affects msvc builds and it breaks
linking to static builds (although is required for shared builds).
This flag is set by x264 in its pkgconfig as required since build
158 (a615f027ed172e2dd5380e736d487aa858a0c4ff) from July 2019.
So this patch updates configure to require a newer x264 build that
correctly sets the imports flag.

The min version requirement of 158 is applied for msvc builds only.

This is also removing the check for 'libx264 without pkg-config'
which was left for compatibility reasons about 7 years ago when
the pkg-config check was introduced by commit
e06263ef1e.

Co-authored-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-11 14:15:16 +02:00
softworkz 3b3c567ad3 avformat/os_support: use windows stat structs with 64bit time_t
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-11 11:11:12 +03:00
Gyan Doshi 09c53a04c5 ffmpeg: add option fps_mode
fps_mode sets video sync per output stream. Overrides vsync for matching
streams.

vsync is deprecated.
2022-06-11 09:47:27 +05:30
Tomas Härdin cb204f007b libavcodec/jpeg2000_parser: Localize m->bytes_read
Another 6%
2022-06-10 10:50:12 +02:00
Tomas Härdin ffc2d95674 libavcodec/jpeg2000_parser: Reindent 2022-06-10 10:50:12 +02:00
Tomas Härdin d6d7b78c46 libavcodec/jpeg2000_parser: Rearrange ifs
A modest 8% improvement
2022-06-10 10:50:12 +02:00
Tomas Härdin 01827beb70 libavcodec/jpeg2000_parser: LUTify info_marker()
This speeds find_frame_end() up by 39% according to valgrind
2022-06-10 10:50:12 +02:00
Tomas Härdin 6704c2dd19 libavcodec/jpeg2000_parser: next_state is just a temporary 2022-06-10 10:50:12 +02:00
Tomas Härdin 5cfc1b0595 libavcodec/jpeg2000_parser: Simplify, fix reset_context() 2022-06-10 10:50:12 +02:00
Tomas Härdin 1ee994e168 libavcodec/jpeg2000_parser: Speed up long skips 2022-06-10 10:50:12 +02:00
Gijs Peskens 7f3f3539e8 avformat/librist: allow setting fifo size and fail on overflow
Introduce fifo_size and overrun_nonfatal params to configure fifo buffer
behavior.

Use newly introduced RIST_DATA_FLAGS_OVERFLOW flag to check for overrun
and error out in that case.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-09 23:57:20 +02:00
Stefano Sabatini 605b4016b3 ffmpeg: drop undocumented -d option
Option was added in commit 39aafa5ee9 but was never documented.

Also does not seem there are current use cases for it,
tests for which it was introduced are still working therefore we drop
it altogether.

Indirectly fix trac issue: http://trac.ffmpeg.org/ticket/1698

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-09 21:12:16 +02:00
Michael Niedermayer c4b130e876 avformat/aviobuf: Check buf_size in ffio_ensure_seekback()
buffer_size is an int

Fixes: signed integer overflow: 9223372036854775754 + 32767 cannot be represented in type 'long'
Fixes: 45691/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5263458831040512

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-06-09 20:46:21 +02:00
Michael Niedermayer 35dc93ab44 avformat/bfi: Check offsets better
Fixes: signed integer overflow: -2145378272 - 538976288 cannot be represented in type 'int'
Fixes: 45690/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5015496544616448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-06-09 20:46:10 +02:00
Michael Niedermayer ffc8772150 avformat/asfdec_f: Check packet_frag_timestamp
Fixes: signed integer overflow: -9223372036854775808 - 4607 cannot be represented in type 'long'
Fixes: 45685/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5280102802391040

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-06-09 20:45:36 +02:00
Michael Niedermayer 5d6cdb015e avcodec/wmalosslessdec: Check channels after setting them
Fixes: 46194/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-580292873827123
Fixes: stack-buffer-overflow on address 0x7ffc0ce69b30 at pc 0x00000062fb03 bp 0x7ffc0ce69af0 sp 0x7ffc0ce69ae8
Fixes: 46205/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5354894996930560
Fixes: 47861/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-4817404984688640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-06-09 20:44:26 +02:00
softworkz 5d5a014199 avformat/file: remove _WIN32 condition
stat is now re-mapped with long path support
in os_support.h

Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-09 13:03:55 +03:00