9#ifndef BROTLI_ENC_FAST_LOG_H_
10#define BROTLI_ENC_FAST_LOG_H_
14#include <brotli/types.h>
18#if defined(__cplusplus) || defined(c_plusplus)
23#if defined(BROTLI_BSR32)
24 return BROTLI_BSR32((uint32_t)n);
27 while (n >>= 1) result++;
32#define BROTLI_LOG2_TABLE_SIZE 256
40#if !defined(BROTLI_HAVE_LOG2)
41#if ((defined(_MSC_VER) && _MSC_VER <= 1700) || \
42 (defined(__ANDROID_API__) && __ANDROID_API__ < 18))
43#define BROTLI_HAVE_LOG2 0
45#define BROTLI_HAVE_LOG2 1
49#define LOG_2_INV 1.4426950408889634
56#if !(BROTLI_HAVE_LOG2)
59 return log2((
double)v);
63#if defined(__cplusplus) || defined(c_plusplus)
#define LOG_2_INV
Definition fast_log.h:48
BROTLI_INTERNAL const double kBrotliLog2Table[BROTLI_LOG2_TABLE_SIZE]
Definition fast_log.c:14
#define BROTLI_LOG2_TABLE_SIZE
Definition fast_log.h:31