Make codec options externally configurable and remove BC7 support

This change makes it possible to exclude formats using compile time
options. BC7 is *never* exposed on the web and it has an absolutely huge
coding table which means we're just wasting space.

basis_transcoder.js 58707
basis_transcoder.wasm 224404
This commit is contained in:
Arseny Kapoulkine
2019-05-22 20:57:17 -07:00
parent 6fa7476bf9
commit f5d502912d
4 changed files with 21 additions and 7 deletions

View File

@@ -23,11 +23,25 @@
// Set to 1 for fuzz testing. This will disable all CRC16 checks on headers and compressed data.
#define BASISU_NO_HEADER_OR_DATA_CRC16_CHECKS 0
#define BASISD_SUPPORT_DXT1 1
#define BASISD_SUPPORT_DXT5A 1
#define BASISD_SUPPORT_BC7 1
#define BASISD_SUPPORT_PVRTC1 1
#define BASISD_SUPPORT_ETC2_EAC_A8 1
#ifndef BASISD_SUPPORT_DXT1
#define BASISD_SUPPORT_DXT1 1
#endif
#ifndef BASISD_SUPPORT_DXT5A
#define BASISD_SUPPORT_DXT5A 1
#endif
#ifndef BASISD_SUPPORT_BC7
#define BASISD_SUPPORT_BC7 1
#endif
#ifndef BASISD_SUPPORT_PVRTC1
#define BASISD_SUPPORT_PVRTC1 1
#endif
#ifndef BASISD_SUPPORT_ETC2_EAC_A8
#define BASISD_SUPPORT_ETC2_EAC_A8 1
#endif
#define BASISD_WRITE_NEW_BC7_TABLES 0
#define BASISD_WRITE_NEW_DXT1_TABLES 0