minor optimization of cv::CLAHE