Showing the changes to codec/processing/src/downsample (2 of 3 files). Show all
Unified · Split
| @@ -57,21 +57,21 @@ void CDownsampling::InitDownsampleFuncs (SDownsampleFuncs& sDownsampleFunc, int · 56 unmodified lines | |||
| 57 | sDownsampleFunc.pfGeneralRatioLuma = GeneralBilinearFastDownsampler_c; | 57 | sDownsampleFunc.pfGeneralRatioLuma = GeneralBilinearFastDownsampler_c; |
| 58 | #if defined(X86_ASM) | 58 | #if defined(X86_ASM) |
| 59 | if (iCpuFlag & WELS_CPU_SSE) { | 59 | if (iCpuFlag & WELS_CPU_SSE) { |
| 60 | /* sDownsampleFunc.pfHalfAverage[0] = DyadicBilinearDownsamplerWidthx32_sse; | 60 | sDownsampleFunc.pfHalfAverage[0] = DyadicBilinearDownsamplerWidthx32_sse; |
| 61 | sDownsampleFunc.pfHalfAverage[1] = DyadicBilinearDownsamplerWidthx16_sse; | 61 | sDownsampleFunc.pfHalfAverage[1] = DyadicBilinearDownsamplerWidthx16_sse; |
| 62 | sDownsampleFunc.pfHalfAverage[2] = DyadicBilinearDownsamplerWidthx8_sse;*/ | 62 | sDownsampleFunc.pfHalfAverage[2] = DyadicBilinearDownsamplerWidthx8_sse; |
| 63 | } | 63 | } |
| 64 | if (iCpuFlag & WELS_CPU_SSE2) { | 64 | if (iCpuFlag & WELS_CPU_SSE2) { |
| 65 | // sDownsampleFunc.pfGeneralRatioChroma = GeneralBilinearAccurateDownsamplerWrap_sse2; | 65 | sDownsampleFunc.pfGeneralRatioChroma = GeneralBilinearAccurateDownsamplerWrap_sse2; |
| 66 | // sDownsampleFunc.pfGeneralRatioLuma = GeneralBilinearFastDownsamplerWrap_sse2; | 66 | sDownsampleFunc.pfGeneralRatioLuma = GeneralBilinearFastDownsamplerWrap_sse2; |
| 67 | } | 67 | } |
| 68 | if (iCpuFlag & WELS_CPU_SSSE3) { | 68 | if (iCpuFlag & WELS_CPU_SSSE3) { |
| 69 | // sDownsampleFunc.pfHalfAverage[0] = DyadicBilinearDownsamplerWidthx32_ssse3; | 69 | sDownsampleFunc.pfHalfAverage[0] = DyadicBilinearDownsamplerWidthx32_ssse3; |
| 70 | // sDownsampleFunc.pfHalfAverage[1] = DyadicBilinearDownsamplerWidthx16_ssse3; | 70 | sDownsampleFunc.pfHalfAverage[1] = DyadicBilinearDownsamplerWidthx16_ssse3; |
| 71 | } | 71 | } |
| 72 | if (iCpuFlag & WELS_CPU_SSE41) { | 72 | if (iCpuFlag & WELS_CPU_SSE41) { |
| 73 | // sDownsampleFunc.pfHalfAverage[0] = DyadicBilinearDownsamplerWidthx32_sse4; | 73 | sDownsampleFunc.pfHalfAverage[0] = DyadicBilinearDownsamplerWidthx32_sse4; |
| 74 | // sDownsampleFunc.pfHalfAverage[1] = DyadicBilinearDownsamplerWidthx16_sse4; | 74 | sDownsampleFunc.pfHalfAverage[1] = DyadicBilinearDownsamplerWidthx16_sse4; |
| 75 | } | 75 | } |
| 76 | #endif//X86_ASM | 76 | #endif//X86_ASM |
| 77 | 77 | ||
| @@ -202,31 +202,31 @@ void GeneralBilinearAccurateDownsampler_c (uint8_t* pDst, const int32_t kiDstStr · 201 unmodified lines | |||
| 202 | 202 | ||
| 203 | 203 | ||
| 204 | #ifdef X86_ASM | 204 | #ifdef X86_ASM |
| 205 | //void GeneralBilinearFastDownsamplerWrap_sse2 (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, | 205 | void GeneralBilinearFastDownsamplerWrap_sse2 (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, |
| 206 | // const int32_t kiDstHeight, | 206 | const int32_t kiDstHeight, |
| 207 | // uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight) { | 207 | uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight) { |
| 208 | // const int32_t kiScaleBitWidth = 16, kiScaleBitHeight = 15; | 208 | const int32_t kiScaleBitWidth = 16, kiScaleBitHeight = 15; |
| 209 | // const uint32_t kuiScaleWidth = (1 << kiScaleBitWidth), kuiScaleHeight = (1 << kiScaleBitHeight); | 209 | const uint32_t kuiScaleWidth = (1 << kiScaleBitWidth), kuiScaleHeight = (1 << kiScaleBitHeight); |
| 210 | // | 210 | |
| 211 | // uint32_t uiScalex = WELS_ROUND ((float)kiSrcWidth / (float)kiDstWidth * kuiScaleWidth); | 211 | uint32_t uiScalex = WELS_ROUND ((float)kiSrcWidth / (float)kiDstWidth * kuiScaleWidth); |
| 212 | // uint32_t uiScaley = WELS_ROUND ((float)kiSrcHeight / (float)kiDstHeight * kuiScaleHeight); | 212 | uint32_t uiScaley = WELS_ROUND ((float)kiSrcHeight / (float)kiDstHeight * kuiScaleHeight); |
| 213 | // | 213 | |
| 214 | // GeneralBilinearFastDownsampler_sse2 (pDst, kiDstStride, kiDstWidth, kiDstHeight, | 214 | GeneralBilinearFastDownsampler_sse2 (pDst, kiDstStride, kiDstWidth, kiDstHeight, |
| 215 | // pSrc, kiSrcStride, kiSrcWidth, kiSrcHeight, uiScalex, uiScaley); | 215 | pSrc, kiSrcStride, kiSrcWidth, kiSrcHeight, uiScalex, uiScaley); |
| 216 | //} | 216 | } |
| 217 | // | 217 | |
| 218 | //void GeneralBilinearAccurateDownsamplerWrap_sse2 (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, | 218 | void GeneralBilinearAccurateDownsamplerWrap_sse2 (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, |
| 219 | // const int32_t kiDstHeight, | 219 | const int32_t kiDstHeight, |
| 220 | // uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight) { | 220 | uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight) { |
| 221 | // const int32_t kiScaleBit = 15; | 221 | const int32_t kiScaleBit = 15; |
| 222 | // const uint32_t kuiScale = (1 << kiScaleBit); | 222 | const uint32_t kuiScale = (1 << kiScaleBit); |
| 223 | // | 223 | |
| 224 | // uint32_t uiScalex = WELS_ROUND ((float)kiSrcWidth / (float)kiDstWidth * kuiScale); | 224 | uint32_t uiScalex = WELS_ROUND ((float)kiSrcWidth / (float)kiDstWidth * kuiScale); |
| 225 | // uint32_t uiScaley = WELS_ROUND ((float)kiSrcHeight / (float)kiDstHeight * kuiScale); | 225 | uint32_t uiScaley = WELS_ROUND ((float)kiSrcHeight / (float)kiDstHeight * kuiScale); |
| 226 | // | 226 | |
| 227 | // GeneralBilinearAccurateDownsampler_sse2 (pDst, kiDstStride, kiDstWidth, kiDstHeight, | 227 | GeneralBilinearAccurateDownsampler_sse2 (pDst, kiDstStride, kiDstWidth, kiDstHeight, |
| 228 | // pSrc, kiSrcStride, kiSrcWidth, kiSrcHeight, uiScalex, uiScaley); | 228 | pSrc, kiSrcStride, kiSrcWidth, kiSrcHeight, uiScalex, uiScaley); |
| 229 | //} | 229 | } |
| 230 | #endif //X86_ASM | 230 | #endif //X86_ASM |
| 231 | 231 | ||
| 232 | #ifdef HAVE_NEON | 232 | #ifdef HAVE_NEON |