Re: [FFmpeg-devel] [PATCH 0/3] Fix memory leaks in vulkan ffv1 decoding

2025-06-10 Thread Lynne
On 11/06/2025 03:58, averne wrote: This fixes a few leaks reported by LeakSanitizer. I tested this on my Intel laptop running anv, with these patches no more leaks are detected. Signed-off-by: averne --- averne (3): vulkan: fix leak in FFVkExecPool vulkan/ffv1dec: fix leak in FFVu

[FFmpeg-devel] [PATCH v2 3/3] hwcontext_vulkan: add a setting to limit queues

2025-06-04 Thread Lynne
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. --- libavutil/hwcontext_vulkan.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_v

[FFmpeg-devel] [PATCH v2 2/3] hwcontext_vulkan: minimize queue allocation on NVIDIA

2025-06-04 Thread Lynne
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 reduce

[FFmpeg-devel] [PATCH v2 1/3] hwcontext_vulkan: do not use optical flow queueus by default

2025-06-04 Thread Lynne
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. --- libavutil/hwcontext_vulkan.c | 8 1 file changed, 8 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index ce485a85a2

[FFmpeg-devel] [PATCH] hwcontext_vulkan: minimize queue allocation on NVIDIA

2025-06-03 Thread Lynne
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 reduce

[FFmpeg-devel] [PATCH] hwcontext_vulkan: do not use optical flow queueus by default

2025-06-03 Thread Lynne
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. --- libavutil/hwcontext_vulkan.c | 8 1 file changed, 8 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index aa0bfa3756

Re: [FFmpeg-devel] [RFC] Subtitle Filtering Ramp-Up

2025-06-03 Thread Lynne
You don't get to say "oh, there were no more objections, so it was fine" or "the use is evident" after the mess that your original patchsets were. You're still not using the native time fields, nor the packet buffers, which is a very hard NAK from me. On 03/06/2025 23:20, softworkz . wrote:

[FFmpeg-devel] [PATCH] hwcontext_vulkan: use host image copy

2025-06-02 Thread Lynne
--- libavutil/hwcontext_vulkan.c | 84 +++- libavutil/vulkan_functions.h | 6 +++ libavutil/vulkan_loader.h| 1 + 3 files changed, 89 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index ce485a85a2..b22e

Re: [FFmpeg-devel] STF RaptorQ

2025-05-23 Thread Lynne
On 23/05/2025 15:50, Kieran Kunhya via ffmpeg-devel wrote: On Fri, 23 May 2025, 04:44 Lynne, wrote: On 23/05/2025 08:42, Kieran Kunhya via ffmpeg-devel wrote: Hello, I wanted to put on the record that adding RaptorQ to FFmpeg isn't maintenance of FFmpeg. It isn't -- it's

Re: [FFmpeg-devel] STF RaptorQ

2025-05-22 Thread Lynne
On 23/05/2025 08:55, Devin Heitmueller wrote: On Thu, May 22, 2025 at 7:42 PM Kieran Kunhya via ffmpeg-devel wrote: I wanted to put on the record that adding RaptorQ to FFmpeg isn't maintenance of FFmpeg. It's adding an obscure FEC protocol to FFmpeg, which is not going to be implemented well

Re: [FFmpeg-devel] STF RaptorQ

2025-05-22 Thread Lynne
On 23/05/2025 08:42, Kieran Kunhya via ffmpeg-devel wrote: Hello, I wanted to put on the record that adding RaptorQ to FFmpeg isn't maintenance of FFmpeg. It isn't -- it's research. It's adding an obscure FEC protocol to FFmpeg, which is not going to be implemented well without an event loop

[FFmpeg-devel] [PATCH] aacdec_ac: fix signed overflow in ff_aac_ac_update_context()

2025-05-22 Thread Lynne
The issue is that state->cur[] is 8-bits, but a+b+1 can overflow before being clipped to 0xF in the following line, causing an incorrect state to be saved for the next symbol. This solves numerous bitstream desyncs, particularly when coefficients with magnitude greater than 127 are sent. --- liba

Re: [FFmpeg-devel] [PATCH 7/7] avutil/vf_scdet_vulkan: add new filter

2025-05-21 Thread Lynne
On 18/05/2025 21:11, Niklas Haas wrote: From: Niklas Haas Carbon copy of vf_scdet. Signed-off-by: Niklas Haas Sponsored-by: nxtedition --- configure | 1 + libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_scdet_vulkan.c |

Re: [FFmpeg-devel] [PATCH 5/7] avfilter/blackdetect_vulkan: add hw accelerated blackdetect filter

2025-05-21 Thread Lynne
On 18/05/2025 21:11, Niklas Haas wrote: From: Niklas Haas Like vf_blackdetect but better, faster, stronger, harder. Signed-off-by: Niklas Haas Sponsored-by: nxtedition --- configure | 1 + doc/filters.texi| 2 +- libavfilter/Makefile

Re: [FFmpeg-devel] [PATCH 3/7] avfilter/vf_gblur_vulkan: omit unnecessary buffer usage flag

2025-05-21 Thread Lynne
On 18/05/2025 21:11, Niklas Haas wrote: From: Niklas Haas Implied internally now when needed. --- libavfilter/vf_gblur_vulkan.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavfilter/vf_gblur_vulkan.c b/libavfilter/vf_gblur_vulkan.c index 80b66de735..fb676a7fc9 100644 --- a/libavfilt

Re: [FFmpeg-devel] [PATCH 2/7] avutil/vulkan: automatically enable shader device address usage bit

2025-05-21 Thread Lynne
On 18/05/2025 21:11, Niklas Haas wrote: From: Niklas Haas We require this internally when using descriptor buffers, so it makes sense to enable it internally, also. --- libavutil/vulkan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index 5f2

Re: [FFmpeg-devel] [PATCH] avcodec: reorder MP3 decoder declarations to match MP2 pattern

2025-05-21 Thread Lynne
On 22/05/2025 06:21, sohzm wrote: Fix inconsistent sample format reporting between probing and decoding. Previously, avformat_find_stream_info reported fltp format for MP3 streams but frames were decoded as s16p. Fixes ticket/11561 --- libavcodec/allcodecs.c | 2 +- 1 file changed, 1 insertio

Re: [FFmpeg-devel] [PATCH] avfilter/vf_interlace_vulkan: fix FPS and PTS calculation

2025-05-21 Thread Lynne
LGTM On 21/05/2025 23:12, Niklas Haas wrote: From: Niklas Haas ol->frame_rate is 0/0, so we need to calcalute the correct value based on the il->frame_rate instead. Also adjust the time base, PTS and frame_duration values accordingly. (Logic taken from vf_tinterlace.c) --- libavfilter/vf_int

Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/graphprint: Now, make it a Killer-Feature!

2025-05-15 Thread Lynne
On 16/05/2025 02:39, James Almer wrote: On 5/15/2025 9:36 PM, softworkz . wrote: -Original Message- From: ffmpeg-devel On Behalf Of softworkz . Sent: Freitag, 16. Mai 2025 02:33 To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/grap

[FFmpeg-devel] [PATCH 16/16] hwcontext_vulkan: only try exporting DMABUF memory on !WIN32 and only for DMABUF tiling

2025-05-14 Thread Lynne
--- libavutil/hwcontext_vulkan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 9f9df91e5d..4f205137eb 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -2643,11 +2643,12 @@ st

[FFmpeg-devel] [PATCH 15/16] hwcontext_vulkan: correct image transfer usage flags

2025-05-14 Thread Lynne
By pure coincidence, BUFFER and IMAGE flags were equal for those two usage types. --- libavutil/hwcontext_vulkan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index eded36bc01..9f9df91e5d 100644 --- a/libavutil

[FFmpeg-devel] [PATCH 14/16] vulkan: enable VK_KHR_shader_subgroup_rotate

2025-05-14 Thread Lynne
Yet another thing that should've been always present. --- libavutil/hwcontext_vulkan.c | 5 + libavutil/vulkan_functions.h | 1 + libavutil/vulkan_loader.h| 1 + 3 files changed, 7 insertions(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 978d7e29d3..ede

[FFmpeg-devel] [PATCH 13/16] vulkan_ffv1: pipe through slice decoding status

2025-05-14 Thread Lynne
--- libavcodec/vulkan/ffv1_dec.comp | 4 ++ libavcodec/vulkan/ffv1_dec_setup.comp | 4 +- libavcodec/vulkan_decode.c| 1 + libavcodec/vulkan_decode.h| 1 + libavcodec/vulkan_ffv1.c | 60 +++ 5 files changed, 52 insertions(+), 1

[FFmpeg-devel] [PATCH 12/16] vulkan/ffv1: unify encode and decode get/put primitives

2025-05-14 Thread Lynne
This simply makes a get_rac/put_rac_internal variant that can be reused. --- libavcodec/vulkan/rangecoder.comp | 57 +-- 1 file changed, 17 insertions(+), 40 deletions(-) diff --git a/libavcodec/vulkan/rangecoder.comp b/libavcodec/vulkan/rangecoder.comp index 9e2c5fbe

[FFmpeg-devel] [PATCH 11/16] ffv1enc_vulkan: implement RCT search for level >= 4

2025-05-14 Thread Lynne
ice(inout SliceContext sc, const uint slice_idx) { /* Set coordinates */ uvec2 img_size = imageSize(src[0]); @@ -37,11 +37,13 @@ void init_slice(out SliceContext sc, const uint slice_idx) sc.slice_pos = ivec2(sxs, sys); sc.slice_dim = ivec2(sxe - sxs, sye - sys); -sc.sli

[FFmpeg-devel] [PATCH 10/16] ffv1enc_vulkan: implement the cached EC writer from the decoder

2025-05-14 Thread Lynne
This gives a 35% speedup on AMD and 50% on Nvidia. --- libavcodec/ffv1enc_vulkan.c | 6 ++- libavcodec/vulkan/ffv1_enc.comp | 68 ++--- 2 files changed, 50 insertions(+), 24 deletions(-) diff --git a/libavcodec/ffv1enc_vulkan.c b/libavcodec/ffv1enc_vulkan.c index

[FFmpeg-devel] [PATCH 09/16] vulkan_ffv1: fix PCM + cached symbol reader

2025-05-14 Thread Lynne
writeout_rgb requires that all subgroups are active. --- libavcodec/vulkan/ffv1_dec.comp | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/vulkan/ffv1_dec.comp b/libavcodec/vulkan/ffv1_dec.comp index c74af4bf6a..e73b3f1dc0 100644 --- a/libavcodec/vulkan/ffv1_dec

[FFmpeg-devel] [PATCH 08/16] ffv1enc_vulkan: use ff_get_encode_buffer

2025-05-14 Thread Lynne
We used to create our own buffer, but still used the DR1 flag, which is not how it's supposed to work. Instead, use ff_get_encode_buffer, and either host-map the buffer before copying each slice via GPU transfers, or just copy each slice manually if that fails or is unavailable. --- libavcodec/ff

[FFmpeg-devel] [PATCH 07/16] ffv1_common: minor RGB optimization

2025-05-14 Thread Lynne
--- libavcodec/vulkan/ffv1_common.comp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/vulkan/ffv1_common.comp b/libavcodec/vulkan/ffv1_common.comp index 1f222bdc42..3d40592739 100644 --- a/libavcodec/vulkan/ffv1_common.comp +++ b/libavcodec/vulkan/ffv1_common

[FFmpeg-devel] [PATCH 06/16] ffv1enc_vulkan: switch to 2-line cache, unify prediction code

2025-05-14 Thread Lynne
--- libavcodec/ffv1enc_vulkan.c| 379 + libavcodec/vulkan/ffv1_common.comp | 87 +++ libavcodec/vulkan/ffv1_dec.comp| 91 +-- libavcodec/vulkan/ffv1_enc.comp| 155 ++-- libavcodec/vulkan_ffv1.c | 5 +- 5 files changed, 288 i

[FFmpeg-devel] [PATCH 05/16] ffv1enc_vulkan: minor EC optimizations

2025-05-14 Thread Lynne
--- libavcodec/vulkan/rangecoder.comp | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/libavcodec/vulkan/rangecoder.comp b/libavcodec/vulkan/rangecoder.comp index badc65293f..9e2c5fbecf 100644 --- a/libavcodec/vulkan/rangecoder.comp +++ b/libavcodec/vulkan/

[FFmpeg-devel] [PATCH 02/16] vulkan/ffv1: synchronize get_pred implementations between encoder and decoder

2025-05-14 Thread Lynne
--- libavcodec/vulkan/ffv1_dec.comp | 32 ++--- libavcodec/vulkan/ffv1_enc.comp | 85 - 2 files changed, 68 insertions(+), 49 deletions(-) diff --git a/libavcodec/vulkan/ffv1_dec.comp b/libavcodec/vulkan/ffv1_dec.comp index fc0175c715..1c313b3168 100644 ---

[FFmpeg-devel] [PATCH 04/16] ffv1enc_vulkan: unify EC code between setup and encode

2025-05-14 Thread Lynne
--- libavcodec/ffv1enc_vulkan.c | 1 + libavcodec/vulkan/ffv1_enc.comp | 7 --- libavcodec/vulkan/ffv1_enc_setup.comp | 10 +- libavcodec/vulkan/rangecoder.comp | 23 +++ 4 files changed, 17 insertions(+), 24 deletions(-) diff --git a/libavcod

[FFmpeg-devel] [PATCH 01/16] ffv1enc_vulkan: merge all encoder variants into one file

2025-05-14 Thread Lynne
const uint slice_idx = gl_WorkGroupID.y*gl_NumWorkGroups.x + gl_WorkGroupID.x; encode_slice(slice_ctx[slice_idx], slice_idx); +finalize_slice(slice_ctx[slice_idx], slice_idx); } diff --git a/libavcodec/vulkan/ffv1_enc_ac.comp b/libavcodec/vulkan/ffv1_enc_ac.comp deleted file mode 10

[FFmpeg-devel] [PATCH 03/16] ffv1enc_vulkan: get rid of temporary data for the setup shader

2025-05-14 Thread Lynne
--- libavcodec/ffv1enc_vulkan.c | 21 - libavcodec/vulkan/ffv1_enc_setup.comp | 65 +++ libavcodec/vulkan/rangecoder.comp | 28 +++- 3 files changed, 42 insertions(+), 72 deletions(-) diff --git a/libavcodec/ffv1enc_vulkan.c b/libavcodec/ffv1e

Re: [FFmpeg-devel] [PATCH 0/5] doc/developer: Add subsection about patch submission via FFstaging

2025-05-08 Thread Lynne
On 08/05/2025 14:26, softworkz . wrote: -Original Message- From: ffmpeg-devel On Behalf Of Lynne Sent: Donnerstag, 8. Mai 2025 14:00 To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH 0/5] doc/developer: Add subsection about patch submission via FFstaging On 08/05/2025

Re: [FFmpeg-devel] [PATCH 0/5] doc/developer: Add subsection about patch submission via FFstaging

2025-05-08 Thread Lynne
On 08/05/2025 13:33, softworkz . wrote: -Original Message- From: ffmpeg-devel On Behalf Of Lynne Sent: Donnerstag, 8. Mai 2025 13:20 To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH 0/5] doc/developer: Add subsection about patch submission via FFstaging On 08/05/2025

Re: [FFmpeg-devel] [PATCH 0/5] doc/developer: Add subsection about patch submission via FFstaging

2025-05-08 Thread Lynne
On 08/05/2025 12:22, ffmpegagent wrote: Signed-off-by: softworkz softwo...@hotmail.com softworkz (5): doc/developer: Move checklist into Submitting Patches chapter doc/developer: Move codecs/formats checklist into Development Policy chapter doc/developer: Reorder Submission procedu

Re: [FFmpeg-devel] [PATCH 01/11] avcodec/vulkan_encode_h264: Fix memleak on error

2025-05-07 Thread Lynne
On 06/05/2025 01:37, Andreas Rheinhardt wrote: Patches attached. - Andreas Vulkan patches LGTM. OpenPGP_0xA2FEA5F03F034464.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature ___ ffmpeg-devel mailing l

Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_vulkan: Query the correct format

2025-05-07 Thread Lynne
On 05/05/2025 21:37, Link Mauve wrote: 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

Re: [FFmpeg-devel] [PATCH] aactab: add and initialize 2D VLC tables for USAC Mps212

2025-05-05 Thread Lynne
On 05/05/2025 16:57, Andreas Rheinhardt wrote: Lynne: On 05/05/2025 15:52, Andreas Rheinhardt wrote: Lynne: ---   libavcodec/aac/aacdec_tab.c |   54 ++   libavcodec/aactab.c | 1820 +++   libavcodec/aactab.h |   20 +   3 files changed, 1894

Re: [FFmpeg-devel] [PATCH] aactab: add and initialize 2D VLC tables for USAC Mps212

2025-05-05 Thread Lynne
On 05/05/2025 15:52, Andreas Rheinhardt wrote: Lynne: --- libavcodec/aac/aacdec_tab.c | 54 ++ libavcodec/aactab.c | 1820 +++ libavcodec/aactab.h | 20 + 3 files changed, 1894 insertions(+) 1. This should only be applied if it is used

[FFmpeg-devel] [PATCH] aactab: add and initialize 2D VLC tables for USAC Mps212

2025-05-05 Thread Lynne
--- libavcodec/aac/aacdec_tab.c | 54 ++ libavcodec/aactab.c | 1820 +++ libavcodec/aactab.h | 20 + 3 files changed, 1894 insertions(+) diff --git a/libavcodec/aac/aacdec_tab.c b/libavcodec/aac/aacdec_tab.c index 45a84a9a72..5ba20c0d8a 100644 -

Re: [FFmpeg-devel] [PATCH] hwcontext_vulkan: fix exporting multi-plane DRM modifiers

2025-05-03 Thread Lynne
On 03/05/2025 17:01, Russell Greene wrote: vkGetPhysicalDeviceToolPropertiesEXT(dev, nb, array) If pToolProperties is NULL, then the number of tools currently active on physicalDevice is returned in pToolCount. Otherwise, pToolCount must point to a variable set by the application to the number of

Re: [FFmpeg-devel] [PATCH] hwcontext_vulkan: fix exporting multi-plane DRM modifiers

2025-05-03 Thread Lynne
On 03/05/2025 04:39, Russell Greene wrote: Is this documented anywhere? Should I maybe have a fixed sized stack buffer and fallback to an allocation if it's just a rule of thumb that it'll be less than some known small number. I just somehow doubt this is in the vulkan spec or any sort of guarant

Re: [FFmpeg-devel] [PATCH] hwcontext_vulkan: fix exporting multi-plane DRM modifiers

2025-05-01 Thread Lynne
On 01/05/2025 07:05, Russell Greene wrote: From: Russell Greene 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 stru

Re: [FFmpeg-devel] [PATCH v2 4/4] avcodec/apv_decoder: Provided support for APV decoder

2025-04-30 Thread Lynne
On 30/04/2025 10:11, Dawid Kozinski wrote: - Added APV decoder wrapper - Changes in project configuration file and libavcodec Makefile - Added documentation for APV decoder wrapper Signed-off-by: Dawid Kozinski --- configure | 1 + doc/decoders.texi | 27 ++ libavcodec/

[FFmpeg-devel] [PATCH 2/2] ffv1enc_vulkan: support 2-plane YUV formats

2025-04-29 Thread Lynne
This adds support for NV12 and P010. More will be added later. --- libavcodec/ffv1enc.c| 2 ++ libavcodec/ffv1enc_vulkan.c | 8 ++-- libavcodec/vulkan/ffv1_enc.comp | 21 ++--- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/libavcodec/ffv1enc.

[FFmpeg-devel] [PATCH 1/2] hwcontext_vulkan: support AV_PIX_FMT_GBRP

2025-04-29 Thread Lynne
Support was partially added previously in vulkan.c, but now it's fully supported. --- libavutil/hwcontext_vulkan.c | 1 + libavutil/vulkan.c | 6 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index ade023

[FFmpeg-devel] [PATCH] aacdec_usac: correct Mps212 parsing location

2025-04-27 Thread Lynne
It gets parsed after SBR, even if there is no SBR. --- libavcodec/aac/aacdec_usac.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c index ccdf58bc8e..ef0c115aa0 100644 --- a/libavcodec/aac/aacdec_usac.c +++ b/l

Re: [FFmpeg-devel] [PATCH 1/2] tests: Add stream dump test API util, use it to dump stream data for chained ogg/{vorbis, opus, flac} streams.

2025-04-26 Thread Lynne
On 26/04/2025 05:11, Michael Niedermayer wrote: On Tue, Apr 22, 2025 at 04:44:07PM -0500, Romain Beauxis wrote: --- tests/Makefile | 4 + tests/api/Makefile | 2 +- tests/api/api-dump-stream-meta-test.c | 177 +

[FFmpeg-devel] [PATCH] cuda: add support for yuv420p10

2025-04-25 Thread Lynne
This patch adds support for accepting yuv420p10 in encoders and cuda. --- libavcodec/nvenc.c | 2 ++ libavutil/hwcontext_cuda.c | 7 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index 41a4dc55f4..ccf8cc6d39 100644 --- a/liba

[FFmpeg-devel] [PATCH] hwcontext_vulkan: set Vulkan 1.4 as the maximum API version

2025-04-20 Thread Lynne
The field represents the maximum Vulkan version that an application supports. We do not have any code which require us to stay at 1.3. This enables validation against 1.4, and enables all 1.4 features. --- libavutil/hwcontext_vulkan.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) di

[FFmpeg-devel] [PATCH 3/3] vulkan: move OPT_CHAIN out of hwcontext_vulkan

2025-04-20 Thread Lynne
This allows for it to be shared. Technically, implementations should not give drivers structs that the drivers are not familiar with. --- libavutil/hwcontext_vulkan.c | 63 +- libavutil/vulkan.c | 75 ++-- libavutil/vulkan.h

[FFmpeg-devel] [PATCH 2/3] vulkan: check that the max number of push descriptors is not exceeded

2025-04-20 Thread Lynne
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. --- libavutil/vulkan.c | 15 ++- libavutil/vulkan.h | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/libavutil/vulkan.c b/

[FFmpeg-devel] [PATCH 1/3] vulkan: move feature<->property mapping code outside of hwcontext_vulkan.c

2025-04-20 Thread Lynne
Allows for it to be reused. --- libavutil/hwcontext_vulkan.c | 42 ++-- libavutil/vulkan.c | 34 + libavutil/vulkan.h | 6 ++ 3 files changed, 46 insertions(+), 36 deletions(-) diff --git a/libavutil/hwcontext_vu

Re: [FFmpeg-devel] [PATCH v2] fate: add various FFv1 tests for 1024 slices

2025-04-18 Thread Lynne
On 19/04/2025 03:01, Michael Niedermayer wrote: On Wed, Apr 16, 2025 at 04:09:13PM +0200, Lynne wrote: This lets us test features that were broken earlier, as well as test the hardware decoder by using the HWACCEL=vulkan option. --- tests/Makefile| 1 + tests/fate/ffv1

[FFmpeg-devel] [PATCH] vulkan: use ReadWithoutFormat/WriteWithoutFormat

2025-04-18 Thread Lynne
This implements support for reading and writing storage images with no format. The issue is that we define our images as arrays, and arrays can only have a single type, which means that f.ex. NV12 needs two different images, R8 and RG8. Not using any formats fixes this. --- libavutil/vulkan.c | 2

Re: [FFmpeg-devel] [PATCH v3 5/5] lavc: implement a Vulkan-based VC-2 encoder Implements a Vulkan based dirac encoder. Supports Haar and Legall wavelets and should work with all wavelet depths.

2025-04-17 Thread Lynne
On 18/04/2025 01:55, IndecisiveTurtle wrote: From: IndecisiveTurtle Performance wise, encoding a 1080p 1-minute video is performed in about 2.5 minutes with the cpu encoder running on my Ryzen 5 4600H, while it takes about 30 seconds on my NVIDIA GTX 1650 Haar shader has a subgroup optimized

[FFmpeg-devel] [PATCH v2] fate: add various FFv1 tests for 1024 slices

2025-04-16 Thread Lynne
This lets us test features that were broken earlier, as well as test the hardware decoder by using the HWACCEL=vulkan option. --- tests/Makefile| 1 + tests/fate/ffv1.mak | 46 +++ tests/ref/fate/ffv1-s1024-bgra| 4 +++ tests/ref/

[FFmpeg-devel] [PATCH] vulkan: use a single command buffer per command buffer pool

2025-04-16 Thread Lynne
We violated the spec, which, despite the actual command buffer pool *not* being involved in any functions which require external synchronization of the pool, *require* external synchronization even if only the command buffers are used. This also has the effect of *significantly* speeding up execut

Re: [FFmpeg-devel] [PATCH] fate: add various FFv1 tests for 1024 slices

2025-04-16 Thread Lynne
On 16/04/2025 12:22, Andreas Rheinhardt wrote: Lynne: This lets us test features that were broken earlier, as well as test the hardware decoder by using the HWACCEL=vulkan option. Can't you just adjust some of vsynth FFV1 tests to use this many slices? (Can one even use 1024 slices for s

[FFmpeg-devel] [PATCH] fate: add various FFv1 tests for 1024 slices

2025-04-16 Thread Lynne
This lets us test features that were broken earlier, as well as test the hardware decoder by using the HWACCEL=vulkan option. --- tests/Makefile | 1 + tests/fate/ffv1.mak | 53 + tests/ref/fate/ffv1-s1024-bgra | 4 +++ tests/

Re: [FFmpeg-devel] [PATCH] avcodec/h264bsd_dec: add h264dec base on h264bsd

2025-04-15 Thread Lynne
On 16/04/2025 08:12, Shiqi Zhu wrote: h264bsd url https://github.com/oneam/h264bsd ./configure --enable-decoder="h264_bsd" --extra-cflags="-I/h264bsd/src" --extra-ldflags="-L/h264bsd/posix/lib" --extra-libs="-lh264bsd" Test ./ffmpeg -y -codec:v h264_bsd -i /h264bsd/test/test_640x360.h264 ./test

[FFmpeg-devel] [PATCH] hwcontext_vulkan: check if expect_assume is supported by the headers

2025-04-15 Thread Lynne
--- libavutil/hwcontext_vulkan.c | 8 libavutil/vulkan_loader.h| 2 ++ 2 files changed, 10 insertions(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 8823af0175..f878dfec76 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c

Re: [FFmpeg-devel] [PATCH 3/3] avcodec: add Blackmagic RAW decoder

2025-04-15 Thread Lynne
On 15/04/2025 12:04, Lynne wrote: Most of the work was done by Paul B Mahol. I cleaned the patch up, improved the code a bit, and added slice threading. --- configure | 1 + libavcodec/Makefile| 1 + libavcodec/allcodecs.c | 1 + libavcodec/braw.c | 666

[FFmpeg-devel] [PATCH 3/3] avcodec: add Blackmagic RAW decoder

2025-04-15 Thread Lynne
ndex 00..2246b2d645 --- /dev/null +++ b/libavcodec/braw.c @@ -0,0 +1,666 @@ +/* + * Blackmagic RAW codec + * + * Copyright (c) 2019 Paul B Mahol + * Copyright (c) 2025 Lynne + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under

[FFmpeg-devel] [PATCH 1/3] avcodec: add AV_CODEC_ID_BRAW

2025-04-15 Thread Lynne
This adds codec entries for the Blackmagic RAW codec. --- libavcodec/codec_desc.c | 7 +++ libavcodec/codec_id.h | 1 + 2 files changed, 8 insertions(+) diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 9fb190e35a..90e31a8b6a 100644 --- a/libavcodec/codec_desc.c +++ b/lib

[FFmpeg-devel] [PATCH 2/3] lavf/mov: support demuxing Blackmagic RAW streams

2025-04-15 Thread Lynne
--- libavformat/isom_tags.c | 7 +++ libavformat/mov.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libavformat/isom_tags.c b/libavformat/isom_tags.c index f05762beec..7bf2bf7d5b 100644 --- a/libavformat/isom_tags.c +++ b/libavformat/isom_tags.c @@ -286,6 +286,13

[FFmpeg-devel] [PATCH v2] lavc: add an av1_vulkan encoder

2025-04-14 Thread Lynne
This commit adds a Vulkan AV1 encoder, using the native acceleration API. --- configure |1 + libavcodec/Makefile|2 + libavcodec/allcodecs.c |1 + libavcodec/vulkan_encode_av1.c | 1385 libavcodec/vulkan_video.c

[FFmpeg-devel] [PATCH 17/18] vulkan: add support for expect/assume

2025-04-12 Thread Lynne
This commit adds support for compiler hints. While on AMD these are not used/needed, Nvidia benefits from them, and gives a sizeable 10% speedup on 4k. --- libavcodec/vulkan/ffv1_dec.comp | 16 libavcodec/vulkan/rangecoder.comp | 12 ++-- libavutil/hwcontext_vulkan.c

[FFmpeg-devel] [PATCH 13/18] ffv1/vulkan: redo context count tracking and quant_table_idx management

2025-04-12 Thread Lynne
This commit also makes it possible for the encoder to choose a different quantization table on a per-slice basis, as well as adding this capability to the decoder. Also, this commit fully fixes decoding of context=1 encoded files. --- libavcodec/ffv1_vulkan.h | 2 +- libavcodec/ffv1

[FFmpeg-devel] [PATCH 01/18] hwcontext_vulkan: disable descriptor buffer extension on Intel

2025-04-12 Thread Lynne
Temporary workaround. Will be replaced with a version check once a fix is in the works and a known next version for Mesa with a fix is known. --- libavutil/hwcontext_vulkan.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index

[FFmpeg-devel] [PATCH 18/18] vulkan_ffv1: add cached symbol reader for AMD

2025-04-12 Thread Lynne
Speeds up everything on AMD by 3x. This uses 32 local invocations to load state into cache, as well as to do the RCT faster. --- libavcodec/vulkan/ffv1_dec.comp | 71 - libavcodec/vulkan_ffv1.c| 7 +++- 2 files changed, 50 insertions(+), 28 deletions(-) di

[FFmpeg-devel] [PATCH 16/18] vulkan_ffv1: shortcut +-1 coeffs in symbol reading

2025-04-12 Thread Lynne
Slightly faster, and allows for further optimizations. --- libavcodec/vulkan/ffv1_dec.comp | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/vulkan/ffv1_dec.comp b/libavcodec/vulkan/ffv1_dec.comp index 4cc3b9987f..fd9b98023c 100644 --- a/libavcodec/vulkan/ffv1_dec.

[FFmpeg-devel] [PATCH 15/18] vulkan_ffv1: remove need for scratch data during setup

2025-04-12 Thread Lynne
This saves on some VRAM, but mainly allows for a more unified path. --- libavcodec/vulkan/ffv1_dec_setup.comp | 55 ++- libavcodec/vulkan/rangecoder.comp | 17 + libavcodec/vulkan_ffv1.c | 23 +-- 3 files changed, 46 insertions(+), 49 deleti

[FFmpeg-devel] [PATCH 12/18] vulkan_ffv1: cache only 2 lines when decoding RGB

2025-04-12 Thread Lynne
s, run_index); +decode_line(sc, sp, w, y, p, bits, +slice_state_off[p], run_index); + +writeout_rgb(sc, sp, w, y, true); } #endif } diff --git a/libavcodec/vulkan/ffv1_dec_rct.comp b/libavcodec/vulkan/ffv1_dec_rct.comp deleted

[FFmpeg-devel] [PATCH 14/18] vulkan_ffv1: externalize extended lookup check

2025-04-12 Thread Lynne
8% speedup on nvidia on 4k. --- libavcodec/vulkan/ffv1_dec.comp | 3 +-- libavcodec/vulkan_ffv1.c| 6 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/vulkan/ffv1_dec.comp b/libavcodec/vulkan/ffv1_dec.comp index a6272d4832..4cc3b9987f 100644 --- a/libavcodec

[FFmpeg-devel] [PATCH 11/18] vulkan_ffv1: fix left-2 sample addressing

2025-04-12 Thread Lynne
Typo. Not enough to fix context=1, but its a start. --- libavcodec/vulkan/ffv1_dec.comp | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libavcodec/vulkan/ffv1_dec.comp b/libavcodec/vulkan/ffv1_dec.comp index 7d3150ed63..1954c050f8 100644 --- a/libavcodec/vulkan/f

[FFmpeg-devel] [PATCH 10/18] vulkan_ffv1: improve buffer barrier correctness for slice state

2025-04-12 Thread Lynne
This is likely a nanooptimization, but its more correct. --- libavcodec/vulkan_ffv1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/vulkan_ffv1.c b/libavcodec/vulkan_ffv1.c index d90db291aa..e511840a01 100644 --- a/libavcodec/vulkan_ffv1.c +++ b/libavcodec/vul

[FFmpeg-devel] [PATCH 09/18] vulkan_ffv1: fix reset shader dependencies

2025-04-12 Thread Lynne
Without a barrier upfront, the reset shader may read data fields not yet set by the setup shader. --- libavcodec/vulkan_ffv1.c | 36 +--- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/libavcodec/vulkan_ffv1.c b/libavcodec/vulkan_ffv1.c index ccff92

[FFmpeg-devel] [PATCH 08/18] vulkan_ffv1: fallback to upload if mapping packet fails, fix fallback

2025-04-12 Thread Lynne
The commit which added support for host mapping accidentally broke the original, upload route. For drivers without host-mapping (very few), fix it. --- libavcodec/vulkan_ffv1.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/libavcodec/vulkan_ffv1.c b/libav

[FFmpeg-devel] [PATCH 06/18] vulkan_ffv1: allocate just as much memory for slice state as needed

2025-04-12 Thread Lynne
Rather than always using the maximum allowed slices, just use the number of slices present in this frame. --- libavcodec/vulkan_ffv1.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/vulkan_ffv1.c b/libavcodec/vulkan_ffv1.c index b6c9320ec2..9747721f0d 100644

[FFmpeg-devel] [PATCH 04/18] vulkan_ffv1: slightly optimize the range decoder

2025-04-12 Thread Lynne
GPUs have cmovs as standard. --- libavcodec/vulkan/rangecoder.comp | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libavcodec/vulkan/rangecoder.comp b/libavcodec/vulkan/rangecoder.comp index 4272b2a42f..ba8a6cfd9d 100644 --- a/libavcodec/vulkan/rangecoder.comp +++ b/l

[FFmpeg-devel] [PATCH 05/18] vulkan_ffv1: optimize symbol reader

2025-04-12 Thread Lynne
This was the fastest variant tested. --- libavcodec/vulkan/ffv1_dec.comp | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libavcodec/vulkan/ffv1_dec.comp b/libavcodec/vulkan/ffv1_dec.comp index f9ffe1cee1..7d3150ed63 100644 --- a/libavcodec/vulkan/ffv1_dec.comp +++

[FFmpeg-devel] [PATCH 07/18] vulkan_ffv1: init overread/corrupt fields

2025-04-12 Thread Lynne
Forgotten. --- libavcodec/vulkan/rangecoder.comp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vulkan/rangecoder.comp b/libavcodec/vulkan/rangecoder.comp index ba8a6cfd9d..e332bce8a5 100644 --- a/libavcodec/vulkan/rangecoder.comp +++ b/libavcodec/vulkan/rangec

[FFmpeg-devel] [PATCH 02/18] vulkan_ffv1: enable acceleration on Intel

2025-04-12 Thread Lynne
Fixed by previous commit. --- libavcodec/vulkan_ffv1.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/libavcodec/vulkan_ffv1.c b/libavcodec/vulkan_ffv1.c index 17bfc943d4..1156d6749b 100644 --- a/libavcodec/vulkan_ffv1.c +++ b/libavcodec/vulkan_ffv1.c @@ -1142,20 +1142,6 @@ sta

[FFmpeg-devel] [PATCH 03/18] vulkan_ffv1: remove unused define

2025-04-12 Thread Lynne
Leftover debug macro. --- libavcodec/vulkan_ffv1.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/vulkan_ffv1.c b/libavcodec/vulkan_ffv1.c index 1156d6749b..b6c9320ec2 100644 --- a/libavcodec/vulkan_ffv1.c +++ b/libavcodec/vulkan_ffv1.c @@ -41,8 +41,6 @@ const FFVulkanDecodeDescri

Re: [FFmpeg-devel] [PATCH] avcodec/mlpdec: Add decoding of object audio data

2025-04-05 Thread Lynne
On 22/03/2025 18:49, Massimo Eynard wrote: This patch adds support for decoding the fourth MLP substream which contains the 16-channel presentation used for Atmos audio objects. By default only the first three substreams are decoded unless the new extract_objects flag is enabled as the resulting

Re: [FFmpeg-devel] Hardware purchase request: Ryzen 9 CPU

2025-04-04 Thread Lynne
On 04/04/2025 19:20, Niklas Haas wrote: Hi all, My current workstation (first generation Zen) is getting rather old (8 years). On top of being slow and power hungry, it is also not very representative anymore of modern hardware. Additionally, I would like to try and incorporate AVX-512 instruct

Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_vulkan: Remove unused variable

2025-04-02 Thread Lynne
On 02/04/2025 16:23, Andreas Rheinhardt wrote: Andreas Rheinhardt: Patch attached. - Andreas Will apply this patch tomorrow unless there are objections. LGTM ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo

[FFmpeg-devel] [PATCH 4/6] vulkan_decode: add a generic start_frame function

2025-03-30 Thread Lynne
--- libavcodec/vulkan_decode.c | 38 ++ libavcodec/vulkan_decode.h | 6 ++ 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c index 058efe3037..893f8fca3d 100644 --- a/libavcodec/vulkan_de

[FFmpeg-devel] [PATCH 6/6] vulkan_hevc: make all temporary structs temporary

2025-03-30 Thread Lynne
--- libavcodec/vulkan_hevc.c | 291 --- 1 file changed, 150 insertions(+), 141 deletions(-) diff --git a/libavcodec/vulkan_hevc.c b/libavcodec/vulkan_hevc.c index e83f8346a0..baf8b0c3fd 100644 --- a/libavcodec/vulkan_hevc.c +++ b/libavcodec/vulkan_hevc.c @@ -11

[FFmpeg-devel] [PATCH 5/6] vulkan_h264: make all temporary structs temporary

2025-03-30 Thread Lynne
This commit moves all temporary structs used for decoding out of the common picture header and onto stack. --- libavcodec/vulkan_decode.c | 1 + libavcodec/vulkan_decode.h | 3 + libavcodec/vulkan_h264.c | 322 +++-- 3 files changed, 168 insertions(+), 158 del

[FFmpeg-devel] [PATCH 3/6] vulkan_decode: move temporary Vulkan structs into each codec

2025-03-30 Thread Lynne
Required for next refactor. --- libavcodec/vulkan_av1.c| 30 +- libavcodec/vulkan_decode.c | 20 ++-- libavcodec/vulkan_decode.h | 13 + libavcodec/vulkan_h264.c | 32 ++-- libavcodec/vulkan_hevc.c | 28 +++

[FFmpeg-devel] [PATCH 1/6] vulkan_decode: generalize handling of slice offsets/nb

2025-03-30 Thread Lynne
This allows for the upcoming refactor. --- libavcodec/vulkan_av1.c| 6 +++--- libavcodec/vulkan_decode.c | 23 ++- libavcodec/vulkan_decode.h | 5 +++-- libavcodec/vulkan_ffv1.c | 22 -- libavcodec/vulkan_h264.c | 9 +++-- libavcodec/vulkan_he

[FFmpeg-devel] [PATCH 2/6] vulkan_decode: only create sequence params in end_frame

2025-03-30 Thread Lynne
We tried to create sequence params in both start_frame and end_frame. This was redundant. Just always create them in end_frame. --- libavcodec/vulkan_av1.c | 8 libavcodec/vulkan_h264.c | 9 - libavcodec/vulkan_hevc.c | 9 - 3 files changed, 26 deletions(-) diff --git a

Re: [FFmpeg-devel] [PATCH] avcodec/ffv1: Implement 2D RLE for remap

2025-03-20 Thread Lynne
On 20/03/2025 23:30, Michael Niedermayer wrote: This performs about as good as the non LRU system for 16bit and better than then the LRU system for 16 converted to 32. So its basically performing best in all cases we have atm making the LRU system unneeded. Test on *real* 32-bit content, please

Re: [FFmpeg-devel] [PATCH] avcodec/Makefile: Skip ffv1_vulkan.h in checkheaders

2025-03-18 Thread Lynne
On 18/03/2025 16:25, Andreas Rheinhardt wrote: Patch attached. - Andreas LGTM Thanks OpenPGP_0xA2FEA5F03F034464.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature ___ ffmpeg-devel mailing list ffmpeg-

Re: [FFmpeg-devel] [PATCH] avcodec/ffv1dec: set the FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM capability

2025-03-15 Thread Lynne
On 15/03/2025 20:10, James Almer wrote: Will prevent decoding frame data during probing. Signed-off-by: James Almer --- libavcodec/ffv1dec.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index b731f11297..998b981a33 100644 --- a/libavcode

  1   2   3   4   5   6   7   8   9   10   >