History

nlmeans_vulkan: fix width/height for chroma plane weights calculation

Lynne committed 3 years ago

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

Showing the changes to libavfilter (1 of 1 file). Show all

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
100 gl_SemanticsMakeAvailable |100 gl_SemanticsMakeAvailable |
101 gl_SemanticsMakeVisible); );101 gl_SemanticsMakeVisible); );
102 }102 }
103 GLSLC(1, for (y = 0; y < height[0]; y++) { );103 GLSLF(1, for (y = 0; y < height[%i]; y++) { ,plane);
104 GLSLC(2, offset = uint64_t(int_stride)*y*T_ALIGN; );104 GLSLC(2, offset = uint64_t(int_stride)*y*T_ALIGN; );
105 GLSLC(2, dst = DataBuffer(uint64_t(integral_data) + offset); );105 GLSLC(2, dst = DataBuffer(uint64_t(integral_data) + offset); );
106 GLSLC(0, );106 GLSLC(0, );
@@ -127,7 +127,7 @@ static void insert_vertical_pass(FFVkSPIRVShader *shd, int nb_rows, int first, i · 20 unmodified lines
127 gl_SemanticsMakeAvailable |127 gl_SemanticsMakeAvailable |
128 gl_SemanticsMakeVisible); );128 gl_SemanticsMakeVisible); );
129 }129 }
130 GLSLC(1, for (x = 0; x < width[0]; x++) { );130 GLSLF(1, for (x = 0; x < width[%i]; x++) { ,plane);
131 GLSLC(2, dst = DataBuffer(uint64_t(integral_data) + x*T_ALIGN); );131 GLSLC(2, dst = DataBuffer(uint64_t(integral_data) + x*T_ALIGN); );
132 132
133 for (int r = 0; r < nb_rows; r++) {133 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
156 gl_SemanticsMakeVisible); );156 gl_SemanticsMakeVisible); );
157 GLSLC(1, barrier(); );157 GLSLC(1, barrier(); );
158 if (!vert) {158 if (!vert) {
159 GLSLC(1, for (y = 0; y < height[0]; y++) { );159 GLSLF(1, for (y = 0; y < height[%i]; y++) { ,plane);
160 GLSLF(2, if (gl_GlobalInvocationID.x*%i >= width[%i]) ,nb_rows, plane);160 GLSLF(2, if (gl_GlobalInvocationID.x*%i >= width[%i]) ,nb_rows, plane);
161 GLSLC(3, break; );161 GLSLC(3, break; );
162 GLSLF(2, for (r = 0; r < %i; r++) { ,nb_rows);162 GLSLF(2, for (r = 0; r < %i; r++) { ,nb_rows);
163 GLSLF(3, x = int(gl_GlobalInvocationID.x) * %i + r; ,nb_rows);163 GLSLF(3, x = int(gl_GlobalInvocationID.x) * %i + r; ,nb_rows);
164 } else {164 } else {
165 GLSLC(1, for (x = 0; x < width[0]; x++) { );165 GLSLF(1, for (x = 0; x < width[%i]; x++) { ,plane);
166 GLSLF(2, if (gl_GlobalInvocationID.x*%i >= height[%i]) ,nb_rows, plane);166 GLSLF(2, if (gl_GlobalInvocationID.x*%i >= height[%i]) ,nb_rows, plane);
167 GLSLC(3, break; );167 GLSLC(3, break; );
168 GLSLF(2, for (r = 0; r < %i; r++) { ,nb_rows);168 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