diff options
Diffstat (limited to 'kernels')
-rw-r--r-- | kernels/runtime_yuy2_processing.cl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kernels/runtime_yuy2_processing.cl b/kernels/runtime_yuy2_processing.cl new file mode 100644 index 00000000..1478e656 --- /dev/null +++ b/kernels/runtime_yuy2_processing.cl @@ -0,0 +1,15 @@ +__kernel void +runtime_yuy2_processing(__global uchar *src, + int image_height, + int image_pitch) +{ + int gx = get_global_id(0); + int gy = get_global_id(1); + + int src_y = image_height / 2 + gy; + int mirror_y = image_height - src_y; + + uchar4 mirror_val = *(__global uchar4*)(src + mirror_y*image_pitch + gx*4); + *(__global uchar4*)(src + src_y*image_pitch + gx*4) = mirror_val; + +} |