mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 05:49:51 +02:00
Merge "Unify some entropy functions."
This commit is contained in:
@ -216,12 +216,9 @@ typedef struct { // small struct to hold counters
|
||||
int streaks[2][2]; // [zero/non-zero][streak<3 / streak>=3]
|
||||
} VP8LStreaks;
|
||||
|
||||
typedef VP8LStreaks (*VP8LCostCountFunc)(const uint32_t* population,
|
||||
int length);
|
||||
typedef VP8LStreaks (*VP8LCostCombinedCountFunc)(const uint32_t* X,
|
||||
const uint32_t* Y, int length);
|
||||
|
||||
extern VP8LCostCountFunc VP8LHuffmanCostCount;
|
||||
extern VP8LCostCombinedCountFunc VP8LHuffmanCostCombinedCount;
|
||||
|
||||
typedef struct { // small struct to hold bit entropy results
|
||||
@ -234,14 +231,28 @@ typedef struct { // small struct to hold bit entropy results
|
||||
|
||||
void VP8LBitEntropyInit(VP8LBitEntropy* const entropy);
|
||||
|
||||
// Get the combined symbol entropy for the distributions 'X' and 'Y'.
|
||||
// Get the combined symbol bit entropy and Huffman cost stats for the
|
||||
// distributions 'X' and 'Y'. Those results can then be refined according to
|
||||
// codec specific heuristics.
|
||||
void VP8LGetCombinedEntropyUnrefined(const uint32_t* const X,
|
||||
const uint32_t* const Y, int length,
|
||||
VP8LBitEntropy* bit_entropy,
|
||||
VP8LStreaks* stats);
|
||||
VP8LBitEntropy* const bit_entropy,
|
||||
VP8LStreaks* const stats);
|
||||
// Get the entropy for the distribution 'X'.
|
||||
void VP8LGetEntropyUnrefined(const uint32_t* const X, int length,
|
||||
VP8LBitEntropy* const bit_entropy,
|
||||
VP8LStreaks* const stats);
|
||||
|
||||
void VP8LBitsEntropyUnrefined(const uint32_t* const array, int n,
|
||||
VP8LBitEntropy* entropy);
|
||||
VP8LBitEntropy* const entropy);
|
||||
|
||||
typedef void (*GetEntropyUnrefinedHelperFunc)(uint32_t val, int i,
|
||||
uint32_t* const val_prev,
|
||||
int* const i_prev,
|
||||
VP8LBitEntropy* const bit_entropy,
|
||||
VP8LStreaks* const stats);
|
||||
// Internal function used by VP8LGet*EntropyUnrefined.
|
||||
extern GetEntropyUnrefinedHelperFunc VP8LGetEntropyUnrefinedHelper;
|
||||
|
||||
typedef void (*VP8LHistogramAddFunc)(const VP8LHistogram* const a,
|
||||
const VP8LHistogram* const b,
|
||||
|
Reference in New Issue
Block a user