react-native-vision-camera-spoof-detector 1.1.23 → 1.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/CMakeLists.txt +12 -0
- package/android/build.gradle +10 -9
- package/android/src/main/cpp/cpp-adapter.cpp +6 -3
- package/package.json +1 -1
- package/android/src/main/cpp/CMakeLists.txt +0 -33
- package/android/src/main/cpp/FaceAntiSpoofJSI.cpp +0 -142
- package/android/src/main/cpp/FastYuvJni.cpp +0 -111
- package/android/src/main/cpp/fast_yuv.cpp +0 -342
- package/android/src/main/cpp/fast_yuv.h +0 -23
- package/android/src/main/cpp/libyuv/.clang-format +0 -6
- package/android/src/main/cpp/libyuv/.gn +0 -40
- package/android/src/main/cpp/libyuv/.vpython3 +0 -410
- package/android/src/main/cpp/libyuv/AUTHORS +0 -7
- package/android/src/main/cpp/libyuv/Android.bp +0 -202
- package/android/src/main/cpp/libyuv/Android.mk +0 -106
- package/android/src/main/cpp/libyuv/BUILD.gn +0 -490
- package/android/src/main/cpp/libyuv/CM_linux_packages.cmake +0 -70
- package/android/src/main/cpp/libyuv/CMakeLists.txt +0 -259
- package/android/src/main/cpp/libyuv/DEPS +0 -935
- package/android/src/main/cpp/libyuv/DIR_METADATA +0 -3
- package/android/src/main/cpp/libyuv/LICENSE +0 -29
- package/android/src/main/cpp/libyuv/OWNERS +0 -11
- package/android/src/main/cpp/libyuv/PATENTS +0 -24
- package/android/src/main/cpp/libyuv/PRESUBMIT.py +0 -65
- package/android/src/main/cpp/libyuv/README.chromium +0 -11
- package/android/src/main/cpp/libyuv/README.md +0 -19
- package/android/src/main/cpp/libyuv/build_overrides/build.gni +0 -60
- package/android/src/main/cpp/libyuv/build_overrides/gtest.gni +0 -19
- package/android/src/main/cpp/libyuv/build_overrides/partition_alloc.gni +0 -17
- package/android/src/main/cpp/libyuv/codereview.settings +0 -5
- package/android/src/main/cpp/libyuv/docs/deprecated_builds.md +0 -409
- package/android/src/main/cpp/libyuv/docs/environment_variables.md +0 -64
- package/android/src/main/cpp/libyuv/docs/feature_detection.md +0 -108
- package/android/src/main/cpp/libyuv/docs/filtering.md +0 -196
- package/android/src/main/cpp/libyuv/docs/formats.md +0 -208
- package/android/src/main/cpp/libyuv/docs/getting_started.md +0 -296
- package/android/src/main/cpp/libyuv/docs/rotation.md +0 -107
- package/android/src/main/cpp/libyuv/download_vs_toolchain.py +0 -29
- package/android/src/main/cpp/libyuv/include/libyuv/basic_types.h +0 -68
- package/android/src/main/cpp/libyuv/include/libyuv/compare.h +0 -111
- package/android/src/main/cpp/libyuv/include/libyuv/compare_row.h +0 -112
- package/android/src/main/cpp/libyuv/include/libyuv/convert.h +0 -1117
- package/android/src/main/cpp/libyuv/include/libyuv/convert_argb.h +0 -2335
- package/android/src/main/cpp/libyuv/include/libyuv/convert_from.h +0 -203
- package/android/src/main/cpp/libyuv/include/libyuv/convert_from_argb.h +0 -394
- package/android/src/main/cpp/libyuv/include/libyuv/cpu_id.h +0 -147
- package/android/src/main/cpp/libyuv/include/libyuv/cpu_support.h +0 -99
- package/android/src/main/cpp/libyuv/include/libyuv/loongson_intrinsics.h +0 -1949
- package/android/src/main/cpp/libyuv/include/libyuv/mjpeg_decoder.h +0 -195
- package/android/src/main/cpp/libyuv/include/libyuv/planar_functions.h +0 -1131
- package/android/src/main/cpp/libyuv/include/libyuv/rotate.h +0 -296
- package/android/src/main/cpp/libyuv/include/libyuv/rotate_argb.h +0 -37
- package/android/src/main/cpp/libyuv/include/libyuv/rotate_row.h +0 -265
- package/android/src/main/cpp/libyuv/include/libyuv/row.h +0 -6738
- package/android/src/main/cpp/libyuv/include/libyuv/row_sve.h +0 -2154
- package/android/src/main/cpp/libyuv/include/libyuv/scale.h +0 -336
- package/android/src/main/cpp/libyuv/include/libyuv/scale_argb.h +0 -76
- package/android/src/main/cpp/libyuv/include/libyuv/scale_rgb.h +0 -42
- package/android/src/main/cpp/libyuv/include/libyuv/scale_row.h +0 -1726
- package/android/src/main/cpp/libyuv/include/libyuv/scale_uv.h +0 -51
- package/android/src/main/cpp/libyuv/include/libyuv/version.h +0 -16
- package/android/src/main/cpp/libyuv/include/libyuv/video_common.h +0 -222
- package/android/src/main/cpp/libyuv/include/libyuv.h +0 -33
- package/android/src/main/cpp/libyuv/infra/config/OWNERS +0 -3
- package/android/src/main/cpp/libyuv/infra/config/PRESUBMIT.py +0 -17
- package/android/src/main/cpp/libyuv/infra/config/README.md +0 -2
- package/android/src/main/cpp/libyuv/infra/config/codereview.settings +0 -6
- package/android/src/main/cpp/libyuv/infra/config/commit-queue.cfg +0 -144
- package/android/src/main/cpp/libyuv/infra/config/cr-buildbucket.cfg +0 -1185
- package/android/src/main/cpp/libyuv/infra/config/luci-logdog.cfg +0 -9
- package/android/src/main/cpp/libyuv/infra/config/luci-milo.cfg +0 -246
- package/android/src/main/cpp/libyuv/infra/config/luci-scheduler.cfg +0 -385
- package/android/src/main/cpp/libyuv/infra/config/main.star +0 -402
- package/android/src/main/cpp/libyuv/infra/config/project.cfg +0 -16
- package/android/src/main/cpp/libyuv/infra/config/realms.cfg +0 -111
- package/android/src/main/cpp/libyuv/libyuv.gni +0 -34
- package/android/src/main/cpp/libyuv/libyuv.gyp +0 -149
- package/android/src/main/cpp/libyuv/libyuv.gypi +0 -87
- package/android/src/main/cpp/libyuv/linux.mk +0 -96
- package/android/src/main/cpp/libyuv/public.mk +0 -13
- package/android/src/main/cpp/libyuv/pylintrc +0 -49
- package/android/src/main/cpp/libyuv/riscv_script/prepare_toolchain_qemu.sh +0 -74
- package/android/src/main/cpp/libyuv/riscv_script/riscv-clang.cmake +0 -56
- package/android/src/main/cpp/libyuv/riscv_script/run_qemu.sh +0 -15
- package/android/src/main/cpp/libyuv/source/compare.cc +0 -435
- package/android/src/main/cpp/libyuv/source/compare_common.cc +0 -74
- package/android/src/main/cpp/libyuv/source/compare_gcc.cc +0 -362
- package/android/src/main/cpp/libyuv/source/compare_neon.cc +0 -96
- package/android/src/main/cpp/libyuv/source/compare_neon64.cc +0 -223
- package/android/src/main/cpp/libyuv/source/compare_win.cc +0 -241
- package/android/src/main/cpp/libyuv/source/convert.cc +0 -4746
- package/android/src/main/cpp/libyuv/source/convert_argb.cc +0 -9179
- package/android/src/main/cpp/libyuv/source/convert_from.cc +0 -866
- package/android/src/main/cpp/libyuv/source/convert_from_argb.cc +0 -3671
- package/android/src/main/cpp/libyuv/source/convert_jpeg.cc +0 -602
- package/android/src/main/cpp/libyuv/source/convert_to_argb.cc +0 -391
- package/android/src/main/cpp/libyuv/source/convert_to_i420.cc +0 -288
- package/android/src/main/cpp/libyuv/source/cpu_id.cc +0 -496
- package/android/src/main/cpp/libyuv/source/mjpeg_decoder.cc +0 -580
- package/android/src/main/cpp/libyuv/source/mjpeg_validate.cc +0 -71
- package/android/src/main/cpp/libyuv/source/planar_functions.cc +0 -5663
- package/android/src/main/cpp/libyuv/source/rotate.cc +0 -1241
- package/android/src/main/cpp/libyuv/source/rotate_any.cc +0 -76
- package/android/src/main/cpp/libyuv/source/rotate_argb.cc +0 -259
- package/android/src/main/cpp/libyuv/source/rotate_common.cc +0 -208
- package/android/src/main/cpp/libyuv/source/rotate_gcc.cc +0 -505
- package/android/src/main/cpp/libyuv/source/rotate_lsx.cc +0 -233
- package/android/src/main/cpp/libyuv/source/rotate_neon.cc +0 -219
- package/android/src/main/cpp/libyuv/source/rotate_neon64.cc +0 -273
- package/android/src/main/cpp/libyuv/source/rotate_sme.cc +0 -174
- package/android/src/main/cpp/libyuv/source/rotate_win.cc +0 -253
- package/android/src/main/cpp/libyuv/source/row_any.cc +0 -2519
- package/android/src/main/cpp/libyuv/source/row_common.cc +0 -4461
- package/android/src/main/cpp/libyuv/source/row_gcc.cc +0 -9570
- package/android/src/main/cpp/libyuv/source/row_lasx.cc +0 -2343
- package/android/src/main/cpp/libyuv/source/row_lsx.cc +0 -3030
- package/android/src/main/cpp/libyuv/source/row_neon.cc +0 -4026
- package/android/src/main/cpp/libyuv/source/row_neon64.cc +0 -5617
- package/android/src/main/cpp/libyuv/source/row_rvv.cc +0 -2599
- package/android/src/main/cpp/libyuv/source/row_sme.cc +0 -1183
- package/android/src/main/cpp/libyuv/source/row_sve.cc +0 -1088
- package/android/src/main/cpp/libyuv/source/row_win.cc +0 -6453
- package/android/src/main/cpp/libyuv/source/scale.cc +0 -2710
- package/android/src/main/cpp/libyuv/source/scale_any.cc +0 -991
- package/android/src/main/cpp/libyuv/source/scale_argb.cc +0 -1158
- package/android/src/main/cpp/libyuv/source/scale_common.cc +0 -1977
- package/android/src/main/cpp/libyuv/source/scale_gcc.cc +0 -2947
- package/android/src/main/cpp/libyuv/source/scale_lsx.cc +0 -739
- package/android/src/main/cpp/libyuv/source/scale_neon.cc +0 -1449
- package/android/src/main/cpp/libyuv/source/scale_neon64.cc +0 -1552
- package/android/src/main/cpp/libyuv/source/scale_rgb.cc +0 -82
- package/android/src/main/cpp/libyuv/source/scale_rvv.cc +0 -1971
- package/android/src/main/cpp/libyuv/source/scale_sme.cc +0 -555
- package/android/src/main/cpp/libyuv/source/scale_uv.cc +0 -1159
- package/android/src/main/cpp/libyuv/source/scale_win.cc +0 -1392
- package/android/src/main/cpp/libyuv/source/test.sh +0 -35
- package/android/src/main/cpp/libyuv/source/video_common.cc +0 -62
- package/android/src/main/cpp/libyuv/tools_libyuv/OWNERS +0 -4
- package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/roll_deps.py +0 -931
- package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/unittests/roll_deps_test.py +0 -164
- package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS +0 -21
- package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.new +0 -13
- package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old +0 -13
- package/android/src/main/cpp/libyuv/tools_libyuv/get_landmines.py +0 -38
- package/android/src/main/cpp/libyuv/tools_libyuv/msan/OWNERS +0 -3
- package/android/src/main/cpp/libyuv/tools_libyuv/msan/blacklist.txt +0 -9
- package/android/src/main/cpp/libyuv/tools_libyuv/ubsan/OWNERS +0 -3
- package/android/src/main/cpp/libyuv/tools_libyuv/ubsan/blacklist.txt +0 -15
- package/android/src/main/cpp/libyuv/tools_libyuv/ubsan/vptr_blacklist.txt +0 -25
- package/android/src/main/cpp/libyuv/unit_test/basictypes_test.cc +0 -43
- package/android/src/main/cpp/libyuv/unit_test/color_test.cc +0 -848
- package/android/src/main/cpp/libyuv/unit_test/compare_test.cc +0 -739
- package/android/src/main/cpp/libyuv/unit_test/convert_argb_test.cc +0 -2867
- package/android/src/main/cpp/libyuv/unit_test/convert_test.cc +0 -2133
- package/android/src/main/cpp/libyuv/unit_test/cpu_test.cc +0 -427
- package/android/src/main/cpp/libyuv/unit_test/cpu_thread_test.cc +0 -63
- package/android/src/main/cpp/libyuv/unit_test/math_test.cc +0 -160
- package/android/src/main/cpp/libyuv/unit_test/planar_test.cc +0 -4731
- package/android/src/main/cpp/libyuv/unit_test/rotate_argb_test.cc +0 -334
- package/android/src/main/cpp/libyuv/unit_test/rotate_test.cc +0 -962
- package/android/src/main/cpp/libyuv/unit_test/scale_argb_test.cc +0 -590
- package/android/src/main/cpp/libyuv/unit_test/scale_plane_test.cc +0 -465
- package/android/src/main/cpp/libyuv/unit_test/scale_rgb_test.cc +0 -280
- package/android/src/main/cpp/libyuv/unit_test/scale_test.cc +0 -1135
- package/android/src/main/cpp/libyuv/unit_test/scale_uv_test.cc +0 -249
- package/android/src/main/cpp/libyuv/unit_test/testdata/arm_v7.txt +0 -12
- package/android/src/main/cpp/libyuv/unit_test/testdata/mips.txt +0 -7
- package/android/src/main/cpp/libyuv/unit_test/testdata/mips_loongson2k.txt +0 -5
- package/android/src/main/cpp/libyuv/unit_test/testdata/mips_loongson3.txt +0 -10
- package/android/src/main/cpp/libyuv/unit_test/testdata/mips_loongson_mmi.txt +0 -7
- package/android/src/main/cpp/libyuv/unit_test/testdata/riscv64.txt +0 -4
- package/android/src/main/cpp/libyuv/unit_test/testdata/riscv64_rvv.txt +0 -4
- package/android/src/main/cpp/libyuv/unit_test/testdata/riscv64_rvv_zvfh.txt +0 -4
- package/android/src/main/cpp/libyuv/unit_test/testdata/tegra3.txt +0 -23
- package/android/src/main/cpp/libyuv/unit_test/testdata/test0.jpg +0 -0
- package/android/src/main/cpp/libyuv/unit_test/testdata/test1.jpg +0 -0
- package/android/src/main/cpp/libyuv/unit_test/testdata/test2.jpg +0 -0
- package/android/src/main/cpp/libyuv/unit_test/testdata/test3.jpg +0 -0
- package/android/src/main/cpp/libyuv/unit_test/testdata/test4.jpg +0 -0
- package/android/src/main/cpp/libyuv/unit_test/unit_test.cc +0 -581
- package/android/src/main/cpp/libyuv/unit_test/unit_test.h +0 -232
- package/android/src/main/cpp/libyuv/unit_test/video_common_test.cc +0 -112
- package/android/src/main/cpp/libyuv/util/Makefile +0 -9
- package/android/src/main/cpp/libyuv/util/color.cc +0 -120
- package/android/src/main/cpp/libyuv/util/compare.cc +0 -67
- package/android/src/main/cpp/libyuv/util/cpuid.c +0 -211
- package/android/src/main/cpp/libyuv/util/i444tonv12_eg.cc +0 -28
- package/android/src/main/cpp/libyuv/util/psnr.cc +0 -291
- package/android/src/main/cpp/libyuv/util/psnr.h +0 -47
- package/android/src/main/cpp/libyuv/util/psnr_main.cc +0 -620
- package/android/src/main/cpp/libyuv/util/ssim.cc +0 -364
- package/android/src/main/cpp/libyuv/util/ssim.h +0 -38
- package/android/src/main/cpp/libyuv/util/yuvconstants.c +0 -114
- package/android/src/main/cpp/libyuv/util/yuvconvert.cc +0 -367
- package/android/src/main/cpp/libyuv/winarm.mk +0 -47
- package/android/src/main/java/com/faceantispoof/ByteBufferPool.kt +0 -68
- package/android/src/main/java/com/faceantispoof/FastYuv.kt +0 -51
- package/android/src/main/java/com/faceantispoof/YuvToFloatArrayConverter.kt +0 -584
- package/android/src/main/java/com/faceantispoof/YuvToRgbConverter.kt +0 -73
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2022 The LibYuv Project Authors. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2022 Loongson Technology Corporation Limited
|
|
5
|
-
*
|
|
6
|
-
* Use of this source code is governed by a BSD-style license
|
|
7
|
-
* that can be found in the LICENSE file in the root of the source
|
|
8
|
-
* tree. An additional intellectual property rights grant can be found
|
|
9
|
-
* in the file PATENTS. All contributing project authors may
|
|
10
|
-
* be found in the AUTHORS file in the root of the source tree.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
#include "libyuv/rotate_row.h"
|
|
14
|
-
|
|
15
|
-
#if !defined(LIBYUV_DISABLE_LSX) && defined(__loongarch_sx)
|
|
16
|
-
#include "libyuv/loongson_intrinsics.h"
|
|
17
|
-
|
|
18
|
-
#ifdef __cplusplus
|
|
19
|
-
namespace libyuv {
|
|
20
|
-
extern "C" {
|
|
21
|
-
#endif
|
|
22
|
-
|
|
23
|
-
#define ILVLH_B(in0, in1, in2, in3, out0, out1, out2, out3) \
|
|
24
|
-
{ \
|
|
25
|
-
DUP2_ARG2(__lsx_vilvl_b, in1, in0, in3, in2, out0, out2); \
|
|
26
|
-
DUP2_ARG2(__lsx_vilvh_b, in1, in0, in3, in2, out1, out3); \
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
#define ILVLH_H(in0, in1, in2, in3, out0, out1, out2, out3) \
|
|
30
|
-
{ \
|
|
31
|
-
DUP2_ARG2(__lsx_vilvl_h, in1, in0, in3, in2, out0, out2); \
|
|
32
|
-
DUP2_ARG2(__lsx_vilvh_h, in1, in0, in3, in2, out1, out3); \
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
#define ILVLH_W(in0, in1, in2, in3, out0, out1, out2, out3) \
|
|
36
|
-
{ \
|
|
37
|
-
DUP2_ARG2(__lsx_vilvl_w, in1, in0, in3, in2, out0, out2); \
|
|
38
|
-
DUP2_ARG2(__lsx_vilvh_w, in1, in0, in3, in2, out1, out3); \
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
#define ILVLH_D(in0, in1, in2, in3, out0, out1, out2, out3) \
|
|
42
|
-
{ \
|
|
43
|
-
DUP2_ARG2(__lsx_vilvl_d, in1, in0, in3, in2, out0, out2); \
|
|
44
|
-
DUP2_ARG2(__lsx_vilvh_d, in1, in0, in3, in2, out1, out3); \
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
#define LSX_ST_4(_dst0, _dst1, _dst2, _dst3, _dst, _stride, _stride2, \
|
|
48
|
-
_stride3, _stride4) \
|
|
49
|
-
{ \
|
|
50
|
-
__lsx_vst(_dst0, _dst, 0); \
|
|
51
|
-
__lsx_vstx(_dst1, _dst, _stride); \
|
|
52
|
-
__lsx_vstx(_dst2, _dst, _stride2); \
|
|
53
|
-
__lsx_vstx(_dst3, _dst, _stride3); \
|
|
54
|
-
_dst += _stride4; \
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
#define LSX_ST_2(_dst0, _dst1, _dst, _stride, _stride2) \
|
|
58
|
-
{ \
|
|
59
|
-
__lsx_vst(_dst0, _dst, 0); \
|
|
60
|
-
__lsx_vstx(_dst1, _dst, _stride); \
|
|
61
|
-
_dst += _stride2; \
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
void TransposeUVWx16_C(const uint8_t* src,
|
|
65
|
-
int src_stride,
|
|
66
|
-
uint8_t* dst_a,
|
|
67
|
-
int dst_stride_a,
|
|
68
|
-
uint8_t* dst_b,
|
|
69
|
-
int dst_stride_b,
|
|
70
|
-
int width) {
|
|
71
|
-
TransposeUVWx8_C(src, src_stride, dst_a, dst_stride_a, dst_b, dst_stride_b,
|
|
72
|
-
width);
|
|
73
|
-
TransposeUVWx8_C((src + 8 * src_stride), src_stride, (dst_a + 8),
|
|
74
|
-
dst_stride_a, (dst_b + 8), dst_stride_b, width);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
void TransposeWx16_LSX(const uint8_t* src,
|
|
78
|
-
int src_stride,
|
|
79
|
-
uint8_t* dst,
|
|
80
|
-
int dst_stride,
|
|
81
|
-
int width) {
|
|
82
|
-
int x;
|
|
83
|
-
int len = width / 16;
|
|
84
|
-
uint8_t* s;
|
|
85
|
-
int src_stride2 = src_stride << 1;
|
|
86
|
-
int src_stride3 = src_stride + src_stride2;
|
|
87
|
-
int src_stride4 = src_stride2 << 1;
|
|
88
|
-
int dst_stride2 = dst_stride << 1;
|
|
89
|
-
int dst_stride3 = dst_stride + dst_stride2;
|
|
90
|
-
int dst_stride4 = dst_stride2 << 1;
|
|
91
|
-
__m128i src0, src1, src2, src3, dst0, dst1, dst2, dst3;
|
|
92
|
-
__m128i tmp0, tmp1, tmp2, tmp3;
|
|
93
|
-
__m128i reg0, reg1, reg2, reg3, reg4, reg5, reg6, reg7;
|
|
94
|
-
__m128i res0, res1, res2, res3, res4, res5, res6, res7, res8, res9;
|
|
95
|
-
|
|
96
|
-
for (x = 0; x < len; x++) {
|
|
97
|
-
s = (uint8_t*)src;
|
|
98
|
-
src0 = __lsx_vld(s, 0);
|
|
99
|
-
src1 = __lsx_vldx(s, src_stride);
|
|
100
|
-
src2 = __lsx_vldx(s, src_stride2);
|
|
101
|
-
src3 = __lsx_vldx(s, src_stride3);
|
|
102
|
-
s += src_stride4;
|
|
103
|
-
ILVLH_B(src0, src1, src2, src3, tmp0, tmp1, tmp2, tmp3);
|
|
104
|
-
ILVLH_H(tmp0, tmp2, tmp1, tmp3, reg0, reg1, reg2, reg3);
|
|
105
|
-
src0 = __lsx_vld(s, 0);
|
|
106
|
-
src1 = __lsx_vldx(s, src_stride);
|
|
107
|
-
src2 = __lsx_vldx(s, src_stride2);
|
|
108
|
-
src3 = __lsx_vldx(s, src_stride3);
|
|
109
|
-
s += src_stride4;
|
|
110
|
-
ILVLH_B(src0, src1, src2, src3, tmp0, tmp1, tmp2, tmp3);
|
|
111
|
-
ILVLH_H(tmp0, tmp2, tmp1, tmp3, reg4, reg5, reg6, reg7);
|
|
112
|
-
ILVLH_W(reg0, reg4, reg1, reg5, res0, res1, res2, res3);
|
|
113
|
-
ILVLH_W(reg2, reg6, reg3, reg7, res4, res5, res6, res7);
|
|
114
|
-
src0 = __lsx_vld(s, 0);
|
|
115
|
-
src1 = __lsx_vldx(s, src_stride);
|
|
116
|
-
src2 = __lsx_vldx(s, src_stride2);
|
|
117
|
-
src3 = __lsx_vldx(s, src_stride3);
|
|
118
|
-
s += src_stride4;
|
|
119
|
-
ILVLH_B(src0, src1, src2, src3, tmp0, tmp1, tmp2, tmp3);
|
|
120
|
-
ILVLH_H(tmp0, tmp2, tmp1, tmp3, reg0, reg1, reg2, reg3);
|
|
121
|
-
src0 = __lsx_vld(s, 0);
|
|
122
|
-
src1 = __lsx_vldx(s, src_stride);
|
|
123
|
-
src2 = __lsx_vldx(s, src_stride2);
|
|
124
|
-
src3 = __lsx_vldx(s, src_stride3);
|
|
125
|
-
s += src_stride4;
|
|
126
|
-
ILVLH_B(src0, src1, src2, src3, tmp0, tmp1, tmp2, tmp3);
|
|
127
|
-
ILVLH_H(tmp0, tmp2, tmp1, tmp3, reg4, reg5, reg6, reg7);
|
|
128
|
-
res8 = __lsx_vilvl_w(reg4, reg0);
|
|
129
|
-
res9 = __lsx_vilvh_w(reg4, reg0);
|
|
130
|
-
ILVLH_D(res0, res8, res1, res9, dst0, dst1, dst2, dst3);
|
|
131
|
-
LSX_ST_4(dst0, dst1, dst2, dst3, dst, dst_stride, dst_stride2, dst_stride3,
|
|
132
|
-
dst_stride4);
|
|
133
|
-
res8 = __lsx_vilvl_w(reg5, reg1);
|
|
134
|
-
res9 = __lsx_vilvh_w(reg5, reg1);
|
|
135
|
-
ILVLH_D(res2, res8, res3, res9, dst0, dst1, dst2, dst3);
|
|
136
|
-
LSX_ST_4(dst0, dst1, dst2, dst3, dst, dst_stride, dst_stride2, dst_stride3,
|
|
137
|
-
dst_stride4);
|
|
138
|
-
res8 = __lsx_vilvl_w(reg6, reg2);
|
|
139
|
-
res9 = __lsx_vilvh_w(reg6, reg2);
|
|
140
|
-
ILVLH_D(res4, res8, res5, res9, dst0, dst1, dst2, dst3);
|
|
141
|
-
LSX_ST_4(dst0, dst1, dst2, dst3, dst, dst_stride, dst_stride2, dst_stride3,
|
|
142
|
-
dst_stride4);
|
|
143
|
-
res8 = __lsx_vilvl_w(reg7, reg3);
|
|
144
|
-
res9 = __lsx_vilvh_w(reg7, reg3);
|
|
145
|
-
ILVLH_D(res6, res8, res7, res9, dst0, dst1, dst2, dst3);
|
|
146
|
-
LSX_ST_4(dst0, dst1, dst2, dst3, dst, dst_stride, dst_stride2, dst_stride3,
|
|
147
|
-
dst_stride4);
|
|
148
|
-
src += 16;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
void TransposeUVWx16_LSX(const uint8_t* src,
|
|
153
|
-
int src_stride,
|
|
154
|
-
uint8_t* dst_a,
|
|
155
|
-
int dst_stride_a,
|
|
156
|
-
uint8_t* dst_b,
|
|
157
|
-
int dst_stride_b,
|
|
158
|
-
int width) {
|
|
159
|
-
int x;
|
|
160
|
-
int len = width / 8;
|
|
161
|
-
uint8_t* s;
|
|
162
|
-
int src_stride2 = src_stride << 1;
|
|
163
|
-
int src_stride3 = src_stride + src_stride2;
|
|
164
|
-
int src_stride4 = src_stride2 << 1;
|
|
165
|
-
int dst_stride_a2 = dst_stride_a << 1;
|
|
166
|
-
int dst_stride_b2 = dst_stride_b << 1;
|
|
167
|
-
__m128i src0, src1, src2, src3, dst0, dst1, dst2, dst3;
|
|
168
|
-
__m128i tmp0, tmp1, tmp2, tmp3;
|
|
169
|
-
__m128i reg0, reg1, reg2, reg3, reg4, reg5, reg6, reg7;
|
|
170
|
-
__m128i res0, res1, res2, res3, res4, res5, res6, res7, res8, res9;
|
|
171
|
-
|
|
172
|
-
for (x = 0; x < len; x++) {
|
|
173
|
-
s = (uint8_t*)src;
|
|
174
|
-
src0 = __lsx_vld(s, 0);
|
|
175
|
-
src1 = __lsx_vldx(s, src_stride);
|
|
176
|
-
src2 = __lsx_vldx(s, src_stride2);
|
|
177
|
-
src3 = __lsx_vldx(s, src_stride3);
|
|
178
|
-
s += src_stride4;
|
|
179
|
-
ILVLH_B(src0, src1, src2, src3, tmp0, tmp1, tmp2, tmp3);
|
|
180
|
-
ILVLH_H(tmp0, tmp2, tmp1, tmp3, reg0, reg1, reg2, reg3);
|
|
181
|
-
src0 = __lsx_vld(s, 0);
|
|
182
|
-
src1 = __lsx_vldx(s, src_stride);
|
|
183
|
-
src2 = __lsx_vldx(s, src_stride2);
|
|
184
|
-
src3 = __lsx_vldx(s, src_stride3);
|
|
185
|
-
s += src_stride4;
|
|
186
|
-
ILVLH_B(src0, src1, src2, src3, tmp0, tmp1, tmp2, tmp3);
|
|
187
|
-
ILVLH_H(tmp0, tmp2, tmp1, tmp3, reg4, reg5, reg6, reg7);
|
|
188
|
-
ILVLH_W(reg0, reg4, reg1, reg5, res0, res1, res2, res3);
|
|
189
|
-
ILVLH_W(reg2, reg6, reg3, reg7, res4, res5, res6, res7);
|
|
190
|
-
src0 = __lsx_vld(s, 0);
|
|
191
|
-
src1 = __lsx_vldx(s, src_stride);
|
|
192
|
-
src2 = __lsx_vldx(s, src_stride2);
|
|
193
|
-
src3 = __lsx_vldx(s, src_stride3);
|
|
194
|
-
s += src_stride4;
|
|
195
|
-
ILVLH_B(src0, src1, src2, src3, tmp0, tmp1, tmp2, tmp3);
|
|
196
|
-
ILVLH_H(tmp0, tmp2, tmp1, tmp3, reg0, reg1, reg2, reg3);
|
|
197
|
-
src0 = __lsx_vld(s, 0);
|
|
198
|
-
src1 = __lsx_vldx(s, src_stride);
|
|
199
|
-
src2 = __lsx_vldx(s, src_stride2);
|
|
200
|
-
src3 = __lsx_vldx(s, src_stride3);
|
|
201
|
-
s += src_stride4;
|
|
202
|
-
ILVLH_B(src0, src1, src2, src3, tmp0, tmp1, tmp2, tmp3);
|
|
203
|
-
ILVLH_H(tmp0, tmp2, tmp1, tmp3, reg4, reg5, reg6, reg7);
|
|
204
|
-
res8 = __lsx_vilvl_w(reg4, reg0);
|
|
205
|
-
res9 = __lsx_vilvh_w(reg4, reg0);
|
|
206
|
-
ILVLH_D(res0, res8, res1, res9, dst0, dst1, dst2, dst3);
|
|
207
|
-
LSX_ST_2(dst0, dst2, dst_a, dst_stride_a, dst_stride_a2);
|
|
208
|
-
LSX_ST_2(dst1, dst3, dst_b, dst_stride_b, dst_stride_b2);
|
|
209
|
-
res8 = __lsx_vilvl_w(reg5, reg1);
|
|
210
|
-
res9 = __lsx_vilvh_w(reg5, reg1);
|
|
211
|
-
ILVLH_D(res2, res8, res3, res9, dst0, dst1, dst2, dst3);
|
|
212
|
-
LSX_ST_2(dst0, dst2, dst_a, dst_stride_a, dst_stride_a2);
|
|
213
|
-
LSX_ST_2(dst1, dst3, dst_b, dst_stride_b, dst_stride_b2);
|
|
214
|
-
res8 = __lsx_vilvl_w(reg6, reg2);
|
|
215
|
-
res9 = __lsx_vilvh_w(reg6, reg2);
|
|
216
|
-
ILVLH_D(res4, res8, res5, res9, dst0, dst1, dst2, dst3);
|
|
217
|
-
LSX_ST_2(dst0, dst2, dst_a, dst_stride_a, dst_stride_a2);
|
|
218
|
-
LSX_ST_2(dst1, dst3, dst_b, dst_stride_b, dst_stride_b2);
|
|
219
|
-
res8 = __lsx_vilvl_w(reg7, reg3);
|
|
220
|
-
res9 = __lsx_vilvh_w(reg7, reg3);
|
|
221
|
-
ILVLH_D(res6, res8, res7, res9, dst0, dst1, dst2, dst3);
|
|
222
|
-
LSX_ST_2(dst0, dst2, dst_a, dst_stride_a, dst_stride_a2);
|
|
223
|
-
LSX_ST_2(dst1, dst3, dst_b, dst_stride_b, dst_stride_b2);
|
|
224
|
-
src += 16;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
#ifdef __cplusplus
|
|
229
|
-
} // extern "C"
|
|
230
|
-
} // namespace libyuv
|
|
231
|
-
#endif
|
|
232
|
-
|
|
233
|
-
#endif // !defined(LIBYUV_DISABLE_LSX) && defined(__loongarch_sx)
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2011 The LibYuv Project Authors. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed by a BSD-style license
|
|
5
|
-
* that can be found in the LICENSE file in the root of the source
|
|
6
|
-
* tree. An additional intellectual property rights grant can be found
|
|
7
|
-
* in the file PATENTS. All contributing project authors may
|
|
8
|
-
* be found in the AUTHORS file in the root of the source tree.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "libyuv/rotate_row.h"
|
|
12
|
-
#include "libyuv/row.h"
|
|
13
|
-
|
|
14
|
-
#include "libyuv/basic_types.h"
|
|
15
|
-
|
|
16
|
-
#ifdef __cplusplus
|
|
17
|
-
namespace libyuv {
|
|
18
|
-
extern "C" {
|
|
19
|
-
#endif
|
|
20
|
-
|
|
21
|
-
#if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__) && \
|
|
22
|
-
!defined(__aarch64__)
|
|
23
|
-
|
|
24
|
-
void TransposeWx8_NEON(const uint8_t* src,
|
|
25
|
-
int src_stride,
|
|
26
|
-
uint8_t* dst,
|
|
27
|
-
int dst_stride,
|
|
28
|
-
int width) {
|
|
29
|
-
const uint8_t* temp;
|
|
30
|
-
asm volatile(
|
|
31
|
-
// loops are on blocks of 8. loop will stop when
|
|
32
|
-
// counter gets to or below 0. starting the counter
|
|
33
|
-
// at w-8 allow for this
|
|
34
|
-
"sub %[width], #8 \n"
|
|
35
|
-
|
|
36
|
-
"1: \n"
|
|
37
|
-
"mov %[temp], %[src] \n"
|
|
38
|
-
"vld1.8 {d0}, [%[temp]], %[src_stride] \n"
|
|
39
|
-
"vld1.8 {d1}, [%[temp]], %[src_stride] \n"
|
|
40
|
-
"vld1.8 {d2}, [%[temp]], %[src_stride] \n"
|
|
41
|
-
"vld1.8 {d3}, [%[temp]], %[src_stride] \n"
|
|
42
|
-
"vld1.8 {d4}, [%[temp]], %[src_stride] \n"
|
|
43
|
-
"vld1.8 {d5}, [%[temp]], %[src_stride] \n"
|
|
44
|
-
"vld1.8 {d6}, [%[temp]], %[src_stride] \n"
|
|
45
|
-
"vld1.8 {d7}, [%[temp]] \n"
|
|
46
|
-
"add %[src], #8 \n"
|
|
47
|
-
|
|
48
|
-
"vtrn.8 d1, d0 \n"
|
|
49
|
-
"vtrn.8 d3, d2 \n"
|
|
50
|
-
"vtrn.8 d5, d4 \n"
|
|
51
|
-
"vtrn.8 d7, d6 \n"
|
|
52
|
-
"subs %[width], #8 \n"
|
|
53
|
-
|
|
54
|
-
"vtrn.16 d1, d3 \n"
|
|
55
|
-
"vtrn.16 d0, d2 \n"
|
|
56
|
-
"vtrn.16 d5, d7 \n"
|
|
57
|
-
"vtrn.16 d4, d6 \n"
|
|
58
|
-
|
|
59
|
-
"vtrn.32 d1, d5 \n"
|
|
60
|
-
"vtrn.32 d0, d4 \n"
|
|
61
|
-
"vtrn.32 d3, d7 \n"
|
|
62
|
-
"vtrn.32 d2, d6 \n"
|
|
63
|
-
|
|
64
|
-
"vrev16.8 q0, q0 \n"
|
|
65
|
-
"vrev16.8 q1, q1 \n"
|
|
66
|
-
"vrev16.8 q2, q2 \n"
|
|
67
|
-
"vrev16.8 q3, q3 \n"
|
|
68
|
-
|
|
69
|
-
"mov %[temp], %[dst] \n"
|
|
70
|
-
"vst1.8 {d1}, [%[temp]], %[dst_stride] \n"
|
|
71
|
-
"vst1.8 {d0}, [%[temp]], %[dst_stride] \n"
|
|
72
|
-
"vst1.8 {d3}, [%[temp]], %[dst_stride] \n"
|
|
73
|
-
"vst1.8 {d2}, [%[temp]], %[dst_stride] \n"
|
|
74
|
-
"vst1.8 {d5}, [%[temp]], %[dst_stride] \n"
|
|
75
|
-
"vst1.8 {d4}, [%[temp]], %[dst_stride] \n"
|
|
76
|
-
"vst1.8 {d7}, [%[temp]], %[dst_stride] \n"
|
|
77
|
-
"vst1.8 {d6}, [%[temp]] \n"
|
|
78
|
-
"add %[dst], %[dst], %[dst_stride], lsl #3 \n"
|
|
79
|
-
|
|
80
|
-
"bge 1b \n"
|
|
81
|
-
: [temp] "=&r"(temp), // %[temp]
|
|
82
|
-
[src] "+r"(src), // %[src]
|
|
83
|
-
[dst] "+r"(dst), // %[dst]
|
|
84
|
-
[width] "+r"(width) // %[width]
|
|
85
|
-
: [src_stride] "r"(src_stride), // %[src_stride]
|
|
86
|
-
[dst_stride] "r"(dst_stride) // %[dst_stride]
|
|
87
|
-
: "memory", "cc", "q0", "q1", "q2", "q3");
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
void TransposeUVWx8_NEON(const uint8_t* src,
|
|
91
|
-
int src_stride,
|
|
92
|
-
uint8_t* dst_a,
|
|
93
|
-
int dst_stride_a,
|
|
94
|
-
uint8_t* dst_b,
|
|
95
|
-
int dst_stride_b,
|
|
96
|
-
int width) {
|
|
97
|
-
const uint8_t* temp;
|
|
98
|
-
asm volatile(
|
|
99
|
-
// loops are on blocks of 8. loop will stop when
|
|
100
|
-
// counter gets to or below 0. starting the counter
|
|
101
|
-
// at w-8 allow for this
|
|
102
|
-
"sub %[width], #8 \n"
|
|
103
|
-
|
|
104
|
-
"1: \n"
|
|
105
|
-
"mov %[temp], %[src] \n"
|
|
106
|
-
"vld2.8 {d0, d1}, [%[temp]], %[src_stride] \n"
|
|
107
|
-
"vld2.8 {d2, d3}, [%[temp]], %[src_stride] \n"
|
|
108
|
-
"vld2.8 {d4, d5}, [%[temp]], %[src_stride] \n"
|
|
109
|
-
"vld2.8 {d6, d7}, [%[temp]], %[src_stride] \n"
|
|
110
|
-
"vld2.8 {d16, d17}, [%[temp]], %[src_stride] \n"
|
|
111
|
-
"vld2.8 {d18, d19}, [%[temp]], %[src_stride] \n"
|
|
112
|
-
"vld2.8 {d20, d21}, [%[temp]], %[src_stride] \n"
|
|
113
|
-
"vld2.8 {d22, d23}, [%[temp]] \n"
|
|
114
|
-
"add %[src], #8*2 \n"
|
|
115
|
-
|
|
116
|
-
"vtrn.8 q1, q0 \n"
|
|
117
|
-
"vtrn.8 q3, q2 \n"
|
|
118
|
-
"vtrn.8 q9, q8 \n"
|
|
119
|
-
"vtrn.8 q11, q10 \n"
|
|
120
|
-
"subs %[width], #8 \n"
|
|
121
|
-
|
|
122
|
-
"vtrn.16 q1, q3 \n"
|
|
123
|
-
"vtrn.16 q0, q2 \n"
|
|
124
|
-
"vtrn.16 q9, q11 \n"
|
|
125
|
-
"vtrn.16 q8, q10 \n"
|
|
126
|
-
|
|
127
|
-
"vtrn.32 q1, q9 \n"
|
|
128
|
-
"vtrn.32 q0, q8 \n"
|
|
129
|
-
"vtrn.32 q3, q11 \n"
|
|
130
|
-
"vtrn.32 q2, q10 \n"
|
|
131
|
-
|
|
132
|
-
"vrev16.8 q0, q0 \n"
|
|
133
|
-
"vrev16.8 q1, q1 \n"
|
|
134
|
-
"vrev16.8 q2, q2 \n"
|
|
135
|
-
"vrev16.8 q3, q3 \n"
|
|
136
|
-
"vrev16.8 q8, q8 \n"
|
|
137
|
-
"vrev16.8 q9, q9 \n"
|
|
138
|
-
"vrev16.8 q10, q10 \n"
|
|
139
|
-
"vrev16.8 q11, q11 \n"
|
|
140
|
-
|
|
141
|
-
"mov %[temp], %[dst_a] \n"
|
|
142
|
-
"vst1.8 {d2}, [%[temp]], %[dst_stride_a] \n"
|
|
143
|
-
"vst1.8 {d0}, [%[temp]], %[dst_stride_a] \n"
|
|
144
|
-
"vst1.8 {d6}, [%[temp]], %[dst_stride_a] \n"
|
|
145
|
-
"vst1.8 {d4}, [%[temp]], %[dst_stride_a] \n"
|
|
146
|
-
"vst1.8 {d18}, [%[temp]], %[dst_stride_a] \n"
|
|
147
|
-
"vst1.8 {d16}, [%[temp]], %[dst_stride_a] \n"
|
|
148
|
-
"vst1.8 {d22}, [%[temp]], %[dst_stride_a] \n"
|
|
149
|
-
"vst1.8 {d20}, [%[temp]] \n"
|
|
150
|
-
"add %[dst_a], %[dst_a], %[dst_stride_a], lsl #3 \n"
|
|
151
|
-
|
|
152
|
-
"mov %[temp], %[dst_b] \n"
|
|
153
|
-
"vst1.8 {d3}, [%[temp]], %[dst_stride_b] \n"
|
|
154
|
-
"vst1.8 {d1}, [%[temp]], %[dst_stride_b] \n"
|
|
155
|
-
"vst1.8 {d7}, [%[temp]], %[dst_stride_b] \n"
|
|
156
|
-
"vst1.8 {d5}, [%[temp]], %[dst_stride_b] \n"
|
|
157
|
-
"vst1.8 {d19}, [%[temp]], %[dst_stride_b] \n"
|
|
158
|
-
"vst1.8 {d17}, [%[temp]], %[dst_stride_b] \n"
|
|
159
|
-
"vst1.8 {d23}, [%[temp]], %[dst_stride_b] \n"
|
|
160
|
-
"vst1.8 {d21}, [%[temp]] \n"
|
|
161
|
-
"add %[dst_b], %[dst_b], %[dst_stride_b], lsl #3 \n"
|
|
162
|
-
|
|
163
|
-
"bge 1b \n"
|
|
164
|
-
: [temp] "=&r"(temp), // %[temp]
|
|
165
|
-
[src] "+r"(src), // %[src]
|
|
166
|
-
[dst_a] "+r"(dst_a), // %[dst_a]
|
|
167
|
-
[dst_b] "+r"(dst_b), // %[dst_b]
|
|
168
|
-
[width] "+r"(width) // %[width]
|
|
169
|
-
: [src_stride] "r"(src_stride), // %[src_stride]
|
|
170
|
-
[dst_stride_a] "r"(dst_stride_a), // %[dst_stride_a]
|
|
171
|
-
[dst_stride_b] "r"(dst_stride_b) // %[dst_stride_b]
|
|
172
|
-
: "memory", "cc", "q0", "q1", "q2", "q3", "q8", "q9", "q10", "q11");
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// Transpose 32 bit values (ARGB)
|
|
176
|
-
void Transpose4x4_32_NEON(const uint8_t* src,
|
|
177
|
-
int src_stride,
|
|
178
|
-
uint8_t* dst,
|
|
179
|
-
int dst_stride,
|
|
180
|
-
int width) {
|
|
181
|
-
const uint8_t* src1 = src + src_stride;
|
|
182
|
-
const uint8_t* src2 = src1 + src_stride;
|
|
183
|
-
const uint8_t* src3 = src2 + src_stride;
|
|
184
|
-
uint8_t* dst1 = dst + dst_stride;
|
|
185
|
-
uint8_t* dst2 = dst1 + dst_stride;
|
|
186
|
-
uint8_t* dst3 = dst2 + dst_stride;
|
|
187
|
-
asm volatile(
|
|
188
|
-
// Main loop transpose 4x4. Read a column, write a row.
|
|
189
|
-
"1: \n"
|
|
190
|
-
"vld4.32 {d0[0], d2[0], d4[0], d6[0]}, [%0], %9 \n"
|
|
191
|
-
"vld4.32 {d0[1], d2[1], d4[1], d6[1]}, [%1], %9 \n"
|
|
192
|
-
"vld4.32 {d1[0], d3[0], d5[0], d7[0]}, [%2], %9 \n"
|
|
193
|
-
"vld4.32 {d1[1], d3[1], d5[1], d7[1]}, [%3], %9 \n"
|
|
194
|
-
"subs %8, %8, #4 \n" // w -= 4
|
|
195
|
-
"vst1.8 {q0}, [%4]! \n"
|
|
196
|
-
"vst1.8 {q1}, [%5]! \n"
|
|
197
|
-
"vst1.8 {q2}, [%6]! \n"
|
|
198
|
-
"vst1.8 {q3}, [%7]! \n"
|
|
199
|
-
"bgt 1b \n"
|
|
200
|
-
|
|
201
|
-
: "+r"(src), // %0
|
|
202
|
-
"+r"(src1), // %1
|
|
203
|
-
"+r"(src2), // %2
|
|
204
|
-
"+r"(src3), // %3
|
|
205
|
-
"+r"(dst), // %4
|
|
206
|
-
"+r"(dst1), // %5
|
|
207
|
-
"+r"(dst2), // %6
|
|
208
|
-
"+r"(dst3), // %7
|
|
209
|
-
"+r"(width) // %8
|
|
210
|
-
: "r"((ptrdiff_t)(src_stride * 4)) // %9
|
|
211
|
-
: "memory", "cc", "q0", "q1", "q2", "q3");
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
#endif // defined(__ARM_NEON__) && !defined(__aarch64__)
|
|
215
|
-
|
|
216
|
-
#ifdef __cplusplus
|
|
217
|
-
} // extern "C"
|
|
218
|
-
} // namespace libyuv
|
|
219
|
-
#endif
|