Commit Graph

6807 Commits

Author SHA1 Message Date
Lynne
dd80ecb666 doc/APIchanges: bump lavu minor and remove reverted pixfmts 2025-11-06 21:47:08 +01:00
Lynne
9a7174bc9a Revert "lavu/pixfmt: add grayscale 10 and 12-bit MSB padded variants"
This reverts commit ed5b694ebe.
2025-11-06 21:46:43 +01:00
Lynne
26236a47b2 Revert "lavu/pixfmt: add 420 and 422, 10 and 12-bit MSB padded variants"
This reverts commit e42c7698f5.
2025-11-06 21:46:43 +01:00
Lynne
22cc958c58 Revert "hwcontext_vulkan: fix grayscale 10 and 12-bit formats using the new MSB formats"
This reverts commit 471acedec2.
2025-11-06 21:44:13 +01:00
Lynne
2c7732a676 Revert "hwcontext_vulkan: fix 3-plane 444 10 and 12-bit formats using the new MSB formats"
This reverts commit 41ecb203c5.
2025-11-06 21:44:13 +01:00
Lynne
38df9ba71b Revert "hwcontext_vulkan: fix planar 10 and 12-bit RGB formats using the new MSB formats"
This reverts commit 98ee3f6718.
2025-11-06 21:44:13 +01:00
Lynne
15e82dc452 Revert "hwcontext_vulkan: remove unsupported/broken pixel formats"
This reverts commit 5b388f2838.
2025-11-06 21:44:13 +01:00
Zhao Zhili
222127418b avutil/internal: remove some compats for msvc
They are supported by MSVC with C11.
2025-11-06 02:16:27 +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
James Almer
633d424b1b avutil/csp: don't dereference NULL pointer in av_csp_primaries_desc_from_id()
Fixes CID 1668265.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-11-01 12:41:23 -03:00
Lynne
71c7b9156b lavu: bump minor and add APIchanges entry for V-Log/V-Gamut 2025-10-28 20:46:21 +01:00
Lynne
92a688cabd lavu: add support for Panasonic V-Gamut 2025-10-28 20:46:21 +01:00
Lynne
aeb9b19ebc lavu: add support for Panasonic V-Log 2025-10-28 20:46:21 +01:00
Lynne
964e9cc63b hwcontext_vulkan: add support for VK_EXT_zero_initialize_device_memory 2025-10-28 07:11:21 +01:00
Lynne
5b388f2838 hwcontext_vulkan: remove unsupported/broken pixel formats
We have no use for 14-bit pixel formats for now, so remove support for gray14,
which was broken due to the LSB padding issue.

Similarly YUVA at 10/12 bit was broken for the same reason.
2025-10-27 22:59:41 -03:00
Lynne
98ee3f6718 hwcontext_vulkan: fix planar 10 and 12-bit RGB formats using the new MSB formats 2025-10-27 22:59:41 -03:00
Lynne
41ecb203c5 hwcontext_vulkan: fix 3-plane 444 10 and 12-bit formats using the new MSB formats
We previously tried to fudge this somehow, but the pixel formats
are simply broken and we cannot use them without declaring them as MSB.
2025-10-27 22:59:41 -03:00
Lynne
471acedec2 hwcontext_vulkan: fix grayscale 10 and 12-bit formats using the new MSB formats 2025-10-27 22:59:41 -03:00
Lynne
dc34d0764f lavu: bump minor and add APIchanges entry for the new pixfmts 2025-10-27 22:59:41 -03:00
Lynne
e42c7698f5 lavu/pixfmt: add 420 and 422, 10 and 12-bit MSB padded variants
Vulkan has defined all its 3-plane formats as MSB padded.
2025-10-27 22:59:39 -03:00
Lynne
ed5b694ebe lavu/pixfmt: add grayscale 10 and 12-bit MSB padded variants 2025-10-27 22:58:21 -03: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
63bb6201c7 avutil/tests/hash: don't print trailing spaces
This matches the tests/ref files, which were manually stripped.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-25 11:11:41 +02:00
Kacper Michajłow
c819e59721 avutil/tests/dict: don't print trailing spaces
This matches the tests/ref files, which were manually stripped.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-25 11:11:41 +02:00
Kacper Michajłow
8d16f85764 avutil/tests/fifo: don't print trailing spaces
This matches the tests/ref files, which were manually stripped.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-25 11:11:41 +02:00
Kacper Michajłow
3e69541ff3 avutil/tests/audio_fifo: don't print trailing spaces
This matches the tests/ref files, which were manually stripped.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-25 11:11:34 +02:00
Andreas Rheinhardt
7b5b29910a avutil/x86/cpu: Remove 3dnow flags, macros
Unused since 5ef613bcb0.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-25 07:27:11 +02:00
Kacper Michajłow
00e43619cd avutil/csp: add av_csp_approximate_eotf_gamma()
2.2 gamma was used for bt.1886 aproximation as the most common target in
real world.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-24 22:24:54 +00:00
Niklas Haas
a45d30a675 avutil/hwcontext_vulkan: always enable baseline usage flags
The documentation states that this field is for enabling "extra" usage
flags. This conflicts with the implementation, and the rest of the comment,
though.

In resolving this ambiguity, I think it's better to lean towards the first
sentence and treat this field purely as specifying *extra* usage flags to
enable. Otherwise, this may break vulkan encoding or subsequent hwdownload
if the upstream filter did not specifically advertise this.

Change the default behavior and update the documentation slightly to more
clearly document the semantics.
2025-10-16 17:40:25 +00:00
Kacper Michajłow
3a8ea78b88 avutil/attributes: add AV_HAS_ATTRIBUTE
Maybe useful and to fix MSVC preprocessor warnings.

Fixes: afad332d77
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-09 06:25:06 +02:00
Kacper Michajłow
afad332d77 avutil/attributes: use __has_attribute to test for format attribute
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-09 03:35:16 +00:00
Kacper Michajłow
086597adae avutil/attributes: don't force format checking to __gnu_printf__ on mingw build
Use __MINGW_{PRINTF,SCANF}_FORMAT which matches the format check for
implementation that is actually used.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-09 03:35:16 +00:00
Baptiste Coudurier
ef60d5ac32 general: fix warning 'av_malloc_array' sizes specified with 'sizeof'
in the earlier argument and not in the later argument [-Wcalloc-transposed-args]

Fixes trac ticket #11620
2025-10-07 14:51:46 -07:00
Kacper Michajłow
941eae01b1 avutil/attributes: prefer clang attributes even in non-gnu builds
In MSVC mode Clang doesn't define __GNUC__, but we can still attributes.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-09-26 16:15:46 +00:00
Kacper Michajłow
b7ab357db4 avutil/attributes: use standard attributes when they are available
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-09-26 16:15:46 +00:00
Kacper Michajłow
a7f0377a3d avutil/attributes: add AV_HAS_STD_ATTRIBUTE
For testing language standard attributes, for both C++ and C.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-09-26 16:15:46 +00:00
Kacper Michajłow
d6cb0d2c2b ALL: move av_unused to conform with standard requirement
This is required placement by standard [[maybe_unused]] attribute, works
the same for __attribute__((unused)).

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-09-26 16:15:46 +00:00
Brad Smith
ced4a6ebc9 libavutil/arm: Rename the HWCAP defines
Rename the HWCAP defines to use the same naming scheme as AArch64 and PPC.

Signed-off-by: Brad Smith <brad@comstyle.com>
2025-09-22 07:28:21 -04:00
Brad Smith
cdae5c3639 libavutil/arm: Make use of elf_aux_info() on FreeBSD/OpenBSD
- FreBSD/OpenBSD have elf_aux_info() on arm
- Wrap AT_HWCAP as the value is different for BSD vs Linux (16 vs 25)

Signed-off-by: Brad Smith <brad@comstyle.com>
2025-09-22 07:16:24 -04:00
Timo Rothenpieler
efd484cb2d avutil/hwcontext_d3d11va: remove D3D11_BIND_RENDER_TARGET restriction for array textures
This was added in 4f78711f9c, with the
commit message claiming that it's a Microsoft restriction that array
textures with ArraySize > 2 cannot be created with
D3D11_BIND_RENDER_TARGET.

I was unable to find any documentation or other references on that, and
a quick test also found it to not be the case. So this patch removes
that restriction.

This enables frame sources, like the d3d11 capture filters, to output
frames in an array texture, which is neccesary to pass those frames as
input to some hardware encoders.
2025-09-17 14:50:41 +00:00
James Almer
799c133273 avutil/tests/aes_ctr: extend the test to cover payloads smaller than a block
Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-11 18:32:24 -03:00
James Almer
335ba4a649 avutil/aes_ctr: reintroduce the block offset state
Wrongly removed in fe73b84879, it's required for
calls with a payload smaller than a full block.

Fixes issue #20474.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-11 18:32:23 -03:00
Dmitrii Ovchinnikov
1b97966199 avutil/hwcontext_d3d12va: added resource and heap flags to DeviceContext 2025-09-08 15:44:47 +00:00
Alan Kelly
f4b044bbe3 swscale: Disable avx2 hscale 8to15 on IceLake and below due to Intel Gather Data Sampling mitigation performance loss
Intel provided a microcode update to mitigate this security
    vulnerability which has a huge negative performance impact on gather
    instructions. This means that hscale 8to15 avx2, which uses gather
    extensively, is no longer faster than SSSE3 on impacted CPUs.

    https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/gather-data-sampling.html

    Broadwell:
    hscale_8_to_15__fs_4_dstW_512_c:                      3379.5 ( 1.00x)
    hscale_8_to_15__fs_4_dstW_512_sse2:                    615.7 ( 5.49x)
    hscale_8_to_15__fs_4_dstW_512_ssse3:                   613.4 ( 5.51x)
    hscale_8_to_15__fs_4_dstW_512_avx2:                    495.7 ( 6.82x)

    Skylake:
    hscale_8_to_15__fs_4_dstW_512_c:                      3411.4 ( 1.00x)
    hscale_8_to_15__fs_4_dstW_512_sse2:                    591.0 ( 5.77x)
    hscale_8_to_15__fs_4_dstW_512_ssse3:                   591.5 ( 5.77x)
    hscale_8_to_15__fs_4_dstW_512_avx2:                   1386.2 ( 2.46x)

    Cascade Lake:
    hscale_8_to_15__fs_4_dstW_512_c:                      3231.3 ( 1.00x)
    hscale_8_to_15__fs_4_dstW_512_sse2:                    517.9 ( 6.24x)
    hscale_8_to_15__fs_4_dstW_512_ssse3:                   521.6 ( 6.19x)
    hscale_8_to_15__fs_4_dstW_512_avx2:                   1775.0 ( 1.82x)

    Sapphire Rapids:
    hscale_8_to_15__fs_4_dstW_512_c:                      1840.0 ( 1.00x)
    hscale_8_to_15__fs_4_dstW_512_sse2:                    287.9 ( 6.39x)
    hscale_8_to_15__fs_4_dstW_512_ssse3:                   293.8 ( 6.26x)
    hscale_8_to_15__fs_4_dstW_512_avx2:                    219.2 ( 8.40x)
2025-09-06 20:57:48 +00:00
Cameron Gutman
37f02603b1 avutil/hwcontext_drm: fix mapping when dst format is unset
av_hwframe_map() is documented to work with a blank dst frame, but
hwcontext_drm currently fails if dst->format == AV_PIX_FMT_NONE.

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
2025-09-03 20:21:51 -05:00
Wu Jianhua
858aa6176b avutil/version: bump minor after recent change
See c2ce387385

Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-09-03 22:34:40 +00:00
Araz Iusubov
c2ce387385 avcodec/d3d12va_encode: texture array support for HEVC
This patch adds support for the texture array feature
used by AMD boards in the D3D12 HEVC encoder.
In texture array mode, a single texture array is shared for all
reference and reconstructed pictures using different subresources.
The implementation ensures compatibility
and has been successfully tested on AMD, Intel, and NVIDIA GPUs.
2025-09-03 11:56:06 +02:00
Niklas Haas
22929bd044 avutil/frame: add AVFrame.alpha_mode
FFmpeg currently handles alpha in a quasi-arbitrary way. Some filters/codecs
assume alpha is premultiplied, others assume it is independent. If there is
to be any hope for order in this chaos, we need to start by defining an enum
for the possible range of values.
2025-09-02 17:05:50 +02:00
Marton Balint
2296a9c1bc avutil/bprint: fix av_bprint_strftime with %p format string reporting truncated output
strftime returns 0 in case of an empty output (e.g. %p format string with some
locales), there is no way to distinguish this from a buffer-too-small error
condition. So we must use some heuristics to handle this case, and not consume
INT_MAX RAM and falsely report a truncated output.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-08-31 09:37:59 +02:00
Marton Balint
50e94aadb2 avutil/bprint: make av_bprintf use av_vbprintf
No reason to duplicate the code.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-08-31 09:37:59 +02:00