| 31 | } |
| 32 | |
| 33 | void DyadicBilinearDownsampler2_ref (uint8_t* pDst, const int32_t kiDstStride, |
| 34 | const uint8_t* pSrc, const int32_t kiSrcStride, |
| 35 | const int32_t kiSrcWidth, const int32_t kiSrcHeight) { |
| 36 | uint8_t* pDstLine = pDst; |
| 37 | const uint8_t* pSrcLine1 = pSrc; |
| 38 | const uint8_t* pSrcLine2 = pSrc + kiSrcStride; |
| 39 | const int32_t kiDstWidth = kiSrcWidth >> 1; |
| 40 | const int32_t kiDstHeight = kiSrcHeight >> 1; |
| 41 | |
| 42 | for (int32_t j = 0; j < kiDstHeight; j++) { |
| 43 | for (int32_t i = 0; i < kiDstWidth; i++) { |
| 44 | const int32_t kiTempCol1 = (pSrcLine1[2 * i + 0] + pSrcLine2[2 * i + 0] + 1) >> 1; |
| 45 | const int32_t kiTempCol2 = (pSrcLine1[2 * i + 1] + pSrcLine2[2 * i + 1] + 1) >> 1; |
| 46 | pDstLine[i] = (uint8_t) ((kiTempCol1 + kiTempCol2 + 1) >> 1); |
| 47 | } |
| 48 | pDstLine += kiDstStride; |
| 49 | pSrcLine1 += 2 * kiSrcStride; |
| 50 | pSrcLine2 += 2 * kiSrcStride; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | void GeneralBilinearFastDownsampler_ref (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, |
| 55 | const int32_t kiDstHeight, |
nothing calls this directly
no outgoing calls
no test coverage detected