aboutsummaryrefslogtreecommitdiff
path: root/source/scale_common.cc
diff options
context:
space:
mode:
authorHao Chen <chenhao@loongson.cn>2021-12-20 20:14:11 +0800
committerFrank Barchard <fbarchard@chromium.org>2022-01-21 01:34:38 +0000
commitdfe046d27255cff06fc4cfe42c6d373fd83bc2aa (patch)
treece440885c31987ee6177ead9edc5aa2be7439695 /source/scale_common.cc
parentde8ae8c679f5a42fb9f9f65318d6cb95112180d6 (diff)
downloadlibyuv-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_common.cc')
-rw-r--r--source/scale_common.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/scale_common.cc b/source/scale_common.cc
index da96d428..5055bb0c 100644
--- a/source/scale_common.cc
+++ b/source/scale_common.cc
@@ -1519,6 +1519,14 @@ void ScalePlaneVertical(int src_height,
}
}
#endif
+#if defined(HAS_INTERPOLATEROW_LSX)
+ if (TestCpuFlag(kCpuHasLSX)) {
+ InterpolateRow = InterpolateRow_Any_LSX;
+ if (IS_ALIGNED(dst_width_bytes, 32)) {
+ InterpolateRow = InterpolateRow_LSX;
+ }
+ }
+#endif
for (j = 0; j < dst_height; ++j) {
int yi;
int yf;