Showing the changes to codec/processing/src/downsample/downsample.h (1 of 9 files). Show all
Unified · Split
| @@ -54,20 +54,29 @@ typedef void (HalveDownsampleFunc) (uint8_t* pDst, const int32_t kiDstStride, · 53 unmodified lines | |||
| 54 | uint8_t* pSrc, const int32_t kiSrcStride, | 54 | uint8_t* pSrc, const int32_t kiSrcStride, |
| 55 | const int32_t kiSrcWidth, const int32_t kiSrcHeight); | 55 | const int32_t kiSrcWidth, const int32_t kiSrcHeight); |
| 56 | 56 | ||
| 57 | typedef void (SpecificDownsampleFunc) (uint8_t* pDst, const int32_t kiDstStride, | ||
| 58 | uint8_t* pSrc, const int32_t kiSrcStride, | ||
| 59 | const int32_t kiSrcWidth, const int32_t kiHeight); | ||
| 60 | |||
| 57 | typedef void (GeneralDownsampleFunc) (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, | 61 | typedef void (GeneralDownsampleFunc) (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, |
| 58 | const int32_t kiDstHeight, | 62 | const int32_t kiDstHeight, |
| 59 | uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight); | 63 | uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight); |
| 60 | 64 | ||
| 61 | typedef HalveDownsampleFunc* PHalveDownsampleFunc; | 65 | typedef HalveDownsampleFunc* PHalveDownsampleFunc; |
| 66 | typedef SpecificDownsampleFunc* PSpecificDownsampleFunc; | ||
| 62 | typedef GeneralDownsampleFunc* PGeneralDownsampleFunc; | 67 | typedef GeneralDownsampleFunc* PGeneralDownsampleFunc; |
| 63 | 68 | ||
| 64 | HalveDownsampleFunc DyadicBilinearDownsampler_c; | 69 | HalveDownsampleFunc DyadicBilinearDownsampler_c; |
| 65 | GeneralDownsampleFunc GeneralBilinearFastDownsampler_c; | 70 | GeneralDownsampleFunc GeneralBilinearFastDownsampler_c; |
| 66 | GeneralDownsampleFunc GeneralBilinearAccurateDownsampler_c; | 71 | GeneralDownsampleFunc GeneralBilinearAccurateDownsampler_c; |
| 72 | SpecificDownsampleFunc DyadicBilinearOneThirdDownsampler_c; | ||
| 73 | SpecificDownsampleFunc DyadicBilinearQuarterDownsampler_c; | ||
| 67 | 74 | ||
| 68 | typedef struct { | 75 | typedef struct { |
| 69 | // align_index: 0 = x32; 1 = x16; 2 = x8; 3 = common case left; | 76 | // align_index: 0 = x32; 1 = x16; 2 = x8; 3 = common case left; |
| 70 | PHalveDownsampleFunc pfHalfAverage[4]; | 77 | PHalveDownsampleFunc pfHalfAverage[4]; |
| 78 | PSpecificDownsampleFunc pfOneThirdDownsampler; | ||
| 79 | PSpecificDownsampleFunc pfQuarterDownsampler; | ||
| 71 | PGeneralDownsampleFunc pfGeneralRatioLuma; | 80 | PGeneralDownsampleFunc pfGeneralRatioLuma; |
| 72 | PGeneralDownsampleFunc pfGeneralRatioChroma; | 81 | PGeneralDownsampleFunc pfGeneralRatioChroma; |
| 73 | } SDownsampleFuncs; | 82 | } SDownsampleFuncs; |
| @@ -93,10 +102,19 @@ HalveDownsampleFunc DyadicBilinearDownsamplerWidthx32_sse4; · 19 unmodified lines | |||
| 93 | GeneralDownsampleFunc GeneralBilinearFastDownsamplerWrap_sse2; | 102 | GeneralDownsampleFunc GeneralBilinearFastDownsamplerWrap_sse2; |
| 94 | GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_sse2; | 103 | GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_sse2; |
| 95 | 104 | ||
| 105 | SpecificDownsampleFunc DyadicBilinearOneThirdDownsampler_ssse3; | ||
| 106 | SpecificDownsampleFunc DyadicBilinearOneThirdDownsampler_sse4; | ||
| 107 | SpecificDownsampleFunc DyadicBilinearQuarterDownsampler_sse; | ||
| 108 | SpecificDownsampleFunc DyadicBilinearQuarterDownsampler_ssse3; | ||
| 109 | SpecificDownsampleFunc DyadicBilinearQuarterDownsampler_sse4; | ||
| 110 | |||
| 96 | void GeneralBilinearFastDownsampler_sse2 (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, | 111 | void GeneralBilinearFastDownsampler_sse2 (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, |
| 97 | const int32_t kiDstHeight, uint8_t* pSrc, const int32_t kiSrcStride, const uint32_t kuiScaleX, const uint32_t kuiScaleY); | 112 | const int32_t kiDstHeight, uint8_t* pSrc, const int32_t kiSrcStride, const uint32_t kuiScaleX, |
| 113 | const uint32_t kuiScaleY); | ||
| 98 | void GeneralBilinearAccurateDownsampler_sse2 (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, | 114 | void GeneralBilinearAccurateDownsampler_sse2 (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, |
| 99 | const int32_t kiDstHeight, uint8_t* pSrc, const int32_t kiSrcStride, const uint32_t kuiScaleX, const uint32_t kuiScaleY); | 115 | const int32_t kiDstHeight, uint8_t* pSrc, const int32_t kiSrcStride, const uint32_t kuiScaleX, |
| 116 | const uint32_t kuiScaleY); | ||
| 117 | |||
| 100 | WELSVP_EXTERN_C_END | 118 | WELSVP_EXTERN_C_END |
| 101 | #endif | 119 | #endif |
| 102 | 120 | ||
| @@ -109,6 +127,10 @@ HalveDownsampleFunc DyadicBilinearDownsamplerWidthx32_neon; · 6 unmodified lines | |||
| 109 | 127 | ||
| 110 | GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_neon; | 128 | GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_neon; |
| 111 | 129 | ||
| 130 | SpecificDownsampleFunc DyadicBilinearOneThirdDownsampler_neon; | ||
| 131 | |||
| 132 | SpecificDownsampleFunc DyadicBilinearQuarterDownsampler_neon; | ||
| 133 | |||
| 112 | void GeneralBilinearAccurateDownsampler_neon (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, | 134 | void GeneralBilinearAccurateDownsampler_neon (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, |
| 113 | const int32_t kiDstHeight, | 135 | const int32_t kiDstHeight, |
| 114 | uint8_t* pSrc, const int32_t kiSrcStride, const uint32_t kuiScaleX, const uint32_t kuiScaleY); | 136 | uint8_t* pSrc, const int32_t kiSrcStride, const uint32_t kuiScaleX, const uint32_t kuiScaleY); |
| @@ -125,8 +147,13 @@ HalveDownsampleFunc DyadicBilinearDownsamplerWidthx32_AArch64_neon; · 10 unmodified lines | |||
| 125 | 147 | ||
| 126 | GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_AArch64_neon; | 148 | GeneralDownsampleFunc GeneralBilinearAccurateDownsamplerWrap_AArch64_neon; |
| 127 | 149 | ||
| 128 | void GeneralBilinearAccurateDownsampler_AArch64_neon (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, const int32_t kiDstHeight, | 150 | SpecificDownsampleFunc DyadicBilinearOneThirdDownsampler_AArch64_neon; |
| 129 | uint8_t* pSrc, const int32_t kiSrcStride, const uint32_t kuiScaleX, const uint32_t kuiScaleY); | 151 | |
| 152 | SpecificDownsampleFunc DyadicBilinearQuarterDownsampler_AArch64_neon; | ||
| 153 | |||
| 154 | void GeneralBilinearAccurateDownsampler_AArch64_neon (uint8_t* pDst, const int32_t kiDstStride, | ||
| 155 | const int32_t kiDstWidth, const int32_t kiDstHeight, | ||
| 156 | uint8_t* pSrc, const int32_t kiSrcStride, const uint32_t kuiScaleX, const uint32_t kuiScaleY); | ||
| 130 | 157 | ||
| 131 | WELSVP_EXTERN_C_END | 158 | WELSVP_EXTERN_C_END |
| 132 | #endif | 159 | #endif |