History

nlmeans_vulkan: fix width/height for chroma plane weights calculation

Lynne committed 3 years ago

Commit 6bc8ff71 parent 60287281 file · +4 −4Browse files

Unified · Split

libavfilter/vf_nlmeans_vulkan.c+4−4
@@ -100,7 +100,7 @@ static void insert_horizontal_pass(FFVkSPIRVShader *shd, int nb_rows, int first, · 99 unmodified lines
100100 gl_SemanticsMakeAvailable |
101101 gl_SemanticsMakeVisible); );
102102 }
103− GLSLC(1, for (y = 0; y < height[0]; y++) { );
103+ GLSLF(1, for (y = 0; y < height[%i]; y++) { ,plane);
104104 GLSLC(2, offset = uint64_t(int_stride)*y*T_ALIGN; );
105105 GLSLC(2, dst = DataBuffer(uint64_t(integral_data) + offset); );
106106 GLSLC(0, );
@@ -127,7 +127,7 @@ static void insert_vertical_pass(FFVkSPIRVShader *shd, int nb_rows, int first, i · 20 unmodified lines
127127 gl_SemanticsMakeAvailable |
128128 gl_SemanticsMakeVisible); );
129129 }
130− GLSLC(1, for (x = 0; x < width[0]; x++) { );
130+ GLSLF(1, for (x = 0; x < width[%i]; x++) { ,plane);
131131 GLSLC(2, dst = DataBuffer(uint64_t(integral_data) + x*T_ALIGN); );
132132
133133 for (int r = 0; r < nb_rows; r++) {
@@ -156,13 +156,13 @@ static void insert_weights_pass(FFVkSPIRVShader *shd, int nb_rows, int vert, · 22 unmodified lines
156156 gl_SemanticsMakeVisible); );
157157 GLSLC(1, barrier(); );
158158 if (!vert) {
159− GLSLC(1, for (y = 0; y < height[0]; y++) { );
159+ GLSLF(1, for (y = 0; y < height[%i]; y++) { ,plane);
160160 GLSLF(2, if (gl_GlobalInvocationID.x*%i >= width[%i]) ,nb_rows, plane);
161161 GLSLC(3, break; );
162162 GLSLF(2, for (r = 0; r < %i; r++) { ,nb_rows);
163163 GLSLF(3, x = int(gl_GlobalInvocationID.x) * %i + r; ,nb_rows);
164164 } else {
165− GLSLC(1, for (x = 0; x < width[0]; x++) { );
165+ GLSLF(1, for (x = 0; x < width[%i]; x++) { ,plane);
166166 GLSLF(2, if (gl_GlobalInvocationID.x*%i >= height[%i]) ,nb_rows, plane);
167167 GLSLC(3, break; );
168168 GLSLF(2, for (r = 0; r < %i; r++) { ,nb_rows);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t