Optimize OpenCL LUT function

don't merge
check_regression=*LUT*
test_modules=core