summaryrefslogtreecommitdiffstats
path: root/media/libwebp/utils/utils.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-01-21 13:09:32 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-01-21 13:09:32 +0100
commitd1a0bfe221b91ea37a34d0b0360f347d2a6394e5 (patch)
tree5bba8c28b5415c90e90156bfa59a641a99118b99 /media/libwebp/utils/utils.h
parent9a954e2d1619788f658f6ec30c7dbd89b3d48b0d (diff)
downloadUXP-d1a0bfe221b91ea37a34d0b0360f347d2a6394e5.tar
UXP-d1a0bfe221b91ea37a34d0b0360f347d2a6394e5.tar.gz
UXP-d1a0bfe221b91ea37a34d0b0360f347d2a6394e5.tar.lz
UXP-d1a0bfe221b91ea37a34d0b0360f347d2a6394e5.tar.xz
UXP-d1a0bfe221b91ea37a34d0b0360f347d2a6394e5.zip
Update libwebp to version 1.0.2
This resolves #939.
Diffstat (limited to 'media/libwebp/utils/utils.h')
-rw-r--r--media/libwebp/utils/utils.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/media/libwebp/utils/utils.h b/media/libwebp/utils/utils.h
index 27dc7e090..d22151b0f 100644
--- a/media/libwebp/utils/utils.h
+++ b/media/libwebp/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
@@ -175,4 +175,4 @@ WEBP_EXTERN int WebPGetColorPalette(const struct WebPPicture* const pic,
} // extern "C"
#endif
-#endif /* WEBP_UTILS_UTILS_H_ */
+#endif // WEBP_UTILS_UTILS_H_