Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // da completare...
- #define IDX(x,y,destWidth) x+y*w
- __kernel void shear45(__global char* sourceImage,
- __global char* destImage,
- char backColor,
- int destWidth,
- int destHeight){
- /* getting coordinates */
- int x = get_global_id(0);
- int y = get_global_id(1);
- if(x > destWidth or y > destHeight) return;
- int h = destHeight;
- int w = destWidth - destHeight;
- destImage[IDX(x,y,destWidth)] = (x < y || x >= w+y) ? gray : in[IDX(x-y, y, w)];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement