[FFmpeg-devel] [PATCH v6 2/4] libavcodec/vc2enc: Switch quant to int

2025-06-02 Thread IndecisiveTurtle
From: IndecisiveTurtle Prevents compiler from mistaking it as a string Also makes passing it to the GPU in a buffer easier --- libavcodec/vc2enc_common.c | 2 +- libavcodec/vc2enc_common.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/vc2enc_common.c b

[FFmpeg-devel] [PATCH v6 3/4] libavcodec/vulkan: Add modifications to common shader for VC2 vulkan encoder

2025-06-02 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/vulkan/common.comp | 51 --- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/libavcodec/vulkan/common.comp b/libavcodec/vulkan/common.comp index 10af9c0623..59a4a4b1a8 100644 --- a/libavcodec/vulkan

Re: [FFmpeg-devel] [PATCH v6 4/4] 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-06-02 Thread IndecisiveTurtle
IndecisiveTurtle έγραψε: > > From: IndecisiveTurtle > > Performance wise, encoding a 3440x1440 1-minute video is performed in about > 2.4 minutes with the cpu encoder running on my Ryzen 5 4600H, while it takes > about 1.3 minutes on my NVIDIA GTX 1650 > > Haar shader has a subgrou

[FFmpeg-devel] [PATCH v6 4/4] 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-06-02 Thread IndecisiveTurtle
From: IndecisiveTurtle Performance wise, encoding a 3440x1440 1-minute video is performed in about 2.4 minutes with the cpu encoder running on my Ryzen 5 4600H, while it takes about 1.3 minutes on my NVIDIA GTX 1650 Haar shader has a subgroup optimized variant that applies when configured

[FFmpeg-devel] [PATCH v6 1/4] libavcodec/vc2enc: Split out common functions between software and hardware encoders

2025-06-02 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/Makefile| 2 +- libavcodec/vc2enc.c| 673 ++--- libavcodec/vc2enc_common.c | 575 +++ libavcodec/vc2enc_common.h | 169 ++ 4 files changed, 770 insertions(+), 649

Re: [FFmpeg-devel] [PATCH v5 4/4] 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-05-24 Thread IndecisiveTurtle
> Same benchmarks as v4. Did the switch to put_bits63() not cost performance? In my tests it did not. I tested with old uint32_t, then immediately afterwards with uint64_t and times were the same. Στις Σάβ 24 Μαΐ 2025 στις 2:09 μ.μ., ο/η Andreas Rheinhardt έγραψε: > > IndecisiveTurtle:

[FFmpeg-devel] [PATCH v5 2/4] libavcodec/vc2enc: Switch quant to int

2025-05-23 Thread IndecisiveTurtle
From: IndecisiveTurtle Prevents compiler from mistaking it as a string Also makes passing it to the GPU in a buffer easier --- libavcodec/vc2enc_common.c | 2 +- libavcodec/vc2enc_common.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/vc2enc_common.c b

[FFmpeg-devel] [PATCH v5 1/4] libavcodec/vc2enc: Split out common functions between software and hardware encoders

2025-05-23 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/Makefile| 2 +- libavcodec/vc2enc.c| 669 ++--- libavcodec/vc2enc_common.c | 571 +++ libavcodec/vc2enc_common.h | 168 ++ 4 files changed, 765 insertions(+), 645

[FFmpeg-devel] [PATCH v5 4/4] 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-05-23 Thread IndecisiveTurtle
From: IndecisiveTurtle Performance wise, encoding a 3440x1440 1-minute video is performed in about 2.4 minutes with the cpu encoder running on my Ryzen 5 4600H, while it takes about 1.3 minutes on my NVIDIA GTX 1650 Haar shader has a subgroup optimized variant that applies when configured

[FFmpeg-devel] [PATCH v5 3/4] libavcodec/vulkan: Add modifications to common shader for VC2 vulkan encoder

2025-05-23 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/vulkan/common.comp | 51 --- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/libavcodec/vulkan/common.comp b/libavcodec/vulkan/common.comp index 10af9c0623..59a4a4b1a8 100644 --- a/libavcodec/vulkan

Re: [FFmpeg-devel] [PATCH v4 4/4] 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-05-19 Thread IndecisiveTurtle
t is not implemented in vulkan encoder. This is also why I couldn't unify this array as you mentioned before. Στις Δευ 19 Μαΐ 2025 στις 8:09 μ.μ., ο/η Andreas Rheinhardt έγραψε: > > IndecisiveTurtle: > > From: IndecisiveTurtle > > > > Performance wise, encoding a 344

Re: [FFmpeg-devel] [PATCH v4 3/4] libavcodec/vulkan: Add modifications to common shader for VC2 vulkan encoder

2025-05-19 Thread IndecisiveTurtle
ting code to > skip_put_bytes(). But this file is (if I am not mistaken) supposed to be > generic, not vc2 specific, so this feels very wrong. Would it be enough to move it to vc2_encode.comp or should I also rename the function? Στις Δευ 19 Μαΐ 2025 στις 7:46 μ.μ., ο/η Andreas Rheinhardt έγραψε: &g

Re: [FFmpeg-devel] [PATCH v4 4/4] 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-05-17 Thread IndecisiveTurtle
I tried to solve all the review comments from the last patchset, please review in case I missed anything. Thanks Στις Σάβ 17 Μαΐ 2025 στις 11:49 μ.μ., ο/η IndecisiveTurtle έγραψε: > > From: IndecisiveTurtle > > Performance wise, encoding a 3440x1440 1-minute video is performed in

[FFmpeg-devel] [PATCH v4 4/4] 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-05-17 Thread IndecisiveTurtle
From: IndecisiveTurtle Performance wise, encoding a 3440x1440 1-minute video is performed in about 2.4 minutes with the cpu encoder running on my Ryzen 5 4600H, while it takes about 1.3 minutes on my NVIDIA GTX 1650 Haar shader has a subgroup optimized variant that applies when configured

[FFmpeg-devel] [PATCH v4 3/4] libavcodec/vulkan: Add modifications to common shader for VC2 vulkan encoder

2025-05-17 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/vulkan/common.comp | 54 --- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/libavcodec/vulkan/common.comp b/libavcodec/vulkan/common.comp index 10af9c0623..db216a2ac6 100644 --- a/libavcodec/vulkan

[FFmpeg-devel] [PATCH v4 2/4] libavcodec/vc2enc: Switch quant to int

2025-05-17 Thread IndecisiveTurtle
From: IndecisiveTurtle Prevents compiler from mistaking it as a string Also makes passing it to the GPU in a buffer easier --- libavcodec/vc2enc_common.c | 2 +- libavcodec/vc2enc_common.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/vc2enc_common.c b

[FFmpeg-devel] [PATCH v4 1/4] libavcodec/vc2enc: Split out common functions between software and hardware encoders

2025-05-17 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/Makefile| 2 +- libavcodec/vc2enc.c| 679 ++--- libavcodec/vc2enc_common.c | 571 +++ libavcodec/vc2enc_common.h | 178 ++ 4 files changed, 772 insertions(+), 658

[FFmpeg-devel] [PATCH v3 1/5] libavcodec/vc2enc: Split out common functions between software and hardware encoders

2025-04-17 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/Makefile| 2 +- libavcodec/vc2enc.c| 513 + libavcodec/vc2enc_common.c | 376 +++ libavcodec/vc2enc_common.h | 196 ++ 4 files changed, 581 insertions(+), 506

[FFmpeg-devel] [PATCH v3] 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 IndecisiveTurtle
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 variant that applies when configured wavelet

[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 IndecisiveTurtle
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 variant that applies when configured wavelet

[FFmpeg-devel] [PATCH v3 2/5] libavcodec/vc2enc: Switch quant to int

2025-04-17 Thread IndecisiveTurtle
From: IndecisiveTurtle Prevents compiler from mistaking it as a string Also makes passing it to the GPU in a buffer easier --- libavcodec/vc2enc_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc2enc_common.h b/libavcodec/vc2enc_common.h index eaaf5ac99c

[FFmpeg-devel] [PATCH v3 4/5] libavcodec/vulkan: Add modifications to common shader for VC2 vulkan encoder

2025-04-17 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/vulkan/common.comp | 54 --- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/libavcodec/vulkan/common.comp b/libavcodec/vulkan/common.comp index 10af9c0623..db216a2ac6 100644 --- a/libavcodec/vulkan

[FFmpeg-devel] [PATCH v3 3/5] libavcodec/vc2enc: Pass quant array as argument to init function

2025-04-17 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/vc2enc.c| 2 +- libavcodec/vc2enc_common.c | 18 +- libavcodec/vc2enc_common.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index 2e849eb09e..c0f542e116 100644

[FFmpeg-devel] [PATCH v2 2/4] libavcodec/vulkan: Add modifications to common shader for VC2 vulkan encoder

2025-03-11 Thread IndecisiveTurtle
--- libavcodec/vulkan/common.comp | 58 +++ 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/libavcodec/vulkan/common.comp b/libavcodec/vulkan/common.comp index e4e983b3e2..3dc1527529 100644 --- a/libavcodec/vulkan/common.comp +++ b/libavcodec/vulkan/

[FFmpeg-devel] [PATCH v2 4/4] avcodec/vc2enc: Initial vulkan VC2 encoder Implements a Vulkan based dirac encoder. Supports Haar and Legall wavelets and should work with all wavelet depths.

2025-03-08 Thread 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 variant that applies when configured wavelet depth allows it lavapipe

[FFmpeg-devel] [PATCH v2 3/4] libavcodec/vulkan: Add vulkan vc2 shaders

2025-03-08 Thread IndecisiveTurtle
--- libavcodec/vulkan/vc2_dwt_haar.comp | 66 +++ libavcodec/vulkan/vc2_dwt_haar_subgroup.comp | 89 + libavcodec/vulkan/vc2_dwt_hor_legall.comp| 66 +++ libavcodec/vulkan/vc2_dwt_upload.comp| 29 +++ libavcodec/vulkan/vc2_dwt_ver_legall.comp| 62 +

[FFmpeg-devel] [PATCH v2 1/4] libavcodec/vc2enc: Split out common functions between software and hardware encoders

2025-03-08 Thread IndecisiveTurtle
From: IndecisiveTurtle diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 499f826635..a96c700745 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -768,7 +768,7 @@ OBJS-$(CONFIG_VC1_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_VC1_MMAL_DECODER)+= mmaldec.o

Re: [FFmpeg-devel] [PATCH 1/4] libavcodec/vc2enc: Split out common functions between software and hardware encoders

2025-03-08 Thread IndecisiveTurtle
> a) Don't top-post. Sorry my mistake, I hope this message is proper now > b) If you put a static array in a header, it will be included in every > file that actually uses it and therefore end up being duplicated in the > binary. Ah I understand now, thanks will also fix that.

Re: [FFmpeg-devel] [PATCH 1/4] libavcodec/vc2enc: Split out common functions between software and hardware encoders

2025-03-08 Thread IndecisiveTurtle
dreas.rheinha...@outlook.com> έγραψε: > IndecisiveTurtle: > > From: IndecisiveTurtle > > > > --- > > libavcodec/Makefile| 2 +- > > libavcodec/vc2enc.c| 515 + > > libavcodec/vc2enc_common.c | 321 ++

[FFmpeg-devel] [PATCH 2/4] libavcodec/vulkan: Add modifications to common shader for VC2 vulkan encoder

2025-03-08 Thread IndecisiveTurtle
--- libavcodec/vulkan/common.comp | 58 +++ 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/libavcodec/vulkan/common.comp b/libavcodec/vulkan/common.comp index e4e983b3e2..3dc1527529 100644 --- a/libavcodec/vulkan/common.comp +++ b/libavcodec/vulkan/

[FFmpeg-devel] [PATCH 4/4] avcodec/vc2enc: Initial vulkan VC2 encoder Implements a Vulkan based dirac encoder. Supports Haar and Legall wavelets and should work with all wavelet depths.

2025-03-08 Thread 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 variant that applies when configured wavelet depth allows it lavapipe

[FFmpeg-devel] [PATCH 3/4] libavcodec/vulkan: Add vulkan vc2 shaders

2025-03-08 Thread IndecisiveTurtle
--- libavcodec/vulkan/vc2_dwt_haar.comp | 70 +++ libavcodec/vulkan/vc2_dwt_haar_subgroup.comp | 89 + libavcodec/vulkan/vc2_dwt_hor_legall.comp| 66 +++ libavcodec/vulkan/vc2_dwt_upload.comp| 29 +++ libavcodec/vulkan/vc2_dwt_ver_legall.comp| 62 +

[FFmpeg-devel] [PATCH 1/4] libavcodec/vc2enc: Split out common functions between software and hardware encoders

2025-03-08 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/Makefile| 2 +- libavcodec/vc2enc.c| 515 + libavcodec/vc2enc_common.c | 321 +++ libavcodec/vc2enc_common.h | 323 +++ 4 files changed, 653 insertions(+), 508

[FFmpeg-devel] [PATCH] libavutil/vulkan: Expose ff_vk_set_descriptor_image

2025-02-28 Thread IndecisiveTurtle
Useful when creating a descriptor array of separate images --- libavutil/vulkan.c | 12 ++-- libavutil/vulkan.h | 8 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index 31610e2d94..91415957fd 100644 --- a/libavutil/vulkan.

[FFmpeg-devel] [PATCH] libavutil/vulkan: Expose ff_vk_set_descriptor_image

2025-02-27 Thread IndecisiveTurtle
From: IndecisiveTurtle <47210458+raphaelthegr...@users.noreply.github.com> Useful when creating a descriptor array of separate images --- libavutil/vulkan.c | 12 ++-- libavutil/vulkan.h | 8 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/libavutil/vulk

[FFmpeg-devel] [PATCH] avcodec/vc2enc: Initial vulkan VC2 encoder

2024-11-29 Thread IndecisiveTurtle
Implements a Vulkan based dirac encoder. Supports Haar and Legall wavelets and should work with all wavelet depths. 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

[FFmpeg-devel] [PATCH 2/3] vulkan/common: Use u32vec2 buffer type instead of u64

2024-11-27 Thread IndecisiveTurtle
According to the GL_EXT_buffer_reference spec alignment "must be a power of two and be greater than or equal to the largest scalar/component type in the block." This means by using u32vec2 we can drop the requirement alignment from 8 bytes to 4 bytes and save a pack64 call in reverse8 (though I

[FFmpeg-devel] [PATCH 3/3] vulkan/common: Add put_bytes_count

2024-11-27 Thread IndecisiveTurtle
--- libavcodec/vulkan/common.comp | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/vulkan/common.comp b/libavcodec/vulkan/common.comp index e0874d304f..799aa86f64 100644 --- a/libavcodec/vulkan/common.comp +++ b/libavcodec/vulkan/common.comp @@ -172,3 +172,8 @@ uint64_t put_bits

[FFmpeg-devel] [PATCH 1/3] vulkan/common: Fix off-by-one error in flush_put_bits

2024-11-27 Thread IndecisiveTurtle
If caller wrote a divisible by eight number of bits it would write an extra byte. Also increment by to_write instead of BUF_BYTES which overly pads the bitstream. --- libavcodec/vulkan/common.comp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vulkan/common.com

[FFmpeg-devel] [PATCH v3] avcodec/vc2enc: Initial vulkan VC2 encoder

2024-10-29 Thread IndecisiveTurtle
Implements a Vulkan based dirac encoder. Supports Haar and Legall wavelets and should work with all wavelet depths. 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

[FFmpeg-devel] [PATCH v2] avcodec/vc2enc: Initial vulkan VC2 encoder

2024-10-28 Thread IndecisiveTurtle
Implements a Vulkan based dirac encoder. Supports Haar and Legall wavelets and should work with all wavelet depths. 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

[FFmpeg-devel] [PATCH] avcodec/proresenc_ks: Reduce size of blocks array

2024-10-28 Thread IndecisiveTurtle
Small cleanup, only blocks[0] seems to ever be used --- libavcodec/proresenc_kostya.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 226f95f8c6..1a09488cd7 100644 --- a/libavcodec/proresenc_kostya

[FFmpeg-devel] [PATCH] avcodec/vc2enc: Initial vulkan VC2 encoder

2024-10-23 Thread IndecisiveTurtle
Implements a Vulkan based dirac encoder. Supports Haar and Legall wavelets and should work with all wavelet depths. 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

[FFmpeg-devel] [PATCH] avcodec/vulkan: Add support for generating GLSL strings from comp shaders

2024-10-05 Thread IndecisiveTurtle
--- libavcodec/Makefile | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 4eed81ed03..734ab14596 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -1371,3 +1371,10 @@ $(SUBDIR)pcm.o: $(SUBDIR)pcm_tables.h $(SUBDIR)qdm2.o: $(SUBD

[FFmpeg-devel] [PATCH] libavutil/vulkan: Prevent crash on shaders with no descriptors

2024-10-04 Thread IndecisiveTurtle
Needed to prevent crashes on vc2 vulkan encoder patch --- libavutil/vulkan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index 44552e97b8..cd617496dc 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -2022,7 +2022,7 @@