write an ad-hoc EncodeImageInternal variant

Used when we don't code a Huffman Image.
-> Simplify the code quite some because we don't have to
deal with special cases of histo bits

Change-Id: I0c3f46cbf3b501e021c093e07253e7404c01ff4f
This commit is contained in:
Pascal Massimino
2012-06-08 11:52:31 -07:00
parent eaee9e79f7
commit 3697b5ceb2
3 changed files with 94 additions and 47 deletions

View File

@ -62,11 +62,16 @@ void VP8LHistogramCreate(VP8LHistogram* const p,
// Set the palette_code_bits and reset the stats.
void VP8LHistogramInit(VP8LHistogram* const p, int palette_code_bits);
// Collect all the references into a histogram (without reset)
void VP8LHistogramStoreRefs(const VP8LBackwardRefs* const refs,
VP8LHistogram* const histo);
// Allocate an array of pointer to histograms, allocated and initialized
// using 'cache_bits'. Return NULL in case of memory error.
VP8LHistogramSet* VP8LAllocateHistogramSet(int size, int cache_bits);
void VP8LHistogramAddSinglePixOrCopy(VP8LHistogram* const p,
// Accumulate a token 'v' into a histogram.
void VP8LHistogramAddSinglePixOrCopy(VP8LHistogram* const histo,
const PixOrCopy* const v);
// Estimate how many bits the combined entropy of literals and distance