Commit Graph

3323 Commits

Author SHA1 Message Date
openvela-robot 9255782c27 Merge commit '9c37d765ef28b027414f86b0088b0c282a3c46d8'
* commit '9c37d765ef28b027414f86b0088b0c282a3c46d8':
  configure: Add check_cc/require_cc helper functions to simplify some expressions

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:56:44 +08:00
openvela-robot bdc805ea04 Add Haivision SRT protocol
The protocol requires libsrt (https://github.com/Haivision/srt) to be
installed

Signed-off-by: Sven Dueking <sven.dueking@nablet.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:56:42 +08:00
openvela-robot f892a1b690 avcodec/avpacket: remove unnecessary check in av_packet_make_writable()
Zero sized packets are already handled below in the function.
This is more in line with av_packet_ref().

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:56:38 +08:00
openvela-robot 2efd420673 configure: Drop unused helper function test_cflags_cpp() 2026-04-20 19:56:34 +08:00
openvela-robot 0bcf7151fb libavfilter: Add OpenCL convolution filter
Behaves like existing convolution filter.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2026-04-20 19:56:28 +08:00
openvela-robot 7badc4e7b8 configure: Document available options for the --toolchain parameter 2026-04-20 19:56:22 +08:00
openvela-robot 8b3c1291db libavformat/dashenc: Option to set timeout for socket I/O operation 2026-04-20 19:56:11 +08:00
openvela-robot 40f50cc4aa configure: Don't assume a 16 byte aligned stack on BSDs on i386
With GCC, request it to maintain 16 byte alignment, and the existing
entry points already align it via attribute_align_arg.

With clang, do the same as for mingw; disable the aligned stack
and let the assembly functions that require it do the alignment
instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:56:08 +08:00
openvela-robot d07a6f35fc cmdutils: remove a superfluous line break
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:56:03 +08:00
openvela-robot b7c124a960 qsvenc: add the Access Unit Delimiter NAL Unit support
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:56:00 +08:00
openvela-robot 43af9ebba5 avcodec/hap : move parse_section_header to hap.c in order to be use by new bsf filter 2026-04-20 19:55:52 +08:00
openvela-robot dd7a3c0269 configure: Don't assume an aligned stack on clang on windows
If we'd enable a 16 byte aligned stack, clang/llvm would also assume
that alignment everywhere and produce code that strictly requires it.
That would require adding realignment (via attribute_align_arg) on every
single public library function or enable -mstackrealign (which does the
same on every single function).

Also relatedly; the parameter currently tested (-mllvm
-stack-alignment=16) hasn't actually been supported for quite some
time; current clang versions use -mstack-alignment=16 for the same.
Actually testing for that parameter would be a different change
though, since it has a real risk of changing behaviour on any other
platform where clang is used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:55:49 +08:00
openvela-robot 2d0628bde6 avformat/hlsenc: fix for zero EXTINF tag duration
This is the fix for bug https://trac.ffmpeg.org/ticket/7073

Tested-by: Brainiarc7
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2026-04-20 19:55:46 +08:00
openvela-robot c5dcd5b1c7 Support AV1 encoding using libaom 2026-04-20 19:55:43 +08:00
openvela-robot f5c4f4b3be avcodec/mediacodecdec: add debug logging around hw buffer lifecycle
Some Android devices are very finicky about how quicky output buffers
are returned back to the decoder, especially when they are associated
with a Surface.

This commit adds a new counter that keeps track of exactly how many hw
output buffers are being retained by the user, along with DEBUG level
logging that makes it easy to track the lifecycle of these buffers.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2026-04-20 19:55:40 +08:00
openvela-robot 8e157a7361 ivf: Support VP9 and AV1 as well 2026-04-20 19:55:37 +08:00
openvela-robot 42f3cffc2e lavc/videotoolbox: fix threaded decoding
AVHWAccel.end_frame can run on a worker thread. The assumption of the
frame threading code is that the worker thread will change the AVFrame
image data, not the AVFrame fields. So the AVFrame fields are not synced
back to the main thread. But this breaks videotoolbox due to its special
requirements (everything else is fine). It actually wants to update
AVFrame fields.

The actual videotoolbox frame is now stored in the dummy AVBufferRef, so
it mimics what happens in non-videotoolbox cases. (Changing the
AVBufferRef contents is a bit like changing the image data.) The
post_process callback copies that reference to the proper AVFrame field.

Based on a patch by wm4.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2026-04-20 19:55:32 +08:00
openvela-robot 73dcb226d1 configure: Restore original endianness test
Previously the bit pattern for the endianness test was declared as a
global, instead of a local, variable. This ensures that the pattern
appears unchanged in the object file and is not optimized out.
2026-04-20 19:55:29 +08:00
openvela-robot 6e173f5d36 avcodec/aacdec: log configuration change details
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:55:25 +08:00
openvela-robot 2cd9749bda configure: Fix logic of AMF external library check
Fail if AMF is requested but unavailable, as we do for all
other external libraries that need to be explicitly enabled.
2026-04-20 19:55:22 +08:00
openvela-robot 1b1e7f8e74 avcodec/mediacodec_wrapper: fix false positives in swdec blacklist
'OMX.SEC.avc.dec' is a valid hardware decoder, while the decoders
we seek to blacklist all match 'OMX.SEC.*.sw.dec'.
2026-04-20 19:55:19 +08:00
openvela-robot dc0da53272 examples: Use new API for transcoding example
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 19:55:16 +08:00
openvela-robot d79fed1d40 avcodec/mediacodec_wrapper: blacklist more software decoders
Additionally blacklist ffmpeg, Samsung and Qualcomm
software implementations offered through MediaCodec.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2026-04-20 19:55:12 +08:00
openvela-robot ef941d04ed hls: Add a discontinuity marker on recover
It seems to improve the compatibility with the js demuxers.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:55:10 +08:00
openvela-robot 1c2a54310c avformat/dashenc: add option to change HTTP method 2026-04-20 19:54:59 +08:00
openvela-robot 8e220aa68d fate: Error out more gracefully on configure failure
If configure fails before config.fate is generated, the report file misses
some values and gets discarded by the FATE server. In these cases, print
those values as "failed" along with the failing configure command line.
2026-04-20 19:54:56 +08:00
openvela-robot fcc3fe47f3 Merge commit '2651352988212531038326c44754ece1728c4a3b'
* commit '2651352988212531038326c44754ece1728c4a3b':
  cbs: Allocate the context inside the init function

This commit is a noop, see 6734eef6b8

Merged-by: Mark Thompson <sw@jkqxz.net>
2026-04-20 19:54:34 +08:00
openvela-robot 7e49adfbc3 cbs: Allocate the context inside the init function
... instead of making callers allocate it themselves.  This is more
consistent with other APIs in libav.
2026-04-20 19:54:30 +08:00
openvela-robot 3448c84a04 avcodec/mediacodecdec: refactor to take advantage of new decoding api
This refactor splits up the main mediacodec decode loop into two
send/receive helpers, which are then used to rewrite the receive_frame
callback and take full advantage of the new decoding api. Since we
can now request packets on demand with ff_decode_get_packet(), the
fifo buffer is no longer necessary and has been removed.

This change was motivated by behavior observed on certain Android TV
devices, featuring hardware mpeg2/h264 decoders which also deinterlace
content (to produce multiple frames per field). Previously, this code
caused buffering issues because queueInputBuffer() was always invoked
before each dequeueOutputBuffer(), even though twice as many output
buffers were being generated.

With this patch, the decoder will always attempt to drain new frames
first before sending more data into the underlying codec.

Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2026-04-20 19:54:24 +08:00
openvela-robot d7e2623a60 Revert "configure: Stop using dlltool to create an import library"
This reverts commit 67c72f08a4.

While the linker produced import libraries might work with MSVC in
simple test cases, they don't if e.g. linking to multiple GNU ld
produced import libraries at the same time. (They end up importing
functions from the wrong libraries.) The ones produced by dlltool
work fine though.

This issue was pointed out by Hendrik Leppkes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:54:22 +08:00
openvela-robot 9b45b98e10 h264_idct: enable unmacro on newer NASM versions
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2026-04-20 19:54:05 +08:00
openvela-robot 320af4b0da avcodec/vc1dec: fix mby_start for interlaced content
Bug-Id: 1100
Bug-Id: ffmpeg/Ticket2531
Cc: libav-stable@libav.org
2026-04-20 19:54:02 +08:00
openvela-robot 95825d3085 Merge commit '6829a079444e10818a847e153121fb458cc5c0a8'
* commit '6829a079444e10818a847e153121fb458cc5c0a8':
  qsvdec: Relax the surface vs coded dimension check

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:53:50 +08:00
openvela-robot 5e6a2149c6 lavc/qsv: default la_ds to MFX_LOOKAHEAD_DS_UNKNOWN
MFX_LOOKAHEAD_DS_UNKNOWN means auto.
-1 is not a valid value.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2026-04-20 19:53:48 +08:00
openvela-robot 5f7cf2031d fate/libavcodec: add codec_desc test
Remove runtime check at codec_desc.c

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2026-04-20 19:53:45 +08:00
openvela-robot 11800e5ce0 lavc: Add support for increasing hardware frame pool sizes
AVCodecContext.extra_hw_frames is added to the size of hardware frame
pools created by libavcodec for APIs which require fixed-size pools.
This allows the user to keep references to a greater number of frames
after decode, which may be necessary for some use-cases.

It is also added to the initial_pool_size value returned by
avcodec_get_hw_frames_parameters() if a fixed-size pool is required.
2026-04-20 19:53:42 +08:00
openvela-robot c45b913aac lavc: add new API for iterating codecs and codec parsers
Based on an unfinished patch by atomnuker.
2026-04-20 19:53:35 +08:00
openvela-robot d2c59c1ae4 configure: Simplify restrict keyword handling
Skip a variable indirection and only redefine restrict if necessary.
2026-04-20 19:53:33 +08:00
openvela-robot 220feab5f9 rtsp: rename certain options after a deprecation period
The "timeout" option name inherently clashes with the meaning of the
HTTP libavformat protocol option with the same name. Rename it after a
deprecation period to make it compatible with the HTTP one.
2026-04-20 19:53:29 +08:00
openvela-robot 8727fa1d3e hwcontext: Fix documentation for av_hwdevice_ctx_alloc()
From ffmpeg commit 9365dfcbf6.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2026-04-20 19:53:27 +08:00
openvela-robot 4756ac5c06 configure: update minimum required version of libvmaf
At least version 0.6.2 is needed since commit
df3222d4bb.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:52:45 +08:00
openvela-robot 30f8a55e46 Add support for H.264 and HEVC hardware encoding for AMD GPUs based on AMF SDK
Requires AMF headers for at least version 1.4.4.1.

Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:52:43 +08:00
openvela-robot 121d2753b3 configure: bump year
Happy new year!
2026-04-20 19:52:38 +08:00
openvela-robot f372382cc3 cmdutils: update copyright year to 2018 2026-04-20 19:52:35 +08:00
openvela-robot 2d445d4482 configure: add missing avcodec dep to avfilter for de/convolve filters 2026-04-20 19:52:28 +08:00
openvela-robot e9657caeb1 x264: Support version 153
It has native simultaneus 8 and 10 bit support.
2026-04-20 19:52:25 +08:00
openvela-robot 3e55220e8e avfilter/vf_psnr: add more gbrap formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:52:16 +08:00
openvela-robot 81675aa8ec mmaldec: Fix compilation after 2fcb0090
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:52:13 +08:00
openvela-robot 121c408a70 configure: Fix case of static libmp3lame
Fixes #6918.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:52:10 +08:00
openvela-robot f7568e9bcb lavc: Add codec metadata to indicate hardware support 2026-04-20 19:52:07 +08:00
openvela-robot 2ef1ab1ae9 avcodec: add metadata to identify wrappers and hardware decoders
Explicitly identify decoder/encoder wrappers with a common name. This
saves API users from guessing by the name suffix. For example, they
don't have to guess that "h264_qsv" is the h264 QSV implementation, and
instead they can just check the AVCodec .codec and .wrapper_name fields.

Explicitly mark AVCodec entries that are hardware decoders or most
likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing
API users listing hardware decoders in a more generic way. The proposed
AVCodecHWConfig does not provide this information fully, because it's
concerned with decoder configuration, not information about the fact
whether the hardware is used or not.

AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software
implementations in case the hardware is not capable.

Based on a patch by Philip Langdale <philipl@overt.org>.

Merges Libav commit 47687a2f8a.
2026-04-20 19:51:54 +08:00
openvela-robot d9503e582f avcodec: add metadata to identify wrappers and hardware decoders
Explicitly identify decoder/encoder wrappers with a common name. This
saves API users from guessing by the name suffix. For example, they
don't have to guess that "h264_qsv" is the h264 QSV implementation, and
instead they can just check the AVCodec .codec and .wrapper_name fields.

Explicitly mark AVCodec entries that are hardware decoders or most
likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing
API users listing hardware decoders in a more generic way. The proposed
AVCodecHWConfig does not provide this information fully, because it's
concerned with decoder configuration, not information about the fact
whether the hardware is used or not.

AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software
implementations in case the hardware is not capable.

Based on a patch by Philip Langdale <philipl@overt.org>.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:51:51 +08:00
openvela-robot 4ed1312221 avfilter/vf_pseudocolor: add support for more formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:51:47 +08:00
openvela-robot 6bb98b724d checkasm: Use LOCAL_ALIGNED for aligned variables on the stack
This fixes fate-checkasm-hevc_mc on ARMCC 5.0 after adding
NEON HEVC MC assembly.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:51:44 +08:00
openvela-robot 0dcf65791a avfilter/x86/vf_threshold : add threshold16 SIMD (SSE4 and AVX2) 2026-04-20 19:51:35 +08:00
openvela-robot 84a22d001a hevc: Add hevc_get_pixel_4/8/12/16/24/32/48/64
Checkasm timings:
block size bitdepth  C       NEON
4           8 bit:    146.7   48.7
           10 bit:    146.7   52.7
8           8 bit:    430.3   84.4
           10 bit:    430.4  119.5
12          8 bit:    812.8  141.0
           10 bit:    812.8  195.0
16          8 bit:   1499.1  268.0
           10 bit:   1498.9  368.4
24          8 bit:   4394.2  574.8
           10 bit:   3696.3  804.8
32          8 bit:   5108.6  568.9
           10 bit:   4249.6  918.8
48          8 bit:  16819.6 2304.9
           10 bit:  13882.0 3178.5
64          8 bit:  13490.8 1799.5
           10 bit:  11018.5 2519.4

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:51:32 +08:00
openvela-robot 2e91690caa x86/vf_hflip: don't load the width argument twice
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:51:28 +08:00
openvela-robot c9122feec6 vaapi_h264: Add named options for setting profile and level 2026-04-20 19:51:26 +08:00
openvela-robot 3e2ff72f85 avutil/x86util : add macro for loading a 128 bits constants in an xmm or in each part of an ymm in order to simplify avx2 asm func 2026-04-20 19:51:19 +08:00
openvela-robot f70cdc38cd cbs: Add padding to slice data allocations
These may be read by the bitstream reader, so they should include the
necessary padding for overreads.
2026-04-20 19:51:16 +08:00
openvela-robot bd0f01abc8 avfilter/drawbox: rename variable for maximum thickness
The present value name for maximum thickness is 'max' which results in a
parse error of any thickness expression containing 'max(val1,val2)'.

Value renamed to 'fill'. Tested locally and documented.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:51:07 +08:00
openvela-robot fd73f875db prores: Always assume limited range
As defined by the specification.
2026-04-20 19:51:05 +08:00
openvela-robot 17851e998f avcodec/nvdec: Round up odd width/height values
nvdec will not produce odd width/height output, and while this is
basically never an issue with most codecs, due to internal alignment
requirements, you can get odd sized jpegs.

If an odd-sized jpeg is encountered, nvdec will actually round down
internally and produce output that is slightly smaller. This isn't
the end of the world, as long as you know the output size doesn't
match the original image resolution.

However, with an hwaccel, we don't know. The decoder controls
the reported output size and the hwaccel cannot change it. I was
able to trigger an error in mpv where it tries to copy the output
surface as part of rendering and triggers a cuda error because
cuda knows the output frame is smaller than expected.

To fix this, we can round up the configured width/height passed
to nvdec so that the frames are always at least as large as the
decoder's reported size, and data can be copied out safely.

In this particular jpeg case, you end up with a blank (green) line
at the bottom due to nvdec refusing to decode the last line, but
the behaviour matches cuviddec, so it's as good as you're going to
get.
2026-04-20 19:50:56 +08:00
openvela-robot 6aa78e5341 qsvenc: cavlc option is only available for h264
Moving option definition to h264 implementation and fixing command line defaults
in order to properly respect cavlc input value

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2026-04-20 19:50:53 +08:00
openvela-robot 39068c8bd9 avfilter: fix indentation
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:50:42 +08:00
openvela-robot 55eac1555c libavcodec: Don't use dllexport, only dllimport when building DLLs
The only purpose of dllexport (which is set while building the library
that exports the symbols) is to have the linker automatically
export such symbols into a DLL without using a def file - it doesn't
affect the generated code.

For both MSVC and mingw builds, this isn't essential since we override
what symbols to export via an autogenerated def file instead.

Update a comment in configure to refer to the right concept.

With lld, this avoids warnings about duplicate export directives,
when some symbols are requested to be exported both via dllexport
attributes and via the autogenerated def file.

This also reduces the number of lines of code marginally.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:50:39 +08:00
openvela-robot a3c38e5c11 Merge commit '5c2a01f064d5ab2b309d25c7f46c6c4471838d90'
* commit '5c2a01f064d5ab2b309d25c7f46c6c4471838d90':
  Makefile: fix distclean target
  configure: fix writing library dependencies to config.sh

This commit is a noop, see
d9ff1e4c8b
e7e7d56a85

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:50:30 +08:00
openvela-robot 8031029947 makedef: Pass EXTERN_PREFIX from configure to makedef
This avoids having to use either "dumpbin -headers" to find out
the current architecture, or pass $ARCH from configure to deduce it.

When configuring with --disable-asm, ARCH is equal to "c", which doesn't
give any indication of what symbol prefix is to be used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:50:28 +08:00
openvela-robot dbfb13c71c avcodec/dvbsubdec: Avoid re-computing clut
Fixes: Timeout
Fixes: 3218/clusterfuzz-testcase-5390672154591232

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:50:13 +08:00
openvela-robot 144dc4bb0d configure: Miscellaneous minor changes
- Move a variable closer to where it is used
- Add an explanatory comment
- Simplify a crosscompile check
- Minor SHFLAGS simplification
- Coalesce some threads tests
2026-04-20 19:50:08 +08:00
openvela-robot 1ede696c6d avformat/http: fix chunked response w/ multiple_requests=1
Currently if you use the multiple_requests=1 option and try to
receive a chunked-encoded response, http_buf_read() will hang forever.

After this patch, EOF is emulated once a 0-byte final chunk is
received by setting a new flag. This flag is reset in ff_http_do_new_request(),
which is used to make additional requests on the open socket.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Aman Gupta <aman@tmm1.net>
2026-04-20 19:50:03 +08:00
openvela-robot 462e4adae5 Makefile: fix distclean target
It must imply clean. Regression since 7ebe7e8e7a.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:50:01 +08:00
openvela-robot 4915c4777f configure: fix writing library dependencies to config.sh
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:49:55 +08:00
openvela-robot ef0187a8e3 configure: fix writing library dependencies to config.sh
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:49:52 +08:00
openvela-robot c49b317925 avfilter/vf_tile: add overlap option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:49:49 +08:00
openvela-robot 50e5e801ca vaapi_h264: Do not use deprecated header type
SEI headers should be inserted as generic raw data (the old specific
type has been deprecated in libva2).
2026-04-20 19:49:46 +08:00
openvela-robot 56e64c0b7c Merge commit '9f5b77c16f4da6248b57f0601364d9c762c620c2'
* commit '9f5b77c16f4da6248b57f0601364d9c762c620c2':
  png: Report more details regarding unsupported pixel formats

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:48:05 +08:00
openvela-robot bc44a5e5d1 vp9_superframe_bsf: cache packets by creating new references instead of moving pointers
Fixes invalid reads after free.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:48:03 +08:00
openvela-robot e502e43c21 Merge commit 'defe307fb22beca60a632e976ab97e5edd4aee25'
* commit 'defe307fb22beca60a632e976ab97e5edd4aee25':
  mov: move stsd finalization to an appropriate place
  mov: Do not set stsd_count if mov_read_stsd() fails
  mov: log and return early on non-positive stsd entry counts

See 8b43ee4054
656feb641d

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:47:53 +08:00
openvela-robot ad5098f03a smacker: add sanity check for length in smacker_decode_tree()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Bug-Id: 1098
Cc: libav-stable@libav.org
Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
2026-04-20 19:47:50 +08:00
openvela-robot cb0c3b1f8f avdevice/decklink_dec: make some function static
Reviewed-by: Aaron Levinson <alevinsn_dev@levland.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:47:39 +08:00
openvela-robot 258692f204 build: Remove pkg-config files on clean instead of on distclean
The files are no longer generated by configure, so they should not
be removed by the distclean target any longer.
2026-04-20 19:47:36 +08:00
openvela-robot d36c36b741 aacenc: mark the preset 5.0/5.1 layouts correctly with back speakers
The spec is correct, it does list these layouts as having rear speakers.
Questionable how many decoders correctly interpret those correctly since
side is way more popular.
Also fixes fate-aac-yoraw-encode.

Reported-by: pkviet <pkv.stream@gmail.com>
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2026-04-20 19:47:33 +08:00
openvela-robot e274a0967b build: Add uninstall-pkgconfig target to match install-lib*-pkgconfig 2026-04-20 19:47:31 +08:00
openvela-robot 9e62819d04 libavcodec/utvideo : simplify decode_plane
the func is only call with step = 1
no need to pass it in the func
2026-04-20 19:47:11 +08:00
openvela-robot 74576104ba matroskadec: allow RealAudio/Cook/Sipro streams of flavor 0
Regression since 569d18aa9d.

Bug-Id: 1055
Cc: libav-stable@libav.org
2026-04-20 19:47:08 +08:00
openvela-robot a6eea4bcb5 avcodec/exr: fix undefined shift in pxr24_uncompress()
Fixes: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
Fixes: 3787/clusterfuzz-testcase-minimized-5728764920070144

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:46:56 +08:00
openvela-robot da3bbb1389 configure: Use right variable and right value for AIX ar flags 2026-04-20 19:46:53 +08:00
openvela-robot 0ba902fa4e h2645_parse: Allocate a single buffer per packet
Drastically reduces memory usage on pathological streams.
Fixes ticket #6789
2026-04-20 19:46:50 +08:00
openvela-robot 32eeb8c14d avconv.c: fix calculation of input file duration in seek_to_start()
Fixes looping files without audio or when using stream_copy, where
ist->nb_samples is not set since no decoding is done.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 19:46:47 +08:00
openvela-robot 94c8c1c61a avfilter/vf_tile: remove limit of max tile size
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:46:44 +08:00
openvela-robot 31045dd209 Revert "configure: Detect AIX ar command instead of hardcoding it in the OS section"
This reverts commit 4822ee3ca6.
AIX is a fringe oddity. Do not clutter the main codepath with AIX workarounds.
2026-04-20 19:46:41 +08:00
openvela-robot 86e3b9331e lavfi/framepool: use av_image_check_size2().
Allow filters to handle larger frames.
2026-04-20 19:46:35 +08:00
openvela-robot 6b883f28fa configure: Miscellaneous small changes to helper functions
- Reuse sanitize_var_name() where appropriate
- Add some quotes to enabled()/disabled() to ease readability
- Fix logged names of some helper functions
- Filter LDFLAGS also in test_ldflags()
2026-04-20 19:46:32 +08:00
openvela-robot 32b69212ff Merge commit 'bee89ed3ec61a4a0e72255ae6f4a4274d25b5ccd'
* commit 'bee89ed3ec61a4a0e72255ae6f4a4274d25b5ccd':
  matroskaenc: don't warn about unknown spherical metadata when there isn't any

This commit is a noop.

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:45:26 +08:00
openvela-robot 1615b73a1b configure: Stop using dlltool to create an import library
There shouldn't be any functional difference between the import
library created by dlltool and the one produced by the linker itself.
Keep installing it with both names though, for compatibility with users
that expect both to exist.

The dlltool step was added in ec10a9ab4; prior to that, a MSVC
compatible import library was generated using lib.exe. After that
commit, there was no functional difference between the two import
libraries (and since MSVC 2012, link.exe works just fine with the
GNU binutils generated one).

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:45:24 +08:00
openvela-robot 5ac1382eff Merge commit '50a1c66cf6ab7eb683daaa9e2da3869fa3a54609'
* commit '50a1c66cf6ab7eb683daaa9e2da3869fa3a54609':
  ac3_parser: add a public function for parsing the data required by the demuxer

avpriv_ac3_parse_header() is left in place but without the
GetBitContext parameter, as the mov muxer requires a lot more fields
than just bitstream_id and frame_size from the AC3HeaderInfo struct.

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:44:45 +08:00
openvela-robot 97668ead07 doc: Provide better examples for hls and segment muxing
Some encoders do not output further IDRs if not requested to.
2026-04-20 19:44:42 +08:00
openvela-robot 5f15b0c9ab Don't use _tzcnt instrinics with clang for windows w/o BMI.
Technically _tzcnt* intrinsics are only available when the BMI
instruction set is present. However the instruction encoding
degrades to "rep bsf" on older processors.

Clang for Windows debatably restricts the _tzcnt* instrinics behind
the __BMI__ architecture define, so check for its presence or
exclude the usage of these intrinics when clang is present.

See also:
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-November/183404.html
https://bugs.llvm.org/show_bug.cgi?id=30506
http://lists.llvm.org/pipermail/cfe-dev/2016-October/051034.html

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Matt Oliver <protogonoi@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:44:18 +08:00
openvela-robot 0b37ca2251 vaapi: Disable deprecation warnings around use of struct vaapi_context 2026-04-20 19:44:15 +08:00
openvela-robot 60f384255d lavfi/tests/filtfmts: Constify a variable.
Fixes the following warning:
libavfilter/tests/filtfmts.c: In function ‘main’:
libavfilter/tests/filtfmts.c:103:18: warning: assignment discards ‘const’ qualifier from pointer target type
2026-04-20 19:44:06 +08:00
openvela-robot 316e991ed1 arm: Check for have_vfp_vm instead of !have_vfpv3 for float_dsp_vfp
This was missed in e2710e790c since those functions weren't exercised
by checkasm.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:44:04 +08:00
openvela-robot f7f952bf0b Merge commit 'd6390090c4dbd766b77353553d9cb4fb4fb41ebd'
* commit 'd6390090c4dbd766b77353553d9cb4fb4fb41ebd':
  configure: Skip check for inline assembly capabilities when explicitly disabled

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:43:58 +08:00
openvela-robot f362b3c5d0 lavc: fix hw_device_ctx operation
Commit b46a77f19d accidentally broke this (requested change that was
added to the patch later and which was not fully tested).

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2026-04-20 19:43:56 +08:00
openvela-robot 7ba71d4d18 avformat: remove ABI portion of the side data merging API
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:43:25 +08:00
openvela-robot fe0f2066fe configure: Group system feature variables and system libraries together 2026-04-20 19:43:23 +08:00
openvela-robot 91ed2a7a0d libavformat: not treat 0 as EOF
transfer_func variable passed to retry_transfer_wrapper
are h->prot->url_read and h->prot->url_write functions.
These need to return EOF or other error properly.
In case of returning >= 0, url_read/url_write is retried
until error is returned.

Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com>
2026-04-20 19:42:43 +08:00
openvela-robot 1755dd84e7 lavc: external hardware frame pool initialization
This adds a new API, which allows the API user to query the required
AVHWFramesContext parameters. This also reduces code duplication across
the hwaccels by introducing ff_decode_get_hw_frames_ctx(), which uses
the new API function. It takes care of initializing the hw_frames_ctx
if needed, and does additional error handling and API usage checking.

Support for VDA and Cuvid missing.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 19:42:40 +08:00
openvela-robot a989fe3089 avcodec/cfhd: support cropped height tag
Ported from libav. Authored by one of the following:

Anton Khirnov <anton@khirnov.net>
Diego Biurrun <diego@biurrun.de>
Vittorio Giovara <vittorio.giovara@gmail.com>

Reviewed-by: kierank
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:42:34 +08:00
openvela-robot 8ccc694e72 qsv: Make the hevc idr_interval consistent with the h264 one
According to the MediaSDK documentation the idr_interval value has
a different meaning depending on the codec:

    0 in H264 means make every I-frame IDR, in HEVC it means to have
    it only at the beginning.

    1 in H264 means every other I-frame is not-IDR, in HEVC it means
    that every I-frame is IDR.

Keep the behaviour consistent between the two encoders by increasing
by 1 internally the idr_interval value for HEVC.
2026-04-20 19:42:32 +08:00
openvela-robot 9b8c4df586 lavf/cafenc: Allow muxing opus.
QuickTime does not require the (unknown) kuki chunk for decoding.
2026-04-20 19:42:21 +08:00
openvela-robot 3358bf1661 cbs: Add test dependencies
Fixes the MPEG-2 failure with --disable-error-resilience.
2026-04-20 19:42:19 +08:00
openvela-robot 0bab024127 configure: add missing optional deps on gcrypt and openssl to the hls muxer
Should fix ticket #6738

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:42:12 +08:00
openvela-robot 20f24ace3c mss1: Add missing macro parameters to ARITH_GET_* macros
It is wrong to pass no arguments to a macro that expects one argument
and some compilers complain.
2026-04-20 19:42:09 +08:00
openvela-robot b493a4cf24 avcodec/snowdec: Check mv_scale
Fixes: runtime error: signed integer overflow: 2 * -1094995530 cannot be represented in type 'int'
Fixes: 3512/clusterfuzz-testcase-minimized-4812747210489856

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:42:06 +08:00
openvela-robot d0d7b4c6a9 qsv: Expose idr_interval for hevc as well 2026-04-20 19:42:03 +08:00
openvela-robot 1e9d0ae9b4 configure: add a -lstdc++ flag to the some external library checks
Two of them are missing it in their pkg-config file, so adding it
here is a workaround until said pkg-config files are fixed.

Debugged with the help of Reino Wijnsma.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:42:00 +08:00
openvela-robot 00c9930f1d Remove all output devices
The libavformat API is not suitable for exporting output devices as muxers.
Some practical problems are e.g. lack of timing/synchronization mechanisms
or interaction with output-specific features.
2026-04-20 19:41:57 +08:00
openvela-robot c9b043d5ad configure: add missing libfontconfig and libfreetype dependencies to showcqt filter
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:41:51 +08:00
openvela-robot 2b7458c6de configure: Drop feature for randomly disabling/enabling components
This feature was never used for anything.
2026-04-20 19:41:48 +08:00
openvela-robot 56e06e9517 configure: remove libdl dependency from libndi_newtek
We are not using dynamic loading for libndi.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 19:41:33 +08:00
openvela-robot 65270aef7c configure: Fix stupid typo in gsm.h header name 2026-04-20 19:41:31 +08:00
openvela-robot f8db777ae1 configure: fix decklink dependencies
We don't need libdl for win32/mingw.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 19:41:26 +08:00
openvela-robot 66f9acc6dd build: Drop support for Tru64 Unix (OSF/1)
This proprietary Unix flavor dropped from the face of the earth more
than a decade ago. Nothing of value was lost.
2026-04-20 19:41:23 +08:00
openvela-robot 4a9161f3f7 Makefile: generate stripped CLI tools directly instead of copying unstripped ones first
Now works with --disable-stripping.

Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 19:41:20 +08:00
openvela-robot 6d94f51622 configure: rename hevc_ps to hevcparse
Build h2645_parse.o with it, as every hevc_ps dependency also needs it.
This is more in line with h264's h264parse module.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:41:17 +08:00
openvela-robot d1e26d889f avcodec/dca_parser: revert to conservative sync distance estimation
Fixes regression introduced by commit a0349ae27c
when parsing 14-bit streams with excessive frame size stored in header.

Fixes ticket #6723.
2026-04-20 19:41:14 +08:00
openvela-robot 9e363d673e cpu: split flag checks per arch in av_cpu_max_align()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:41:11 +08:00
openvela-robot d76f607314 MAINTAINERS: change the decklink maintainer to myself
Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 19:41:05 +08:00
openvela-robot 4724a96364 configure: Add test_pkg_config()
This helper is split off check_pkg_config(), setting only the pkg CFLAGS
and extralibs. This is useful for checks that do not require or do not
benefit from setting global CFLAGS.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 19:41:02 +08:00
openvela-robot 32379c63c8 avcodec/mips: preload data in hevc sao edge 45 degree filter msa functions
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:39:19 +08:00
openvela-robot 7ce0667b28 hevc: Fix aligned array declarations 2026-04-20 19:39:16 +08:00
openvela-robot f31fc20b53 avfilter/f_metadata: avoid trailing whitespace in filter output
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2026-04-20 19:39:10 +08:00
openvela-robot 6a66e82289 qsv: Join the derived session to the parent
Should improve the performance on multiple transcoding from a single
source.
2026-04-20 19:39:07 +08:00
openvela-robot a1a2206b2f lavf/tls_gnutls: fix compilation with GnuTLS 2.x
Commit 598e416840 added use of
GNUTLS_E_PREMATURE_TERMINATION, which wasn't introduced to GnuTLS
before 2.99.x / 3.x. This fixes compilation with older versions.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2026-04-20 19:38:31 +08:00
openvela-robot 46b1bf1363 http: Reset compressed header flag when starting to read a request
This fixes redirects, where the original redirect response indicated
support for compression, while the actual redirected content didn't.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:38:29 +08:00
openvela-robot 28b9545108 avfilter/interlace: rename two variables for consistency
Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
2026-04-20 19:38:24 +08:00
openvela-robot 128da943b3 cbs_h264: Fix writing streams with auxiliary pictures
Tested with the alphaconformanceG sample.
2026-04-20 19:38:20 +08:00
openvela-robot c8ecda600b avformat/libopenmpt: Query duration and metadata after selecting subsong
Duration depends on the selected subsong and thus must be queried after
selecting the subsong. There is no compelling reason to query other
metadata earlier either.

Tested with libopenmpt version: 0.2.8760-beta27
Libopenmpt configure options: --without-ogg --without-vorbis
--without-vorbisfile --without-portaudio --without-portaudiocpp
--without-mpg123 --without-pulseaudio --without-sndfile --without-flac

Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Josh de Kock <josh@itanimul.li>
2026-04-20 19:38:13 +08:00
openvela-robot 1bd6a99951 smacker: return meaningful error codes on failure 2026-04-20 19:38:08 +08:00
openvela-robot 8f743bc28d pixdesc: Add API to map color property names to enum values
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:38:03 +08:00
openvela-robot 29e30ba936 pixdesc: Add API to map color property names to enum values
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:38:00 +08:00
openvela-robot b0895f84f2 libavcodec/exr : add X86 SIMD for reorder_pixels
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:37:55 +08:00
openvela-robot 18fb7cdfcb libavfilter/vf_vpp: Add common filters of the qsv vpp
Add common filters of the qsv vpp features including scale,denosie,
deinterlace,frc,crop and procAmp.

Performance will be significantly reduced in the test if using cascade
mode just like qsv framerate + qsv scale + qsv deinterlace + qsv denoise in
separated way no matter in system or video memmory cases.
And the code is so redundant because so much the same just as session and
surface's creation and management.
So we add a common qsv filter.

Usage:
-hwaccel qsv -c:v h264_qsv -r 25 -i in -vf
vpp_qsv=w=iw/2:h=400:deinterlace=1:framerate=60:detail=50:denoise=50
-b 2M -maxrate 3M -c:v h264_qsv -y out.h264

Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
Signed-off-by: Zhengxu Huang <zhengxu.maxwell@gmail.com>
Signed-off-by: Andrew Zhang <huazh407@gmail.com>
Change-Id: I130392ce722138c209ab658c5f03f0009b6e8024
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2026-04-20 19:37:53 +08:00
openvela-robot 583c2ad71a lavd/kmsgrab: Fix packet flag setting
Found-by: James Almer <jamrial@gmail.com>
2026-04-20 19:37:48 +08:00
openvela-robot af1ee8f3c9 avio: update avio_alloc_context() doxy
It must be freed using avio_context_free() starting with commit
99684f3ae7.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:37:46 +08:00
openvela-robot b8459ecff1 h264_sei: Add namespace prefix to all SEI values
This avoids confusion with equivalent H.265 SEI values when both are
being used at the same time.

(cherry picked from commit 6ea220cbee)
2026-04-20 19:37:42 +08:00
openvela-robot 2abdb3a8da cbs: Always check for bitstream end before reading 2026-04-20 19:37:39 +08:00
openvela-robot 56294c9719 avfilter/vf_datascope: make it possible for output window to automatically change position
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:37:29 +08:00
openvela-robot c727fd9de4 flvdec: Check the avio_seek return value after reading a metadata packet
If the metadata packet is corrupted, flv_read_metabody can accidentally
read past the start of the next packet. If the start of the next packet
had been flushed out of the IO buffer, we would be unable to seek to
the right position (on a nonseekable stream).

Prefer to clearly error out instead of silently trying to read from a
desynced stream which will only be interpreted as garbage.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:37:26 +08:00
openvela-robot 3111366040 avcodec/diracdec: Fix integer overflow in INTRA_DC_PRED()
Fixes: runtime error: signed integer overflow: 1168175789 + 1168178473 cannot be represented in type 'int'
Fixes: 3081/clusterfuzz-testcase-minimized-4807564879462400
Fixes: 2844/clusterfuzz-testcase-minimized-5561715838156800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:22 +08:00
openvela-robot 64a2fcfaa9 Revert "checkasm: Test more h264 idct variants"
This reverts commit 547db1eaec.

This commit wasn't supposed to be pushed (yet) since it hasn't
been reviewed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:37:20 +08:00
openvela-robot 17e8e04310 avcodec/fits: add missing header includes
Fixes checkheaders.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:37:14 +08:00
openvela-robot c83c6794f5 msvc: Properly specify dllexport for data symbols shared across dll boundaries
We currently only have exported data symbols within libavcodec, but
the concept is easy to extend to other libraries if necessary.
The attribute declaration needs to be in a private header though,
since we can't use CONFIG_SHARED in public installed headers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:37:11 +08:00
openvela-robot c5ed9f1ee5 avfilter/vf_libvmaf: fix pre convert to framesync2 bugs
Hi, it fixes the errors while converting to framesync2.
libvmaf was changed recently, double *score variable is removed in the new
version since it's not used anywhere. This patch fixes all the warnings and
segmentation faults.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2026-04-20 19:37:07 +08:00
openvela-robot 51c82b2c0e lavf: make avio_read_partial() public
Main use-case is proxying avio through a foreign I/O layer and a custom
AVIO context, without losing latency and performance characteristics.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:37:05 +08:00
openvela-robot 8f53bc3adc lavc/vaapi_encode_h265: Enable VBR mode
Follow vaapi_h264 style, enable the VBR mode.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2026-04-20 19:36:59 +08:00
openvela-robot d6b24a2408 swscale: Do not expand a macro with 'defined' in it
Fixes:

    libswscale/utils.c:1632:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
    #if USE_MMAP
        ^
    libswscale/utils.c:1577:49: note: expanded from macro 'USE_MMAP'
    #define USE_MMAP (HAVE_MMAP && HAVE_MPROTECT && defined MAP_ANONYMOUS)
                                                    ^
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:36:57 +08:00
openvela-robot 4af5536f55 avfilter/af_agate: switch to activate
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:36:50 +08:00
openvela-robot c0df136248 configure: Include d3d11va_extralibs in libavutil
This fixes shared WinRT/UWP builds with d3d11va enabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:36:48 +08:00
openvela-robot 5bfef89719 libavdevice/decklink: configurablity to set max queue size
Signed-off-by: Ravindra Patagar <rpatagar@akamai.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 19:36:43 +08:00
openvela-robot 8a6966744a yadif: Account for the buffer alignment while processing the frame edges
Avoid out of bound reads.

Bug-Id: 1031
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:36:41 +08:00
openvela-robot 36baa52d31 lavc/g726: Add a little-endian G.726 encoder.
Fixes ticket #6596.
2026-04-20 19:36:37 +08:00
openvela-robot d82712c491 png: Report more details regarding unsupported pixel formats 2026-04-20 19:36:35 +08:00
openvela-robot 9273b63c15 avfilter/vf_pseudocolor: add support for some subsampled formats 2026-04-20 19:36:32 +08:00
openvela-robot e3613e06db lavc: Add mpeg2_metadata bitstream filter 2026-04-20 19:36:29 +08:00
openvela-robot 88e5255639 lavc/vaapi_encode_h264: add "coder" option support
Follow libx264 style to support "coder" option, and set it to
cabac by default.

Signed-off-by: Yi A Wang <yi.a.wang@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2026-04-20 19:36:26 +08:00
openvela-robot 4b41db93bc cbs_h2645: Return error if writing fails 2026-04-20 19:36:23 +08:00
openvela-robot 66eb88b55e Add macros to x86util.asm .
Improved version of VBROADCASTSS that works like the avx2 instruction.
Emulation of vpbroadcastd.
Horizontal sum HSUMPS that places the result in all elements.
Emulation of blendvps and pblendvb.

Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
2026-04-20 19:36:19 +08:00
openvela-robot 525be6b180 h264dec: use a large enough field for reference list modification values
pic_num can be at most 17-bit, so uint8_t is not sufficient.

Found-By: Bradley Sepos <bradley@bradleysepos.com>
CC: libav-stable@libav.org
2026-04-20 19:36:17 +08:00
openvela-robot 773a310335 avfilter/scale_npp: fix passthrough mode
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2026-04-20 19:36:12 +08:00
openvela-robot 6b584e3d38 lavc: Add coded bitstream read/write API 2026-04-20 19:36:08 +08:00
openvela-robot 1c91b8efaf h264: Add support for alternative transfer characterics SEI
The use of this SEI is for backward compatibility in HLG HDR systems:
older devices that cannot interpret the "arib-std-b67" transfer will
get the compatible transfer (usually bt709 or bt2020) from the VUI,
while newer devices that can interpret HDR will read the SEI and use
its value instead.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:36:05 +08:00
openvela-robot 54e1d567ee h264: Add support for alternative transfer characterics SEI
The use of this SEI is for backward compatibility in HLG HDR systems:
older devices that cannot interpret the "arib-std-b67" transfer will
get the compatible transfer (usually bt709 or bt2020) from the VUI,
while newer devices that can interpret HDR will read the SEI and use
its value instead.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:36:02 +08:00
openvela-robot 127f49fdc9 avformat/hlsenc: allow dynamic encryption key rotation
Makes behaviour of 805ce25b1d optional, re-enables
HLS key rotation feature

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: DHE <git@dehacked.net>
2026-04-20 19:35:57 +08:00
openvela-robot 6e48113fce hevc: Validate the number of long term reference pictures
This would overflow if the stream contained a value greater than the
maximum allowed by the standard (32).
2026-04-20 19:35:55 +08:00
openvela-robot 55845e9707 avcodec/dirac_vlc: Fix invalid shift
Fixes: runtime error: shift exponent 65 is too large for 64-bit type 'residual' (aka 'unsigned long')
Fixes: 2737/clusterfuzz-testcase-minimized-4968639147016192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:35:50 +08:00
openvela-robot 9f0224be97 mov: Do not set stsd_count if mov_read_stsd() fails
Based on an FFmpeg patch by Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:35:47 +08:00
openvela-robot 3193bb9c8d sws/tests/pixdesc_query: fix use of free() instead of av_free()
Fix CID 1415949
2026-04-20 19:35:44 +08:00
openvela-robot bebb77e59c mov: log and return early on non-positive stsd entry counts
Based on an FFmpeg patch by Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:35:42 +08:00
openvela-robot 89b81ef958 libavcodec/mips: Improve avc dequant-idct luma dc msa function
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:35:37 +08:00
openvela-robot 79094c054b avconv: when using -loop option bail out if seek to start fails
Fixes an infinite loop when a demuxer fails to seek to the start of the input.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 19:35:34 +08:00
openvela-robot f489948ba4 avcodec/jpeg2000dec: Fix h/vden typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:35:31 +08:00
openvela-robot 251bc421fc lavc, lavu: move frame cropping to a convenience function
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 19:35:27 +08:00
openvela-robot e093ccac19 avutil/frame: add ICC Profile to av_frame_side_data_name
Reviwed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:35:11 +08:00
openvela-robot 3d14f6b478 rmdec: add missing brackets to compound statement
Accidentally left out of 95ce02b35d.
2026-04-20 19:35:08 +08:00
openvela-robot 6d23642de2 lavu/frame: add new side data type for ICC profiles
Many image formats support embedding of ICC profiles directly in
their bitstreams. Add a new side data type to allow exposing them to
API users.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2026-04-20 19:35:05 +08:00
openvela-robot 2e843aa235 libavcodec/mjpeg_qsv: Add QSV MJPEG encoder
usage:
-hwaccel qsv -c:v h264_qsv -i in -c:v mjpeg_qsv -global_quality 80 -f
mjpeg out

Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
Signed-off-by: Zhengxu Huang <zhengxu.maxwell@gmail.com>
Signed-off-by: Andrew Zhang <huazh407@gmail.com
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2026-04-20 19:35:02 +08:00
openvela-robot 0c81828c55 pixdesc: Explicitly handle invalid arguments to av_find_best_pix_fmt_of_2() 2026-04-20 19:34:58 +08:00
openvela-robot 9ae85ec8be hevc: Make sure to update the current frame transfer characteristic
Otherwise the first decoded frame will still be tagged with the
original transfer instead of the alternative one.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:34:55 +08:00
openvela-robot 9fde2cd08e opusenc: remove unused variable
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2026-04-20 19:34:46 +08:00
openvela-robot 6194d2da7c rmdec: don't ignore the return value of av_get_packet() 2026-04-20 19:34:43 +08:00
openvela-robot 07da58245e avcodec/magicyuv: make RLE table reading match reference
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:34:38 +08:00
openvela-robot f427048dac build: Add feature test macros for glibc 2.19+
glibc introduced _DEFAULT_SOURCE in version 2.19 to replace _BSD_SOURCE and
_SVID_SOURCE, which were deprecated in version 2.20. Add _DEFAULT_SOURCE
where the latter two are used to be forwards-compatible and avoid warnings
about the use of deprecated definitions.
2026-04-20 19:34:35 +08:00
openvela-robot ba5f8a3479 avformat/avio: Remove no-op code in url_find_protocol().
In url_find_protocol(), proto_str is either "file" or a string
consisting of only the characters in URL_SCHEME_CHARS, which does not
include ','. Therefore the strchr(proto_str, ',') call always returns
NULL.

Note: The code was added in commit
6161c41817.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2026-04-20 19:34:31 +08:00
openvela-robot a051d6d396 flac: Convert to the new bitstream reader
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 19:34:28 +08:00
openvela-robot 1c42f64ac7 avcodec/noise_bsf: add support for dropping packets
Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 19:34:25 +08:00
openvela-robot 02cc9486d2 bitstream: Avoid undefined behavior in bitstream_skip()
Do not use skip_remaining() to fully wipe the cache, as this could do
a 64-bit shift of a 64-bit variable which is undefined behavior in C.
Instead set the related variables to zero directly.

Thanks to Uoti for pointing out the problem.

CC: libav-stable@libav.org
2026-04-20 19:34:22 +08:00
openvela-robot 4349ab8774 Revert "x86/sbrdsp: remove unnecessary sign extend instruction in apply_noise_main"
This reverts commit 24bb7db403.

noise has to after all be sign extended, not zero extended, on tests
other than checkasm.
Fixes most aac tests broken by the now reverted commit.
2026-04-20 19:34:16 +08:00
openvela-robot 9684da3360 Add Cinepak encoder
With permission of Tomas Härdin applied by Rl aetey.se

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 19:34:13 +08:00
openvela-robot b416f95782 avfomat/hlsenc: support fmp4 format in hls
add the fmp4 format into hlsenc
because the fmp4 format add into hls from version 7.
the spec link is:
https://tools.ietf.org/html/draft-pantos-http-live-streaming-20
and the describe on WWDC
https://developer.apple.com/videos/play/wwdc2017/515/

Signed-off-by: Steven Liu <lq@onvideo.cn>
2026-04-20 19:34:08 +08:00
openvela-robot 1d9865c731 lavf: Remove codec_tag from dashenc and smoothstreamingenc
Currently, the tags enforced and set on the segmenter muxer level
mismatch what the mp4/ismv muxer uses (since 713efb2c0d).

Skip the codec_tag altogether here, to let the user (try to) set
whichever codec/tag is preferred; the individual chained muxer will
reject invalid codecs anyway.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:34:05 +08:00
openvela-robot f293061025 avcodec/interplayvideo: check that video_size is >0
Fixes #6498.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:33:46 +08:00
openvela-robot 33f1d4f8bb dvbsubdec: Fixed segfault when decoding subtitles
This fixes a segfault (originally found in Movian, but traced to libav)
when decoding subtitles because only an array of rects is allocated,
but not the actual structs it contains. The issue was probably
introduced in commit 2383323 where the loop to allocate the rects in
the array was thrown away.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:33:43 +08:00
openvela-robot deb62e9786 avcodec/utvideodec: add SIMD for restore_rgb_planes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:33:37 +08:00
openvela-robot 24fa46ffba dxva: add declarative profile checks
Make supported codec profiles part of each dxva_modes entry. Every DXVA2
mode is representative for a codec with a subset of supported profiles,
so reflecting that in dxva_modes seems appropriate.

In practice, this will more strictly check MPEG2 profiles, will stop
relying on the surface format checks for selecting the correct HEVC
profile, and remove the verbose messages for mismatching H264/HEVC
profiles. Instead of the latter, it will now print the more nebulous "No
decoder device for codec found" verbose message.

This also respects AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH. Move the
Main10 HEVC entry before the normal one to make this work better.

Originally inspired by VLC's code.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:33:33 +08:00
openvela-robot 0a7c6f3c3c avcodec/hevcdec: check ff_init_cabac_decoder() for failure
Fixes: runtime error: left shift of 1965559808 by 4 places cannot be represented in type 'int'
Fixes: 2333/clusterfuzz-testcase-minimized-5223935677300736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:33:28 +08:00
openvela-robot d7f2f212e8 configure: Reset X86ASM_DEP(FLAGS) when probing for the assembler program
These variables might be set from a previous probe run, but one or the
other program that is probed for may not grok the flags, resulting in
errors during assembling when the values of those variables are passed
to the assembler.
2026-04-20 19:33:25 +08:00
openvela-robot 3ec50d1bf7 ffmpeg: Flush output BSFs when encode reaches EOF
Before this, output bitstream filters would never see EOF and
therefore would not be able to flush any delayed packets.

(cherry picked from commit f64d1100a5)
2026-04-20 19:33:21 +08:00
openvela-robot 84ac5f2251 nvenc: Add an explicit auto alias 2026-04-20 19:33:18 +08:00
openvela-robot 0390bd712b opus_celt: do not use double precision exp2
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2026-04-20 19:33:14 +08:00
openvela-robot c9527827e0 build: Add an option for passing linker flags to the shared library build
Also employ this mechanism to pass $libdir to the runtime library search
path if rpath is enabled. This fixes underlinking of some test binaries
on some systems.
2026-04-20 19:33:11 +08:00
openvela-robot b5fa9421c4 build: Generalize yasm/nasm-related variable names
None of them are specific to the YASM assembler.

(Cherry-picked from libav commit 39e208f4d4)

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:33:07 +08:00
openvela-robot 71b4c38e4b configure: Automatically add -isysroot for darwin if --sysroot is specified
Check the existing flags in the cc/cflags/cppflags/ldflags for
occurrances of -isysroot; if none is found but --sysroot was specified,
set -isysroot to the same value as --sysroot.

This simplifies configuring cross-builds for iOS, if the global
environment variable SDKROOT isn't set.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:33:04 +08:00
openvela-robot ee40e2ca41 mdec: stop preferring the simple IDCT.
This was added in e3e3c82555, probably
as a workaround for the fact that the quant table was not permutated
and the IDCT coefficients are, meaning that you'd only get correct
reconstruction if the IDCT permutation was an identity matrix, which
happens to be the case when you use the simple IDCT. The quant table
permutation bug was fixed in 42dd1434bf,
meaning this workaround is no longer necessary.

In practical terms, before 42dd1434bf,
the PSNR between decodes of the fate-mdec using simple (C) or simplemmx
IDCTs was 35. After 42dd1434bf, it's 90.
2026-04-20 19:33:01 +08:00
openvela-robot 64c700d013 af_bs2b: Add missing casts to complex pointer assignments
Fixes several warnings of the type:
libavfilter/af_bs2b.c:171:22: warning: assignment from incompatible pointer type
2026-04-20 19:32:58 +08:00
openvela-robot da26bf7c02 configure: Move up the avbuild directory creation
The early check for inconsistent in-source vs out-of-source build
cannot generate a config.log otherwise.

(Cherry-picked from libav commit 0ee78020cd)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:32:54 +08:00
openvela-robot bbb50f3a1a tls_openssl: Readd support for nonblocking operation
The rtmp protocol uses nonblocking reads, to poll for incoming
messages from the server while publishing a stream.

Prior to 94599a6de3 and
d13b124eaf, the tls protocol
handled the nonblocking flag, mostly as a side effect from not
using custom IO callbacks for reading from the socket. When custom
IO callbacks were taken into use in
d15eec4d6b, the handling of a nonblocking
socket wasn't necessary for the default blocking mode any longer.

The code was simplified, since it was overlooked that other code
within libavformat actually used the tls protocol in nonblocking mode.

This fixes publishing over rtmps, with the openssl backend.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:32:51 +08:00
openvela-robot 181da903cd avcodec/decode: Update decode_simple_internal() to get the side data correctly.
Use avci->last_pkt_props to get the side data. Using |pkt| doesn't work
when FF_API_MERGE_SD is set, as the compressed side data is expanded into
|tmp|, leaving the original |pkt| unchanged.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:32:48 +08:00
openvela-robot 4e113a9f66 movenc: use correct tag list for AVOutputFormat.codec_tag
ff_mp4_obj_type contains the wrong type of tags for
AVOutputFormat.codec_tag. AVOutputFormat.codec_tag is used to
validate AVCodecParameters.codec_tag so needs to be the same
type of tag.

Creates new tag lists for mp4 and ismv.  New tag lists support
same list of codecs found in ff_mp4_obj_type. psp uses the same
tag list as mp4 since these both use mp4_get_codec_tag to look up tags.
2026-04-20 19:32:45 +08:00
openvela-robot a0751ad3bf avfilter: add superequalizer filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:32:40 +08:00
openvela-robot 928bc45f53 doc: Drop the legacy symlink to README
Windows does not like symlinks and README.md is pretty common nowadays.
2026-04-20 19:32:37 +08:00
openvela-robot 44915cbcc8 fate: use do_md5sum instead of the md5 protocol for most md5 fate tests
The md5 protocol has no seek support, but some tests use seeks. This changes
the fate tests to actually create the output files and calculate the md5 on the
written files, which also makes the tests independent of the size of the output
buffers and output buffering in general.

A new md5pipe fate test method is also introduced to keep the old functionality
for tests where using a non-seekable output was intentional, and matroska md5
tests are changed to use that.

Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 19:32:33 +08:00
openvela-robot 5e3edcdb97 d3d11va: Link directly to dxgi.dll and d3d11.dll functions if LoadLibrary is unavailable
When targeting the UWP API subset, the LoadLibrary function is not
available (and the fallback, LoadPackagedLibrary, can't be used to
load system DLLs). In these cases, link directly to the functions
in the DLLs instead of trying to load them dynamically at runtime.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:32:30 +08:00
openvela-robot 4510dba153 avformat/libssh: check the user provided a password before trying to use it
Fixes ticket #6413

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:32:16 +08:00
openvela-robot 25dd2f503f build: Add missing mpeg4audio dependency for RTP muxer 2026-04-20 19:32:13 +08:00
openvela-robot d8c9558be3 avcodec/hevcdec: Check nb_sps
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:32:08 +08:00
openvela-robot d085763a9b hwcontext: Mark local table static const 2026-04-20 19:32:05 +08:00
openvela-robot c3c938c502 vp9: fix overwrite in ff_vp9_ipred_dr_16x16_16_avx2.
Fixes trac issue 6459.
2026-04-20 19:31:59 +08:00
openvela-robot cb899a6fcc libfdk-aacdec: Correct buffer_size parameter
The timeDataSize argument to aacDecoder_DecodeFrame() seems undocumented
and until 2016 04 (203e3f28fbebec7011342017fafc2a0bda0ce530) unused.
After that commit libfdk-aacdec interprets it as size in sample units
and memsets that on error.

FFmpeg as well as others (like GStreamer) did interpret it as size in
bytes.

Fixes: 1442/clusterfuzz-testcase-minimized-4540199973421056 (This requires recent libfdk to reproduce)

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:31:56 +08:00
openvela-robot a3787b6fb6 lavc/mediacodecdec: switch to the new generic filtering mechanism 2026-04-20 19:31:52 +08:00
openvela-robot 8fd8af8355 ppc: Drop support for Apple GCC
Apple GCC has not been a thing anymore on PowerPC since many years.
2026-04-20 19:31:49 +08:00
openvela-robot 922276c34b x86inc: Add some additional cpuflag relations
Simplifies writing assembly code that depends on available instructions.

LZCNT implies SSE2
BMI1 implies AVX+LZCNT
AVX2 implies BMI2
2026-04-20 19:31:45 +08:00
openvela-robot 6b39e92993 Convert all AVClass struct declarations to designated initializers. 2026-04-20 19:31:42 +08:00
openvela-robot 6647d7daeb avcodec/cfhd: Check band parameters before storing them
Fixes out of array read
Fixes: 2169/clusterfuzz-testcase-minimized-5688641642823680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:31:38 +08:00
openvela-robot 9c3e941c35 nvenc: Add default value for AVCodecContext::refs
AVCodecContext::refs is used to control the DPB size to be used by the
encoder. The default value for AVCodecContext::refs as set in
libavcodec/options_table.h is 1.

This patch sets AVCodecContext::refs to 0 for h264_nvenc and hevc_nvenc in
order to let the driver take the decision of the correct DPB size to use in
all cases.

Signed-off-by: Srinath K R <skr@nvidia.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:31:35 +08:00
openvela-robot 616227430e avfilter/af_sofalizer: switch to libmysofa
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:31:31 +08:00
openvela-robot 23b79b95b3 lavu: add new D3D11 pixfmt and hwcontext
To be used with the new d3d11 hwaccel decode API.

With the new hwaccel API, we don't want surfaces to depend on the
decoder (other than the required dimension and format). The old D3D11VA
pixfmt uses ID3D11VideoDecoderOutputView pointers, which include the
decoder configuration, and thus is incompatible with the new hwaccel
API. This patch introduces AV_PIX_FMT_D3D11, which uses ID3D11Texture2D
and an index. It's simpler and compatible with the new hwaccel API.

The introduced hwcontext supports only the new pixfmt.

Frame upload code untested.

Significantly based on work by Steve Lhomme <robux4@gmail.com>, but with
heavy changes/rewrites.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 19:31:28 +08:00
openvela-robot f98f936d75 libavfilter/scale2ref: Fix out-of-bounds array access
ff_scale_eval_dimensions blindly assumes that two inputs are always
available as of 3385989b98. This is
notably not the case when the function is called for the scale
filter. With the scale filter inputs[1] does not exist.

ff_scale_eval_dimensions now has an updated scale2ref check that
makes certain two inputs are actually available before attempting to
access the second one.

Thanks to James Almer for reporting this bug. This should fix the 820
Valgrind tests I single-handedly managed to break.

Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:31:21 +08:00
openvela-robot 79a43667a7 build: Add missing zlib dependencies for several protocols 2026-04-20 19:31:17 +08:00
openvela-robot 297f8ccb61 x86/aacpsdsp: optimize ff_ps_stereo_interpolate_sse3
Move the unpacking outside of the loop. 5% to 10% faster.

Suggested-by: ubitux
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:31:14 +08:00
openvela-robot 487d321cac avutil/md5: fix misaligned reads
This makes ubsan happy and also considerably increases performance on
big endian systems.

Tested on an IBM POWER7 3.55 GHz

Before:

2.24user 0.14system 0:02.39elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
2.26user 0.11system 0:02.38elapsed 99%CPU (0avgtext+0avgdata 2688maxresident)k
2.23user 0.15system 0:02.38elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
2.25user 0.12system 0:02.38elapsed 100%CPU (0avgtext+0avgdata 2624maxresident)k
2.20user 0.15system 0:02.36elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k

After:

1.86user 0.13system 0:02.00elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
1.89user 0.11system 0:02.01elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
1.85user 0.14system 0:02.00elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
1.84user 0.15system 0:01.99elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
1.89user 0.13system 0:02.02elapsed 99%CPU (0avgtext+0avgdata 2688maxresident)k

Tested-by: Nicolas George <george@nsup.org>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
2026-04-20 19:31:11 +08:00
openvela-robot 1f49d24247 x86/aacps: add ff_ps_stereo_interpolate_ipdopd_sse3()
About 2x faster than the c version.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:31:07 +08:00
openvela-robot 22c7276013 tls: Hide backend implementation details from users
TLS is currently implemented over either OpenSSL or GnuTLS, with more
backends likely to appear in the future. Currently, those backend libraries
are part of the protocol names used during e.g. the configure stage of a
build. Hide those details behind a generically-named declaration for the
TLS protocol to avoid leaking those details into the configuration stage.
2026-04-20 19:31:04 +08:00
openvela-robot cb35569ed6 checkasm: add _fixed suffix to fixed_dsp tests
Should prevents future conflicts with the similarly named floatdsp tests
2026-04-20 19:30:57 +08:00
openvela-robot 2663b69081 smacker: Improve error handling
Return sensible error values and forward error codes.
2026-04-20 19:30:46 +08:00
openvela-robot 0413c4d6d1 compat/cuda: make cuvidGetDecoderCaps optional 2026-04-20 19:30:43 +08:00
openvela-robot d15b6e7ea6 os_support: Remove the dynamic loading of getaddrinfo from the fallback getaddrinfo
If we for some unexplicable reason didn't pick up getaddrinfo
at configure, the default, IPv4-only, fallback should be good enough.

This effectively reverts 6023d84a2b.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:30:40 +08:00
openvela-robot 1dcc8d537b examples/encode_video: add log
This helps to visualize how the send/receive API works.
2026-04-20 19:30:36 +08:00
openvela-robot 61f36b04b0 hlsenc: Support recovery from an already present playlist
Parse the playlist to recover the start sequence and previously
generated segments and continue muxing from there.

Mainly useful for near-seamless recovery in live scenarios.
2026-04-20 19:30:33 +08:00
openvela-robot 49b979a213 configure: Fix the msvcrt version check for mingw32
This was actually broken when committed in 46e3936fb04; the
test never succeeded, and thus, _aligned_malloc wasn't actually
used on legacy mingw.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 427f7a1f9e)
2026-04-20 19:30:30 +08:00
openvela-robot 40e9cda88d configure: Fix the msvcrt version check for mingw32
This was actually broken when committed in 46e3936fb04; the
test never succeeded, and thus, _aligned_malloc wasn't actually
used on legacy mingw.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:30:27 +08:00
openvela-robot a2da5d5492 avcodec/dds: Fix runtime error: left shift of 145 by 24 places cannot be represented in type 'int'
Fixes: 1891/clusterfuzz-testcase-minimized-6274417925554176

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:30:23 +08:00
openvela-robot b277c50a49 vaapi: Add ABGR map only if VA_FOURCC_ABGR is defined
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:30:20 +08:00
openvela-robot 9034342c7e avfilter/af_sidechaincompress: change default makeup gain to 1
This avoids producing out of range or clipped samples.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:29:57 +08:00
openvela-robot 42165a9f81 vp9_superframe_bsf: cache input packets directly
Avoids unnecessary allocs+copies and makes the code slightly simpler.
2026-04-20 19:29:54 +08:00
openvela-robot 3835a3c155 avcodec/mlpdec: Fix runtime error: left shift of negative value -1
Fixes: 1636/clusterfuzz-testcase-minimized-5310494757879808

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:29:32 +08:00
openvela-robot 700515e1f1 doc: Document hwupload, hwdownload and hwmap filters 2026-04-20 19:29:29 +08:00
openvela-robot abee26d60a avfilter/af_silenceremove: set output timestamps
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:29:11 +08:00
openvela-robot 261f0bffc9 movenc: Add an option for enabling negative CTS offsets
This reduces the need for an edit list; streams that start with
e.g. dts=-1, pts=0 can be encoded as dts=0, pts=0 (which is valid
in mov/mp4) by shifting the dts values of all packets forward.
This avoids the need for edit lists for such streams (while they
still are needed for audio streams with encoder delay).

This eases conformance with the DASH-IF interoperability guidelines.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:29:08 +08:00
openvela-robot 73fdf8ea30 videotoolbox: add hwcontext support
This adds tons of code for no other benefit than making VideoToolbox
support conform with the new hwaccel API (using hw_device_ctx and
hw_frames_ctx).

Since VideoToolbox decoding does not actually require the user to
allocate frames, the new code does mostly nothing.

One benefit is that ffmpeg_videotoolbox.c can be dropped once generic
hwaccel support for ffmpeg.c is merged from Libav.

Does not consider VDA or VideoToolbox encoding.

Fun fact: the frame transfer functions are copied from vaapi, as the
mapping makes copying generic boilerplate. Mapping itself is not
exported by the VT code, because I don't know how to test.
2026-04-20 19:29:04 +08:00
openvela-robot ee8efdd619 arm: Avoid using .dn register aliases
clang now (in the upcoming 5.0 version) is capable of building our
arm assembly without relying on gas-preprocessor, although clang/LLVM
doesn't support .dn register aliases.

The VC1 MC assembly was only built and used if the chosen assembler
supported the .dn directives though. This was supported as long as
gas-preprocessor was used.

This means that VC1 decoding got a speed regression on clang 5.0,
unless the user manually chose using gas-preprocessor again.

By avoiding using the .dn register aliases, we can build the VC1 MC
assembly with the latest clang version.

Support for the .dn/.qn directives in clang/LLVM isn't actively planned,
see https://bugs.llvm.org/show_bug.cgi?id=18199.

This partially reverts 896a5bff64.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:29:02 +08:00
openvela-robot c2e5802584 ffprobe: discard non-selected streams 2026-04-20 19:28:53 +08:00
openvela-robot 15582aaf26 mpjpeg: Use proper CR/LF in multipart headers
This is more correct.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:28:50 +08:00
openvela-robot dfbab19968 Changelog: mention afir addition
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:28:45 +08:00
openvela-robot 505fdad7b4 h264_refs: validate the SPS pointer in ff_h264_execute_ref_pic_marking()
Bug-Id: 1036
CC: libav-stable@libav.org
2026-04-20 19:28:42 +08:00
openvela-robot 7736b7fcdf avfilter/vf_histogram: actually add parade display mode
Rename previous parade mode to stack, what it really was from start.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:28:38 +08:00
openvela-robot 92ff62f6f6 hevcdec: remove HEVCContext usage from hevc_sei
Based on the H264 SEI implementation.

This will be mainly useful once support for SEI messages that can be
used by the hevc parser are implemented, like Picture Timing.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:28:35 +08:00
openvela-robot c7a7d4cdd5 avcodec/msvideo1: Check buffer size before re-getting the frame
Fixes timeout
Fixes: 1306/clusterfuzz-testcase-minimized-6152296217968640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:27:32 +08:00
openvela-robot 5be1014ad0 hevc: 16x16 NEON idct: Use the right element size for loads/stores
This doesn't change the actual behaviour of the code but improves
readability.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:27:29 +08:00
openvela-robot bc5ca5a16f configure: fix libopus detection
Prevents compilation failures on libopus < 1.0.3
Regression since 37941878.
2026-04-20 19:27:26 +08:00
openvela-robot fce65aa9b2 aacsbr: Turnoff in the event of over read.
Aliased compressed AAC bytes are almost certainly not meaningful SBR
data. In the wild this causes harsh artifacts switching HE-AAC streams
that don't have SBR headers aligned with segment boundaries.

Turning off SBR falls back to a default set of upsampling parameters
that can function as a sort of error concealment. This is consistent
with how the decoder handles other sorts of errors.

Bug-Id: 1047
CC: libav-stable@libav.org

Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
2026-04-20 19:27:23 +08:00
openvela-robot 99cb657c9d avfilter/interlace: add complex vertical low-pass filter
This complex (-1 2 6 2 -1) filter slightly less reduces interlace 'twitter' but better retain detail and subjective sharpness impression compared to the linear (1 2 1) filter.

Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:27:13 +08:00
openvela-robot 831a88377c vlc: Add header #include when the types are used
Do not rely on indirectly including it from bitstream.h.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 19:27:10 +08:00
openvela-robot cbff5f292a lavc/mips/hevc_idct_msa: Add missing const qualifier.
Fixes many warnings:
initialization discards 'const' qualifier from pointer target type
2026-04-20 19:27:06 +08:00
openvela-robot 7eca105221 hevc: Add NEON add_residual for bitdepth 10
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:27:03 +08:00
openvela-robot 8cd8c9a1b7 avformat/matroskadec: export Content Light Level metadata
Based on a patch by Hendrik Leppkes

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:26:59 +08:00
openvela-robot 53384f1e81 avconv_hw: Add implicit device creation with default parameters
If -hwaccel foo is supplied without any other device options, and the
foo hwaccel is meant to have a device, try to make such a device with
default parameters for the hwaccel to use.
2026-04-20 19:26:55 +08:00
openvela-robot c7b045bd38 Merge commit 'c2fa6bb0e8703a7a6aa10e11f9ab36094416d83f'
* commit 'c2fa6bb0e8703a7a6aa10e11f9ab36094416d83f':
  mpeg12dec: move setting first_field to mpeg_field_start()

This commit is a noop, see 2f6f2f4f73

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:26:52 +08:00
openvela-robot eac6455f41 vp9_raw_reorder_bsf: Remove a redundant allocation
This was left over from an earlier version which created the new
packet inside the current frame structure.  Now it just leaks an
unused packet, so remove the allocation entirely.
2026-04-20 19:26:49 +08:00
openvela-robot 9c96a53bd3 avfilter/lavfutils: use image2pipe demuxer on ff_load_image
allow protocols other than file to be used
for example, use data protocol to embed a file in script

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2026-04-20 19:26:41 +08:00
openvela-robot c8da68ac7b arm: hevc_idct: Tune the add_res_8x8 and add_res_32x32 functions
Before:              Cortex     A7      A8      A9     A53
hevc_add_res_8x8_8_neon:     116.0    58.7    80.2    90.7
hevc_add_res_32x32_8_neon:  1230.0   737.5  1187.5   974.4
After:
hevc_add_res_8x8_8_neon:      97.7    57.0    73.7    80.0
hevc_add_res_32x32_8_neon:  1216.0   698.7  1127.5   827.1

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:26:38 +08:00
openvela-robot d35a661176 avformat/hlsenc: hold old key info when append list
fix ticket id: #6353

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2026-04-20 19:26:34 +08:00
openvela-robot c9b62626d7 spherical: add functions to retrieve and request projection names
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:26:31 +08:00
openvela-robot 9c0c87e6cd opus_pvq: minor cleanups
Removes unneeded variables, renames confusing and innacurate variables
and rewrites and slightly optimizes hadamard interleave/deinterleave
functions.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2026-04-20 19:26:27 +08:00
openvela-robot 012e5f3d75 vaapi_encode: Use gop_size consistently in RC parameters
The non-H.26[45] codecs already use this form.  Since we don't
currently generate I frames for codecs which support them separately
to IDR, the p_per_i variable is set to infinity by default so that it
doesn't interfere with any other calculation.  (All the code for I
frames still exists, and it works for H.264 if set manually.)
2026-04-20 19:26:24 +08:00
openvela-robot 5bfd18d3fa avcodec/nvenc: surface allocation reduction
This patch aims to reduce the number of input/output surfaces
NVENC allocates per session. Previous default sets allocated surfaces to 32
(unless there is user specified param or lookahead involved). Having large
number of surfaces consumes extra video memory (esp for higher resolution
encoding). The patch changes the surfaces calculation for default, B-frames,
lookahead scenario respectively.

The other change involves surface selection. Previously, if a session
allocates x surfaces, only x-1 surfaces are used (due to combination
of output delay and lock toggle logic). To prevent unused surfaces,
changing surface rotation to using predefined fifo.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2026-04-20 19:26:21 +08:00
openvela-robot fb28e66730 avfoundation: update to use AVCodecParameters 2026-04-20 19:26:18 +08:00
openvela-robot 422a1991f3 Merge commit '373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a'
* commit '373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a':
  hevcdec: do not set decoder-global SPS prematurely

Merged-by: Clément Bœsch <u@pkh.me>
2026-04-20 19:26:13 +08:00
openvela-robot 42155f8737 mlp: Drop ff_ prefix from a static function 2026-04-20 19:26:10 +08:00
openvela-robot 86925df79b Merge commit 'ee480790c7eeb03c9cebd8971c46e0cb7db65277'
* commit 'ee480790c7eeb03c9cebd8971c46e0cb7db65277':
  build: Add name parameter to check_lib() helper function

Merged-by: Clément Bœsch <u@pkh.me>
2026-04-20 19:25:56 +08:00
openvela-robot 289d32216c mlp: Rename the channel layout variable
Purely cosmetic change, will make code more readable once the new
channel layout takes over.
2026-04-20 19:25:53 +08:00
openvela-robot e8162bf00e Merge commit '86157e6db2c7a9222f77fa7e7f50fb9aebc3aa81'
* commit '86157e6db2c7a9222f77fa7e7f50fb9aebc3aa81':
  hevc: decouple calling get_format() from exporting the SPS parameters

See 786032cad8 (which has been reverted
and replaced with Anton's version to reduce diffs between the two
projects).

Merged-by: Clément Bœsch <u@pkh.me>
2026-04-20 19:25:37 +08:00
openvela-robot e97e881617 matroskaenc: don't warn about unknown spherical metadata when there isn't any
The same warning is issued when actual unknown spherical metadata is
found further down in the function.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 19:25:34 +08:00
openvela-robot 62d3c4f631 avformat/concatdec: fix the h264 annexb extradata check
The start code can be either in the first three or four bytes.
2026-04-20 19:25:31 +08:00
openvela-robot d0269f487a hevc: Add NEON IDCT DC functions for bitdepth 8
Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:25:28 +08:00
openvela-robot 9885ebbf5b avfilter/af_biquads: allow filtering only selected channels
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:25:23 +08:00
openvela-robot 512df17738 Add ClearVideo decoder
Only I-frames are decoded for now.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 19:25:20 +08:00
openvela-robot d7229702bd tools/target_dec_fuzzer: Remove FuzzerInterface.h dependancy
The header is not always available in the docker build environment

Suggested-by: Kostya Serebryany
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:25:17 +08:00
openvela-robot 22cca2dbae vc1dec: raise an error if sprite picture data is missing
Bug-Id: 1013
CC: libav-stable@libav.org
2026-04-20 19:25:13 +08:00
openvela-robot ad4ecf043d avfilter: add lumakey filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:25:10 +08:00
openvela-robot 246958d462 swscale-test: const correctness 2026-04-20 19:25:08 +08:00
openvela-robot 202bea6cb5 avformat/webmdashenc: Require the 'adaptation_sets' option to be set
This seems to be non-optional, and if the muxer is run without it,
strlen() is run on NULL, causing a segfault.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:24:57 +08:00
openvela-robot 365a162a2f flv: Validate the packet size
Size can be negative at that point.

Bug-Id: 1041
CC: libav-stable@libav.org
2026-04-20 19:24:54 +08:00
openvela-robot 09cc2633c9 avfilter/af_compand: Check av_strtok() for failure
Fixes CID1396256

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:24:51 +08:00
openvela-robot c566449ce3 dca: Account for lfe when checking for the channel count
Bug-Id: 1037
CC: libav-stable@libav.org
2026-04-20 19:24:49 +08:00
openvela-robot cf92d4a89c Merge commit '932cc6496ef6ab0e589ea51d3adefe5b7d7f1e2a'
* commit '932cc6496ef6ab0e589ea51d3adefe5b7d7f1e2a':
  vdpau: Do not #include vdpau_x11.h from the main vdpau header

Merged-by: Clément Bœsch <u@pkh.me>
2026-04-20 19:24:28 +08:00
openvela-robot 2bd3ddfefe swscale: Add gbrap10 output
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:24:17 +08:00
openvela-robot 60e5600b57 Merge commit '404cb74793284aa03e2e1a7e911c980c4cba0e9e'
* commit '404cb74793284aa03e2e1a7e911c980c4cba0e9e':
  configure: Pass CFLAGS_HEADERS through the right CFLAGS filter

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:23:46 +08:00
openvela-robot fc3f9b849f Add FM Screen Capture Codec decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 19:23:43 +08:00
openvela-robot 41510da941 configure: Fix decklink license dependency. 2026-04-20 19:23:39 +08:00
openvela-robot 01610cb3aa hevc: Add NEON 16x16 IDCT
The speedup vs C code is around 6-13x.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:23:36 +08:00
openvela-robot 5a444cb11f avfilter/vf_framerate: always request input if no output is provided in request_frame
Fixes ticket #6285.

Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 19:23:33 +08:00
openvela-robot 3210b0c8d1 ac3_parser: add a public function for parsing the data required by the demuxer
Make the current semi-public avpriv_ac3_parse_header() private to lavc.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 19:23:30 +08:00
openvela-robot d79fdc6fee Revert "avcodec/svq1: zero initialize entries array"
This reverts commit aed84ee4d1.

It is a false positive from Valgrind with recent GCC and
-funswitch-loops (present in -O3).
2026-04-20 19:23:25 +08:00
openvela-robot 70d9e7374d examples: Fixed and extended Doxygen documentation
Added parameter descriptions for all functions
 and converted in-function comments into regular
 (non-Doxygen) comments.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:23:23 +08:00
openvela-robot 6017cef3d3 avformat/movenc: auto insert vp9_superframe bsf when needed
Experimental VP9 support was added to the muxer recently.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:23:18 +08:00
openvela-robot 08724df39f lavfi: Drop unused and empty header file
This header was public but deprecated on 2013-04-11 (lavfi 3.8.0).
2026-04-20 19:23:15 +08:00
openvela-robot 1443c88e93 avfilter/vf_paletteuse: silence warning about misaligned indentation
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:23:12 +08:00
openvela-robot de0b685796 matroska: Read only the data written in the scratch buffer
The private buffer is 20bytes but depending on the type only 12 bytes
are actually filled.
2026-04-20 19:23:09 +08:00
openvela-robot a917b0c818 ffmpeg: make transcode_init_done atomic.
Should fix tsan warnings in fate-fifo-muxer-h264/wav:

WARNING: ThreadSanitizer: data race (pid=26552)
  Write of size 4 at 0x000001e0d7c0 by main thread:
    #0 transcode_init src/ffmpeg.c:3761 (ffmpeg+0x00000050ca1c)
[..]
  Previous read of size 4 at 0x000001e0d7c0 by thread T1:
    #0 decode_interrupt_cb src/ffmpeg.c:460 (ffmpeg+0x0000004fde19)
2026-04-20 19:21:14 +08:00
openvela-robot 42860e1e34 mov: Move code shared with CAF to a separate file 2026-04-20 19:21:11 +08:00
openvela-robot 3f0c389478 build: Add missing object dependency for extract_extradata bitstream filter
Cherry-picked from libav commit cfee5e1a0f

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:21:08 +08:00
openvela-robot 611dd3323a vp9: Add bsf to fix reordering in raw streams
Takes a raw input stream containing frames with correct timestamps but
possibly out of order and inserts additional show-existing-frame
packets to correct the ordering.
2026-04-20 19:21:05 +08:00
openvela-robot 6d1cf434b6 Bump minor for 3.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:21:02 +08:00
openvela-robot 41355d04db pthread_frame: Propagate sw_pix_fmt across threads 2026-04-20 19:20:59 +08:00
openvela-robot 694825af65 Merge commit 'fe7bc1f16abaefe66d8a20f734ca3eb8a4ce4d43'
* commit 'fe7bc1f16abaefe66d8a20f734ca3eb8a4ce4d43':
  configure: Do not unconditionally check for (and enable) xlib

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:19:42 +08:00
openvela-robot 8708c05210 takdec: Use ISO C printf conversion specifiers where appropriate
libavformat/takdec.c:144:20: warning: format '%X' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t'
2026-04-20 19:19:39 +08:00
openvela-robot 176643688e Merge commit '7433feb82f75827884d909de34d341a1c4401d4a'
* commit '7433feb82f75827884d909de34d341a1c4401d4a':
  lavfi: Make default get_video_buffer work with hardware frames

Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2026-04-20 19:18:45 +08:00
openvela-robot 86a5435c0c dcadec: remove extra indirection
num_core_channels is always equal to s->audio_header.prim_channels,
neither one of those variables ever get changed.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:18:42 +08:00
openvela-robot 52703294f0 pthread_frame: minor simplification to error handling
Get rid of the "ret" variable, and always use err. Report the packet as
consumed if err is unset. This should be equivalent to the old code,
which obviously required err=0 for p->result>=0 (and otherwise,
p->result must have had the value err was last set to). The code block
added by commit 32a5b63126 is also not needed anymore, because the new
code strictly returns err if it's >=0.

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
2026-04-20 19:18:21 +08:00
openvela-robot c52b990551 hevcdec: Use LOCAL_ALIGNED_* for declaring local variables with alignment
Not all compilers can do alignment larger than the normal stack alignment
for variables on the stack. In these cases, the LOCAL_ALIGNED_* macros
produce the workaround alignment wrapper consisting of a padded array
and a pointer variable.

This fixes the hevc fate tests on RVCT/ARMCC after adding IDCT assembly
that actually assumes/relies on this alignment.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:18:18 +08:00
openvela-robot 80f7e78d19 doc/examples/filtering_*: switch to codecpar 2026-04-20 19:18:13 +08:00
openvela-robot 1d997dddc0 jack: Drop support for old (2012) JACK versions 2026-04-20 19:17:59 +08:00
openvela-robot 59f3e047ea Merge commit 'b90c8a3d08e3f9ad4de1253376d2d1d93abb8b8c'
* commit 'b90c8a3d08e3f9ad4de1253376d2d1d93abb8b8c':
  fate: Add tests for mov display matrix

Adapted to use ffprobe -show_entries

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:17:54 +08:00
openvela-robot ba7919128a hwcontext: Move NONE to the be the first member of AVHWDeviceType
Also use that to fix a warning in av_hwdevice_get_type_name().
2026-04-20 19:17:51 +08:00
openvela-robot 630332e347 Merge commit 'c454dfcff90f0ed39c7b0d4e85664986a8b4476c'
* commit 'c454dfcff90f0ed39c7b0d4e85664986a8b4476c':
  Use ISO C printf conversion specifiers where appropriate

This commit is a noop, an equivalent patch is currently under review on
the mailing-list: http://ffmpeg.org/pipermail/ffmpeg-devel/2017-March/209239.html

Merged-by: Clément Bœsch <u@pkh.me>
2026-04-20 19:17:39 +08:00
openvela-robot 124bd8266b hevc: Add NEON 4x4 and 8x8 IDCT
Optimized by Martin Storsjö <martin@martin.st>.

The speedup vs C code is around 3.2-4.4x.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:17:36 +08:00
openvela-robot 2c1d74ff88 avcodec/x86/idctdsp: Remove duplicate include
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:17:31 +08:00
openvela-robot 394fdfe5e0 nsvdec: don't ignore the return value of av_get_packet()
Fixes invalid reads with corrupted files.

CC: libav-stable@libav.org
Bug-Id: 1039
2026-04-20 19:17:29 +08:00
openvela-robot 1f12a8f3e6 fate: mask errors while constructing report files
The first case was forgotten in 89790ba2bf.

Note: build_only=yes is one of the case where hiding the errors makes
sense.
2026-04-20 19:17:25 +08:00
openvela-robot 006e67b07a configure: Skip check for inline assembly capabilities when explicitly disabled
Otherwise inline assembly may get enabled when disabled on the command line.
2026-04-20 19:17:22 +08:00
openvela-robot 3707a76a2f avcodec/tiff: Check geotag count for being non zero
Fixes memleak
Fixes: 874/clusterfuzz-testcase-5252796175613952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:16:02 +08:00
openvela-robot b01540eb9d avplay: Use the named syntax for buffersrc arguments
Avoid confusion.
2026-04-20 19:15:59 +08:00
openvela-robot 405c00ba6e Merge commit '5cc0057f4910c8c72421b812c8f337ef6c43696c'
* commit '5cc0057f4910c8c72421b812c8f337ef6c43696c':
  lavu: remove the custom atomic API

This commit is a noop. The removal is postponed until all usages in
FFmpeg are dropped as well. A patchset is on discussion on the
mailing-list:
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-March/209003.html

Merged-by: Clément Bœsch <u@pkh.me>
2026-04-20 19:15:36 +08:00
openvela-robot d5fd2361ca Bump major versions of all libraries
This disables everything that was deprecated at least 18 months ago.

Readjust the minimum API version as needed, postponing any
API-incompatible changes until the next bump.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:15:31 +08:00
openvela-robot 71bfdd19ba fate: update ref file for apng-clock test 2026-04-20 19:15:12 +08:00
openvela-robot 5c9d437753 libavutil: Hook up the rest of the gcc specific attributes to clang as well
Hook up all attributes that don't have a MSVC specific version at the
moment.

See f637046d31 for details.

These don't seem to be critical for building with clang in MSVC mode
though, and thus haven't been hooked up until now.

These seem to build fine with as old clang as 3.3 at least.
(clang 3.3 disguises itself as gcc 4.2 normally, so all of these
have been used for clang before, except for av_cold.)

The clang version numbers themselves are useless for detecting what
attributes are available, since Apple's clang builds use a completely
different versioning (presenting itself as e.g. clang 8.0 instead
of 3.8).

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:15:09 +08:00
openvela-robot dfff387961 Merge commit 'e87a501e7d03ac68b58520108fe24ad9d0b36765'
* commit 'e87a501e7d03ac68b58520108fe24ad9d0b36765':
  swscale: Update bitdepth range check

This commit is a noop.

Up to 14 bits is supported since fa36f33422. This commits pushes the
limit to 15 bits but we don't seem to have pixel formats that enters in
that category.

12:03 <ubitux> so what's your opinion? should we move to 15 even if unused currently to make it consistent with libav and the function names, or keep our 14 suggesting there might be an issue with 15?
12:05 <ubitux> (functions are called hScale8To15_c, hScale16To15_c, ff_hscale8to15, ...)
12:06 <michaelni> I prefer to keep 14 until theres a case that allows us to test this and i suspect it will not work with 15 at least not all the code

Merged-by: Clément Bœsch <u@pkh.me>
2026-04-20 19:14:25 +08:00
openvela-robot 5ed9d31362 nvenc: Allow different const qps for I, P and B frames
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:14:22 +08:00