From 4ad1e056c173d22ca8e17adf3cf70a3a28b4d81d Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Wed, 28 Aug 2024 17:15:04 +0800 Subject: [PATCH] Fix reversal in cuda/ocl transpose filter there's a regression is the last typo fix. Signed-off-by: nyanmisaka --- debian/patches/0056-add-cuda-transpose-filter-impl.patch | 2 +- .../patches/0057-add-flip-feat-to-opencl-transpose-filter.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/patches/0056-add-cuda-transpose-filter-impl.patch b/debian/patches/0056-add-cuda-transpose-filter-impl.patch index 28b8d36baaa..a6975b749bb 100644 --- a/debian/patches/0056-add-cuda-transpose-filter-impl.patch +++ b/debian/patches/0056-add-cuda-transpose-filter-impl.patch @@ -555,7 +555,7 @@ Index: FFmpeg/libavfilter/vf_transpose_cuda.cu + return; + + int xi = (dir < 4) ? ((dir & 2) ? (dst_height - 1 - yo) : yo) -+ : ((dir == 5) ? (dst_width - 1 - xo) : xo); ++ : ((dir == 6) ? xo : (dst_width - 1 - xo)); + int yi = (dir < 4) ? ((dir & 1) ? (dst_width - 1 - xo) : xo) + : ((dir == 5) ? yo : (dst_height - 1 - yo)); + if (xi >= src_width || yi >= src_height) diff --git a/debian/patches/0057-add-flip-feat-to-opencl-transpose-filter.patch b/debian/patches/0057-add-flip-feat-to-opencl-transpose-filter.patch index bebf14a0fa7..df0842784f3 100644 --- a/debian/patches/0057-add-flip-feat-to-opencl-transpose-filter.patch +++ b/debian/patches/0057-add-flip-feat-to-opencl-transpose-filter.patch @@ -9,7 +9,7 @@ Index: FFmpeg/libavfilter/opencl/transpose.cl - int xin = (dir & 2) ? (size.y - 1 - y) : y; - int yin = (dir & 1) ? (size.x - 1 - x) : x; + int xin = (dir < 4) ? ((dir & 2) ? (size.y - 1 - y) : y) -+ : ((dir == 5) ? (size.x - 1 - x) : x); ++ : ((dir == 6) ? x : (size.x - 1 - x)); + int yin = (dir < 4) ? ((dir & 1) ? (size.x - 1 - x) : x) + : ((dir == 5) ? y : (size.y - 1 - y)); float4 data = read_imagef(src, sampler, (int2)(xin, yin));