100 Commits
Author SHA1 Message Date
Kacper Michajłow f43f609bb8 avutil/x86/tx_float: add missing vzeroupper to 15xM PFA FFT
The AVX2 15xM PFA FFT calls its second-dimension subtransform with dirty
YMM. That subtransform may be a legacy-SSE codelet (fft4 is SSE2 only),
causing AVX<->SSE transition penalties. Clear them after the first
dimension, before the calls.

Detected with `sde64 -ast` FATE job.

Fixes: ace42cf581
2026-06-09 17:54:21 +00:00
Kacper Michajłow 2a54b181c0 tests/checkasm/vvc_mc: prevent function inline to avoid stack overflow
Fixes stack overflow on Windows when by default we have 1 MB.
Individually those functions fit, but when they are all inlined, it's
too much.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-06-05 08:22:40 +02:00
Kacper Michajłow 7d2a629ccf tests/checkasm/rv34dsp: pass correct buffer to bench function
The test can negate stride, in which case we have to use adjusted
`dst_newp`.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-06-05 08:22:37 +02:00
Kacper Michajłow 65ae944d34 configure: set -mpreferred-stack-boundary=4 for Windows 32-bit targets
Win32 ABI only mandates 4 bytes stack alignment. GCC 16 changed default
align and no longer works with ffmpeg expectations.

Fixes crashes on aligned memory access in mingw32 gcc 16 build.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-06-05 03:17:43 +02:00
Kacper MichajłowandJames Almer ca1b3c79a4 avformat: don't use deprecated .lcevc field
It's the same as `.layered_video` now.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-06-04 17:03:05 +00:00
Kacper Michajłow 59619a1917 tests/fate/hevc: add dovi_split BSF tests 2026-05-31 16:58:23 +02:00
Kacper Michajłow 6026988b75 avcodec/bsf: add dovi_split BSF
Allows splitting interleaved BL+EL HEVC bitstream into separate streams.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-31 16:58:23 +02:00
Kacper Michajłow a76eae2765 avfilter/Makefile: fix build with Vulkan and runtime GLSL compilation
Fixes: avfilter/vulkan_shaderc.c:90: undefined reference to `ff_vk_shader_print'
Fixes: #23231

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-31 13:38:30 +00:00
Kacper MichajłowandJames Almer b31fdbfde0 avformat/matroskadec: create Dolby Vision stream group
Matroska has no explicit cross-track Dolby Vision reference, so the
pairing is recovered from the dvcC/dvvC config records. Find a single
HEVC track whose record declares a profile 7 enhancement layer
(el_present_flag=1) and a single sibling HEVC BL candidate. If either
side is ambiguous, leave the streams ungrouped.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-31 03:43:29 +00:00
Kacper MichajłowandJames Almer 29bc8ec8d1 avformat/mpegts: create Dolby Vision stream group
See: https://professionalsupport.dolby.com/s/article/How-to-signal-Dolby-Vision-in-MPEG-2-TS

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-31 03:43:29 +00:00
Kacper MichajłowandJames Almer 8d89d7c25a avformat/mov: create Dolby Vision stream group
See: https://professionalsupport.dolby.com/s/article/How-to-signal-Dolby-Vision-in-ISOBMFF-format-AKA-mp4-container

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-31 03:43:29 +00:00
Kacper MichajłowandJames Almer 0a2e0b28d0 avformat/mov: add support for vdep based tref
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-31 03:43:29 +00:00
Kacper MichajłowandJames Almer d7c7ee4e2e avformat: add AV_STREAM_GROUP_PARAMS_DOLBY_VISION
This uses existing AVStreamGroupLayeredVideo.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-31 03:43:29 +00:00
Kacper MichajłowandJames Almer 1e3883df9f avformat: rename AVStreamGroupLCEVC to AVStreamGroupLayeredVideo
It will be reused for other similar groups.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-31 03:43:29 +00:00
Kacper Michajłow 200cbaeb5a avformat/hlsenc: use correct close function for custom io
This is open by s->io_open().

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-16 18:03:26 +02:00
Kacper Michajłow 06ef9a74ea avformat/hlsenc: respect io_open set in AVFormatContext
io_open_default() will call internal impl if needed, don't call it
directly.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-16 17:18:51 +02:00
Kacper Michajłow 4cf687b3b1 avformat/dashenc: respect io_open set in AVFormatContext
io_open_default() will call internal impl if needed, don't call it
directly.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-16 17:18:51 +02:00
Kacper Michajłow fbc4003642 avformat/dashdec: respect io_open set in AVFormatContext
io_open_default() will call internal impl if needed, don't call it
directly.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-16 17:18:51 +02:00
Kacper MichajłowandLeo Izen dc74fe70b2 avformat/demux: use correct close function for custom io
You may look and think `AVFMT_FLAG_CUSTOM_IO` check is enough, but this
is not what it seems. This flag means that user provided custom
AVIOContext, before creating AVFormatContext and it should not be
closed. However nested sub-demuxers may still open an temporary io, and
those have to be closed and use correct io_close2 function.

You can see 0dcac9c3f0 and
ef01061225 where this flag is cleared for
nested opens to avoid leaking those.

lavf micro version bumped so API users can know if it is safe to use
custom io.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-16 11:09:56 +00:00
Kacper Michajłow 17bc88e67f avformat/hls: disable http_persistent/http_multiple with custom io_open
Both rely on the AVIOContext being backed by the builtin URLContext.
When the API user overrides io_open, the keepalive path asserts on the
missing URLContext and the http_multiple auto-detect probe fails on
every read. http_multiple=1 still works even with custom IO.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-11 09:00:31 +00:00
Kacper Michajłow 702b0784b7 avformat/concat: guard total_size overflow
Fixes: 466797413/clusterfuzz-testcase-minimized-fuzzer_options_parser-6015183727427584
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-03 07:30:46 +00:00
Kacper Michajłow be207a0d66 avformat/concat: change concat_data::total_size to int64_t
It's both initialized as int64_t in concat_open() and returned as
int64_t in concat_seek().
2026-05-03 07:30:46 +00:00
Kacper Michajłow dba0b078c8 avcodec/vaapi_av1: reorder functions to avoid fwd decl 2026-05-01 23:59:06 +00:00
Kacper Michajłow 688f68bffa avcodec/vaapi_av1: fix leak of ref frames on init failure
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-01 23:59:06 +00:00
Kacper Michajłow 1bb12370b0 avformat/httpauth: avoid casting callback functions type
Technically it's is UB to call function of different type.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-01 23:58:40 +00:00
Kacper Michajłow d768bd564e avformat/hls: avoid casting callback functions type
Technically it's is UB to call function of different type.

Fixes:
src/libavformat/utils.c:531:9: runtime error: call to function handle_variant_args through pointer to incorrect function type 'void (*)(void *, const char *, int, char **, int *)'
src/libavformat/hls.c:379: note: handle_variant_args defined here

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-01 23:58:40 +00:00
Kacper Michajłow 03967fcff4 tests/checkasm/sw_ops: fix too large shift for int
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-04-16 18:56:22 +00:00
Kacper Michajłow 369dbbe488 swscale/ops_memcpy: guard exec->in_stride[-1] access
When use_loop == true and idx < 0, we would incorrectly check
in_stride[idx], which is OOB read. Reorder conditions to avoid that.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-04-16 18:56:22 +00:00
Kacper Michajłow 1092852406 swscale/ops: remove type from continuation functions
The glue code doesn't care about types, so long the functions are
chained correctly. Let's not pretend there is any type safety there, as
the function pointers were casted anyway from unrelated types.
Particularly some f32 and u32 are shared.

This fixes errors like so:
src/libswscale/ops_tmpl_int.c:471:1: runtime error: call to function linear_diagoff3_f32 through pointer to incorrect function type 'void (*)(struct SwsOpIter *, const struct SwsOpImpl *, unsigned int *, unsigned int *, unsigned int *, unsigned int *)'
libswscale/ops_tmpl_float.c:208: note: linear_diagoff3_f32 defined here

Fixes: #22332
2026-04-13 23:28:30 +00:00
Kacper Michajłow 9a2a0557ad swscale/ops: remove optimize attribute from op functions
It was added to force auto vectorization on GCC builds. Since then auto
vectorization has been enabled for whole code base, 1464930696.

According to GCC documentaiton, the optimize attribute should be used
for debugging purposes only. It is not suitable in production code.

In particular it's unclear whether the attribute is applied, as it's is
actually lost when function is inlined, so usage of it is quite fragile.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-04-13 23:28:30 +00:00
Kacper Michajłow eaadd05232 .forgejo/CODEOWNERS: add myself for hls.*
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-04-11 01:58:35 +02:00
Kacper Michajłow 721545a3c2 MAINTAINERS: add myself as HLS demuxer maintainer
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-04-11 01:58:35 +02:00
Kacper Michajłow cc41e6a462 tests/fate/hlsenc: add hls-event-no-endlist test
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-04-11 01:58:34 +02:00
Kacper Michajłow 6d98a9a2e8 avformat/hls: fix seeking in EVENT playlists that start mid-stream
HLS EVENT playlists (e.g. Twitch VODs) are seekable but not finished,
so live_start_index causes playback to begin near the end. The first
packet's DTS then becomes first_timestamp, creating a wrong mapping
between timestamps and segments.

Fix this by subtracting the cumulative duration of skipped segments from
first_timestamp so it reflects the true start of the playlist.

Also set per-stream start_time from first_timestamp so correct time is
reported, reset pts_wrap_reference on seek to prevent bogus wrap
arounds.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-04-11 01:58:34 +02:00
Kacper Michajłow 1e031d4af7 configure: treat unrecognized option warnings as errors in test_ld
This fixes dummy warnings when link/lld-link is called by the clang:
lld-link: warning: ignoring unknown argument '--as-needed'
lld-link: warning: ignoring unknown argument '-rpath-link=:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil'

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-04-02 16:37:55 +00:00
Kacper Michajłow 740dc9e027 configure: test if -lm is available on host compiler
Fixes host binaries compilation on platforms without math lib.

Fixes clang host compilation, which replaces `-lm` with `m.lib` that
does not exist:
LINK : fatal error LNK1181: cannot open input file 'm.lib'
clang: error: linker command failed with exit code 1181 (use -v to see invocation)

Fixes MSVC (cl) host warning:
cl : Command line warning D9002 : ignoring unknown option '-lm'

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-04-02 16:37:55 +00:00
Kacper Michajłow 43be5cccd8 configure: add llvm toolchain option
This uses llvm tools. `clang-*` toolchain is left mostly for backward
compatibility, although it doesn't use llvm tools, only clang. On top of
that it's for enabling sanitizers. While `llvm` toolchain can be use
without sanitizer suffix.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-04-02 16:37:55 +00:00
Kacper Michajłow 7d57621b83 avutil/x86/x86util: tone down NASM workaround and use info section
The use of code section (.text) was forced by the unreleased NASM
3.02rc3 which made the issue worse, but preventing assambling anything
without code section, including when only data was present.

This works fine for the most part, but using code (.text) section with
IMAGE_COMDAT_SELECT_ANY causes issues with lib.exe after stripping such
object:
fatal error LNK1143: invalid or corrupt file: no symbol for COMDAT section 0x2

Esentially it makes our workaround not work in all cases, and while
string could be disabled like it already is for MSVC/ICL builds, it used
to work so let's preserve that state.

This make it not compatible with NASM 3.02rc3 when CV debug info is
generated, but hopefully the upstream fix will be merged before release,
to avoid this regression:
https://github.com/netwide-assembler/nasm/pull/221

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-30 19:46:53 +02:00
Kacper Michajłow e54e117998 avutil/x86/x86util: define .text section additionally to COMDAT one
This is needed to cover the case when assembled source doesn't have
.text section. NASM documentation suggest to add $ suffix to section
name for COMDAT in .text, but this actually requires the main .text
section to exist also. And use less generic suffix for our dummy
sub-section.

Third time's the charm.

Fixes: 80cd067715
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-30 01:08:45 +02:00
Kacper Michajłow 80cd067715 avutil/x86util: don't produce empty object files on win{32,64}
In cases when preprocesor would remove all code, nasm would produce
empty object files. This is technically not wrong, but often cause
issues with various tooling:

* NASM fails to emit CodeView debug info when there is no code [1]
* Older VS2022 builds hangs on empty files [2]
* GNU binutils `strip` errors when there is no sections [3]
error: the input file '.o' has no sections

Workaround those issues by adding dummy byte in COMDAT section,
which is then dropped by linker, as the `__x86util_notref` symbol is not
referenced from C. [4] IMAGE_COMDAT_SELECT_ANY (2) is used to allow
multiple symbol definition.

This is limited to win{32,64} as this is the target where issues were
observed.

[1] https://github.com/netwide-assembler/nasm/issues/216
[2] https://developercommunity.visualstudio.com/t/MSVC-Hangs-when-compiling-ffmpeg-When-l/10233953
[3] https://trac.ffmpeg.org/ticket/6711
[4] https://www.nasm.us/docs/3.01/nasm09.html#section-9.6.1

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-29 23:00:06 +02:00
Kacper Michajłow 2b1d8ba3ec avfilter/x86/vf_atadenoise: move %if ARCH_X86_64 after x86util include
This is consistent pattern with other files. Also is needed for next
commit to always include x86util.asm

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-29 22:22:29 +02:00
Kacper Michajłow 2b8ca0f3c5 avfilter/x86/avf_showcqt: add missing section declaration
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-29 22:22:29 +02:00
Kacper Michajłow 0f600cbc16 configure: enable nasm debug information also for non-ELF targets
The default NASM selection of debug information formats should cover all
cases nicely. See `nasm -h -F` for the default and supported formats.

This commit allows emitting debug information for macho{32,64} (DWARF)
and win{32,64} (CodeView), where previously only ELF targets would
get debug information.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-26 00:25:29 +00:00
Kacper Michajłow e17d84ac8a avcodec/vp9: fix cbs fragment leak on error
Fixes: c0bf1382a7
Fixes: 490257166/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-6185031050788864
Fixes: 490131106/clusterfuzz-testcase-minimized-fuzzer_loadfile-5438205762797568
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-25 14:02:19 +00:00
Kacper Michajłow 9c63742425 avutil/attributes: enable av_flatten when available
This enables av_flatten on Clang in particular.

It was disabled because at the time this attribute was not supported.
It was implemented in Clang/LLVM 3.5 [1].

Use `__has_attribute` to check for availability. This has been added in
Clang 2.9 [2].

This reverts change 5858a67f13.

[1] https://github.com/llvm/llvm-project/commit/41af7c2fdc8cc2ef186669dcb21cac58d5bd69ee
[2] https://github.com/llvm/llvm-project/commit/274a70ed7f4315c83273173fce4c3b0e097958d6

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-22 15:55:54 +00:00
Kacper Michajłow 5074d9f06e hwcontext_amf: fix version variable type and remove cast
Fixes compilation errors on newer Clang/GCC that errors out on
incompatible pointers.

error: incompatible pointer types passing 'unsigned long long *' to
parameter of type 'amf_uint64 *' (aka 'unsigned long *')
[-Wincompatible-pointer-types]

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-11 18:41:10 +00:00
Kacper MichajłowandArazIusubov b028dac149 configure: bump AMF requirement to 1.5.0
6972b127de requires at least version
1.5.0, as earlier versions are not compatible with C due to unguarded
`extern "C"`.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-11 17:32:20 +00:00
Kacper Michajłow 6e322fa582 configure: warn about excessive stack usage
Use a 120 KiB per-function threshold. This roughly matches the default
thread stack size on Musl, which is 128 KiB, leaving some headroom for
caller frames.

This warning draws attention to functions in the codebase that may have
excessively large stack frames. A few functions could benefit from
reducing their frame size.

120 KiB is a reasonable limit. If a function requires more stack, it
likely would benefit from restructuring the code.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-05 16:02:04 +00:00
Kacper Michajłow 4e32fb4c2a fftools/cmdutils: constify string
Fixes:
warning: initializing 'char *' with an expression of type 'const char *'
discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-02-28 13:42:01 +01:00
Kacper MichajłowandJun Zhao 3b4281e919 avcodec/hevc/hevcdec: skip logging 'Skipping NAL unit 63'
We know that this is Dolby Vision Enhancement Layer and while it's not
handled, we can just reduce log spam for this, as it's if fact
recognized.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-02-12 00:56:21 +00:00
Kacper MichajłowandJun Zhao fa36645f7e avcodec/bsf/dovi_rpu: fix typo
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-02-12 00:56:21 +00:00
Kacper Michajłow 590e2b1894 vf_libplacebo: sync peak detection parameters with upstream
Fixes peak detection for samples like in https://github.com/haasn/libplacebo/issues/358

This might introduce flickering on some other samples, but was agreed
upstream that they are better overall.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-02-12 00:12:48 +00:00
Kacper MichajłowandNiklas Haas 10db62d205 swscale/utils: zero init filter memory as before
Commit 795bb37a39 removed zeroing of those
buffers, without mention, which introduces corrupted output.

Fixes: 795bb37a39
Fixes: https://github.com/mpv-player/mpv/issues/17317
2026-01-26 09:45:16 +00:00
Kacper MichajłowandLynne eea648ef1d avutil/hwcontext_vulkan: fix logic error when checking for encode support
Both FF_VK_EXT_VIDEO_ENCODE_QUEUE and FF_VK_EXT_VIDEO_MAINTENANCE_1 are
required, not only one of them.

Found by VVL.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-31 10:30:36 +00:00
Kacper MichajłowandLynne 20ac8c3688 avfilter/vulkan_filter: fix logic error when checking for encode support
Both FF_VK_EXT_VIDEO_ENCODE_QUEUE and FF_VK_EXT_VIDEO_MAINTENANCE_1 are
required, not only one of them.

Found by VVL.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-31 10:30:36 +00:00
Kacper MichajłowandLynne 0a8b915b04 avcodec/vulkan_decode: fix logic error when checking for encode support
Both FF_VK_EXT_VIDEO_ENCODE_QUEUE and FF_VK_EXT_VIDEO_MAINTENANCE_1 are
required, not only one of them.

Found by VVL.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-31 10:30:36 +00:00
Kacper Michajłow c50e5c7778 avcodec/libaomenc: remove enum type from codecctl_* functions
aom_codec_control() takes control id as int. It could be AV1E_ or common
AV1_ enum in encoder, and AV1D_ for decoder.

While upstream provides AOM_CODEC_CONTROL_TYPECHECKED() macro to check
the provided enum value, we wrap those calls in codecctl_ functions,
which makes it not feasible to use.

To avoid complicating this needlessly, just use int.

Fixes: warning: implicit conversion from enumeration type 'enum aom_com_control_id' to different enumeration type 'enum aome_enc_control_id'
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-22 07:05:58 +01:00
Kacper Michajłow 96afe665ef avcodec/libaomenc: remove UENUM1BYTE check
AOM had a short-lived API breakage introduced in commit [1], which was
workedaround in commit [2]. The original change, however, was reverted
shortly afterward in commit [3]. Since we require at least v2.0.0, there
is no need to keep this workaround.

[1] https://aomedia.googlesource.com/aom/+/4667aa1a373566e9c124afcd58c71731ab0d7377
[2] aaf9171574
[3] https://aomedia.googlesource.com/aom/+/9b1252eab0616d2c1f6d7990c6256441c0b6483f

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-22 07:05:58 +01: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
Kacper MichajłowandJames Almer 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łowandJames Almer f4fc14fb38 avcodec/d3d12va_encode_av1: fix size_t format specifier 2025-12-08 21:31:13 +00:00
Kacper MichajłowandJames Almer 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łowandJames Almer 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łowandJames Almer 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łowandJames Almer 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łowandJames Almer 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łowandJames Almer 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łowandJames Almer 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łowandJames Almer 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
Kacper Michajłow a8df08f628 swscale/x86/yuv2yuvX: don't use deprecated hexadecimal prefix
Fixes: warning: $ prefix for hexadecimal is deprecated [-w+number-deprecated-hex]
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-08 17:43:29 +00:00
Kacper Michajłow 5b5d51cbc1 avcodec/x86/h264_idct: fix version check for NASM 3 and newer
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-08 17:43:29 +00:00
Kacper MichajłowandNiklas Haas 6a14a93af5 checkasm/sw_xyz2rgb: fix function type
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-05 21:55:03 +00:00
Kacper Michajłow 9ed71a837b avutil/vulkan: fix device memory size truncation
size_t cannot fit VK_WHOLE_SIZE on 32-bit builds.

Fixes: warning: conversion from 'long long unsigned int' to 'size_t' {aka 'unsigned int'} changes value from '18446744073709551615' to '4294967295'

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-03 23:45:44 +00:00
Kacper Michajłow 3cc10b5ff6 fftools/cmdutils: use strcpy directly, the length is computed already
There is no need to scan for NULL, if we inject it ourselves.

Fixes: warning: 'strncat' specified bound 10 equals source length [-Wstringop-overflow=]
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-03 23:45:44 +00:00
Kacper Michajłow f7b7972f78 avdevice/gdigrab: suppress int to pointer cast warning
Fixes: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-03 23:45:44 +00:00
Kacper Michajłow 17456c553e tests/checkasm: fix check for 32-bit Windows build
With --disable-asm, ARCH_X86_32 is set to 0, but we still build the
checkasm binary. Update the check so it is config.h agnostic.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-30 22:07:39 +00:00
Kacper Michajłow 2456a39581 avfilter/avfiltergraph: fix constant string comparision
It's not guaranteed that the conversion filter name string will be
deduplicated to the same memory location. While this is common
optimization to do, we cannot rely on it always happening.

Fixes regression since 8b375b2ffd.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-30 03:02:41 +01:00
Kacper Michajłow 9cd4be6d7c tools/sofa2wavs: fix build on Windows
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-29 21:43:12 +00:00
Kacper Michajłow a75b15a4ab avfilter/vf_drawvg: round color values to avoid differences on some platforms
This ensures consistent color conversion between double and u8 and
guarantees that values remain consistent across different platforms,
especially when x87 math is used.

Note that libcairo also performs rounding internally when converting
doubles to integers, see _cairo_color_double_to_short().

Fixes: fate-filter-drawvg-interpreter
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-25 22:32:50 +01:00
Kacper Michajłow 148cf61585 fate: add missing options in config template
Fixes: f01c771577
Fixes: 523d688c2b
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-24 02:47:08 +00:00
Kacper Michajłow 6cb002610b fate: add skip_clean option
This is useful if one wants to inspect build artifacts after running
fate.sh script.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-24 02:47:08 +00:00
Kacper Michajłow fc3893f5e7 Makefile: remove config_components.asm on distclean
Forgotten in c607aae2b9.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-20 21:20:24 +00:00
Kacper Michajłow 9b2162275b configure: filter out -guard:signret from armasm flags
While cl.exe supports -guard:signret, armasm64 complains about
unknown flag. Note that -guard:ehcont is accepted by armasm64.

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

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-17 20:41:34 +00:00
Kacper Michajłow 523d688c2b fate: add more configure flags to fate config
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-17 20:25:24 +00:00
Kacper Michajłow 3eb0cb3b0b avutil/hwcontext_vulkan: use correct bitmask types
Vulkan headers define *FlagBits enum with individual bit values, and
coresponding *Flags typedef to be used to store the bitmask of
coresponding bits.

In practice those two types map to the same type, but for consistency
*Flags should be used.

Fixes MSVC warnings about type mismatch.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-05 19:04:09 +01:00
Kacper Michajłow f478964226 avcodec/vulkan_encode_av1: fix unit_elems check
Wrong enum value was used to check unit_elems. While
AV_FRAME_DATA_MASTERING_DISPLAY_METADATA (11) would trigger when
UNIT_MASTERING_DISPLAY (2) was set, it also would match
UNIT_CONTENT_LIGHT_LEVEL (1) which is not expected.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-05 19:04:01 +01:00
Kacper Michajłow c3ff7d23f5 avcodec/dxva2: move variable declaration to for loop to avoid warning
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-05 19:04:01 +01:00
Kacper Michajłow 08d327e92c fftools/ffmpeg: suppress unused variable warning, but using it
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-05 19:04:00 +01:00
Kacper Michajłow 671e54d715 configure: add -static suffix to internal static libs for test programs
In MSVC builds, object files built for shared or static libraries are
technically not compatible with each other. That's why building both
shared and static libraries simultaneously is not allowed in configure.
This may change in the future once dllimport/dllexport attributes are no
longer used. Which will be possible on next major bump. The only
remaining use of dllexport was changed in c6c8063186.

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

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

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

Fixes: 8eca3fa619
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-05 13:00:09 +00:00
Kacper Michajłow ccb1865a82 avfilter/buffersink: move ret declaration to suppress unused warning
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-27 15:39:39 +01:00
Kacper Michajłow a6ccaa2eea avcodec/d3d12va_encode_h264: remove unused variables
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-27 15:39:39 +01:00
Kacper Michajłow d57de83352 avcodec/d3d12va_encode: fix format specifier for HRESULT
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-27 15:39:39 +01:00
Kacper Michajłow 4deb8b3a7a avutil/vulkan_glslang: use AVMutex instead of pthread_mutex_t
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-27 11:54:53 +01:00
Kacper Michajłow 8c633f45b0 configure: fix glslang linking on platforms without pthreads
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-27 02:59:09 +01:00
Kacper Michajłow d77f917621 ffbuild/common: silence DEPCXX output
Fixes: 0ce413af9c

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-25 11:15:06 +02:00
Kacper Michajłow 25fe4105c8 tests/fate/api: fix fate-lavf-flv test
fate-lavf-flv is dependency of fate-api-seek, but the fate-api-seek is
setting CMP = null, which affects fate-lavf-flv. Reset CMP value to
expected by the flv test and use default diff compare.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-25 11:11:41 +02:00
Kacper Michajłow c5edd125f4 tests/ref/fate: remove leftover mapchan ref files
Those tests were removed in e48055fdce.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-25 11:11:41 +02:00
Kacper Michajłow 51762c956c tests/ref/fate/iirfilter: remove leftover ref file
Test doesn't exist anymore.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-25 11:11:41 +02:00
Kacper Michajłow df7b6b23ff tests/fate/filter-atempo: remove leftover ref file
Test was onverted to oneoff in 6cde03739e.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-25 11:11:41 +02:00
Kacper Michajłow dd4c524dbc api-h264-test: indent output
This matches tests/ref files.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-25 11:11:41 +02:00