Commit e4c7773fdb for ffmpeg
commit e4c7773fdb95ebaca0180b62b1b36d1596699b3b
Author: Marcos Ashton Iglesias <marcosashiglesias@gmail.com>
Date: Wed Sep 30 19:37:41 2026 +0100
avfilter/vulkan/gblur: repeat the edge pixels instead of reading black
Taps outside the frame were read as 0, which darkened the borders.
diff --git a/libavfilter/vulkan/gblur.comp.glsl b/libavfilter/vulkan/gblur.comp.glsl
index 77c337020e..5eb95ae86b 100644
--- a/libavfilter/vulkan/gblur.comp.glsl
+++ b/libavfilter/vulkan/gblur.comp.glsl
@@ -54,8 +54,8 @@ void main()
for(int i = 1; i < kernel.length(); i++) {
ivec2 offs = gl_WorkGroupSize.x > gl_WorkGroupSize.y ? ivec2(i, 0) :
ivec2(0, i);
- sum += imageLoad(input_img[P_IDX], pos + offs) * kernel[i];
- sum += imageLoad(input_img[P_IDX], pos - offs) * kernel[i];
+ sum += imageLoad(input_img[P_IDX], min(pos + offs, size - 1)) * kernel[i];
+ sum += imageLoad(input_img[P_IDX], max(pos - offs, ivec2(0))) * kernel[i];
}
imageStore(output_img[P_IDX], pos, sum);