Commit Graph

4050 Commits

Author SHA1 Message Date
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
wm4 aeca879c38 dxva: add support for new dxva2 and d3d11 hwaccel APIs
This also adds support to avconv (which is trivial due to the new
hwaccel API being generic enough).

The new decoder setup code in dxva2.c is significantly based on work by
Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites.

Merges Libav commit f9e7a2f95a.
Also adds untested VP9 support.
The check for DXVA2 COBJs is removed. Just update your MinGW to
something newer than a 5 year old release.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 19:33:38 +08:00
wm4 e6a951d169 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.

Merges Libav commit fff90422d1.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 19:33:38 +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
Marton Balint 3709177658 avformat/aviobuf: add support for specifying minimum packet size and marking flush points
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 19:33:22 +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
Mark Thompson 0022079926 hwcontext: Improve allocation in derived contexts
Use the flags argument of av_hwframe_ctx_create_derived() to pass the
mapping flags which will be used on allocation.  Also, set the format
and hardware context on the allocated frame automatically - the user
should not be required to do this themselves.

(cherry picked from commit c5714b51aa)
2026-04-20 19:32:02 +08:00
Mark Thompson 4e153e25aa lavc: Add flag to allow profile mismatch with hardware decoding
(cherry picked from commit 64a5260c69)
2026-04-20 19:32:01 +08:00
Mark Thompson 5b8471446e hwcontext: Make it easier to work with device types
Adds functions to convert to/from strings and a function to iterate
over all supported device types.  Also adds a new invalid type
AV_HWDEVICE_TYPE_NONE, which acts as a sentinel value.

(cherry picked from commit b7487f4f3c)
2026-04-20 19:32:00 +08:00
Mark Thompson eda76a7e95 hwcontext: Add device derivation
Creates a new device context from another of a different type which
refers to the same underlying hardware.

(cherry picked from commit b266ad56fe)
2026-04-20 19:32:00 +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
wm4 530518a4d9 dxva: add support for new dxva2 and d3d11 hwaccel APIs
This also adds support to avconv (which is trivial due to the new
hwaccel API being generic enough).

The new decoder setup code in dxva2.c is 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:29 +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 d859fe0cb5 Merge commit '019ab88a95cb31b698506d90e8ce56695a7f1cc5'
* commit '019ab88a95cb31b698506d90e8ce56695a7f1cc5':
  lavc: add an option for exporting cropping information to the caller

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:28:32 +08:00
openvela-robot cd568566af Merge commit '52627248e49e58eb4b78e4fcda90a64f4c476ea3'
* commit '52627248e49e58eb4b78e4fcda90a64f4c476ea3':
  frame: add a cropping rectangle to AVFrame

Merged-by: James Almer <jamrial@gmail.com>
2026-04-20 19:28:31 +08:00
Clément Bœsch 4a8b0965e5 lavu/sha512: update length argument following sha+md5 changes 2026-04-20 19:28:14 +08:00
openvela-robot d9bf0e6137 Merge commit 'e435beb1ea5380a90774dbf51fdc8c941e486551'
* commit 'e435beb1ea5380a90774dbf51fdc8c941e486551':
  crypto: consistently use size_t as type for length parameters

Merged-by: Clément Bœsch <cboesch@gopro.com>
2026-04-20 19:28:14 +08:00
wm4 27473c3813 cuvid: support AVCodecContext.hw_device_ctx API
This is a newer API that is intended for decoders like the cuvid
wrapper. Until now, the wrapper required to set an awkward
"incomplete" hw_frames_ctx to set the device. Now the device
can be set directly, and the user can get AV_PIX_FMT_CUDA output
for a specific device simply by setting hw_device_ctx.

This still does a dummy ff_get_format() call at init time, and should
be fully backward compatible.
2026-04-20 19:27:33 +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