Merge changes I25c30a9e,I0a192fc6,I4cf89575 into main

* changes:
  WASM: Enable VP8L_USE_FAST_LOAD
  WASM: don't use USE_GENERIC_TREE
  WASM: Enable 64-bit BITS caching
This commit is contained in:
James Zern 2024-08-01 18:36:34 +00:00 committed by Gerrit Code Review
commit 04834acae7
3 changed files with 6 additions and 2 deletions

View File

@ -16,7 +16,8 @@
#include "src/utils/bit_reader_inl_utils.h"
#if !defined(USE_GENERIC_TREE)
#if !defined(__arm__) && !defined(_M_ARM) && !WEBP_AARCH64
#if !defined(__arm__) && !defined(_M_ARM) && !WEBP_AARCH64 && \
!defined(__wasm__)
// using a table is ~1-2% slower on ARM. Prefer the coded-tree approach then.
#define USE_GENERIC_TREE 1 // ALTERNATE_CODE
#else

View File

@ -124,7 +124,8 @@ int32_t VP8GetSignedValue(VP8BitReader* const br, int bits,
#if defined(__arm__) || defined(_M_ARM) || WEBP_AARCH64 || \
defined(__i386__) || defined(_M_IX86) || \
defined(__x86_64__) || defined(_M_X64)
defined(__x86_64__) || defined(_M_X64) || \
defined(__wasm__)
#define VP8L_USE_FAST_LOAD
#endif

View File

@ -69,6 +69,8 @@ extern "C" {
#define BITS 56
#elif defined(__mips__) // MIPS
#define BITS 24
#elif defined(__wasm__) // WASM
#define BITS 56
#else // reasonable default
#define BITS 24
#endif