Skip to content

Commit

Permalink
Fixed odd width image conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
MCJack123 committed Jul 9, 2024
1 parent 386baa9 commit 49cb275
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cc-pixel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ __kernel void copyColors(__global const uchar * input, __global uchar * colors,
__private ulong y = get_global_id(0) * 2 / width, x = get_global_id(0) * 2 % width;
if (y >= height) return;
colors[(y-y%3)*width + x*3 + (y%3)*2] = input[y*width+x];
colors[(y-y%3)*width + x*3 + (y%3)*2 + 1] = input[y*width+x+1];
colors[(y-y%3)*width + x*3 + (y%3)*2 + 1] = x == height - 1 ? 15 : input[y*width+x+1];
}

__kernel void calculateRange_A(__global const uchar * input, __global uchar * ranges, ulong n, ulong offset) {
Expand Down

0 comments on commit 49cb275

Please sign in to comment.