summaryrefslogtreecommitdiff
path: root/thirdparty/etcpak/Tables.hpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-04-13 01:09:38 +0200
committerGitHub <noreply@github.com>2021-04-13 01:09:38 +0200
commit8793a464d312c5a48490fbec03c26f2835318063 (patch)
tree8be39ad26992b0bc10ee69fef5f0c5cadb6a0760 /thirdparty/etcpak/Tables.hpp
parent075f358fcddbb3df8417ef85baabdf3684a4efd2 (diff)
parentd840165a324b5c218ca3a4882f030986855c8383 (diff)
Merge pull request #47370 from fire/etcpak
Add thirdparty library etcpak for faster imports.
Diffstat (limited to 'thirdparty/etcpak/Tables.hpp')
-rw-r--r--thirdparty/etcpak/Tables.hpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/thirdparty/etcpak/Tables.hpp b/thirdparty/etcpak/Tables.hpp
new file mode 100644
index 0000000000..69d7e8aa07
--- /dev/null
+++ b/thirdparty/etcpak/Tables.hpp
@@ -0,0 +1,49 @@
+#ifndef __TABLES_HPP__
+#define __TABLES_HPP__
+
+#include <stdint.h>
+
+#ifdef __AVX2__
+# include <immintrin.h>
+#endif
+#ifdef __SSE4_1__
+# include <smmintrin.h>
+#endif
+#ifdef __ARM_NEON
+# include <arm_neon.h>
+#endif
+
+extern const int32_t g_table[8][4];
+extern const int64_t g_table256[8][4];
+
+extern const uint32_t g_id[4][16];
+
+extern const uint32_t g_avg2[16];
+
+extern const uint32_t g_flags[64];
+
+extern const int32_t g_alpha[16][8];
+extern const int32_t g_alphaRange[16];
+
+#ifdef __SSE4_1__
+extern const __m128i g_table_SIMD[2];
+extern const __m128i g_table128_SIMD[2];
+extern const __m128i g_table256_SIMD[4];
+
+extern const __m128i g_alpha_SIMD[16];
+extern const __m128i g_alphaRange_SIMD;
+#endif
+
+#ifdef __AVX2__
+extern const __m256i g_alpha_AVX[8];
+extern const __m256i g_alphaRange_AVX;
+#endif
+
+#ifdef __ARM_NEON
+extern const int16x8_t g_table128_NEON[2];
+extern const int32x4_t g_table256_NEON[4];
+extern const int16x8_t g_alpha_NEON[16];
+extern const int16x8_t g_alphaRange_NEON;
+#endif
+
+#endif