optimized cv::flip (CV_8UC1)