summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libwebp/src/utils/utils.h
diff options
context:
space:
mode:
authorAndré Klitzing <aklitzing@gmail.com>2019-01-21 16:45:58 +0100
committerAndré Klitzing <aklitzing@gmail.com>2019-02-04 09:17:27 +0000
commit0e8422bedc8c84ff7c08c6b3163329e82c2007dd (patch)
tree0d66b48e024bb4111861a47a6525bd32de9ffdf8 /src/3rdparty/libwebp/src/utils/utils.h
parent9cc84d6cd663a84858bb27716dbc4f80f70e9b20 (diff)
Update bundled libwebp to version 1.0.2
[ChangeLog][Third-Party Code] Update bundled libwebp to version 1.0.2 Change-Id: I12e1557cef6e592c8c2ca417ef87f6df35a7b410 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/3rdparty/libwebp/src/utils/utils.h')
-rw-r--r--src/3rdparty/libwebp/src/utils/utils.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/3rdparty/libwebp/src/utils/utils.h b/src/3rdparty/libwebp/src/utils/utils.h
index da97b5d..c7620f9 100644
--- a/src/3rdparty/libwebp/src/utils/utils.h
+++ b/src/3rdparty/libwebp/src/utils/utils.h
@@ -107,19 +107,6 @@ static WEBP_INLINE void PutLE32(uint8_t* const data, uint32_t val) {
PutLE16(data + 2, (int)(val >> 16));
}
-// Returns 31 ^ clz(n) = log2(n). This is the default C-implementation, either
-// based on table or not. Can be used as fallback if clz() is not available.
-#define WEBP_NEED_LOG_TABLE_8BIT
-extern const uint8_t WebPLogTable8bit[256];
-static WEBP_INLINE int WebPLog2FloorC(uint32_t n) {
- int log_value = 0;
- while (n >= 256) {
- log_value += 8;
- n >>= 8;
- }
- return log_value + WebPLogTable8bit[n];
-}
-
// Returns (int)floor(log2(n)). n must be > 0.
// use GNU builtins where available.
#if defined(__GNUC__) && \
@@ -138,6 +125,19 @@ static WEBP_INLINE int BitsLog2Floor(uint32_t n) {
return first_set_bit;
}
#else // default: use the C-version.
+// Returns 31 ^ clz(n) = log2(n). This is the default C-implementation, either
+// based on table or not. Can be used as fallback if clz() is not available.
+#define WEBP_NEED_LOG_TABLE_8BIT
+extern const uint8_t WebPLogTable8bit[256];
+static WEBP_INLINE int WebPLog2FloorC(uint32_t n) {
+ int log_value = 0;
+ while (n >= 256) {
+ log_value += 8;
+ n >>= 8;
+ }
+ return log_value + WebPLogTable8bit[n];
+}
+
static WEBP_INLINE int BitsLog2Floor(uint32_t n) { return WebPLog2FloorC(n); }
#endif