blob: 69b0618be8e277f0453e67f27b47f7e26bb564bb (
plain)
1
2
3
4
5
6
7
8
9
10
|
/**
* gamma correction kernel
*/
kernel void gamma(global float* image, const float gamma, const float scale, const int max) {
int index = get_global_id(0);
if (index >= max) {
return;
}
image[index] = pow(image[index], gamma) * scale;
}
|