mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-12 22:14:29 +02:00
improve log2 test
- add check for native log2 to configure - use a common define (NOT_HAVE_LOG2) to enable use of local library version for non-autoconf platforms without their own version, currently msvc and android This uses a negative (NOT_HAVE_) to simplify the ifdef Change-Id: Id0610eed507f8bb9c5da338918112853d5c8127a
This commit is contained in:
@ -78,6 +78,9 @@
|
||||
// Using this simple maintenance, we observed a typical 10-20% reduction
|
||||
// in the number of calls to VP8PutBit(), leading to 3-5% speed gain.
|
||||
//
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "./tcoderi.h"
|
||||
|
||||
@ -85,7 +88,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef NOT_HAVE_LOG2
|
||||
static double log2(double d) {
|
||||
const double kLog2Reciprocal = 1.442695040888963;
|
||||
return log(d) * kLog2Reciprocal;
|
||||
|
Reference in New Issue
Block a user