summaryrefslogtreecommitdiffstats
path: root/media/libwebp/enc/histogram_enc.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/enc/histogram_enc.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/enc/histogram_enc.h')
-rw-r--r--media/libwebp/enc/histogram_enc.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/media/libwebp/enc/histogram_enc.h b/media/libwebp/enc/histogram_enc.h
index 4fbb73702..ef39b7c6d 100644
--- a/media/libwebp/enc/histogram_enc.h
+++ b/media/libwebp/enc/histogram_enc.h
@@ -44,6 +44,7 @@ typedef struct {
double literal_cost_; // Cached values of dominant entropy costs:
double red_cost_; // literal, red & blue.
double blue_cost_;
+ uint8_t is_used_[5]; // 5 for literal, red, blue, alpha, distance
} VP8LHistogram;
// Collection of histograms with fixed capacity, allocated as one
@@ -67,7 +68,9 @@ void VP8LHistogramCreate(VP8LHistogram* const p,
int VP8LGetHistogramSize(int palette_code_bits);
// Set the palette_code_bits and reset the stats.
-void VP8LHistogramInit(VP8LHistogram* const p, int palette_code_bits);
+// If init_arrays is true, the arrays are also filled with 0's.
+void VP8LHistogramInit(VP8LHistogram* const p, int palette_code_bits,
+ int init_arrays);
// Collect all the references into a histogram (without reset)
void VP8LHistogramStoreRefs(const VP8LBackwardRefs* const refs,
@@ -83,6 +86,9 @@ void VP8LFreeHistogramSet(VP8LHistogramSet* const histo);
// using 'cache_bits'. Return NULL in case of memory error.
VP8LHistogramSet* VP8LAllocateHistogramSet(int size, int cache_bits);
+// Set the histograms in set to 0.
+void VP8LHistogramSetClear(VP8LHistogramSet* const set);
+
// Allocate and initialize histogram object with specified 'cache_bits'.
// Returns NULL in case of memory error.
// Special case of VP8LAllocateHistogramSet, with size equals 1.
@@ -113,7 +119,7 @@ double VP8LBitsEntropy(const uint32_t* const array, int n);
// Estimate how many bits the combined entropy of literals and distance
// approximately maps to.
-double VP8LHistogramEstimateBits(const VP8LHistogram* const p);
+double VP8LHistogramEstimateBits(VP8LHistogram* const p);
#ifdef __cplusplus
}