Add preliminary support of targeting Wasm

This builds on the work on portable-intrinsics branch:

- define WEBP_ENABLE_WASM_SIMD to enable WebAssembly optimizations, this
defines a constant (WEBP_USE_WASM_SIMD) that we can use in the future to
enable Wasm SIMD intrinsics
- build dwebp with JS build
- add a placeholder dec_wasm.c file, we don't do any special
initialization so it will fall back to c functions
- add Wasm to cpu checks, it needs to come before all checks since the
Emscripten toolchain will emulate x86 systems

Change-Id: I12de720304ff19fff82c8d100defbc60353787a9
This commit is contained in:
Zhi An Ng
2021-11-05 09:34:44 -07:00
parent 6b1d18c362
commit ed665a15e8
8 changed files with 81 additions and 10 deletions

View File

@ -108,6 +108,9 @@
/* Set to 1 if JPEG library is installed */
#cmakedefine WEBP_HAVE_JPEG 1
/* Set to 1 if Wasm SIMD is supported */
#cmakedefine WEBP_HAVE_WASM_SIMD
/* Set to 1 if NEON is supported */
#cmakedefine WEBP_HAVE_NEON