Skip to content

Commit

Permalink
Merge pull request #445 from nyanmisaka/fix-reversal
Browse files Browse the repository at this point in the history
Fix reversal in cuda/ocl transpose filter
  • Loading branch information
nyanmisaka committed Aug 28, 2024
2 parents efe5f43 + 4ad1e05 commit c754fb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion debian/patches/0056-add-cuda-transpose-filter-impl.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit c754fb6

Please sign in to comment.