Showing the changes to codec/processing/src/downsample/downsamplefuncs.cpp (1 of 24 files). Show all
Unified · Split
| @@ -229,4 +229,14 @@ void GeneralBilinearAccurateDownsampler_c (uint8_t* pDst, const int32_t kiDstStr · 228 unmodified lines | |||
| 229 | //} | 229 | //} |
| 230 | #endif //X86_ASM | 230 | #endif //X86_ASM |
| 231 | 231 | ||
| 232 | #ifdef HAVE_NEON | ||
| 233 | void GeneralBilinearAccurateDownsamplerWrap_neon(uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, const int32_t kiDstHeight, | ||
| 234 | uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight) { | ||
| 235 | const int32_t kiScaleBit = 15; | ||
| 236 | const uint32_t kuiScale = (1 << kiScaleBit); | ||
| 237 | uint32_t uiScalex = (uint32_t)((float)kiSrcWidth / (float)kiDstWidth * kuiScale); | ||
| 238 | uint32_t uiScaley = (uint32_t)((float)kiSrcHeight / (float)kiDstHeight * kuiScale); | ||
| 239 | GeneralBilinearAccurateDownsampler_neon(pDst, kiDstStride, kiDstWidth, kiDstHeight, pSrc, kiSrcStride, uiScalex, uiScaley); | ||
| 240 | } | ||
| 241 | #endif | ||
| 232 | WELSVP_NAMESPACE_END | 242 | WELSVP_NAMESPACE_END |