From ddd446f274d33d8624da3fd842c23e9ede0e6b11 Mon Sep 17 00:00:00 2001 From: volzhs Date: Fri, 8 Jul 2016 19:29:58 +0900 Subject: Update webp driver to 0.5.1 (upstream) --- drivers/webp/enc/histogram.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'drivers/webp/enc/histogram.h') diff --git a/drivers/webp/enc/histogram.h b/drivers/webp/enc/histogram.h index 72f045793a..d303d1d58b 100644 --- a/drivers/webp/enc/histogram.h +++ b/drivers/webp/enc/histogram.h @@ -17,13 +17,16 @@ #include #include "./backward_references.h" -#include "webp/format_constants.h" -#include "webp/types.h" +#include "../webp/format_constants.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { #endif +// Not a trivial literal symbol. +#define VP8L_NON_TRIVIAL_SYM (0xffffffff) + // A simple container for histograms of data. typedef struct { // literal_ contains green literal, palette-code and @@ -103,6 +106,16 @@ int VP8LGetHistoImageSymbols(int xsize, int ysize, VP8LHistogramSet* const tmp_histos, uint16_t* const histogram_symbols); +// Returns the entropy for the symbols in the input array. +// Also sets trivial_symbol to the code value, if the array has only one code +// value. Otherwise, set it to VP8L_NON_TRIVIAL_SYM. +double VP8LBitsEntropy(const uint32_t* const array, int n, + uint32_t* const trivial_symbol); + +// Estimate how many bits the combined entropy of literals and distance +// approximately maps to. +double VP8LHistogramEstimateBits(const VP8LHistogram* const p); + #ifdef __cplusplus } #endif -- cgit v1.2.3 From e55c6f823251fcff366c7ce93b3ab0bf1fdedd68 Mon Sep 17 00:00:00 2001 From: volzhs Date: Fri, 8 Jul 2016 22:10:25 +0900 Subject: Modified webp source codes for godot --- drivers/webp/enc/histogram.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/webp/enc/histogram.h') diff --git a/drivers/webp/enc/histogram.h b/drivers/webp/enc/histogram.h index d303d1d58b..59de42b33e 100644 --- a/drivers/webp/enc/histogram.h +++ b/drivers/webp/enc/histogram.h @@ -17,8 +17,8 @@ #include #include "./backward_references.h" -#include "../webp/format_constants.h" -#include "../webp/types.h" +#include "webp/format_constants.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { -- cgit v1.2.3