6070 Commits

Author SHA1 Message Date
stevxiao
7b2ae2ccf7 avcodec/d3d12va_encode: add intra refresh support for d3d12va encode
Intra refresh is a technique that gradually refreshes the video by encoding rows or regions as intra macroblocks/CTUs spread over multiple frames, rather than using periodic I-frames.
This provides better error resilience for video streaming while maintaining more consistent bitrate.

Disable Intra Refresh (This is the default)
ffmpeg -init_hw_device d3d12va -hwaccel d3d12va -hwaccel_output_format d3d12 \
-i input.mp4 \
-c:v h264_d3d12va \
-intra_refresh_mode none \
-intra_refresh_duration 30 \
-g 60 \
output.h264

Enable Intra Refresh
ffmpeg -init_hw_device d3d12va -hwaccel d3d12va -hwaccel_output_format d3d12 \
-i input.mp4 \
-c:v h264_d3d12va \
-intra_refresh_mode row_based \
-intra_refresh_duration 30 \
-g 60 \
output.h264

Parameters
- `-intra_refresh_mode`: Set to `row_based` to enable row-based intra refresh, or `NONE` to disable
- `-intra_refresh_duration`: Number of frames over which to spread the intra refresh (default: 0 = use GOP size)
- `-g`: GOP size (should typically be larger than intra refresh duration)
2025-12-04 08:26:26 +00:00
Thomas Gritzan
0cd75dbfa0 libavdevice/decklink: Implement QueryInterface to support newer driver
Playback to a decklink device with a newer version of the
DeckLink SDK (14.3) stalls because the driver code calls
IDeckLinkVideoFrame::QueryInterface, which is not
implemented by ffmpeg.
This patch implements decklink_frame::QueryInterface,
so that playback works with both older (12.x) and
newer (>= 14.3) drivers.

Note: The patch still does not allow the code to compile
with DeckLink SDK 14.3 or newer, as the API has changed.
2025-11-27 20:12:03 +00:00
Andreas Rheinhardt
f397fe86c3 avcodec/vp56dsp: Separate VP5DSP and VP6DSP
They don't have anything in common since
160ebe0a8d.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-11-27 12:10:29 +01:00
Zhao Zhili
61b034a47c avcodec/rkmppenc: add h264/hevc rkmpp encoder
Bump rockchip_mpp to 1.3.8.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-11-27 15:54:49 +08:00
Zhao Zhili
d8e095b56d configure: cleanup rkmpp check
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-11-27 15:54:42 +08:00
Lynne
531ce713a0 dpxdec: add a Vulkan hwaccel 2025-11-26 15:16:43 +01:00
Araz Iusubov
92f2f9ea5c avcodec/d3d12va_encode: D3D12 AV1 encoding support
Implement AV1 hardware encoding
using Direct3D 12 Video API (D3D12VA).
2025-11-26 09:58:44 +00:00
Jack Lau
0486ad61ce configure: replace openssl header check with 1.1.1 API
Fix #20571

Avoid build errors with openssl forks (like libressl)
that lack some APIs.

This patch replace header check for OPENSSL_init_ssl
(was added in 1.1.0) with the OpenSSL 1.1.1 new API
DTLS_get_data_mtu.

Signed-off-by: Jack Lau <jacklau1222gm@gmail.com>
2025-11-24 21:29:45 +00:00
Neal Gompa
069d465895 configure: Lower libdvdnav and libdvdread minimum versions for EL9
Red Hat Enterprise Linux 9 is one patch version lower than what
FFmpeg currently requests. The slightly older versions still result
in a working build of FFmpeg with DVD support, so allow those
versions to be consumed to build FFmpeg.

Signed-off-by: Neal Gompa <neal@gompa.dev>
2025-11-24 03:08:20 +00:00
Dmitrii Okunev
eccbbd528e fftools: Fix MediaCodec on Android15+
On Android15+ MediaCodec HAL backend was switched from HIDL to AIDL.
As a result, MediaCodec operations started to hang, see:

    https://trac.ffmpeg.org/ticket/11363
    https://github.com/termux/termux-packages/issues/21264
    https://issuetracker.google.com/issues/382831999

To fix that it is necessary to initialize binder thread pool.

Signed-off-by: Dmitrii Okunev <xaionaro@dx.center>
2025-11-23 12:53:43 +00:00
James Almer
9e09be513d configure: move libtls out of non-free libraries list
LibreSSL uses a permisive license, and the OpenSSL code has the same license as
OpenSSL < 3.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-11-22 23:19:01 -03:00
Kacper Michajłow
9b2162275b configure: filter out -guard:signret from armasm flags
While cl.exe supports -guard:signret, armasm64 complains about
unknown flag. Note that -guard:ehcont is accepted by armasm64.

Fixes:
error A2029: unknown command-line argument or argument value -guard:signret

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-17 20:41:34 +00:00
Andreas Rheinhardt
57d6898730 configure: Only test for SSE2 intrinsics on x86
Reviewed-by: Kieran Kunhya <kieran@kunhya.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-11-17 10:36:54 +01:00
Zhao Zhili
c4ce51ee62 avfilter/vf_libopencv: bump to opencv4 2025-11-10 04:12:50 +00:00
Zhao Zhili
2d241202ff avcodec/bsf/dts2pts: add hevc support 2025-11-05 15:13:54 +00:00
Kacper Michajłow
671e54d715 configure: add -static suffix to internal static libs for test programs
In MSVC builds, object files built for shared or static libraries are
technically not compatible with each other. That's why building both
shared and static libraries simultaneously is not allowed in configure.
This may change in the future once dllimport/dllexport attributes are no
longer used. Which will be possible on next major bump. The only
remaining use of dllexport was changed in c6c8063186.

However, for test programs, we still build internal static libraries
that allow the test programs to access internal symbols.

In commit 8eca3fa619, I assumed that when
CONFIG_STATIC=0, we would never build a static library. We actually do
build one for internal purposes, for the test executables. In that case,
we only link the tested library statically (using the same object files
as built for the shared library), the rest of the libraries are still
linked dynamically.

Such libraries are never installed and are used only for test programs.
This change adds a -static suffix to these internal libraries to avoid
name conflicts. In the MSVC world, static libraries and import libraries
are generally the same thing and share the same naming conventions.

Fixes: 8eca3fa619
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-05 13:00:09 +00:00
Andreas Rheinhardt
e0b0ca8111 avcodec/avcodec: Schedule moving private fields of AVCodecParser out of avcodec.h
AVCodecParser has several fields which are not really meant
to be accessed by users, but it has no public-private
demarkation line, so these fields are technically public
and can therefore not simply be made private like
20f9727018 did for AVCodec.*

This commit therefore deprecates these fields and
schedules them to become private. All parsers have already
been switched to FFCodecParser, which (for now) is a union
of AVCodecParser and an unnamed clone of AVCodecParser
(new fields can be added at the end of this clone).

*: This is also the reason why split has never been removed despite
not being set for several years now.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-11-01 16:57:02 +01:00
Andreas Rheinhardt
c607aae2b9 configure: Add config_components.asm
This is in preparation for the next commit.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-11-01 13:33:56 +01:00
Kacper Michajłow
8c633f45b0 configure: fix glslang linking on platforms without pthreads
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-27 02:59:09 +01:00
averne
98412edfed lavc: add a ProRes Vulkan hwaccel
Add a shader-based Apple ProRes decoder.
It supports all codec features for profiles up to
the 4444 XQ profile, ie.:
- 4:2:2 and 4:4:4 chroma subsampling
- 10- and 12-bit component depth
- Interlacing
- Alpha

The implementation consists in two shaders: the
VLD kernel does entropy decoding for color/alpha,
and the IDCT kernel performs the inverse transform
on color components.

Benchmarks for a 4k yuv422p10 sample:
- AMD Radeon 6700XT:   178 fps
- Intel i7 Tiger Lake: 37 fps
- NVidia Orin Nano:    70 fps
2025-10-25 19:54:13 +00:00
Ayose
016d767c8e lavfi: add drawvg video filter.
The drawvg filter can draw vector graphics on top of a video, using libcairo. It
is enabled if FFmpeg is configured with `--enable-cairo`.

The language for drawvg scripts is documented in `doc/drawvg-reference.texi`.

There are two new tests:

- `fate-filter-drawvg-interpreter` launch a script with most commands, and
  verify which libcairo functions are executed.
- `fate-filter-drawvg-video` render a very simple image, just to verify that
  libcairo is working as expected.

Signed-off-by: Ayose <ayosec@gmail.com>
2025-10-25 13:21:50 +00:00
Andreas Rheinhardt
9a9edd8024 configure: Remove 3dnow
The last 3dnow functions have been removed in commit
5ef613bcb0. So remove 3dnow
from configure; the only thing kept is that --disable-amd3dnow
is still accepted, but no longer advertised by --help.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-25 07:04:39 +02:00
Andreas Rheinhardt
7e8ef2ded2 configure: Add mxpeg->hpeldsp dependency
Forgotten in 124c856d38.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-24 12:56:24 +02:00
Araz Iusubov
d19b7c283c avcodec/d3d12va_encode: D3D12 H264 encoding support
This patch introduces hardware-accelerated H.264 encoding
using Direct3D 12 Video API (D3D12VA).
2025-10-18 12:20:11 +00:00
Kacper Michajłow
086597adae avutil/attributes: don't force format checking to __gnu_printf__ on mingw build
Use __MINGW_{PRINTF,SCANF}_FORMAT which matches the format check for
implementation that is actually used.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-09 03:35:16 +00:00
Andreas Rheinhardt
92ae9d1ffc configure: Remove vc1dsp->qpeldsp dependency
It only needs it for some x86 fpel functions; instead
add a direct dependency for that.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-04 07:06:32 +02:00
Andreas Rheinhardt
d09f4f3c78 configure: Remove h263_decoder->h263_parser,qpeldsp dependency
The former is unnecessary since
3ceffe7839. The latter is since
ff_mpeg4_workaround_bugs() (and thereby setting the "old" qpeldsp
functions) has been moved inside #if CONFIG_MPEG4_DECODER.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-04 07:06:32 +02:00
Andreas Rheinhardt
0035d99c61 configure: Avoid mpeg4video_parser->{h263,qpel}dsp dependency
This can be easily achieved by moving code only used by the MPEG-4
decoder behind #if CONFIG_MPEG4_DECODER.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-04 07:06:32 +02:00
Andreas Rheinhardt
770f78b24a configure: Remove mss2->qpeldsp dependency
Forgotten in 9cc38cc636.
(mss2 still has an implicit dependency on qpeldsp
via the VC-1 decoder.)

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-04 07:06:32 +02:00
Gyan Doshi
f1e9032a20 configure: unbreak glslang build
Don't unconditionally link to libSPVRemapper which was removed in 16.0 in 3a7f787
2025-09-30 04:26:18 +00:00
James Almer
d975dbd7b7 avcodec/libdav1d: bump minimum supported version to 1.0.0
This allows us to remove old deprecated options.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-28 23:53:27 -03:00
Timo Rothenpieler
994a368451 configure: deprecate support for libnpp 2025-09-26 12:31:39 +00:00
Kacper Michajłow
f40766da45 configure: suppress C4267 warnings from MSVC
Suppresses implicit integer conversion narrowing warnings:
warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data

Those implicit conversions are abundant in ffmpeg's code base.
Additionally equivalent warnings are not enabled for GCC/Clang by
default, so they are mostly left unfixed.

Suppress reports about them to reduce noise in MSVC build log.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-09-25 18:02:44 +00:00
Stadelmann, Daniel
56c14f2311 avcodec/libmpeghdec: add MPEG-H 3DA Fraunhofer IIS mpeghdec decoder
Adds a wrapper around the Fraunhofer IIS MPEG-H 3D Audio mpeghdec [1]
decoder shared library.

[1] https://github.com/Fraunhofer-IIS/mpeghdec

Signed-off-by: Stadelmann, Daniel <daniel.stadelmann@iis.fraunhofer.de>
2025-09-24 08:25:42 +02:00
Andreas Rheinhardt
cf30a3757f configure: Add missing dependencies for AHX decoder
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-23 22:16:02 +00:00
Michael Niedermayer
745cb6f8c7 configure: Put modules added from almpeg under --enable-gpl as suggested by several members of the GA
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-09-22 23:46:29 +00:00
Michael Niedermayer
b1cbc7c8ff configure: strip non numeric trailer from gcc version
Fixes: ../configure: 7820: [: Illegal number: 13-win32

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-09-22 21:41:42 +00:00
Zhao Zhili
dcddb2bf08 avformat: add hxvs demuxer 2025-09-21 17:42:19 +08:00
Andreas Rheinhardt
124c856d38 avcodec/mjpegdec: Move initializing HpelDSPContext to mxpegdec.c
Only the mxpeg decoder uses it (and the reference/bitmask feature
of ff_mjpeg_decode_sos()). So only initialize it for mxpeg which
allows to remove the mjpeg->hpeldsp dependency.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-15 17:52:22 +02:00
Marvin Scholz
994bc08325 configure: also initialize objcflags_filter early
Fixes an issue uncovered since 0ce413af9c
where flags were properly separated but without the objcflags_filter
being initialized, if add_objcflags is called early as part of
add_allcflags, it would lead to the append() function using an empty
filter and trying to call the flag instead, leading to errors like:

./configure: line 976: -fsanitize=address: command not found
./configure: line 976: -fno-omit-frame-pointer: command not found
2025-09-15 15:50:11 +00:00
Timo Rothenpieler
189d0b83b2 configure: pass CFLAGS to ObjC tests again
It was mistakenly removed in 0ce413af9c.

This matches how the Makefiles actually compile ObjC code, and
unlike C++, this seems to actually be benign and various existing
setups rely on that behaviour.
2025-09-15 14:37:43 +02:00
Timo Rothenpieler
f85da32e3a configure: make --extra-objcflags show the right default flags 2025-09-15 14:17:49 +02:00
Martin Storsjö
424d844534 configure: Make -Werror=partial-availability apply to all languages
This was missed in 0ce413af9c.

This fixes proper detection of Objective C APIs (that are missing)
if targeting older macOS versions, such as the check for
AVCaptureSession.
2025-09-15 14:17:52 +03:00
Timo Rothenpieler
36e374efb0 avfilter: add gfxcapture, Windows.Graphics.Capture based window/monitor capture 2025-09-14 11:45:11 +00:00
Timo Rothenpieler
5146b2fb8b configure: don't use MinGW ANSI stdio when using UCRT
MinGWs ANSI stdio is quite slow, and when using UCRT, its extra features
are not needed.
The only troublesome part with ucrt printf is that is disagrees about
the size of "long double", but FFmpeg does not use that anywhere, let
alone prints it.
2025-09-14 11:45:11 +00:00
Timo Rothenpieler
9c8a6ac85c configure: fix naming of some C++/cxx functions being mislabeled as cpp 2025-09-14 11:45:11 +00:00
Timo Rothenpieler
0ce413af9c configure: properly split C/CXX and CPP flags
Right now, CFLAGS like -std=c17 leak onto the C++ compilers commandline,
leading to tons of warnings and even some errors.

Undefining __STRICT_ANSI__ causes strong warnings from the stdlib
headers. So only set it for C.
2025-09-14 11:45:11 +00:00
Timo Rothenpieler
f8a300c673 configure: fix CUDA compilation with SDK version 13 nvcc
Compute Capability 7.5 is now the lowest supported version.

Fixes #20454
2025-09-08 14:25:44 +02:00
Jack Lau
adc66f30ee configure: remove openssl version check for whip
This version check for whip is unnecessary.
Since several rencet patches to the configure
have already added version checks for OpenSSL.

Signed-off-by: Jack Lau <jacklau1222@qq.com>
2025-09-06 11:27:54 +00:00
Martin Storsjö
f6bcd661f0 configure: Improve the check for schannel DTLS constants
This amends 307983b292 to fix
building with older versions of mingw-w64.

The previously checked constant, SP_PROT_DTLS1_X_CLIENT, was
added in mingw-w64 in df36f5deda23192d0ee99ffd661ea36df924e667
in 2020, and is included in released versions since v8.0.0.

The new checked constant SECPKG_ATTR_DTLS_MTU was added in
mingw-w64 in 0792283787cca8fc27dd38671107c791c87f4db3 in 2021,
and first appeared in mingw-w64 v9.0.0.

This fixes building with mingw-w64 v8, which is the version bundled
in Ubuntu 22.04.
2025-09-05 12:20:11 +00:00