Commit Graph

5878 Commits

Author SHA1 Message Date
Marvin Scholz
4fa2696a08 configure: fix symbol prefix detection
The symbol prefix check would incorrectly detect a bogus prefix in
circumstances where sanitizers instrument the build, like when
configuring with the clang-asan toolchain where it would detect the
prefix as __odr_asan_gen_, which is obviously wrong.

To fix this, adjust the prefix detection to only detect a
one-character prefix, which is the only case that matters
anywhere right now.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-19 18:49:03 +02:00
Lynne
18fa866d5a lavc: add hevc_vulkan hardware encoder
This commit adds a Vulkan hardware HEVC encoder, with full support
of the spec - I, P, and B-frames.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-19 18:39:37 +02:00
Lynne
cea0e9ecfb lavc: add h264_vulkan hardware encoder
This commit adds the first Vulkan hardware encoder.

Currently, P, and **B**-frames are supported. This marks the
first implementation to support both.

The encoder has feature-parity with VAAPI.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-19 18:39:28 +02:00
Lynne
21c0cbe5e6 lavc: add Vulkan video encoding base code
This commit adds the common Vulkan video encoding framework.
It makes full use of the asynchronous features of our new common
hardware encoding code, and of Vulkan.
The code is able to handle anything from H264 to AV1 and MJPEG.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-19 18:39:28 +02:00
Brad Smith
996a8e32b4 aarch64: Implement support for elf_aux_info(3) on FreeBSD and OpenBSD
FreeBSD 12.0+, OpenBSD -current and what will be OpenBSD 7.6 support
elf_aux_info(3).

Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-09 23:36:36 +02:00
Ramiro Polla
a7647a6f88 configure: improve check for POSIX ioctl
Instead of relying on system #ifdefs which may or may not be correct,
detect the POSIX ioctl signature at configure time.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-03 10:22:58 +02:00
Stefan Oltmanns
b73ac602f0 avformat/vapoursynth: load library at runtime
Signed-off-by: Stefan Oltmanns <stefan-oltmanns@gmx.net>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-08-30 18:02:50 +02:00
Stefan Oltmanns
0902b0cc68 avformat/vapoursynth: Update to API version 4
Signed-off-by: Stefan Oltmanns <stefan-oltmanns@gmx.net>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-08-30 18:02:50 +02:00
Niklas Haas
976f47a308 avcodec/bsf/dovi_rpu: add new bitstream filter
This can be used to strip dovi metadata, or enable/disable dovi
metadata compression. Possibly more use cases in the future.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-08-30 18:02:38 +02:00
Rémi Denis-Courmont
8e34942e9b configure: check if assembler supports RV zicbop
zicbop is the Cache Block Operation, Prefetch extension to RVI.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-31 17:43:44 +02:00
Fei Wang
1c9e1e7822 configure: Alphabetical order for av1 codecs
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-31 17:43:42 +02:00
Zhao Zhili
069a7feebf configure: Fix Apple framework dependencies in .pc file
configure use "-Wl,-framework,foo" and "-framework foo" to specify
dependencies on Apple frameworks. These two styles essentially do
the same thing when build ffmpeg. However, they do make difference
when generate pkg-config files. Some tools interact with pkg-config
cannot handle "-Wl,-framework,foo" in Libs field, e.g., cmake with
pkg_check_modules.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-24 00:53:43 +02:00
Zhao Zhili
ce9c8acfc4 avutil/file_open: Fix build error with wasi
Don't assume tempnam is available when !HAVE_MKSTEMP. Check tempnam
explicitly in configure.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-24 00:53:43 +02:00
James Almer
7342ff4125 x86/intreadwrite: add missing casts to pointer arguments
Should make strict compilers happy.

Also, make AV_COPY128 use integer operations while at it. Removing the
inclusion of immintrin.h ensures a lot less intrinsic related headers are
included as well, which fixes a clash of defines with some Clang versions.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-12 21:44:34 +02:00
James Almer
16d4738434 x86/intreadwrite: use intrinsics instead of inline asm for AV_COPY128
This has the benefit of removing any SSE -> AVX penalty that may happen when
the compiler emits VEX encoded instructions.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-12 21:44:33 +02:00
James Almer
ea24343c81 x86/intreadwrite: use intrinsics instead of inline asm for AV_ZERO128
When called inside a loop, the inline asm version results in one pxor
unnecessarely emitted per iteration, as the contents of the __asm__() block are
opaque to the compiler's instruction scheduler.
This is not the case with intrinsics, where pxor will be emitted once with any
half decent compiler.

This also has the benefit of removing any SSE -> AVX penalty that may happen
when the compiler emits VEX encoded instructions.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-12 21:44:33 +02:00
Ramiro Polla
d23d934c7a configure: restore autodetection of v4l2 and fbdev
The detection logic for v4l2 and fbdev was accidentally modified to
depend on v4l2-m2m in 43b3412.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-10 14:29:04 +02:00
Tong Wu
47488b3d24 avcodec: add D3D12VA hardware HEVC encoder
This implementation is based on D3D12 Video Encoding Spec:
https://microsoft.github.io/DirectX-Specs/d3d/D3D12VideoEncoding.html

Sample command line for transcoding:
ffmpeg.exe -hwaccel d3d12va -hwaccel_output_format d3d12 -i input.mp4
-c:v hevc_d3d12va output.mp4

Signed-off-by: Tong Wu <tong1.wu@intel.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-03 08:46:28 +02:00
Dawid Kozinski
9f8f3d7655 avcodec/evc: Alterations following changes in libxeve
Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-28 22:20:31 +02:00
Rémi Denis-Courmont
a72b68327f configure: detect 64-bit generic platforms
Currently, any unrecognised platform is treated as 32-bit. This should
detect *most* 64-bit platforms, namely LP64 and LLP64 ones.
Unfortunately this will not work for ILP32 ABIs on 64-bit ISAs, but
still better than nothing.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-27 09:03:07 +02:00
Andreas Rheinhardt
b890d27ca1 configure: Remove obsolete mpeg4_decoder->mpeg4video_parser dependency
Obsolete since 3ceffe7839.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-20 20:27:41 +02:00
Araz Iusubov
ee9932f6a9 libavcodec/amfenc: Update AMF release version
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-20 20:27:41 +02:00
Rémi Denis-Courmont
4d42288748 configure: remove stray bfin architecture
This seems to have been omitted in
880e2aa236.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-15 09:43:06 +02:00
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