| 551 | } |
| 552 | |
| 553 | void calc_cache_8uc1_2( |
| 554 | const Mat8u& src, const Mat8u& dst, const AlignedVector<int>& tabsx, |
| 555 | const AlignedVector<int>& tabsy, const AlignedVector<int>& tabrx, |
| 556 | const AlignedVector<int>& tabry, int dx, AlignedVector<int>& cache0, |
| 557 | AlignedVector<int>& cache1) { |
| 558 | (void)tabrx; |
| 559 | const uchar* psrc0 = src.ptr(tabsx[dx] + 0); |
| 560 | const uchar* psrc1 = src.ptr(tabsx[dx] + 1); |
| 561 | int dstcols = dst.cols(); |
| 562 | int dy = 0; |
| 563 | |
| 564 | // 4 pixels each time |
| 565 | for (; dy < dstcols; ++dy) { |
| 566 | const uchar* pcsrc00 = psrc0 + (tabsy[dy] + 0); |
| 567 | const uchar* pcsrc01 = psrc0 + (tabsy[dy] + 1); |
| 568 | const uchar* pcsrc10 = psrc1 + (tabsy[dy] + 0); |
| 569 | const uchar* pcsrc11 = psrc1 + (tabsy[dy] + 1); |
| 570 | int ry = tabry[dy]; |
| 571 | int iry = (1 << SCALE) - ry; |
| 572 | cache0[dy] = pcsrc01[0] * ry + pcsrc00[0] * iry; |
| 573 | cache1[dy] = pcsrc11[0] * ry + pcsrc10[0] * iry; |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | void calc_cache_8uc3_1( |
| 578 | const Mat8u& src, const Mat8u& dst, const AlignedVector<int>& tabsx, |
no test coverage detected