Commit Graph

5855 Commits

Author SHA1 Message Date
Rémi Denis-Courmont
0cd153a2a3 avr32: remove explicit support
The vendor has long since switched to Arm, with the last product
reaching their official end-of-life over 11 years ago. Linux support for
the ISA was dropped 7 years ago. More importantly, this architecture was
never supported by upstream GCC, and the vendor fork is stuck at version
4.2, which FFmpeg no longer supports (as per C11 requirement).

Presumably, this is still the case given the lack of vendor support.
Indeed all of the code being removed here consisted of inline assembler
scalar optimisations. A sane C compiler should be able to perform those
automatically nowadays (with the sole exception of fast CLZ detection),
but this is moot as this architecture is evidently dead.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-15 09:43:06 +02:00
Rémi Denis-Courmont
084a8c006b sh4: remove architecture
Support for SuperH was dropped over a decade ago. There no longer is any
architecture-specific code to be found, so just remove the corresponding
test. Technically it is still possible to compile FFmpeg as the
"generic" (pure C) architecture.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-13 21:50:47 +02:00
Sean McGovern
d18560b59a libavcodec/alpha: remove DSP & support code
Introduced in 1992, the Alpha was a 64-bit RISC processor designed to replace the
VAX CISC machines sold by Digital Equipment Corporation.

After Digital was acquired by Compaq in 1998 -- who themselves would be later
purchased by Hewlett-Packard, the architecture was phased out over the following decade.
It became effectively defunct in 2007, the last publically available processor being the Alpha 21364.

FFmpeg has not added any DSP code for this architecture since lowres2 was introduced in 2012,
and it is more than unlikely someone still wishes to maintain it.

Remove the DSP and support code.
2024-06-12 00:09:09 +02:00
Andreas Rheinhardt
3b97133296 configure: Disable DNN without backend
The DNN filters are useless without a backend.
This will also "fix" Coverity issues #1598288 and #1601718.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-11 16:59:44 +02:00
Gyan Doshi
065f3bb0c9 configure: correct libopenjpeg description
Decoding is no longer possible as the decoder wrapper was removed
in 60ccb3fe78

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 21:53:40 +02:00
Paul B Mahol
ebc3778228 configure: add check for CLAP support 2024-05-31 21:09:30 +02:00
Brad Smith
bb668172e6 configure: enable ffnvcodec, nvenc, nvdec for FreeBSD
Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-28 16:28:05 +02:00
James Almer
d2fbff0250 configure: split ISOBMFF writer helpers into a separate component
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:13 +02:00
Rémi Denis-Courmont
95c222ac6d lavu/riscv: fallback to raw hwprobe() system call
Not all C run-times support this, and even then, it will be a while
before distributions provide recent enough versions thereof.

Since this is a trivial system call wrapper, we might just as well call
the corresponding kernel system call directly where the C run-time lacks
support but the kernel headers are new enough (as is the case on Debian
Unstable at the time of writing). In doing so, we need to add a few more
guards as the first suitable kernel (headers) release did not expose the
V, Zba and Zbb extensions.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-14 22:49:48 +02:00
Andreas Rheinhardt
0245cb6eb7 configure: Add missing ftr_parser->adts_header,mpeg4audio dependencies
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-13 23:44:14 +02:00
Andreas Rheinhardt
fafb785559 configure, avcodec/Makefile: Add h264parse->h264data,golomb dependencies
Fixes standalone compilation of the dts2pts BSF.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-13 23:44:13 +02:00
Rémi Denis-Courmont
3bc242e279 riscv: add Zvbb vector bit manipulation extension
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-11 18:22:55 +02:00
Andreas Rheinhardt
fcf0de1faa configure: Add missing identity filter->scene_sad dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-09 19:04:08 +02:00
Andreas Rheinhardt
b29e612954 configure: Add wmv2dsp->qpeldsp dependency
It reuses e.g. ff_put_pixels8_l2_8() directly even though
it never initializes a QpelDSPContext.
Fixes standalone compilation of the wmv2 encoder (the decoder
already has a qpeldsp dependency via the h263 decoder).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-09 19:04:05 +02:00
Andreas Rheinhardt
9815cbfc94 configure: Add missing ftr decoder->adts_header dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-09 19:04:05 +02:00
Andreas Rheinhardt
0836f8a7db configure: Add missing atrac3p(al) decoder->sinewin dependency
atrac3plusdsp.o needs it.
Broken in 34330adb29.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-09 19:04:05 +02:00
Andreas Rheinhardt
397753e4e7 configure: Add missing pdv decoder->inflate_wrapper dependency
A dependency on zlib is not enough.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-09 19:04:04 +02:00
Andreas Rheinhardt
2b95447fe6 configure: Add missing dirac_decoder->qpeldsp dependency
Forgotten in fd0e37f126.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-09 19:04:04 +02:00
Mandava, Mounika
5a06eb7b5c lavc/qsvenc: add support for oneVPL string API
A new option -qsv_params <str> is added, where <str> is a :-separated
list of key=value parameters.

Example:
$ ffmpeg -y -f lavfi -i testsrc -vf "format=nv12" -c:v h264_qsv -qsv_params
"TargetUsage=1:GopPicSize=30:GopRefDist=2:TargetKbps=5000" -f null -

Signed-off-by: Mounika Mandava <mounika.mandava@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-07 17:54:27 +02:00
Rémi Denis-Courmont
ffa4f7f8f5 lavu/riscv: add hwprobe() for CPU detection
This adds the Linux-specific function call to detect CPU features. Unlike
the more portable auxillary vector, this supports extensions other than
single lettered ones. At this point, FFmpeg already needs this to detect
Zba and Zbb at run-time, and probably will need it for Zvbb in the near
future.

Support will be available in glibc 2.40 onward.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-07 17:54:25 +02:00
Niklas Haas
1ee1d95e40 avcodec/libx264: bump minimum required version to 155
This version is seven years old, and present in Debian oldoldstable,
Ubuntu 20.04 and Leap 15.0.

Allows cleaning up the file substantially. In particular, this is
motivated by the desire to stop relying on init_static_data.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-02 19:36:11 +02:00
Timo Rothenpieler
c6fe620a03 configure: handle xargs versions that exec empty commands
Some versions of xargs don't run any commands if no input is given,
others do run it at least once, causing errors.
Pass -r to xargs to avoid that behaviour and never run empty commands.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-02 19:36:11 +02:00
Timo Rothenpieler
ef006107bc configure: support msvc build inside WSL
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-02 19:36:11 +02:00
Zhao Zhili
80b3fed1d1 avcodec/mediacodecenc: Add global header support
The extradata is generated by encoding a dummy frame, then reset
the encoder state by mediacodec flush(). It only works for pixel
format other than AV_PIX_FMT_MEDIACODEC, since I'm not sure how
to create a dummy frame safely with AV_PIX_FMT_MEDIACODEC.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-23 11:10:24 +02:00
Zhao Zhili
142bbd9e90 avcodec/mediacodec_wrapper: link to NDK mediacodec API directly
Drop support of Android version before 5.0.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-23 11:10:23 +02:00
Zhao Zhili
78e568a451 configure: Lower Android API level requirement of mediandk
AImage_delete is introduced in API level 24, while AMediaFormat_new
is introduced in API level 21. We only need API level 21 to support
NDK mediacodec. This change doesn't break or change of
android_camera_indev since camera2ndk still needs API level 24.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-23 11:10:23 +02:00
Haihao Xiang
6ae4352bab configure: fix rpuenc typos
Otherwise there are link errors:
LD      ffprobe_g
/usr/bin/ld: libavcodec/libavcodec.so: undefined reference to
`ff_dovi_rpu_generate'
/usr/bin/ld: libavcodec/libavcodec.so: undefined reference to
`ff_dovi_configure'
collect2: error: ld returned 1 exit status

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-23 11:10:16 +02:00
Niklas Haas
e2fd75bdb8 avcodec/libsvtav1: implement dolby vision coding
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-23 11:10:16 +02:00
Niklas Haas
c63e6b3c21 avcodec/libx265: implement dolby vision coding
libx265 supports these natively, we just need to attach the generated
NALs to the x265picture, as well as setting the appropriate DV profile.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-23 11:10:16 +02:00
Niklas Haas
3ece30b00c avcodec/libaomenc: implement dolby vision coding
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-23 11:10:16 +02:00
Niklas Haas
c9e31faf80 avcodec/dovi_rpuenc: add ff_dovi_configure()
We need to set up the configuration struct appropriately based on the
codec type, colorspace metadata, and presence/absence of an EL (though,
we currently don't support an EL).

When present, we use the signalled RPU data header to help infer (and
validate) the right values.

Behavior can be controlled by a new DOVIContext.enable flag.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-23 11:10:16 +02:00
Niklas Haas
e101ff37d3 configure: rename dovi_rpu subsystem to dovi_rpudec
To distinguish it from the to-be-added dovi_rpuenc.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-23 11:10:16 +02:00
Haihao Xiang
071252bbec lavfi: Add drawbox_vaapi filter
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-18 19:52:17 +02:00
Haihao Xiang
a7c65c3ffb lavfi: Add pad_vaapi filter
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-18 19:52:17 +02:00
J. Dekker
f872413b51 configure, etc: switch to shebang without space
Note that the config.sh file is left without a shebang, this file is
supposed to be sourced into the current environment.

This commit is purely cosmetic.

Signed-off-by: J. Dekker <jdek@itanimul.li>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-10 01:21:07 +02:00
J. Dekker
a79e23af65 configure: simplify bigendian check
The preferred way to use LTO is --enable-lto but often times packagers
still end up with -flto in cflags for various reasons. Using grep
on binary object files is brittle and relies on specific object
representation, which in the case of LLVM bitcode, debug information or
other intermediary formats can fail silently.

This patch changes the check to a more commonly used define for GCC
style compilers. More checks may be needed to cover other potential
compilers that don't use the __BYTE_ORDER__ define.

Signed-off-by: J. Dekker <jdek@itanimul.li>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-10 01:21:07 +02:00
James Almer
7eaee20acc avcodec/libaomenc: bump the minimum required version to 2.0.0
v2.0.0 is already four years old and even newer versions are available on
stable distro releases.
With this we stop setting codec capabilities during static data initialization.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-06 18:08:24 +02:00
Antoine Soulier via ffmpeg-devel
ced20fe27c avcodec/liblc3: add encoding/decoding support of LC3 audio codec
The LC3 audio codec is the default codec of Bluetooth LE audio.
This is a wrapper over the liblc3 library (https://github.com/google/liblc3).

Signed-off-by: Antoine Soulier <asoulier@google.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-06 18:08:21 +02:00
Andreas Rheinhardt
42e4bb0c0a configure: Only enable iamfdec, iamfenc when needed
Since 591e27d1e7b21b66f81c53f381356c5e6f1f0451 they would
always be compiled even when nothing uses them; for shared
builds the default linker behaviour is to include them
even when not needed.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-04 01:53:43 +02:00
Andreas Rheinhardt
331f8ecb6b configure: Fix iamfdec dependencies
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-04 01:53:43 +02:00
Andreas Rheinhardt
24e49968a0 configure: Add missing libdav1d/av1 decoders->dovi_rpu dependency
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-04 01:53:42 +02:00
Eugene Zemtsov
79fb902f69 configure: Separate subsystem for Immersive Audio Model
This change allows users to build libavfomat without support
for Immersive Audio Model by specifying --disable-iamf.
It helps to save on binary size in cases where it's important.

Co-authored-by: James Almer <jamrial@gmail.com>
Signed-off-by: Eugene Zemtsov <eugene@chromium.org>
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-03 17:29:55 +02:00
Andreas Rheinhardt
13463f5f38 all: Don't use ATOMIC_VAR_INIT
C11 required to use ATOMIC_VAR_INIT to statically initialize
atomic objects with static storage duration. Yet this macro
was unsuitable for initializing structures [1] and was actually
unneeded for all known implementations (this includes our
compatibility fallback implementations which simply wrap the value
in parentheses: #define ATOMIC_VAR_INIT(value) (value)).
Therefore C17 deprecated the macro and C23 actually removed it [2].

Since commit 5ff0eb34d2b1089d3dd9f27fdb51520001709138 we default
to C17 if the compiler supports it; Clang warns about ATOMIC_VAR_INIT
in this mode. Given that no implementation ever needed this macro,
this commit stops using it to avoid this warning.

[1]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2396.htm#dr_485
[2]: https://en.cppreference.com/w/c/atomic/ATOMIC_VAR_INIT

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-28 22:25:53 +01:00
Andreas Rheinhardt
54ebb96606 configure: Make hls demuxer select AAC, AC3 and EAC3 demuxers
The code relies on their presence and would presumably crash
when retrieving in_fmt->name if an encrypted stream with a codec id
without demuxer were encountered.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-26 17:29:19 +01:00
Lynne
4ffd298f57 vulkan_av1: port to the new stable API
Co-Authored-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-25 22:54:43 +01:00
Andreas Rheinhardt
5c2cd3e023 configure: Explicitly check for static_assert, _Static_assert
C11 provides static assertions via _Static_assert and
provides static_assert as a convenience define for this
in assert.h. Our codebase uses the latter, as _Static_assert
has actually already been deprecated in C23.

Not all toolchains that declare support for C11 actually
support it; e.g. MSVC 19.27 does not support _Static_assert,
but somehow supports static_assert. MSVC 19.27 admits to be
a "preview implementation of the ISO C11 standard",
so this is not surprising (MSVC 19.28 does not come with
this caveat).

Furthermore some FATE boxes [1] use old GCC toolchains (with
only experimental support for C11) where _Static_assert is
supported, but assert.h does not provide the fallback define.
They are broken since the first usage of static_assert.

This commit therefore checks whether static_assert and
_Static_assert work with assert.h included; if not,
configure errors out.

This intentionally drops support for MSVC 19.27. Users like
the old FATE boxes above can still add -Dstatic_assert=_Static_assert
to cflags as a workaround if desired.

[1]: https://fate.ffmpeg.org/report.cgi?time=20240321123620&slot=sh4-debian-qemu-gcc-4.7

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-25 01:34:00 +01:00
Henrik Gramner
2b16fa53e5 x86: Update x86inc.asm
Make things up-to-date with upstream.

https://code.videolan.org/videolan/x86inc.asm
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-24 15:52:14 +01:00
Matthieu Bouron
008e51553b avformat: add Android content resolver protocol support
Handles Android content URIs starting with content://.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-23 14:23:46 +01:00
Zhao Zhili
465b78e4d9 avcodec/libx264: fix extradata when config annexb=0
AVCodecContext extradata should be an AVCDecoderConfigurationRecord
when bitstream format is avcc. Simply concatenating the NALUs output
by x264_encoder_headers does not form a standard
AVCDecoderConfigurationRecord. The following cmd generates broken
file before the patch:

ffmpeg -i foo.mp4 -c:v libx264 -x264-params annexb=0 bar.mp4

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-23 14:23:42 +01:00
James Almer
40109d0947 configure: check for C17 by default
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-21 20:32:42 +01:00