Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/3] nlmeans_vulkan: fix width/height for chroma plane weights calculation
@ 2023-10-07 15:03 Lynne
       [not found] ` <Ng9eVFH--3-9@lynne.ee-Ng9eZVQ----9>
  0 siblings, 1 reply; 4+ messages in thread
From: Lynne @ 2023-10-07 15:03 UTC (permalink / raw)
  To: Ffmpeg Devel

[-- Attachment #1: Type: text/plain, Size: 17 bytes --]

Patch attached.


[-- Attachment #2: 0001-nlmeans_vulkan-fix-width-height-for-chroma-plane-wei.patch --]
[-- Type: text/x-diff, Size: 2984 bytes --]

From 927c74d7851aafc589760a3882bef7f72b19db1c Mon Sep 17 00:00:00 2001
From: Lynne <dev@lynne.ee>
Date: Sat, 16 Sep 2023 00:42:53 +0200
Subject: [PATCH 1/3] nlmeans_vulkan: fix width/height for chroma plane weights
 calculation

---
 libavfilter/vf_nlmeans_vulkan.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_nlmeans_vulkan.c b/libavfilter/vf_nlmeans_vulkan.c
index 99f4f867e7..5b623eb7a6 100644
--- a/libavfilter/vf_nlmeans_vulkan.c
+++ b/libavfilter/vf_nlmeans_vulkan.c
@@ -100,7 +100,7 @@ static void insert_horizontal_pass(FFVkSPIRVShader *shd, int nb_rows, int first,
                                 gl_SemanticsMakeAvailable |
                                 gl_SemanticsMakeVisible);                     );
     }
-    GLSLC(1, for (y = 0; y < height[0]; y++) {                                );
+    GLSLF(1, for (y = 0; y < height[%i]; y++) {                               ,plane);
     GLSLC(2,     offset = uint64_t(int_stride)*y*T_ALIGN;                     );
     GLSLC(2,     dst = DataBuffer(uint64_t(integral_data) + offset);          );
     GLSLC(0,                                                                  );
@@ -127,7 +127,7 @@ static void insert_vertical_pass(FFVkSPIRVShader *shd, int nb_rows, int first, i
                                 gl_SemanticsMakeAvailable |
                                 gl_SemanticsMakeVisible);                     );
     }
-    GLSLC(1, for (x = 0; x < width[0]; x++) {                                 );
+    GLSLF(1, for (x = 0; x < width[%i]; x++) {                                ,plane);
     GLSLC(2,     dst = DataBuffer(uint64_t(integral_data) + x*T_ALIGN);       );
 
     for (int r = 0; r < nb_rows; r++) {
@@ -156,13 +156,13 @@ static void insert_weights_pass(FFVkSPIRVShader *shd, int nb_rows, int vert,
                             gl_SemanticsMakeVisible);                         );
     GLSLC(1, barrier();                                                       );
     if (!vert) {
-        GLSLC(1, for (y = 0; y < height[0]; y++) {                            );
+        GLSLF(1, for (y = 0; y < height[%i]; y++) {                           ,plane);
         GLSLF(2,     if (gl_GlobalInvocationID.x*%i >= width[%i])             ,nb_rows, plane);
         GLSLC(3,         break;                                               );
         GLSLF(2,     for (r = 0; r < %i; r++) {                       ,nb_rows);
         GLSLF(3,         x = int(gl_GlobalInvocationID.x) * %i + r;   ,nb_rows);
     } else {
-        GLSLC(1, for (x = 0; x < width[0]; x++) {                             );
+        GLSLF(1, for (x = 0; x < width[%i]; x++) {                            ,plane);
         GLSLF(2,     if (gl_GlobalInvocationID.x*%i >= height[%i])            ,nb_rows, plane);
         GLSLC(3,         break;                                               );
         GLSLF(2,     for (r = 0; r < %i; r++) {                       ,nb_rows);
-- 
2.42.0


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-11  3:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-07 15:03 [FFmpeg-devel] [PATCH 1/3] nlmeans_vulkan: fix width/height for chroma plane weights calculation Lynne
     [not found] ` <Ng9eVFH--3-9@lynne.ee-Ng9eZVQ----9>
2023-10-07 15:04   ` [FFmpeg-devel] [PATCH 2/3] nlmeans_vulkan: reduce dispatches by parallelizing the planes Lynne
2023-10-07 15:07   ` [FFmpeg-devel] [PATCH 3/3] nlmeans_vulkan: parallelize workgroup invocations Lynne
     [not found]   ` <Ng9fYdg--3-9@lynne.ee-Ng9faxr----9>
2023-10-11  3:34     ` Lynne

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git