static int flipVert(const Mat_<_Tp, chs>& src, Mat_<_Tp, chs>& dst)
{
const uchar* src0 = src.ptr();
uchar* dst0 = dst.ptr();
Size size = src.size();
size_t sstep = src.step;
size_t dstep = dst.step;
size_t esz = sizeof(_Tp) * chs;
const uchar* src1 = src0 + (size.height - 1)*sstep;
uchar* dst1 = dst0 + (size.height - 1)*dstep;
size.width *= (int)esz;
for (int y = 0; y < (size.height + 1) / 2; y++, src0 += sstep, src1 -= sstep, dst0 += dstep, dst1 -= dstep) {
int i = 0;
if (((size_t)src0 | (size_t)dst0 | (size_t)src1 | (size_t)dst1) % sizeof(int) == 0) {
for