opencl: fix bug introduced with recent changes in nlmeans/denoiseprofile

this would crash opencl for some devices
Merge branch 'opencl'