aboutsummaryrefslogtreecommitdiff
path: root/docs/environment_variables.md
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-05-03 23:40:04 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-05-03 23:40:04 +0000
commitc1068d3eb9464eb1e6028869524930c57feb716b (patch)
tree7aa355fd0b89ec0b2611e17ee84a14c6fa449e22 /docs/environment_variables.md
parentad14b7e1bb4ad1db3cc083b70c9179f86b2e2052 (diff)
parenta270e88f71c875f86ebc612ff3232b204bbc75c9 (diff)
downloadlibyuv-androidx-glance-release.tar.gz
Merge "Snap for 11801295 from 488a2af021e3e7473f083a9435b1472c0d411f3d to androidx-glance-release" into androidx-glance-releaseandroidx-glance-release
Diffstat (limited to 'docs/environment_variables.md')
-rw-r--r--docs/environment_variables.md55
1 files changed, 55 insertions, 0 deletions
diff --git a/docs/environment_variables.md b/docs/environment_variables.md
new file mode 100644
index 00000000..4eb09659
--- /dev/null
+++ b/docs/environment_variables.md
@@ -0,0 +1,55 @@
+# Introduction
+
+For test purposes, environment variables can be set to control libyuv behavior. These should only be used for testing, to narrow down bugs or to test performance.
+
+# CPU
+
+By default the cpu is detected and the most advanced form of SIMD is used. But you can disable instruction sets selectively, or completely, falling back on C code. Set the variable to 1 to disable the specified instruction set.
+
+## All CPUs
+ LIBYUV_DISABLE_ASM
+
+## Intel CPUs
+ LIBYUV_DISABLE_X86
+ LIBYUV_DISABLE_SSE2
+ LIBYUV_DISABLE_SSSE3
+ LIBYUV_DISABLE_SSE41
+ LIBYUV_DISABLE_SSE42
+ LIBYUV_DISABLE_AVX
+ LIBYUV_DISABLE_AVX2
+ LIBYUV_DISABLE_ERMS
+ LIBYUV_DISABLE_FMA3
+ LIBYUV_DISABLE_F16C
+ LIBYUV_DISABLE_AVX512BW
+ LIBYUV_DISABLE_AVX512VL
+ LIBYUV_DISABLE_AVX512VNNI
+ LIBYUV_DISABLE_AVX512VBMI
+ LIBYUV_DISABLE_AVX512VBMI2
+ LIBYUV_DISABLE_AVX512VBITALG
+ LIBYUV_DISABLE_AVX512VPOPCNTDQ
+ LIBYUV_DISABLE_GFNI
+
+## ARM CPUs
+
+ LIBYUV_DISABLE_NEON
+
+## MIPS CPUs
+ LIBYUV_DISABLE_MSA
+
+## LOONGARCH CPUs
+ LIBYUV_DISABLE_LSX
+ LIBYUV_DISABLE_LASX
+
+## RISCV CPUs
+ LIBYUV_DISABLE_RVV
+
+# Test Width/Height/Repeat
+
+The unittests default to a small image (128x72) to run fast. This can be set by environment variable to test a specific resolutions.
+You can also repeat the test a specified number of iterations, allowing benchmarking and profiling.
+
+ set LIBYUV_WIDTH=1280
+ set LIBYUV_HEIGHT=720
+ set LIBYUV_REPEAT=999
+ set LIBYUV_FLAGS=-1
+ set LIBYUV_CPU_INFO=-1