Showing the changes to codec/processing (5 of 14 files). Show all
Unified · Split
| @@ -107,10 +107,12 @@ void CDownsampling::InitDownsampleFuncs (SDownsampleFuncs& sDownsampleFunc, int · 106 unmodified lines | |||
| 107 | sDownsampleFunc.pfQuarterDownsampler = DyadicBilinearQuarterDownsampler_sse4; | 107 | sDownsampleFunc.pfQuarterDownsampler = DyadicBilinearQuarterDownsampler_sse4; |
| 108 | sDownsampleFunc.pfGeneralRatioChroma = GeneralBilinearAccurateDownsamplerWrap_sse41; | 108 | sDownsampleFunc.pfGeneralRatioChroma = GeneralBilinearAccurateDownsamplerWrap_sse41; |
| 109 | } | 109 | } |
| 110 | #ifdef HAVE_AVX2 | ||
| 110 | if (iCpuFlag & WELS_CPU_AVX2) { | 111 | if (iCpuFlag & WELS_CPU_AVX2) { |
| 111 | sDownsampleFunc.pfGeneralRatioChroma = GeneralBilinearAccurateDownsamplerWrap_avx2; | 112 | sDownsampleFunc.pfGeneralRatioChroma = GeneralBilinearAccurateDownsamplerWrap_avx2; |
| 112 | sDownsampleFunc.pfGeneralRatioLuma = GeneralBilinearFastDownsamplerWrap_avx2; | 113 | sDownsampleFunc.pfGeneralRatioLuma = GeneralBilinearFastDownsamplerWrap_avx2; |
| 113 | } | 114 | } |
| 115 | #endif | ||
| 114 | #endif//X86_ASM | 116 | #endif//X86_ASM |
| 115 | 117 | ||
| 116 | #if defined(HAVE_NEON) | 118 | #if defined(HAVE_NEON) |
| @@ -99,8 +99,10 @@ GeneralDownsampleFunc GeneralBilinearFastDownsamplerWrap_sse2; · 98 unmodified lines | |||
| 99 | GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_sse2; | 99 | GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_sse2; |
| 100 | GeneralDownsampleFunc GeneralBilinearFastDownsamplerWrap_ssse3; | 100 | GeneralDownsampleFunc GeneralBilinearFastDownsamplerWrap_ssse3; |
| 101 | GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_sse41; | 101 | GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_sse41; |
| 102 | #ifdef HAVE_AVX2 | ||
| 102 | GeneralDownsampleFunc GeneralBilinearFastDownsamplerWrap_avx2; | 103 | GeneralDownsampleFunc GeneralBilinearFastDownsamplerWrap_avx2; |
| 103 | GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_avx2; | 104 | GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_avx2; |
| 105 | #endif | ||
| 104 | 106 | ||
| 105 | SpecificDownsampleFunc DyadicBilinearOneThirdDownsampler_ssse3; | 107 | SpecificDownsampleFunc DyadicBilinearOneThirdDownsampler_ssse3; |
| 106 | SpecificDownsampleFunc DyadicBilinearOneThirdDownsampler_sse4; | 108 | SpecificDownsampleFunc DyadicBilinearOneThirdDownsampler_sse4; |
| @@ -120,12 +122,14 @@ void GeneralBilinearFastDownsampler_ssse3 (uint8_t* pDst, int32_t iDstStride, in · 13 unmodified lines | |||
| 120 | void GeneralBilinearAccurateDownsampler_sse41 (uint8_t* pDst, int32_t iDstStride, int32_t iDstWidth, | 122 | void GeneralBilinearAccurateDownsampler_sse41 (uint8_t* pDst, int32_t iDstStride, int32_t iDstWidth, |
| 121 | int32_t iDstHeight, uint8_t* pSrc, int32_t iSrcStride, uint32_t uiScaleX, | 123 | int32_t iDstHeight, uint8_t* pSrc, int32_t iSrcStride, uint32_t uiScaleX, |
| 122 | uint32_t uiScaleY); | 124 | uint32_t uiScaleY); |
| 125 | #ifdef HAVE_AVX2 | ||
| 123 | void GeneralBilinearFastDownsampler_avx2 (uint8_t* pDst, int32_t iDstStride, int32_t iDstWidth, | 126 | void GeneralBilinearFastDownsampler_avx2 (uint8_t* pDst, int32_t iDstStride, int32_t iDstWidth, |
| 124 | int32_t iDstHeight, uint8_t* pSrc, int32_t iSrcStride, uint32_t uiScaleX, | 127 | int32_t iDstHeight, uint8_t* pSrc, int32_t iSrcStride, uint32_t uiScaleX, |
| 125 | uint32_t uiScaleY); | 128 | uint32_t uiScaleY); |
| 126 | void GeneralBilinearAccurateDownsampler_avx2 (uint8_t* pDst, int32_t iDstStride, int32_t iDstWidth, | 129 | void GeneralBilinearAccurateDownsampler_avx2 (uint8_t* pDst, int32_t iDstStride, int32_t iDstWidth, |
| 127 | int32_t iDstHeight, uint8_t* pSrc, int32_t iSrcStride, uint32_t uiScaleX, | 130 | int32_t iDstHeight, uint8_t* pSrc, int32_t iSrcStride, uint32_t uiScaleX, |
| 128 | uint32_t uiScaleY); | 131 | uint32_t uiScaleY); |
| 132 | #endif | ||
| 129 | 133 | ||
| 130 | WELSVP_EXTERN_C_END | 134 | WELSVP_EXTERN_C_END |
| 131 | #endif | 135 | #endif |
| @@ -284,8 +284,10 @@ DEFINE_GENERAL_BILINEAR_FAST_DOWNSAMPLER_WRAP (sse2) · 283 unmodified lines | |||
| 284 | DEFINE_GENERAL_BILINEAR_ACCURATE_DOWNSAMPLER_WRAP (sse2) | 284 | DEFINE_GENERAL_BILINEAR_ACCURATE_DOWNSAMPLER_WRAP (sse2) |
| 285 | DEFINE_GENERAL_BILINEAR_FAST_DOWNSAMPLER_WRAP (ssse3) | 285 | DEFINE_GENERAL_BILINEAR_FAST_DOWNSAMPLER_WRAP (ssse3) |
| 286 | DEFINE_GENERAL_BILINEAR_ACCURATE_DOWNSAMPLER_WRAP (sse41) | 286 | DEFINE_GENERAL_BILINEAR_ACCURATE_DOWNSAMPLER_WRAP (sse41) |
| 287 | #ifdef HAVE_AVX2 | ||
| 287 | DEFINE_GENERAL_BILINEAR_FAST_DOWNSAMPLER_WRAP (avx2) | 288 | DEFINE_GENERAL_BILINEAR_FAST_DOWNSAMPLER_WRAP (avx2) |
| 288 | DEFINE_GENERAL_BILINEAR_ACCURATE_DOWNSAMPLER_WRAP (avx2) | 289 | DEFINE_GENERAL_BILINEAR_ACCURATE_DOWNSAMPLER_WRAP (avx2) |
| 290 | #endif | ||
| 289 | #endif //X86_ASM | 291 | #endif //X86_ASM |
| 290 | 292 | ||
| 291 | #ifdef HAVE_NEON | 293 | #ifdef HAVE_NEON |
| @@ -3254,6 +3254,7 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 3253 unmodified lines | |||
| 3254 | %undef xmm_xfrac1_begin | 3254 | %undef xmm_xfrac1_begin |
| 3255 | %undef xmm_xfrac_inc | 3255 | %undef xmm_xfrac_inc |
| 3256 | 3256 | ||
| 3257 | %ifdef HAVE_AVX2 | ||
| 3257 | ; xpos_int=%1 xpos_frac=%2 inc_int+1=%3 inc_frac=%4 tmp=%5 | 3258 | ; xpos_int=%1 xpos_frac=%2 inc_int+1=%3 inc_frac=%4 tmp=%5 |
| 3258 | %macro AVX2_BilinearIncXposuw 5 | 3259 | %macro AVX2_BilinearIncXposuw 5 |
| 3259 | vpaddusw %5, %2, %4 | 3260 | vpaddusw %5, %2, %4 |
| @@ -4552,3 +4553,5 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_avx2 · 1292 unmodified lines | |||
| 4552 | %undef ymm_xfrac0_begin | 4553 | %undef ymm_xfrac0_begin |
| 4553 | %undef ymm_xfrac1_begin | 4554 | %undef ymm_xfrac1_begin |
| 4554 | %undef ymm_xfrac_inc | 4555 | %undef ymm_xfrac_inc |
| 4556 | %endif | ||
| 4557 | |||
| @@ -2088,6 +2088,7 @@ sqdiff_bgd_width_loop: · 2087 unmodified lines | |||
| 2088 | %assign push_num push_num - stack_alloc_num | 2088 | %assign push_num push_num - stack_alloc_num |
| 2089 | %endmacro | 2089 | %endmacro |
| 2090 | 2090 | ||
| 2091 | %ifdef HAVE_AVX2 | ||
| 2091 | ; Max unsigned byte per quadword | 2092 | ; Max unsigned byte per quadword |
| 2092 | ; out=%1 in=%2 tmp=%3 | 2093 | ; out=%1 in=%2 tmp=%3 |
| 2093 | %macro AVX2_Maxubq 3 | 2094 | %macro AVX2_Maxubq 3 |
| @@ -3557,3 +3558,6 @@ WELS_EXTERN VAACalcSadSsdBgd_avx2 · 1463 unmodified lines | |||
| 3557 | %undef p_sd8x8 | 3558 | %undef p_sd8x8 |
| 3558 | %undef p_mad8x8 | 3559 | %undef p_mad8x8 |
| 3559 | ret | 3560 | ret |
| 3561 | |||
| 3562 | %endif | ||
| 3563 | |||