Skip to content

Commit

Permalink
Merge changes I25c30a9e,I0a192fc6,I4cf89575 into main
Browse files Browse the repository at this point in the history
* changes:
  WASM: Enable VP8L_USE_FAST_LOAD
  WASM: don't use USE_GENERIC_TREE
  WASM: Enable 64-bit BITS caching
  • Loading branch information
jzern authored and Gerrit Code Review committed Aug 1, 2024
2 parents 39a602a + 8a7c8dc commit 04834ac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/dec/tree_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/utils/bit_reader_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions src/utils/bit_reader_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04834ac

Please sign in to comment.