diff options
author | Shiyou Yin <yinshiyou-hf@loongson.cn> | 2020-04-08 15:58:52 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-28 11:01:51 +0000 |
commit | bed9292f2cbba2f8f9ff0f1635a8aa17a311f2f9 (patch) | |
tree | 6779566d79d8d6fd00de45104493c6e5ce09ecbe /source/scale_common.cc | |
parent | 86e4cdd91ff6061558550a548525e0a3a0cec6a8 (diff) | |
download | libyuv-bed9292f2cbba2f8f9ff0f1635a8aa17a311f2f9.tar.gz |
Move init process of msa after mmi.
Some processors support both MSA and MMI.
when they are enabled together, MSA will be preferd.
This patch move MSA initialization after MMI, so that
MSA can overide MMI and be setted to effective.
Change-Id: I8a52cce83ee4ec9727d47c99b287c9580329b149
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2155944
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source/scale_common.cc')
-rw-r--r-- | source/scale_common.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/scale_common.cc b/source/scale_common.cc index 63690271..bc167bdc 100644 --- a/source/scale_common.cc +++ b/source/scale_common.cc @@ -1067,14 +1067,6 @@ void ScalePlaneVertical(int src_height, } } #endif -#if defined(HAS_INTERPOLATEROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - InterpolateRow = InterpolateRow_Any_MSA; - if (IS_ALIGNED(dst_width_bytes, 32)) { - InterpolateRow = InterpolateRow_MSA; - } - } -#endif #if defined(HAS_INTERPOLATEROW_MMI) if (TestCpuFlag(kCpuHasMMI)) { InterpolateRow = InterpolateRow_Any_MMI; @@ -1083,6 +1075,14 @@ void ScalePlaneVertical(int src_height, } } #endif +#if defined(HAS_INTERPOLATEROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + InterpolateRow = InterpolateRow_Any_MSA; + if (IS_ALIGNED(dst_width_bytes, 32)) { + InterpolateRow = InterpolateRow_MSA; + } + } +#endif for (j = 0; j < dst_height; ++j) { int yi; int yf; |