MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / calc_cache_8uc1_1

Function calc_cache_8uc1_1

dnn/src/arm_common/resize/resize_cv.cpp:532–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530}
531
532void calc_cache_8uc1_1(
533 const Mat8u& src, const Mat8u& dst, const AlignedVector<int>& tabsx,
534 const AlignedVector<int>& tabsy, const AlignedVector<int>& tabrx,
535 const AlignedVector<int>& tabry, int dx, AlignedVector<int>& cache0,
536 AlignedVector<int>& cache1) {
537 (void)tabrx;
538 const uchar* psrc1 = src.ptr(tabsx[dx] + 1);
539 size_t dstcols = dst.cols();
540 size_t dy = 0;
541
542 // cache0 = cache1;
543 std::swap(cache0, cache1);
544 for (; dy < dstcols; ++dy) {
545 const uchar* pcsrc10 = psrc1 + (tabsy[dy] + 0);
546 const uchar* pcsrc11 = psrc1 + (tabsy[dy] + 1);
547 int ry = tabry[dy];
548 int iry = (1 << SCALE) - ry;
549 cache1[dy] = pcsrc11[0] * ry + pcsrc10[0] * iry;
550 }
551}
552
553void calc_cache_8uc1_2(
554 const Mat8u& src, const Mat8u& dst, const AlignedVector<int>& tabsx,

Callers 1

resize_linear_8u_neonFunction · 0.70

Calls 3

swapFunction · 0.85
ptrMethod · 0.45
colsMethod · 0.45

Tested by

no test coverage detected