aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/nvdec: switch to proper pixfmts on next major bumpTimo Rothenpieler37 hours1-0/+2
|
* avutils/pixfmt: add YUV444/GBRP 10 and 12 bit MSB formatsTimo Rothenpieler37 hours2-0/+111
|
* avutil/hwcontext_videotoolbox: fix unused variable warningMarvin Scholz6 days1-3/+1
| | | | | Resolves an unused variable warning when targeting a recent appleOS version.
* avcodec/nvdec: fix 10bit output pixel formatsTimo Rothenpieler9 days1-1/+2
| | | | Fixes #11655
* avutil/frame: add a 3D Reference Displays Information side data typeJames Almer11 days3-1/+13
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: add an API to handle 3D Reference Displays InformationJames Almer11 days4-1/+218
| | | | | | | As defined in section G.14.3.2.3 of ITU-T H.265, it's required for proper signaling of MV-HEVC. Signed-off-by: James Almer <jamrial@gmail.com>
* hwcontext_vulkan: fix issues with importing a deviceLynne2025-06-271-7/+9
| | | | | The previous fix just used a local variable for the memory properties, which did not fix this issue.
* acvodec/amfenc: Enable use of AMF Surface in multiple encodersDmitrii Ovchinnikov2025-06-261-1/+2
| | | | | | Fixes the behavior of AMF encoders when the same AMF surface is passed to multiple encoder objects. for example when using -filter_complex
* hwcontext_vulkan: fix 85c0364b703Lynne2025-06-241-0/+3
| | | | | The issue is that by moving the mprops loading later, we inadvertently broke some earlier dependencies.
* hwcontext_vulkan: add workaround for broken Nvidia driversLynne2025-06-241-0/+6
|
* hwcontext_vulkan: move ReBAR check into a new function and use it laterLynne2025-06-241-17/+26
| | | | | | | | The issue is that vulkan_device_create_internal() is only called for devices that lavu creates by itself. For external devices, this was never done. This also solves some mid-function declaration warnings.
* avutil/hwcontext_vulkan: disable host transfers if ReBAR is disabledNiklas Haas2025-06-221-4/+21
| | | | | | | | | | | | | | | | | | | This feature fundamentally relies on host-visible VRAM, which restricts the set of available memory types to (typically) host-visible device-local ones. When resizable BAR is disabled, this memory type is usually limited to e.g. 256 MiB in size, which is just plain insufficient for allocation of general purpose GPU images, causing OOM errors on even the simplest of commands. The easiest solution is to disable host transfers entirely on machines without host-addressable VRAM. In theory, we could try and recover the use of host transfers for images which are *not* restricted to device-local memory types, but this is rarely the case in practice, and the effort required would exceed the benefit, especially since ReBAR is a standard feature on all platforms recent enough to have Vulkan drivers, and only occasionally disabled in the UEFI for by default for some hare-brained notion of "backwards compatibiility" with ancient software.
* vulkan: maintain compatibility with old headersLynne2025-06-172-14/+14
| | | | Previous patch to fix these issues was incomplete.
* avutil: Fix linking x86 asm constants with Clang in MSVC modeMartin Storsjö2025-06-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This fixes building with Clang in MSVC mode, for x86, which was broken in 6e49b8699657b808b7dc80033f2c3f2d0e029fa3 (in Nov 2024); previously it failed with undefined symbols for the constants defined with DECLARE_ASM_CONST, accessed via inline assembly. Before 57861911a34e1c33796be97f2b2f44e05fffd647, there was an #elif defined(__GNUC__) || defined(__clang__) case before the #elif defined(_MSC_VER) case for defining DECLARE_ASM_CONST, which included av_used. (This case included the explicit "defined(__clang__)" since f637046d3134a331e4b5a7243ac3dfb92735b8a5.) After 57861911a34e1c33796be97f2b2f44e05fffd647, it used the generic definition of DECLARE_ASM_CONST that also included av_used - which also worked for Clang in MSVC mode. But after 6e49b8699657b808b7dc80033f2c3f2d0e029fa3, Clang in MSVC mode ended up using the MSVC specific variant which lacked the av_used declaration, causing linker errors due to undefined symbols. Signed-off-by: Martin Storsjö <martin@martin.st>
* avutil/hwcontext_videotoolbox: fix color primaries checkJun Zhao2025-06-131-1/+1
| | | | | | | Fix incorrect enum value used in color primaries check by replacing AVCOL_SPC_UNSPECIFIED with AVCOL_PRI_UNSPECIFIED. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avutil/intmath: use AV_HAS_BUILTIN to detect builtin availabilityKacper Michajłow2025-06-122-9/+7
| | | | | | | | | Fixes use of bultins on clang x86_64-pc-windows-msvc which does not define any __GNUC__. Also on other targets __GNUC__ is defined to 4 by default, so any feature testing based on version is not really valid. Signed-off-by: Kacper Michajłow <kasper93@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* vulkan: maintain compatibility with older headersLynne2025-06-122-3/+3
|
* hwcontext_vulkan: fix image copyLynne2025-06-112-15/+28
| | | | | The patch was applied by mistake in an unfinished form. This fixes the build and lets the code run.
* vulkan: fix leak in FFVkExecPoolaverne2025-06-111-0/+2
|
* hwcontext_vulkan: use host image copyLynne2025-06-115-2/+165
|
* hwcontext_vulkan: add a setting to limit queuesLynne2025-06-101-2/+15
| | | | | If its a problem, you'll likely want to set it to 1 than more fine-grained control, which you can already do via the API.
* hwcontext_vulkan: minimize queue allocation on NVIDIALynne2025-06-101-1/+19
| | | | | | | | | | | | On NVIDIA, there's a global maximum limit of approximately 112 queues, which means it takes ONLY 7 total programs using the maximum amount of queues to cause the driver to error out/*segfault* during initialization. Also, each queue takes about 30ms to allocate, which quickly adds up. This reduces the queues allocate to the minimum that we would be happy with. Its not worth limiting decode/encode queues as they're generally not a lot, and do help.
* hwcontext_vulkan: do not use optical flow queueus by defaultLynne2025-06-101-8/+0
| | | | | We don't use them, and on NVIDIA, each queue takes around 30ms to allocate, and the driver has a global limit of ONLY 112 queues.
* avutil/x86/intmath: remove inline asm implementations for clip functionsJames Almer2025-06-071-62/+0
| | | | | | | | | | | GCC/Clang is smart enough to emit minss/maxss the same way as these functions. The only theoretical benefit was in x86_32, where x87 floats are used, but the penalty of making the clipping opaque to the compiler's scheduler plus moving values from mmx regs to xmm and back will offset any potential speedup. x86_32 builds targetting anything made in the last two decades and a half should use -msse -mfp=sse anyway. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: Fix av_realloc_array() argument orderAndreas Rheinhardt2025-06-061-2/+2
| | | | | | This is not a real bug, but mostly cosmetic. Fixes ticket #11620. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/frame: Use av_memdup() for duplicating extended data arrayAndreas Rheinhardt2025-06-061-3/+2
| | | | | | | | | Just do it like av_frame_replace(). Also "fixes" the swapped order or arguments to av_malloc_array() (the first is supposed to be the number of elements, the second the size of an element) and therefore part of ticket #11620. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/frame: Always return error upon errorAndreas Rheinhardt2025-06-061-4/+1
| | | | | | | | (I don't know whether this can be triggered for a file with nonnegative channel count, given that src's extended data can't have been allocated in this case.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/hwcontext_amf: fix error logging on amf_init_from_device.Dmitrii Ovchinnikov2025-06-061-19/+21
|
* avutil/hwcontext_amf: add support for d3d12va initialisationDmitrii Ovchinnikov2025-06-061-0/+36
|
* avutil/vulkan: automatically enable shader device address usage bitNiklas Haas2025-05-281-0/+10
| | | | | We require this internally when using descriptor buffers, so it makes sense to enable it internally, also.
* avutil/vulkan: add YUVA pixel formats supportNiklas Haas2025-05-282-2/+30
| | | | | Signed-off-by: Niklas Haas <git@haasn.dev> Sponsored-by: nxtedition
* avutil/refstruct: Remove redundant checkAndreas Rheinhardt2025-05-221-1/+1
| | | | | | We now require C11. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/avassert: Add av_unreachable() and av_assume() macrosAndreas Rheinhardt2025-05-212-1/+43
| | | | | | | | | | | | | Useful to let the compiler and static analyzers know that something is unreachable without adding an av_assert (which would be either dead for the compiler or add runtime overhead) for this. The implementation used here enforces the use of a message to provide a reason why a particular code is supposed to be unreachable. Reviewed-by: Ramiro Polla <ramiro.polla@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* hwcontext_vulkan: fix build with old Vulkan header versionsLynne2025-05-211-1/+1
|
* hwcontext_vulkan: only try exporting DMABUF memory on !WIN32 and only for ↵Lynne2025-05-201-2/+3
| | | | DMABUF tiling
* hwcontext_vulkan: correct image transfer usage flagsLynne2025-05-201-2/+2
| | | | | By pure coincidence, BUFFER and IMAGE flags were equal for those two usage types.
* vulkan: enable VK_KHR_shader_subgroup_rotateLynne2025-05-203-0/+7
| | | | Yet another thing that should've been always present.
* avcodec/x86/vp9: Add AVX-512ICL for 16x16 and 32x32 8bpc inverse transformsHenrik Gramner2025-05-191-0/+2
|
* aarch64: increase default alignment for functions and constantsRamiro Polla2025-05-191-2/+2
| | | | | | Use 16-byte alignment (align=4) instead of 4-byte (align=2) in the function and const macros. This improves instruction fetch and NEON load performance on modern AArch64 CPUs.
* Remove libpostprocMichael Niedermayer2025-05-071-1/+0
| | | | | | | | | | | | | | | Libpostproc will be available as source plugin at https://github.com/michaelni/FFmpeg/tree/sourceplugin-libpostproc OR https://github.com/michaelni/libpostproc whatever turns out more convenient to maintain For the upcoming 8.0 release, libpostproc will be included, so as not to cause delays or inconveniences Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/hwcontext_vulkan: Query the correct formatLink Mauve2025-05-071-1/+1
| | | | | | | | | | In the call to vkGetPhysicalDeviceImageFormatProperties2(), we were previously requesting the properties of the first fallback format (e.g. VK_FORMAT_R8_UNORM for VK_FORMAT_G8_B8R8_2PLANE_420_UNORM) instead of the actual format in use. We don’t do anything with it afterwards, but there is no reason to keep querying the wrong format.
* avutil/opt: Print default option value for AV_OPT_TYPE_INT64softworkz2025-05-031-1/+1
| | | | Signed-off-by: softworkz <softworkz@hotmail.com>
* hwcontext_vulkan: support AV_PIX_FMT_GBRPLynne2025-05-012-2/+5
| | | | | Support was partially added previously in vulkan.c, but now it's fully supported.
* vulkan: use _KHR suffix for push descriptor properties struct IDLynne2025-04-231-1/+1
|
* hwcontext_vulkan: enable subgroupSizeControlLynne2025-04-221-0/+1
| | | | | | | We already use this feature for setting the subgroup size, but this feature was not enabled. Fixes a validation warning.
* vulkan: move OPT_CHAIN out of hwcontext_vulkanLynne2025-04-223-84/+64
| | | | | | This allows for it to be shared. Technically, implementations should not give drivers structs that the drivers are not familiar with.
* vulkan: check that the max number of push descriptors is not exceededLynne2025-04-222-5/+11
| | | | | | Just correctness. We don't exceed this on any known hardware, but its better to check. If we do, we simply fall back to regular descriptors.
* vulkan: move feature<->usage mapping code outside of hwcontext_vulkan.cLynne2025-04-223-36/+46
| | | | | Allows for it to be reused. In particular, for a future patch to make vulkan hwaccels output DMABUF-backed VkImages.
* avutil/hwcontext: Add item_name function for AVHWDeviceContextsoftworkz2025-04-211-1/+7
| | | | Signed-off-by: softworkz <softworkz@hotmail.com>
* avutil/log,hwcontext: Add AV_CLASS_CATEGORY_HWDEVICEsoftworkz2025-04-214-1/+4
| | | | Signed-off-by: softworkz <softworkz@hotmail.com>