diff options
author | Hao Chen <chenhao@loongson.cn> | 2021-12-20 20:14:11 +0800 |
---|---|---|
committer | Frank Barchard <fbarchard@chromium.org> | 2022-01-21 01:34:38 +0000 |
commit | dfe046d27255cff06fc4cfe42c6d373fd83bc2aa (patch) | |
tree | ce440885c31987ee6177ead9edc5aa2be7439695 /source/scale_argb.cc | |
parent | de8ae8c679f5a42fb9f9f65318d6cb95112180d6 (diff) | |
download | libyuv-dfe046d27255cff06fc4cfe42c6d373fd83bc2aa.tar.gz |
Add optimization functions in row_lsx.cc file.
Optimize 44 functions in source/row_lsx.cc file.
All test cases passed on loongarch platform.
Bug: libyuv:913
Change-Id: Ic80a5751314adc2e9bd435f2bbd928ab017a90f9
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3351467
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source/scale_argb.cc')
-rw-r--r-- | source/scale_argb.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/scale_argb.cc b/source/scale_argb.cc index e558377f..a5d5ee9c 100644 --- a/source/scale_argb.cc +++ b/source/scale_argb.cc @@ -340,6 +340,14 @@ static void ScaleARGBBilinearDown(int src_width, } } #endif +#if defined(HAS_INTERPOLATEROW_LSX) + if (TestCpuFlag(kCpuHasLSX)) { + InterpolateRow = InterpolateRow_Any_LSX; + if (IS_ALIGNED(clip_src_width, 32)) { + InterpolateRow = InterpolateRow_LSX; + } + } +#endif #if defined(HAS_SCALEARGBFILTERCOLS_SSSE3) if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) { ScaleARGBFilterCols = ScaleARGBFilterCols_SSSE3; @@ -452,6 +460,14 @@ static void ScaleARGBBilinearUp(int src_width, } } #endif +#if defined(HAS_INTERPOLATEROW_LSX) + if (TestCpuFlag(kCpuHasLSX)) { + InterpolateRow = InterpolateRow_Any_LSX; + if (IS_ALIGNED(dst_width, 8)) { + InterpolateRow = InterpolateRow_LSX; + } + } +#endif if (src_width >= 32768) { ScaleARGBFilterCols = filtering ? ScaleARGBFilterCols64_C : ScaleARGBCols64_C; @@ -687,6 +703,14 @@ static void ScaleYUVToARGBBilinearUp(int src_width, } } #endif +#if defined(HAS_INTERPOLATEROW_LSX) + if (TestCpuFlag(kCpuHasLSX)) { + InterpolateRow = InterpolateRow_Any_LSX; + if (IS_ALIGNED(dst_width, 8)) { + InterpolateRow = InterpolateRow_LSX; + } + } +#endif void (*ScaleARGBFilterCols)(uint8_t * dst_argb, const uint8_t* src_argb, int dst_width, int x, int dx) = |