aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
Commit message (Collapse)AuthorAgeFilesLines
* avutil/riscv: avoid redefinition of _GNU_SOURCELevi Zim29 hours1-1/+3
| | | | | | Add #ifndef to avoid potential redefinition of _GNU_SOURCE macro. Signed-off-by: Levi Zim <rsworktech@outlook.com>
* avutil/hwcontext_vulkan: add debug option to avoid host ptr importsNiklas Haas7 days1-1/+10
| | | | | In some environments, these are prohibitively slow. Add a debug option to prefer memcpy instead of importing host pointers.
* avutil/hwcontext_vulkan: check driver ID instead of hard-coded vendor checkNiklas Haas7 days1-6/+1
|
* avutil/hwcontext_vulkan: don't re-query driver props in qf setupNiklas Haas7 days1-15/+1
| | | | | This is already queried when the device is selected, so there's no need to re-query the exact same struct.
* avutil/hwcontext_vulkan: also re-query dprops in device_init()Niklas Haas7 days1-0/+2
| | | | | This can be unset if using an externally provided device, as in this case device_create() never gets called.
* avutil/side_data: add EXIF side data typeLeo Izen8 days3-1/+8
| | | | | | | | This commit adds support for the additional side data type AV_FRAME_DATA_EXIF, which contains a buffer of an EXIF metadata payload. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* hwcontext_vulkan: transfer EXCLUSIVE images to correct queue familiesvytskalt8 days1-2/+2
|
* avutil/riscv: add fallthrough comment to switchLevi Zim9 days1-0/+1
| | | | | | | | This fixes the following warning: libavutil/riscv/cpu.c:85:9: warning: label at end of compound statement is a C23 extension [-Wc23-extensions] Signed-off-by: Levi Zim <rsworktech@outlook.com>
* w32pthreads: add support for setting thread nameKacper Michajłow12 days1-0/+2
| | | | Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avutil/avassert: always implement av_assume with av_unreachableKacper Michajłow13 days1-6/+0
| | | | | | | | | | | | | | | One of the design goals of this macro is the ability to support static inline predicate functions. Which is emitting warning in clang that a function may have side-effects and the condition will be ignored. MSVC doesn't emit warning, but also ignore predicate in such cases. Instead of using assume builtins, implement it using unreachable. Which solves this case for MSVC and Clang. This reverts ea56fe60acc139a4dc7c531f2cb9f5319cef7a09, but also extends it to MSVC, which is affected in the similar way. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avutil/tests/pca: comment out unused codeKacper Michajłow2025-08-111-2/+2
| | | | Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* lavu/log: fix color for AV_CLASS_CATEGORY_HWDEVICE on non-Win32nyanmisaka2025-08-101-0/+1
| | | | | | | | | AV_CLASS_CATEGORY_HWDEVICE was introduced in the past but no corresponding colors were added for non-Win32 platforms. Fixes bf1579c ("avutil/log,hwcontext: Add AV_CLASS_CATEGORY_HWDEVICE") Signed-off-by: nyanmisaka <nst799610810@gmail.com>
* hwcontext_vulkan: Fix buildMark Thompson2025-08-091-1/+1
|
* hwcontext_vulkan: Fix build with older Vulkan headersMark Thompson2025-08-091-1/+1
|
* Bump versions for master after release/8.0n8.1-devMichael Niedermayer2025-08-091-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump versions for release/8.0Michael Niedermayer2025-08-091-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/hwcontext_vulkan: use uint64_t specifier in an av_log() callJames Almer2025-08-081-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavu/hwcontext_vaapi: drop a redundant checknyanmisaka2025-08-081-6/+0
| | | | | | | | vaapi_get_image_format() will be called in vaapi_map_frame(). So it's a double check, drop it to avoid redundancy. Signed-off-by: nyanmisaka <nst799610810@gmail.com>
* lavu/hwcontext_vaapi: fix a race mapping to allow CSC to YUV420Pnyanmisaka2025-08-081-3/+11
| | | | | | | | | | | | | | | | | | There's a race condition for YUV420P when mapping from pix_fmt to VA fourcc, both I420 and YV12 could be found by pix_fmt. Currently, vaapi_get_image_format() iterates over the query results of pix_fmt and returns the first matching result in the order declared in the driver. This may result in an incorrect image_format. Now use fourcc to find the image_format. Fixes: ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -i INPUT \ -vf scale_vaapi=format=yuv420p,hwmap,format=yuv420p \ -vframes 1 -f rawvideo -y yuv420p.yuv Signed-off-by: nyanmisaka <nst799610810@gmail.com>
* lavc: add an av1_vulkan encoderLynne2025-08-083-0/+21
| | | | This commit adds a Vulkan AV1 encoder, using the native acceleration API.
* vp9: add Vulkan VP9 hwaccelLynne2025-08-083-1/+23
|
* vulkan: add support for 16-bit RGGB Bayer pixfmtLynne2025-08-082-2/+6
|
* avutil/avassert: use __builtin_assume if availableKacper Michajłow2025-08-071-2/+5
| | | | Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avutil/tx: zero whole array, not only one elementKacper Michajłow2025-08-071-1/+1
| | | | Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* hwcontext_vulkan: fix exporting multi-plane DRM modifiersRussell Greene2025-08-051-10/+94
| | | | | | | | | | | | | | | | | | | | | | Previously, it was assumed that `drmFormatModifierPlaneCount` was one for all modifiers when exporting, which is not always the case, in particular for AMD GPUs and maybe others. Fetch the number of memory planes and fill the structs appropriately in this situation. The encoded stream is still bad in the case whre modifers are involved, but I think this patch still stands on its own and I suspect that may be a driver bug. A potential improvement that could be make is to cache the format information, so we can avoid the two GetPhysicalDeviceFormatProperties2 calls for each export, as well as the allocation. I doubt this is very expensive, but seemed worth noting. v2 changes: query the format properties with the test image created in `vulkan_frames_init` to avoid allocating space for the query during export Signed-off-by: Russell Greene <russellgreene8@gmail.com>
* hwcontext_vulkan: enable uniformBufferStandardLayoutLynne2025-08-051-0/+1
|
* hwcontext_vulkan: temporarily disable host_image_copyLynne2025-08-051-1/+0
| | | | | | | NVIDIA's support for it is a disaster. Of no benefit to other vendors. NVIDIA are working on fixing it, but it may take time.
* all: fix typos found by codespellTimo Rothenpieler2025-08-0328-44/+44
|
* all: fix whitespace/new-line issuesTimo Rothenpieler2025-08-035-5/+0
|
* avutil/hwcontext_qsv: fix format specifier for HRESULTKacper Michajłow2025-08-021-10/+10
| | | | Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* hwcontext_vulkan: transfer exclusive images to correct queue family in ↵vytskalt2025-08-021-1/+1
| | | | drm->vulkan mapping
* avfilter: add scale_d3d11 filterDash Santosh2025-07-311-0/+4
| | | | | | | This commit introduces a new hardware-accelerated video filter, scale_d3d11, which performs scaling and format conversion using Direct3D 11. The filter enables efficient GPU-based scaling and pixel format conversion (p010 to nv12), reducing CPU overhead and latency in video pipelines.
* lavu/spherical: Add support for Spherical Immersive typeVittorio Giovara2025-07-313-1/+8
|
* avutil/hwcontext_amf: add device cache sizeAraz Iusubov2025-07-291-1/+3
| | | | | | This change improves pipeline stability and reduces dynamic GPU surface allocations when using AMF with copy_frame = 1. This optimization has no negative effect.
* avutil/hmac: avoid calling functions through pointer of invalid typeKacper Michajłow2025-07-221-27/+41
| | | | | | | | | | Add type removed function wrappers to resolve UB of calling function through pointer to incorrect function type. Fixes: FATE-{hmac,srtp} Fixes: call to function av_md5_init through pointer to incorrect function type 'void (*)(void *)' and similar for others. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avutil/avstring: shrink allocation from av_get_token to fit tokenKacper Michajłow2025-07-221-2/+3
| | | | | | | | | | | | | | | av_get_token() allocates an output buffer with the same size as the input. Generally, this is harmless, but when the input string is large and consists of many small tokens, calling av_get_token() repeatedly to extract all tokens will significantly amplify memory allocations. To fix this, after obtaining the return value, simply realloc the buffer to the actual size needed for output string. Fixes OOM when parsing filter graph string. Fixes OSS-Fuzz: 394983446 Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avutil/xga_font_data: add getters to access the shared arraysJames Almer2025-07-222-0/+22
| | | | | | And stop exposing the arrays on the next major bump. Signed-off-by: James Almer <jamrial@gmail.com>
* lavu: add av_scanf_format() and use it on av_sscanf()Jacob Lifshay2025-07-223-2/+4
| | | | | Signed-off-by: Jacob Lifshay <programmerjake@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/hwcontext: Add ohcodec device and pixel formatZhao Zhili2025-07-189-2/+98
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avutil/hwcontext_vulkan: don't over-map buffers with prior paddingNiklas Haas2025-07-151-1/+2
| | | | | | | | | | | | | If the image data is not at the start of the buffer allocation, such as when the buffer has padding before the image data, this function maps too much memory, since src_data + src_buf->size exceeds the buffer size. Fix this by subtracting the difference between the buffer start and the provided image data pointer from the size of the memory range to map. An easy way to reproduce this issue is using the vf_pad filter, which allocates image data buffers with a nonzero offset whenever padding is requested before the start of the image data.
* avcodec/nvdec: switch to proper pixfmts on next major bumpTimo Rothenpieler2025-07-111-0/+2
|
* avutils/pixfmt: add YUV444/GBRP 10 and 12 bit MSB formatsTimo Rothenpieler2025-07-112-0/+111
|
* avutil/hwcontext_videotoolbox: fix unused variable warningMarvin Scholz2025-07-071-3/+1
| | | | | Resolves an unused variable warning when targeting a recent appleOS version.
* avcodec/nvdec: fix 10bit output pixel formatsTimo Rothenpieler2025-07-041-1/+2
| | | | Fixes #11655
* avutil/frame: add a 3D Reference Displays Information side data typeJames Almer2025-07-013-1/+13
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: add an API to handle 3D Reference Displays InformationJames Almer2025-07-014-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
|