Commit Graph

122095 Commits

Author SHA1 Message Date
Martin Storsjö
6258e61c4d configure: Fix detection of SME
Older versions of Clang (Xcode 14, llvm.org Clang 13 and 14)
do support and recognize SME, but when enabled through
".arch_extension sme" it fails to transitively enable support
for Streaming SVE; this was fixed in [1].

This issue results in those versions currently detecting support
for SME, but later failing to build cpu_sme.s with errors like
"error: instruction requires: sve or sme" or "error: instruction
requires: streaming-sve or sve", on the "cntb x0" instruction.

Extend the check for this instruction set extension, to test
with two instructions, both specifically a SME instruction
(smstart) and an instruction that is available in Streaming SVE
mode (cntb).

For the configure check, add an extra parameter to
check_archext_insn for an optional second instruction to check.

It would be tempting to just pass both instructions through
the same parameter, as "smstart; cntb x0". However, Darwin
targets use a different token (%%) for starting a new
instruction on the same line - those targets interpret ";"
as the start of a comment. Due to that, such a check would
entirely ignore the second instruction on Darwin targets.

To avoid dealing with the variability in passing multiple
instructions on one line, just pass the optional second
instruction on a separate line.

[1] ff3f3a54e2
2025-12-12 08:15:12 +00:00
James Almer
04df80f973 avcodec/cavs_parser: check return value of init_get_bits8
Fixes Coverity issue CID 1676035

Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-11 20:01:01 -03:00
Jan Ekström
e54bd7065d fate/ffmpeg: remove comparison against ref from fix_sub_duration_heartbeat
After the full ffmpeg CLI multithreading changes went in, this
test started depending on how far the input side read and decoded
the input compared to how quickly the output encoded things, causing
spurious failures on the CI.

To my knowledge all of the failures have so far been valid correct
results, but unfortunately FATE's built in checks mostly consist of
whether there is a difference against an exact result.

This way we still get the CI and valgrind running of the code,
but stop its comparison. Reference file is left around so that
the previous reference is still available.
2025-12-11 22:48:26 +02:00
Ruikai Peng
bb424927db avformat/sierravmd: fix header read error check
The header read check stored the comparison result into ret, so read
failures became ret=1 and were treated as success, leaving the VMD header
uninitialized and letting parsing continue with bogus state.

Regression since: ee623a43e3.
Found-by: Pwno
2025-12-11 16:26:17 +00:00
Rémi Denis-Courmont
a4cb6c724b lavc/llvidencdsp: R-V V sub_left_predict
SpacemiT X60:
sub_left_predict_c:                                  51836.0 ( 1.00x)
sub_left_predict_rvv_i32:                             5843.1 ( 8.87x)
2025-12-11 17:24:38 +02:00
Leo Izen
37858dc6bd avcodec/libjxlenc: add EXIF box to output
We already parse the EXIF side data to extract the orientation, so we
should add it to the output file as an EXIF box.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-12-11 05:38:36 -05:00
Leo Izen
e349118b4c avcodec/libjxlenc: avoid calling functions inside if statements
It leads to messier, less readable code, and can also lead to bugs.
I prefer this code style.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-12-11 05:38:35 -05:00
Leo Izen
6ec4b3a9cb avcodec/libjxlenc: give display matrix sidedata priority
Before this commit, we ignore the display matrix side data if any EXIF
side data is present, even if that side data contains no orientation
tag. This allows us to calculate the orientation from the display
matrix sidedata first, if present. Ideally the decoder will have
removed the orientation tag upon decoding and attached the data as
display matrix side data instead, so this makes our orientation code
respect this behavior.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-12-11 05:38:33 -05:00
James Almer
4f947880bd tests/fate/filter-video: add missing lavfi_indev dependency to fate-filter-feedback-hflip
Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-10 22:07:05 -03:00
James Almer
44862a9d68 avutil/aarch64/cpu: fix check for SME on Linux
SME is a AT_HWCAP2 entry, not AT_HWCAP.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-10 21:51:11 -03:00
Kacper Michajłow
f8929c4510 configure: make --disable-optimizations work on MSVC/ICC
_cflags_noopt was previously set to optimize for size as a workaround
for issues in MSVC builds without any optimizations. Specifically the
lack of DCE and constant merging. This is no longer needed, as those
issues have been fixed in our codebase.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-10 23:19:54 +00:00
Hyunjun Ko
6726359326 vulkan_vp9: fix subsampling source and show_frame flag 2025-12-10 18:41:20 +00:00
Georgii Zagoruiko
cdb14bc74d configure: add detection of assembler support for SME
All changes are made during development/testing of SVE/SME for ffmpeg (vvc). Tested on Apple M4
2025-12-09 21:38:38 +00:00
Georgii Zagoruiko
2251ede69e Makefile: add missing variables in Makefile 2025-12-09 21:38:38 +00:00
Niklas Haas
440d58f5b1 avfilter/avfiltergraph: add missing newlines to format printing 2025-12-09 21:31:58 +00:00
Niklas Haas
978a0821ee avfilter/avfiltergraph: always retry format negotiation after auto-filters
There is an edge case not covered by the current logic: If there is only
a single auto-filter inserted, but the auto-inserted filter is incompatible
with a *different* format attribute (after settling the previous formats),
we may need a second auto-filter (e.g. `scale`) to settle the newly introduced
incompatibility.

A regression test demonstrating the issue is added.
2025-12-09 21:31:58 +00:00
James Almer
16050a1cef avformat/iamf_writer: ensure expanded_loudspeaker_layout is only written when using a single scalable layout layer
Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-09 17:54:11 -03:00
James Almer
5cdc1cad77 avformat/iamf_parse: add a few extra sanity checks
Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-09 17:54:11 -03:00
James Almer
2d5abf27e5 avformat/iamf_parse: fix parsing of Scalable layouts with Mono and Stereo layers
An ASAN heap-buffer-overflow in scalable_channel_layout_config was caused by an
unchecked assumption that the channel layout of a scalable audio layer is a
superset of the previous layer's channel layout.

scalable_channel_layout_config constructs a channel layout map by copying
channels from the previous layer and adding new ones. The memory allocation is
based on the target loudspeaker_layout. However, if the target layout doesn't
encompass all previous channels (e.g., Mono to Stereo), copying previous
channels followed by adding current ones could exceed the allocated size,
causing a heap buffer overflow.

This commit adds an exception for the know case of Mono -> Stereo, and a check
to ensure the previous layer's channel layout is a subset of the current
layer's layout by comparing their masks. If the condition isn't met,
an error is returned.

Fixes: https://issues.oss-fuzz.com/issues/464965414

Co-authored-by: Oliver Chang <ochang@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-09 17:54:11 -03:00
Cameron Gutman
8eae9d3310 fftools/ffplay_renderer: use new Vulkan extension API
Signed-off-by: Cameron Gutman <aicommander@gmail.com>
2025-12-09 19:13:50 +00:00
Cameron Gutman
95c81cc1f9 hwcontext_vulkan: add APIs to get optional extensions
These provide a way for apps that initialize Vulkan themselves to know
which extensions we may be able to use without having to hardcode it.

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
2025-12-09 19:13:50 +00:00
Niklas Haas
7b773aba82 swscale/format: merge fmt_* helpers into a single fmt_analyze()
Handles the split between "regular" and "irregular" pixel formats in a single
place, and opens up the door for more complicated formats.
2025-12-09 09:47:48 +00:00
Niklas Haas
a8dc3a543c swscale/format: consolidate format information into a single struct
I use a switch/case instead of an array because this is only needed for
irregular formats, which are very sparse.
2025-12-09 09:47:48 +00:00
Niklas Haas
3160ace20a swscale/format: derive fmt_read_write() for regular formats 2025-12-09 09:47:48 +00:00
Niklas Haas
004127f00b swscale/format: explicitly test for unsupported subsampled formats
This includes semiplanar formats. Note that the first check typically
subsumes the second check, but I decided to keep both for clarity.
2025-12-09 09:47:48 +00:00
Niklas Haas
748855b227 swscale/format: derive fmt_shift() from AVPixFmtDescriptor
XV36 is the odd one out, being a byte-shifted packed format whose components
don't actually cross any byte boundaries.
2025-12-09 09:47:48 +00:00
Niklas Haas
2feb848252 swscale/format: derive fmt_swizzle() from AVPixFmtDescriptor when possible
Unfortunately, this is exceptionally difficult to handle in the general case,
when packed/bitstream formats come into play - the actual interpretation of
the offset, shift etc. are so difficult to deal with in a general case that
I think it's simpler to continue falling back to a static table of variants
for these exceptions. They are fortunately small in number.
2025-12-09 09:47:48 +00:00
Niklas Haas
83d572e6f6 swscale/format: check SwsPixelType in fmt_read_write()
This is the only function that actually has the ability to return an
error, so just move the pixel type assignment here and add a check to
ensure a valid pixel type is found.
2025-12-09 09:47:48 +00:00
Niklas Haas
ef2ce57c31 swscale/format: exclude U32 from sws_pixel_type()
This function is supposed to give us representable pixel types; but U32 is not
representable (due only to the AVRational range limit).
2025-12-09 09:47:48 +00:00
Gyan Doshi
9507695d06 doc/htmlxref.cnf: add drawvg-reference
Fixes #21125
2025-12-09 10:22:36 +05:30
Andreas Rheinhardt
4baa5e638b tests/checkasm/checkasm: Don't test 3dnow
The last 3dnow functions have been removed in commit
5ef613bcb0, so don't test
it in checkasm.

(This will affect only one test, namely scalarproduct_and_madd_int16
from lossless_audiodsp: It does not use an SSSE3 function when
the 3dnow flag is set. So for old AMDs (which advertise support for
3dnow), said SSSE3 function is never tested. Now it will.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-12-09 03:03:07 +00:00
Andreas Rheinhardt
fb20009f47 tests/ref/fate/source: Fix fate-source after last commit
Broken in ac9552bebf.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-12-08 23:33:47 +00:00
Cameron Gutman
45bf925d54 fftools/ffplay_renderer: use new Vulkan extension API
Signed-off-by: Cameron Gutman <aicommander@gmail.com>
2025-12-08 23:22:31 +00:00
Cameron Gutman
212eb8413a hwcontext_vulkan: add APIs to get optional extensions
These provide a way for apps that initialize Vulkan themselves to know
which extensions we may be able to use without having to hardcode it.

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
2025-12-08 23:22:31 +00:00
James Almer
ac9552bebf avformat/cbs: add missing license headers
Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-08 20:07:45 -03:00
Kacper Michajłow
04a46a2ae4 avcodec/d3d12va_encode_av1: don't ignore return value
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-08 21:31:13 +00:00
Kacper Michajłow
f4fc14fb38 avcodec/d3d12va_encode_av1: fix size_t format specifier 2025-12-08 21:31:13 +00:00
Kacper Michajłow
5b2bd6f88d avcodec/d3d12va_encode_av1: remove unused variables
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-08 21:31:13 +00:00
Kacper Michajłow
6083c9bb8c avutil/hwcontext_vaapi: mark try_all with av_unused to suppres warning
Fixes: warning: variable 'try_all' set but not used [-Wunused-but-set-variable]
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-08 21:31:13 +00:00
Kacper Michajłow
018041f150 swresample/soxr_resample: pass initialized data to soxr_process() in flush()
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-08 21:31:13 +00:00
Kacper Michajłow
1f7182a991 avcodec/libx265: add explicit enum cast to suppress compiler warnings
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-08 21:31:13 +00:00
Kacper Michajłow
eaa2b3d4be avcodec/libsvtav1: add explicit enum cast to suppress compiler warnings
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-08 21:31:13 +00:00
Kacper Michajłow
490af2d4cf avcodec/libaomdec: add explicit enum cast to suppress compiler warnings
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-08 21:31:13 +00:00
Kacper Michajłow
cca872b6fd avfilter/vf_libopencv: make sure there is space for null-terminator in shape_str
Fixes: warning: 'sscanf' may overflow; destination buffer in argument 7 has size 32, but the corresponding specifier may require size 33 [-Wfortify-source]
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-08 21:31:13 +00:00
Kacper Michajłow
1fa5e001bc avfilter/vf_neighbor_opencl: add error condition when filter name doesn't match
This cannot really happen, but to suppress compiler warnings, we can
just return AVERROR_BUG here.

Fixes: warning: variable 'kernel_name' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-08 21:31:13 +00:00
Martin Storsjö
69b4474367 swscale/tests: Fix fate-sws-ops-list on Windows
Set stdout to binary mode, to avoid platform specific differences
in the output that is hashed.
2025-12-08 23:02:30 +02:00
Niklas Haas
c94e8afe5d swscale/ops: clarify SwsOpList.src/dst semantics
Turns out these are not, in fact, purely informative - but the optimizer
can take them into account. This should be documented properly.

I tried to think of a way to avoid needing this in the optimizer, but any
way I could think of would require shoving this to SwsReadWriteOp, which I
am particularly unwilling to do.
2025-12-08 20:09:37 +00:00
Niklas Haas
f39fe6380c swscale/ops_optimizer: set correct value range for subpixel reads
e.g. rgb4 only reads values up to 15, not 255.

Setting this correctly eliminates a number of redundant clamps in cases
like e.g. rgb4 -> monow.
2025-12-08 20:09:37 +00:00
Andreas Rheinhardt
dc843cdd9a avcodec/x86/vp9mc: Reindent after the previous commit
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-12-08 19:35:07 +01:00
Andreas Rheinhardt
65e71b0837 avcodec/x86/vp9mc: Deduplicate coefficient tables
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-12-08 19:35:01 +01:00