Commit 7b7b8e1b17 for ffmpeg
commit 7b7b8e1b172efb605cf3ccc79455c1b8945e403c
Author: Marcos Ashton Iglesias <marcosashiglesias@gmail.com>
Date: Wed Sep 30 19:37:41 2026 +0100
avfilter/vulkan/flip: fix off-by-one in the mirrored position
The mirror of pos is size - 1 - pos, not size - pos. The picture was
shifted by one pixel and column (or row) 0 was never written.
diff --git a/libavfilter/vulkan/flip.comp.glsl b/libavfilter/vulkan/flip.comp.glsl
index a0d556ba8c..71cb8ea007 100644
--- a/libavfilter/vulkan/flip.comp.glsl
+++ b/libavfilter/vulkan/flip.comp.glsl
@@ -47,9 +47,9 @@ void main()
ivec2 dst;
switch (flip) {
- case FLIP_HORIZONTAL: dst = ivec2(size.x - pos.x, pos.y); break;
- case FLIP_VERTICAL: dst = ivec2(pos.x, size.y - pos.y); break;
- case FLIP_BOTH: dst = ivec2(size.xy - pos.xy); break;
+ case FLIP_HORIZONTAL: dst = ivec2(size.x - 1 - pos.x, pos.y); break;
+ case FLIP_VERTICAL: dst = ivec2(pos.x, size.y - 1 - pos.y); break;
+ case FLIP_BOTH: dst = ivec2(size.xy - 1 - pos.xy); break;
default: dst = pos; break;
}