mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 22:09:57 +02:00
Optimize and re-structure VP8LGetHistoImageSymbols
Optimize and re-structured VP8LGetHistoImageSymbols method, by using the bin-hash for merging the Histograms more efficiently, instead of the randomized heuristic of existing method HistogramCombine. This change speeds up the Lossless encoding by 40-50% (for method=4 and Q > 50) with 0.8% penalty in compression density. For lower method, the speed up is 25-30%, with 0.4% penalty in the compression density. Change-Id: If61adadb1a041b95def6405aa1fe3b83c3cb25ce
This commit is contained in:
@ -40,6 +40,9 @@ typedef struct {
|
||||
int distance_[NUM_DISTANCE_CODES];
|
||||
int palette_code_bits_;
|
||||
double bit_cost_; // cached value of VP8LHistogramEstimateBits(this)
|
||||
double literal_cost_; // Cached values of dominant entropy costs:
|
||||
double red_cost_; // literal, red & blue.
|
||||
double blue_cost_;
|
||||
} VP8LHistogram;
|
||||
|
||||
// Collection of histograms with fixed capacity, allocated as one
|
||||
|
Reference in New Issue
Block a user