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,296 +0,0 @@
|
|
|
1
|
-
# Getting Started
|
|
2
|
-
|
|
3
|
-
How to get and build the libyuv code.
|
|
4
|
-
|
|
5
|
-
## Pre-requisites
|
|
6
|
-
|
|
7
|
-
You'll need to have depot tools installed: https://www.chromium.org/developers/how-tos/install-depot-tools
|
|
8
|
-
Refer to chromium instructions for each platform for other prerequisites.
|
|
9
|
-
|
|
10
|
-
## Getting the Code
|
|
11
|
-
|
|
12
|
-
Create a working directory, enter it, and run:
|
|
13
|
-
|
|
14
|
-
fetch libyuv
|
|
15
|
-
|
|
16
|
-
For iOS add `;target_os=['ios'];` to your OSX .gclient and run `gclient sync.`
|
|
17
|
-
|
|
18
|
-
Browse the Git reprository: https://chromium.googlesource.com/libyuv/libyuv/+/master
|
|
19
|
-
|
|
20
|
-
### Android
|
|
21
|
-
For Android add `;target_os=['android'];` to your Linux .gclient
|
|
22
|
-
|
|
23
|
-
solutions = [
|
|
24
|
-
{ "name" : "src",
|
|
25
|
-
"url" : "https://chromium.googlesource.com/libyuv/libyuv",
|
|
26
|
-
"deps_file" : "DEPS",
|
|
27
|
-
"managed" : True,
|
|
28
|
-
"custom_deps" : {
|
|
29
|
-
},
|
|
30
|
-
"safesync_url": "",
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
target_os = ["android", "linux"];
|
|
34
|
-
|
|
35
|
-
Then run:
|
|
36
|
-
|
|
37
|
-
gclient sync
|
|
38
|
-
|
|
39
|
-
To get just the source (not buildable):
|
|
40
|
-
|
|
41
|
-
git clone https://chromium.googlesource.com/libyuv/libyuv
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
## Building the Library and Unittests
|
|
45
|
-
|
|
46
|
-
### Windows
|
|
47
|
-
|
|
48
|
-
gn gen out\Release "--args=is_debug=false target_cpu=\"x64\""
|
|
49
|
-
gn gen out\Debug "--args=is_debug=true target_cpu=\"x64\""
|
|
50
|
-
ninja -v -C out\Release
|
|
51
|
-
ninja -v -C out\Debug
|
|
52
|
-
|
|
53
|
-
gn gen out\Release "--args=is_debug=false target_cpu=\"x86\""
|
|
54
|
-
gn gen out\Debug "--args=is_debug=true target_cpu=\"x86\""
|
|
55
|
-
ninja -v -C out\Release
|
|
56
|
-
ninja -v -C out\Debug
|
|
57
|
-
|
|
58
|
-
### macOS and Linux
|
|
59
|
-
|
|
60
|
-
gn gen out/Release "--args=is_debug=false"
|
|
61
|
-
gn gen out/Debug "--args=is_debug=true"
|
|
62
|
-
ninja -v -C out/Release
|
|
63
|
-
ninja -v -C out/Debug
|
|
64
|
-
|
|
65
|
-
### Building Offical with GN
|
|
66
|
-
|
|
67
|
-
gn gen out/Official "--args=is_debug=false is_official_build=true is_chrome_branded=true"
|
|
68
|
-
ninja -C out/Official
|
|
69
|
-
|
|
70
|
-
### iOS
|
|
71
|
-
http://www.chromium.org/developers/how-tos/build-instructions-ios
|
|
72
|
-
|
|
73
|
-
Add to .gclient last line: `target_os=['ios'];`
|
|
74
|
-
|
|
75
|
-
arm64
|
|
76
|
-
|
|
77
|
-
gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_signing=false target_cpu=\"arm64\""
|
|
78
|
-
gn gen out/Debug "--args=is_debug=true target_os=\"ios\" ios_enable_code_signing=false target_cpu=\"arm64\""
|
|
79
|
-
ninja -v -C out/Debug libyuv_unittest
|
|
80
|
-
ninja -v -C out/Release libyuv_unittest
|
|
81
|
-
|
|
82
|
-
ios simulator
|
|
83
|
-
|
|
84
|
-
gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_signing=false use_xcode_clang=true target_cpu=\"x86\""
|
|
85
|
-
gn gen out/Debug "--args=is_debug=true target_os=\"ios\" ios_enable_code_signing=false use_xcode_clang=true target_cpu=\"x86\""
|
|
86
|
-
ninja -v -C out/Debug libyuv_unittest
|
|
87
|
-
ninja -v -C out/Release libyuv_unittest
|
|
88
|
-
|
|
89
|
-
ios disassembly
|
|
90
|
-
|
|
91
|
-
otool -tV ./out/Release/obj/libyuv_neon/row_neon64.o >row_neon64.txt
|
|
92
|
-
|
|
93
|
-
### Android
|
|
94
|
-
https://code.google.com/p/chromium/wiki/AndroidBuildInstructions
|
|
95
|
-
|
|
96
|
-
Add to .gclient last line: `target_os=['android'];`
|
|
97
|
-
|
|
98
|
-
arm64
|
|
99
|
-
|
|
100
|
-
gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"arm64\""
|
|
101
|
-
gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"arm64\""
|
|
102
|
-
ninja -v -C out/Debug libyuv_unittest
|
|
103
|
-
ninja -v -C out/Release libyuv_unittest
|
|
104
|
-
|
|
105
|
-
armv7
|
|
106
|
-
|
|
107
|
-
gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"arm\""
|
|
108
|
-
gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"arm\""
|
|
109
|
-
ninja -v -C out/Debug libyuv_unittest
|
|
110
|
-
ninja -v -C out/Release libyuv_unittest
|
|
111
|
-
|
|
112
|
-
ia32
|
|
113
|
-
|
|
114
|
-
gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"x86\""
|
|
115
|
-
gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"x86\""
|
|
116
|
-
ninja -v -C out/Debug libyuv_unittest
|
|
117
|
-
ninja -v -C out/Release libyuv_unittest
|
|
118
|
-
|
|
119
|
-
arm disassembly:
|
|
120
|
-
|
|
121
|
-
llvm-objdump -d ./out/Release/obj/libyuv/row_common.o >row_common.txt
|
|
122
|
-
|
|
123
|
-
llvm-objdump -d ./out/Release/obj/libyuv_neon/row_neon.o >row_neon.txt
|
|
124
|
-
|
|
125
|
-
llvm-objdump -d ./out/Release/obj/libyuv_neon/row_neon64.o >row_neon64.txt
|
|
126
|
-
|
|
127
|
-
Caveat: Disassembly may require optimize_max be disabled in BUILD.gn
|
|
128
|
-
|
|
129
|
-
Running tests:
|
|
130
|
-
|
|
131
|
-
out/Release/bin/run_libyuv_unittest -vv --gtest_filter=*
|
|
132
|
-
|
|
133
|
-
Running test as benchmark:
|
|
134
|
-
|
|
135
|
-
out/Release/bin/run_libyuv_unittest -vv --gtest_filter=* --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=-1 --libyuv_cpu_info=-1
|
|
136
|
-
|
|
137
|
-
Running test with C code:
|
|
138
|
-
|
|
139
|
-
out/Release/bin/run_libyuv_unittest -vv --gtest_filter=* --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=1 --libyuv_cpu_info=1
|
|
140
|
-
|
|
141
|
-
### Build targets
|
|
142
|
-
|
|
143
|
-
ninja -C out/Debug libyuv
|
|
144
|
-
ninja -C out/Debug libyuv_unittest
|
|
145
|
-
ninja -C out/Debug compare
|
|
146
|
-
ninja -C out/Debug yuvconvert
|
|
147
|
-
ninja -C out/Debug yuvconstants
|
|
148
|
-
ninja -C out/Debug psnr
|
|
149
|
-
ninja -C out/Debug cpuid
|
|
150
|
-
|
|
151
|
-
### ARM Linux
|
|
152
|
-
|
|
153
|
-
gn gen out/Release "--args=is_debug=false target_cpu=\"arm64\""
|
|
154
|
-
gn gen out/Debug "--args=is_debug=true target_cpu=\"arm64\""
|
|
155
|
-
ninja -v -C out/Debug libyuv_unittest
|
|
156
|
-
ninja -v -C out/Release libyuv_unittest
|
|
157
|
-
|
|
158
|
-
## Building the Library with make
|
|
159
|
-
|
|
160
|
-
### Linux
|
|
161
|
-
|
|
162
|
-
make V=1 -f linux.mk
|
|
163
|
-
make V=1 -f linux.mk clean
|
|
164
|
-
make V=1 -f linux.mk CXX=clang++ CC=clang
|
|
165
|
-
|
|
166
|
-
## Building the library with cmake
|
|
167
|
-
|
|
168
|
-
Install cmake: http://www.cmake.org/
|
|
169
|
-
|
|
170
|
-
### Default debug build:
|
|
171
|
-
|
|
172
|
-
mkdir out
|
|
173
|
-
cd out
|
|
174
|
-
cmake ..
|
|
175
|
-
cmake --build .
|
|
176
|
-
|
|
177
|
-
### Release build/install
|
|
178
|
-
|
|
179
|
-
mkdir out
|
|
180
|
-
cd out
|
|
181
|
-
cmake -DCMAKE_INSTALL_PREFIX="/usr/lib" -DCMAKE_BUILD_TYPE="Release" ..
|
|
182
|
-
cmake --build . --config Release
|
|
183
|
-
sudo cmake --build . --target install --config Release
|
|
184
|
-
|
|
185
|
-
### Build RPM/DEB packages
|
|
186
|
-
|
|
187
|
-
mkdir out
|
|
188
|
-
cd out
|
|
189
|
-
cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
190
|
-
make -j4
|
|
191
|
-
make package
|
|
192
|
-
|
|
193
|
-
## Building RISC-V target with cmake
|
|
194
|
-
|
|
195
|
-
### Prerequisite: build risc-v clang toolchain and qemu
|
|
196
|
-
|
|
197
|
-
If you don't have prebuilt clang and riscv64 qemu, run the script to download source and build them.
|
|
198
|
-
|
|
199
|
-
./riscv_script/prepare_toolchain_qemu.sh
|
|
200
|
-
|
|
201
|
-
After running script, clang & qemu are built in `build-toolchain-qemu/riscv-clang/` & `build-toolchain-qemu/riscv-qemu/`.
|
|
202
|
-
|
|
203
|
-
### Cross-compile for RISC-V target
|
|
204
|
-
cmake -B out/Release/ -DUNIT_TEST=ON \
|
|
205
|
-
-DCMAKE_BUILD_TYPE=Release \
|
|
206
|
-
-DCMAKE_TOOLCHAIN_FILE="./riscv_script/riscv-clang.cmake" \
|
|
207
|
-
-DTOOLCHAIN_PATH={TOOLCHAIN_PATH} \
|
|
208
|
-
-DUSE_RVV=ON .
|
|
209
|
-
cmake --build out/Release/
|
|
210
|
-
|
|
211
|
-
#### Customized Compiler Flags
|
|
212
|
-
|
|
213
|
-
Customized compiler flags are supported by `-DRISCV_COMPILER_FLAGS="xxx"`.
|
|
214
|
-
If `-DRISCV_COMPILER_FLAGS="xxx"` is manually assigned, other compile flags(e.g disable -march=xxx) will not be appended.
|
|
215
|
-
|
|
216
|
-
Example:
|
|
217
|
-
|
|
218
|
-
cmake -B out/Release/ -DUNIT_TEST=ON \
|
|
219
|
-
-DCMAKE_BUILD_TYPE=Release \
|
|
220
|
-
-DCMAKE_TOOLCHAIN_FILE="./riscv_script/riscv-clang.cmake" \
|
|
221
|
-
-DRISCV_COMPILER_FLAGS="-mcpu=sifive-x280" \
|
|
222
|
-
.
|
|
223
|
-
|
|
224
|
-
### Run on QEMU
|
|
225
|
-
|
|
226
|
-
#### Run libyuv_unittest on QEMU
|
|
227
|
-
cd out/Release/
|
|
228
|
-
USE_RVV=ON \
|
|
229
|
-
TOOLCHAIN_PATH={TOOLCHAIN_PATH} \
|
|
230
|
-
QEMU_PREFIX_PATH={QEMU_PREFIX_PATH} \
|
|
231
|
-
../../riscv_script/run_qemu.sh libyuv_unittest
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
## Setup for Arm Cross compile
|
|
235
|
-
|
|
236
|
-
See also https://www.ccoderun.ca/programming/2015-12-20_CrossCompiling/index.html
|
|
237
|
-
|
|
238
|
-
sudo apt-get install ssh dkms build-essential linux-headers-generic
|
|
239
|
-
sudo apt-get install kdevelop cmake git subversion
|
|
240
|
-
sudo apt-get install graphviz doxygen doxygen-gui
|
|
241
|
-
sudo apt-get install manpages manpages-dev manpages-posix manpages-posix-dev
|
|
242
|
-
sudo apt-get install libboost-all-dev libboost-dev libssl-dev
|
|
243
|
-
sudo apt-get install rpm terminator fish
|
|
244
|
-
sudo apt-get install g++-arm-linux-gnueabihf gcc-arm-linux-gnueabihf
|
|
245
|
-
|
|
246
|
-
### Build psnr tool
|
|
247
|
-
|
|
248
|
-
cd util
|
|
249
|
-
arm-linux-gnueabihf-g++ psnr_main.cc psnr.cc ssim.cc -o psnr
|
|
250
|
-
arm-linux-gnueabihf-objdump -d psnr
|
|
251
|
-
|
|
252
|
-
## Running Unittests
|
|
253
|
-
|
|
254
|
-
### Windows
|
|
255
|
-
|
|
256
|
-
out\Release\libyuv_unittest.exe --gtest_catch_exceptions=0 --gtest_filter="*"
|
|
257
|
-
|
|
258
|
-
### macOS and Linux
|
|
259
|
-
|
|
260
|
-
out/Release/libyuv_unittest --gtest_filter="*"
|
|
261
|
-
|
|
262
|
-
Replace --gtest_filter="*" with specific unittest to run. May include wildcards.
|
|
263
|
-
out/Release/libyuv_unittest --gtest_filter=*I420ToARGB_Opt
|
|
264
|
-
|
|
265
|
-
## CPU Emulator tools
|
|
266
|
-
|
|
267
|
-
### Intel SDE (Software Development Emulator)
|
|
268
|
-
|
|
269
|
-
Pre-requisite: Install IntelSDE: http://software.intel.com/en-us/articles/intel-software-development-emulator
|
|
270
|
-
|
|
271
|
-
Then run:
|
|
272
|
-
|
|
273
|
-
c:\intelsde\sde -hsw -- out\Release\libyuv_unittest.exe --gtest_filter=*
|
|
274
|
-
|
|
275
|
-
~/intelsde/sde -skx -- out/Release/libyuv_unittest --gtest_filter=**I420ToARGB_Opt
|
|
276
|
-
|
|
277
|
-
### Intel Architecture Code Analyzer
|
|
278
|
-
|
|
279
|
-
Inset these 2 macros into assembly code to be analyzed:
|
|
280
|
-
IACA_ASM_START
|
|
281
|
-
IACA_ASM_END
|
|
282
|
-
Build the code as usual, then run iaca on the object file.
|
|
283
|
-
~/iaca-lin64/bin/iaca.sh -reduceout -arch HSW out/Release/obj/libyuv_internal/compare_gcc.o
|
|
284
|
-
|
|
285
|
-
## Sanitizers
|
|
286
|
-
|
|
287
|
-
gn gen out/Release "--args=is_debug=false is_msan=true"
|
|
288
|
-
ninja -v -C out/Release
|
|
289
|
-
|
|
290
|
-
Sanitizers available: asan, msan, tsan, ubsan, lsan, ubsan_vptr
|
|
291
|
-
|
|
292
|
-
### Running Dr Memory memcheck for Windows
|
|
293
|
-
|
|
294
|
-
Pre-requisite: Install Dr Memory for Windows and add it to your path: http://www.drmemory.org/docs/page_install_windows.html
|
|
295
|
-
|
|
296
|
-
drmemory out\Debug\libyuv_unittest.exe --gtest_catch_exceptions=0 --gtest_filter=*
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# Introduction
|
|
2
|
-
|
|
3
|
-
Rotation by multiplies of 90 degrees allows mobile devices to rotate webcams from landscape to portrait. The higher level functions ConvertToI420 and ConvertToARGB allow rotation of any format. Optimized functionality is supported for I420, ARGB, NV12 and NV21.
|
|
4
|
-
|
|
5
|
-
# ConvertToI420
|
|
6
|
-
|
|
7
|
-
int ConvertToI420(const uint8* src_frame, size_t src_size,
|
|
8
|
-
uint8* dst_y, int dst_stride_y,
|
|
9
|
-
uint8* dst_u, int dst_stride_u,
|
|
10
|
-
uint8* dst_v, int dst_stride_v,
|
|
11
|
-
int crop_x, int crop_y,
|
|
12
|
-
int src_width, int src_height,
|
|
13
|
-
int crop_width, int crop_height,
|
|
14
|
-
enum RotationMode rotation,
|
|
15
|
-
uint32 format);
|
|
16
|
-
|
|
17
|
-
This function crops, converts, and rotates. You should think of it in that order.
|
|
18
|
-
* Crops the original image, which is src_width x src_height, to crop_width x crop_height. At this point the image is still not rotated.
|
|
19
|
-
* Converts the cropped region to I420. Supports inverted source for src_height negative.
|
|
20
|
-
* Rotates by 90, 180 or 270 degrees.
|
|
21
|
-
The buffer the caller provides should account for rotation. Be especially important to get stride of the destination correct.
|
|
22
|
-
|
|
23
|
-
e.g.
|
|
24
|
-
640 x 480 NV12 captured<br>
|
|
25
|
-
Crop to 640 x 360<br>
|
|
26
|
-
Rotate by 90 degrees to 360 x 640.<br>
|
|
27
|
-
Caller passes stride of 360 for Y and 360 / 2 for U and V.<br>
|
|
28
|
-
Caller passes crop_width of 640, crop_height of 360.<br>
|
|
29
|
-
|
|
30
|
-
# ConvertToARGB
|
|
31
|
-
|
|
32
|
-
int ConvertToARGB(const uint8* src_frame, size_t src_size,
|
|
33
|
-
uint8* dst_argb, int dst_stride_argb,
|
|
34
|
-
int crop_x, int crop_y,
|
|
35
|
-
int src_width, int src_height,
|
|
36
|
-
int crop_width, int crop_height,
|
|
37
|
-
enum RotationMode rotation,
|
|
38
|
-
uint32 format);
|
|
39
|
-
|
|
40
|
-
Same as I420, but implementation is less optimized - reads columns and writes rows, 16 bytes at a time.
|
|
41
|
-
|
|
42
|
-
# I420Rotate
|
|
43
|
-
|
|
44
|
-
int I420Rotate(const uint8* src_y, int src_stride_y,
|
|
45
|
-
const uint8* src_u, int src_stride_u,
|
|
46
|
-
const uint8* src_v, int src_stride_v,
|
|
47
|
-
uint8* dst_y, int dst_stride_y,
|
|
48
|
-
uint8* dst_u, int dst_stride_u,
|
|
49
|
-
uint8* dst_v, int dst_stride_v,
|
|
50
|
-
int src_width, int src_height, enum RotationMode mode);
|
|
51
|
-
|
|
52
|
-
Destination is rotated, so pass dst_stride_y etc that consider rotation.<br>
|
|
53
|
-
Rotate by 180 can be done in place, but 90 and 270 can not.
|
|
54
|
-
|
|
55
|
-
Implementation (Neon/SSE2) uses 8 x 8 block transpose, so best efficiency is with sizes and pointers that are aligned to 8.
|
|
56
|
-
|
|
57
|
-
Cropping can be achieved by adjusting the src_y/u/v pointers and src_width, src_height.
|
|
58
|
-
|
|
59
|
-
Lower level plane functions are provided, allowing other planar formats to be rotated. (e.g. I444)
|
|
60
|
-
|
|
61
|
-
For other planar YUV formats (I444, I422, I411, I400, NV16, NV24), the planar functions are exposed and can be called directly
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
// Rotate a plane by 0, 90, 180, or 270.
|
|
65
|
-
int RotatePlane(const uint8* src, int src_stride,
|
|
66
|
-
uint8* dst, int dst_stride,
|
|
67
|
-
int src_width, int src_height, enum RotationMode mode);
|
|
68
|
-
|
|
69
|
-
# ARGBRotate
|
|
70
|
-
|
|
71
|
-
LIBYUV_API
|
|
72
|
-
int ARGBRotate(const uint8* src_argb, int src_stride_argb,
|
|
73
|
-
uint8* dst_argb, int dst_stride_argb,
|
|
74
|
-
int src_width, int src_height, enum RotationMode mode);
|
|
75
|
-
|
|
76
|
-
Same as I420, but implementation is less optimized - reads columns and writes rows.
|
|
77
|
-
|
|
78
|
-
Rotate by 90, or any angle, can be achieved using ARGBAffine.
|
|
79
|
-
|
|
80
|
-
# Mirror - Horizontal Flip
|
|
81
|
-
|
|
82
|
-
Mirror functions for horizontally flipping an image, which can be useful for 'self view' of a webcam.
|
|
83
|
-
|
|
84
|
-
int I420Mirror(const uint8* src_y, int src_stride_y,
|
|
85
|
-
const uint8* src_u, int src_stride_u,
|
|
86
|
-
const uint8* src_v, int src_stride_v,
|
|
87
|
-
uint8* dst_y, int dst_stride_y,
|
|
88
|
-
uint8* dst_u, int dst_stride_u,
|
|
89
|
-
uint8* dst_v, int dst_stride_v,
|
|
90
|
-
int width, int height);
|
|
91
|
-
int ARGBMirror(const uint8* src_argb, int src_stride_argb,
|
|
92
|
-
uint8* dst_argb, int dst_stride_argb,
|
|
93
|
-
int width, int height);
|
|
94
|
-
|
|
95
|
-
Mirror functionality can also be achieved with the I420Scale and ARGBScale functions by passing negative width and/or height.
|
|
96
|
-
|
|
97
|
-
# Invert - Vertical Flip
|
|
98
|
-
|
|
99
|
-
Inverting can be achieved with almost any libyuv function by passing a negative source height.
|
|
100
|
-
|
|
101
|
-
I420Mirror and ARGBMirror can also be used to rotate by 180 degrees by passing a negative height.
|
|
102
|
-
|
|
103
|
-
# Cropping - Vertical Flip
|
|
104
|
-
|
|
105
|
-
When cropping from a subsampled format like NV21, the method of setting the start pointers wont work for odd crop start y on the UV plane.
|
|
106
|
-
If the height after cropping will be odd, invert the source - point to the last row, negate the strides, and pass negative height, which
|
|
107
|
-
will re-invert the image as the conversion outputs.
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env vpython3
|
|
2
|
-
|
|
3
|
-
# Copyright 2014 The LibYuv Project Authors. All rights reserved.
|
|
4
|
-
#
|
|
5
|
-
# Use of this source code is governed by a BSD-style license
|
|
6
|
-
# that can be found in the LICENSE file in the root of the source
|
|
7
|
-
# tree. An additional intellectual property rights grant can be found
|
|
8
|
-
# in the file PATENTS. All contributing project authors may
|
|
9
|
-
# be found in the AUTHORS file in the root of the source tree.
|
|
10
|
-
|
|
11
|
-
# This script is used to run the vs_toolchain.py script to download the
|
|
12
|
-
# Visual Studio toolchain. It's just a temporary measure while waiting for the
|
|
13
|
-
# Chrome team to move find_depot_tools into src/build to get rid of these
|
|
14
|
-
# workarounds (similar one in gyp_libyuv).
|
|
15
|
-
|
|
16
|
-
import os
|
|
17
|
-
import sys
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
checkout_root = os.path.dirname(os.path.realpath(__file__))
|
|
21
|
-
sys.path.insert(0, os.path.join(checkout_root, 'build'))
|
|
22
|
-
sys.path.insert(0, os.path.join(checkout_root, 'tools', 'find_depot_tools'))
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
import vs_toolchain # pylint: disable=wrong-import-position
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if __name__ == '__main__':
|
|
29
|
-
sys.exit(vs_toolchain.main())
|
|
@@ -1,68 +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
|
-
#ifndef INCLUDE_LIBYUV_BASIC_TYPES_H_
|
|
12
|
-
#define INCLUDE_LIBYUV_BASIC_TYPES_H_
|
|
13
|
-
|
|
14
|
-
#include <stddef.h> // For size_t and NULL
|
|
15
|
-
|
|
16
|
-
#if !defined(INT_TYPES_DEFINED) && !defined(GG_LONGLONG)
|
|
17
|
-
#define INT_TYPES_DEFINED
|
|
18
|
-
|
|
19
|
-
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
|
20
|
-
#include <sys/types.h> // for uintptr_t on x86
|
|
21
|
-
typedef unsigned __int64 uint64_t;
|
|
22
|
-
typedef __int64 int64_t;
|
|
23
|
-
typedef unsigned int uint32_t;
|
|
24
|
-
typedef int int32_t;
|
|
25
|
-
typedef unsigned short uint16_t;
|
|
26
|
-
typedef short int16_t;
|
|
27
|
-
typedef unsigned char uint8_t;
|
|
28
|
-
typedef signed char int8_t;
|
|
29
|
-
#else
|
|
30
|
-
#include <stdint.h> // for uintptr_t and C99 types
|
|
31
|
-
#endif // defined(_MSC_VER) && (_MSC_VER < 1600)
|
|
32
|
-
// Types are deprecated. Enable this macro for legacy types.
|
|
33
|
-
#ifdef LIBYUV_LEGACY_TYPES
|
|
34
|
-
typedef uint64_t uint64;
|
|
35
|
-
typedef int64_t int64;
|
|
36
|
-
typedef uint32_t uint32;
|
|
37
|
-
typedef int32_t int32;
|
|
38
|
-
typedef uint16_t uint16;
|
|
39
|
-
typedef int16_t int16;
|
|
40
|
-
typedef uint8_t uint8;
|
|
41
|
-
typedef int8_t int8;
|
|
42
|
-
#endif // LIBYUV_LEGACY_TYPES
|
|
43
|
-
#endif // INT_TYPES_DEFINED
|
|
44
|
-
|
|
45
|
-
#if !defined(LIBYUV_API)
|
|
46
|
-
#if defined(_WIN32) || defined(__CYGWIN__)
|
|
47
|
-
#if defined(LIBYUV_BUILDING_SHARED_LIBRARY)
|
|
48
|
-
#define LIBYUV_API __declspec(dllexport)
|
|
49
|
-
#elif defined(LIBYUV_USING_SHARED_LIBRARY)
|
|
50
|
-
#define LIBYUV_API __declspec(dllimport)
|
|
51
|
-
#else
|
|
52
|
-
#define LIBYUV_API
|
|
53
|
-
#endif // LIBYUV_BUILDING_SHARED_LIBRARY
|
|
54
|
-
#elif defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__APPLE__) && \
|
|
55
|
-
(defined(LIBYUV_BUILDING_SHARED_LIBRARY) || \
|
|
56
|
-
defined(LIBYUV_USING_SHARED_LIBRARY))
|
|
57
|
-
#define LIBYUV_API __attribute__((visibility("default")))
|
|
58
|
-
#else
|
|
59
|
-
#define LIBYUV_API
|
|
60
|
-
#endif // __GNUC__
|
|
61
|
-
#endif // LIBYUV_API
|
|
62
|
-
|
|
63
|
-
// TODO(fbarchard): Remove bool macros.
|
|
64
|
-
#define LIBYUV_BOOL int
|
|
65
|
-
#define LIBYUV_FALSE 0
|
|
66
|
-
#define LIBYUV_TRUE 1
|
|
67
|
-
|
|
68
|
-
#endif // INCLUDE_LIBYUV_BASIC_TYPES_H_
|
|
@@ -1,111 +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
|
-
#ifndef INCLUDE_LIBYUV_COMPARE_H_
|
|
12
|
-
#define INCLUDE_LIBYUV_COMPARE_H_
|
|
13
|
-
|
|
14
|
-
#include "libyuv/basic_types.h"
|
|
15
|
-
|
|
16
|
-
#ifdef __cplusplus
|
|
17
|
-
namespace libyuv {
|
|
18
|
-
extern "C" {
|
|
19
|
-
#endif
|
|
20
|
-
|
|
21
|
-
// Compute a hash for specified memory. Seed of 5381 recommended.
|
|
22
|
-
LIBYUV_API
|
|
23
|
-
uint32_t HashDjb2(const uint8_t* src, uint64_t count, uint32_t seed);
|
|
24
|
-
|
|
25
|
-
// Hamming Distance
|
|
26
|
-
LIBYUV_API
|
|
27
|
-
uint64_t ComputeHammingDistance(const uint8_t* src_a,
|
|
28
|
-
const uint8_t* src_b,
|
|
29
|
-
int count);
|
|
30
|
-
|
|
31
|
-
// Scan an opaque argb image and return fourcc based on alpha offset.
|
|
32
|
-
// Returns FOURCC_ARGB, FOURCC_BGRA, or 0 if unknown.
|
|
33
|
-
LIBYUV_API
|
|
34
|
-
uint32_t ARGBDetect(const uint8_t* argb,
|
|
35
|
-
int stride_argb,
|
|
36
|
-
int width,
|
|
37
|
-
int height);
|
|
38
|
-
|
|
39
|
-
// Sum Square Error - used to compute Mean Square Error or PSNR.
|
|
40
|
-
LIBYUV_API
|
|
41
|
-
uint64_t ComputeSumSquareError(const uint8_t* src_a,
|
|
42
|
-
const uint8_t* src_b,
|
|
43
|
-
int count);
|
|
44
|
-
|
|
45
|
-
LIBYUV_API
|
|
46
|
-
uint64_t ComputeSumSquareErrorPlane(const uint8_t* src_a,
|
|
47
|
-
int stride_a,
|
|
48
|
-
const uint8_t* src_b,
|
|
49
|
-
int stride_b,
|
|
50
|
-
int width,
|
|
51
|
-
int height);
|
|
52
|
-
|
|
53
|
-
static const int kMaxPsnr = 128;
|
|
54
|
-
|
|
55
|
-
LIBYUV_API
|
|
56
|
-
double SumSquareErrorToPsnr(uint64_t sse, uint64_t count);
|
|
57
|
-
|
|
58
|
-
LIBYUV_API
|
|
59
|
-
double CalcFramePsnr(const uint8_t* src_a,
|
|
60
|
-
int stride_a,
|
|
61
|
-
const uint8_t* src_b,
|
|
62
|
-
int stride_b,
|
|
63
|
-
int width,
|
|
64
|
-
int height);
|
|
65
|
-
|
|
66
|
-
LIBYUV_API
|
|
67
|
-
double I420Psnr(const uint8_t* src_y_a,
|
|
68
|
-
int stride_y_a,
|
|
69
|
-
const uint8_t* src_u_a,
|
|
70
|
-
int stride_u_a,
|
|
71
|
-
const uint8_t* src_v_a,
|
|
72
|
-
int stride_v_a,
|
|
73
|
-
const uint8_t* src_y_b,
|
|
74
|
-
int stride_y_b,
|
|
75
|
-
const uint8_t* src_u_b,
|
|
76
|
-
int stride_u_b,
|
|
77
|
-
const uint8_t* src_v_b,
|
|
78
|
-
int stride_v_b,
|
|
79
|
-
int width,
|
|
80
|
-
int height);
|
|
81
|
-
|
|
82
|
-
LIBYUV_API
|
|
83
|
-
double CalcFrameSsim(const uint8_t* src_a,
|
|
84
|
-
int stride_a,
|
|
85
|
-
const uint8_t* src_b,
|
|
86
|
-
int stride_b,
|
|
87
|
-
int width,
|
|
88
|
-
int height);
|
|
89
|
-
|
|
90
|
-
LIBYUV_API
|
|
91
|
-
double I420Ssim(const uint8_t* src_y_a,
|
|
92
|
-
int stride_y_a,
|
|
93
|
-
const uint8_t* src_u_a,
|
|
94
|
-
int stride_u_a,
|
|
95
|
-
const uint8_t* src_v_a,
|
|
96
|
-
int stride_v_a,
|
|
97
|
-
const uint8_t* src_y_b,
|
|
98
|
-
int stride_y_b,
|
|
99
|
-
const uint8_t* src_u_b,
|
|
100
|
-
int stride_u_b,
|
|
101
|
-
const uint8_t* src_v_b,
|
|
102
|
-
int stride_v_b,
|
|
103
|
-
int width,
|
|
104
|
-
int height);
|
|
105
|
-
|
|
106
|
-
#ifdef __cplusplus
|
|
107
|
-
} // extern "C"
|
|
108
|
-
} // namespace libyuv
|
|
109
|
-
#endif
|
|
110
|
-
|
|
111
|
-
#endif // INCLUDE_LIBYUV_COMPARE_H_
|