godot/thirdparty/etcpak/Tables.hpp
K. S. Ernest (iFire) Lee d840165a32
Add etcpak library for faster ETC/ETC2/S3TC imports.
- `etc` module was renamed to `etcpak` and modified to use the new library.
- PKM importer is removed in the process, it's obsolete.
- Old library `etc2comp` is removed.
- S3TC compression no longer done via `squish` (but decompression still is).
- Slight modifications to etcpak sources for MinGW compatibility,
  to fix LLVM `-Wc++11-narrowing` errors, and to allow using vendored or
  system libpng.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-04-13 00:12:12 +02:00

50 lines
1004 B
C++

#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