diff options
author | Michael Bien <[email protected]> | 2011-02-03 23:13:42 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-02-03 23:13:42 +0100 |
commit | dbe93d1e40a7bc9fbea7c5be3d59bf84e8a20ecb (patch) | |
tree | 3a451adf79f605d32c818a49ea2f71d4db8969fb /src/com/jogamp/opencl/demos/gamma/Gamma.cl | |
parent | 992963009a1f551808e8da786b6b9d7b701f7a34 (diff) |
new simple gamma correction OpenCL example featuring lenna.
Diffstat (limited to 'src/com/jogamp/opencl/demos/gamma/Gamma.cl')
-rw-r--r-- | src/com/jogamp/opencl/demos/gamma/Gamma.cl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/jogamp/opencl/demos/gamma/Gamma.cl b/src/com/jogamp/opencl/demos/gamma/Gamma.cl new file mode 100644 index 0000000..69b0618 --- /dev/null +++ b/src/com/jogamp/opencl/demos/gamma/Gamma.cl @@ -0,0 +1,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; + }
\ No newline at end of file |