mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-17 06:19:54 +02:00
Only recompute level_cost_[] when needed
Add a dirty_ flag to keep track of updated probabilities and the need to recompute the level costs. This only makes a difference for "-m 2" method which was sub-optimal. But it's overall cleaner to have this flag. Change-Id: I21c71201e1d07a923d97a3adf2fbbd7d67d35433
This commit is contained in:
@ -188,6 +188,7 @@ typedef struct {
|
||||
ProbaArray coeffs_[NUM_TYPES][NUM_BANDS]; // 924 bytes
|
||||
StatsArray stats_[NUM_TYPES][NUM_BANDS]; // 4224 bytes
|
||||
CostArray level_cost_[NUM_TYPES][NUM_BANDS]; // 11.4k
|
||||
int dirty_; // if true, need to call VP8CalculateLevelCosts()
|
||||
int use_skip_proba_; // Note: we always use skip_proba for now.
|
||||
int nb_skip_; // number of skipped blocks
|
||||
} VP8Proba;
|
||||
|
Reference in New Issue
Block a user