6641 Commits

Author SHA1 Message Date
19085287b4 avutil/tests/aes_ctr: also check the encrypted buffer
The test in its current form is just ensuring the plain text output is the same
as the plain text input, not bothering to check if anything was done with the
latter. av_aes_ctr_crypt() could be a simple memcpy under the hood and this
test would still succeed.

To check the integrity of the encrypted buffer, both the IV and the key need to
be fixed. As such, and in order to not remove the existing randomization of the
input IV, do two runs, one with random initialization data, and one with static
data.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-04-05 20:46:40 -03:00
0a34f009aa avutil/tests/aes_ctr: test more than a single block worth of data
This should exercise the implementation more thoroughly after an upcoming
change.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-04-05 20:46:39 -03:00
1722f08acf avutil/Makefile: Only include half2float, float2half when needed
They are not needed for shared builds (and because --gc-sections
is not the default for shared builds, they were included by default
included in libavutil since bf22c4cc3e005c01f50e233b1582fd1d8051aed9).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-03 06:04:57 +02:00
4d2e38b376 avutil/hwcontext_vulkan: Remove unused variable
Forgotten in 8c7b00ba3ac4b55d6e48f9a5a4345bbf19c9cb2e.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-03 06:04:57 +02:00
8c7b00ba3a avutil/hwcontext_vulkan: stop checking for deprecated and removed flag
AV_VK_FRAME_FLAG_CONTIGUOUS_MEMORY was deprecated in e0f2d2e70228d022195afccc057bd6dc8b688c21
and removed in 09a57602991d47011247f2683f32a53255adcf09

Fixes: e0f2d2e70228d022195afccc057bd6dc8b688c21
Fixes: 09a57602991d47011247f2683f32a53255adcf09
2025-03-29 00:40:48 +01:00
b338d1b35b libs: bump major version for all libraries
Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:44:34 -03:00
0ccf385e13 avutil/float_dsp: Unavpriv avpriv_scalarproduct_float_c()
Not worth the overhead of exporting it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:08 -03:00
c389d9ac78 avutil/dict: Unavpriv avpriv_dict_set_timestamp()
And move it to lavf, its only user.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:08 -03:00
b306683d12 avutil/frame: Port AVFrame.private_ref to RefStruct API
This is possible without deprecation period, because said field
is documented as only for our libav* libraries and not the general
public.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:08 -03:00
d6b215052b avutil/version_major: postpone some deprecations until the next bump
They are too recent.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:08 -03:00
97609725f8 avutil: remove deprecated FF_API_H274_FILM_GRAIN_VCS
Deprecated since 2024-03-23.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:08 -03:00
09a5760299 avutil: remove deprecated FF_API_VULKAN_CONTIGUOUS_MEMORY
Deprecated since 2023-05-28.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:08 -03:00
6e80ec9dc5 avutil: remove deprecated FF_API_PALETTE_HAS_CHANGED
Deprecated since 2023-05-18.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:08 -03:00
1061689ad8 avutil: remove deprecated FF_API_FRAME_KEY
Deprecated since 2023-05-04.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:08 -03:00
8af3331883 avutil: remove deprecated FF_API_INTERLACED_FRAME
Deprecated since 2023-05-04.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:08 -03:00
ebd6d07ab9 avutil: remove deprecated FF_API_FRAME_PKT
Deprecated since 2023-03-20.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:08 -03:00
10f199cfa5 avutil: remove deprecated FF_API_HDR_VIVID_THREE_SPLINE
Deprecated since 2023-03-17.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:07 -03:00
8804ae158b vulkan_functions: add note to update ff_vk_extensions_to_mask
Otherwise, the extension looks like its enabled, but isn't
actually used by anything.
2025-03-27 17:22:12 +01:00
5595068be5 vulkan_loader: remap video_maintenance2 in ff_vk_extensions_to_mask
This was broken.
2025-03-27 17:22:11 +01:00
4dadf71dce lavu/vulkan: skip adding NULL buffers as deps in ff_vk_exec_add_dep_buf
Allows for cleaner code.
2025-03-27 17:22:07 +01:00
e8a8a13128 avutil/slicethread: Mark avpriv_slicethread_{create,free} as av_cold
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-03-26 03:14:41 +01:00
f9fe1e07ad avutil/slicethread: Remove NULL pointer check when freeing
avpriv_slicethread_free() is one of our functions that takes
a pointer to a pointer and resets the pointer when done.
It is legal for such functions to be passed a pointer to a NULL
pointer, yet passing a NULL pointer would be insane and should
not be tolerated.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-03-26 03:14:17 +01:00
c94143350f avutil/libm: Only include intfloat.h when needed
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-03-22 03:35:28 +01:00
5b460bde8b libavutil/hwcontext_amf: add format validation in transfer_data functions 2025-03-21 17:36:13 +01:00
dff498fddf avutil/csp: Improve enum range comparisons
The underlying integer type of an enumeration is
implementation-defined (see C11, 6.7.2.2 (4)); GCC defaults
to unsigned if there are no negative values like for all enums
from pixfmt.h except enum AVPixelFormat.

This means that tests like "if (csp >= AVCOL_SPC_NB)" for
invalid colorspaces need not work as expected (namely if
enum AVColorSpace is signed). It also means that testing
for such an enum variable to be >= 0 may be tautologically
true. Clang emits a -Wtautological-unsigned-enum-zero-compare
warning for this.

Fix both of these issues by casting to unsigned.
Also do the same in libswscale/format.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-03-21 04:30:09 +01:00
f7e6070c51 avutil/tests/pixfmt_best: add more semi planar format tests
Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-19 09:34:10 -03:00
bf22c4cc3e avutil: only duplicate hal2float and float2half in shared builds
Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-18 17:21:23 -03:00
53ff9005b5 vulkan: add support for AV_PIX_FMT_GBRAP32 2025-03-17 08:49:15 +01:00
4de023f953 vulkan: add ff_vk_exec_add_dep_wait_sem()
This adds a function which adds a regular timeline semaphore
as a wait-only dependency.
2025-03-17 08:49:15 +01:00
f2a0bdd6b1 vulkan: unify handling of BGR and simplify ffv1_rct 2025-03-17 08:49:15 +01:00
67eb01b458 hwcontext_vulkan: enable VK_KHR_video_maintenance2
Enables some fixes for the video specifications, and a new feature.
2025-03-17 08:49:12 +01:00
bbb06f1ffc vulkan: workaround BGR storage image undefined behaviour 2025-03-17 08:49:10 +01:00
3c09aadcf4 hwcontext_vulkan: allow using concurrent access images with more than 5 queues
This limit was not bumped when the queue family rewrite happened.

Fixes validation issues on nvidia.
2025-03-17 08:49:10 +01:00
6c9affb3e6 hwcontext_vulkan: fix downloads; use the common host map function to map frame data
This commit uses the recently exported code for host mapping images back
where it was exported from.

The function also had broken download code for image downloading since its
recent refactor.
2025-03-17 08:49:09 +01:00
a5b90caacd vulkan: copy host-mapping buffer code from hwcontext
This is useful elsewhere.
2025-03-17 08:49:09 +01:00
ed6ee32846 vulkan: add ff_vk_create_imageview 2025-03-17 08:49:09 +01:00
7046e65e37 vulkan: rename ff_vk_set_descriptor_image to ff_vk_shader_update_img 2025-03-17 08:49:08 +01:00
49af9746e8 pixfmt: add AV_PIX_FMT_GBRAP32
This commit adds a 32-bit *integer* planar RGBA format.
Vulkan FFv1 decoding is best performed on separate planes, rather than
packed RGBA (i.e. RGBA128), hence this is useful as an intermediate format.
2025-03-17 08:49:04 +01:00
a6c58450da all: Fix doxy comments wrongly designated as trailing ///<
The ///< or /**< form of doxygen comments are only to be used
when the documentation follows the member and the comment
block starts on the same line as the member. This commit
fixes wrong uses of them; in particular, this fixes the comment
for mb_height in H.264 SPS's structure which was wrongly added
to mb_width.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-03-12 17:00:24 +01:00
bdc07f372a hwcontext_vulkan: add support for mapping multiplane images into CUDA
This patch refactors the CUDA import code to allow for Vulkan images
with multiple planes to be mapped.

Currently, a driver bug exists which causes NV12 images to be mapped
incorrectly when the memory being mapped contains both planes, the
issue has been reported to NVIDIA.
yuv420p does work correctly, however.

This is still an improvement, as the code used to crash when trying to
map the memory, unless disable_multiplane=1 was given as an option.
2025-03-11 13:42:19 +01:00
27c82af2fe avutil/vulkan: Remove unused ff_vk_create_avbuf()
Unused since aea4d4b423c62aecf326ef3ae1578710faa3eca6.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-03-11 04:35:53 +01:00
e499c85999 avutil/refstruct: Fix documentation
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-03-11 04:35:06 +01:00
61fc9b6fee avutil/pixfmt: add YAF16 and YAF32 pixel formats
Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-10 10:15:42 -03:00
f641c6846a avutil/log: Set AVClass* in av_expr_eval()
Otherwise it is possible for av_log() to receive a non-NULL object
with a NULL AVClass pointer; the default log callback handles it
gracefully, yet this is probably an API violation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-03-08 01:05:47 +01:00
7225e307be Added support for direct RGB input to AMF encoder 2025-03-06 15:38:58 +01:00
57f184221d avutil/attributes_internal: Add EXTERN macro for extern+hidden
This is inspired by the equivalent dav1d attribute introduced
by Henrik Gramner in e4c4af02f3de5e6cea6f81272a2981c0fa7bae28.
Also already use it to beautify declarations.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-03-05 00:24:54 +01:00
964d28e83c avutil/frame: move side data helpers to a new file
Should reduce clutter in frame.c, plus allow us to make opaque changes to
side data handling.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-03 18:10:10 -03:00
8631990f22 vulkan: take refs of frames using the regular buffer ref path
This simplifies the code, reduces allocations, and critically, does
not store references of frames, along with references to hw_frames_ctx.
The issue was that storing refs to frames while transferring stored
refs to hw_frames_ctx of frames, and so created a circular dependency,
which caused the Vulkan device to never be terminated.

This only stores what it strictly needs as a dependency, and enables
the frames context to be freed, even while doing asynchronous transfers.
2025-03-03 19:43:57 +01:00
9d5d51bd12 avutil/timecode: add ff_timecode_set_smpte 2025-03-02 18:43:08 +01:00
0245e9382c lavu: bump minor and add APIChanges entry for new GRAY32 pixfmts 2025-03-01 20:16:00 +01:00