mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-14 21:09:55 +02:00
fix for LevelCost + little speed-up
the p0 proba was incorrectly accumulated. Merging its contribution into the LevelCost[] was creating more problems than anything (esp. with trellis) so let's just not. Change-Id: I4c07bfee471085df901228d97b20a4d9606ba44e
This commit is contained in:
@ -359,7 +359,7 @@ void VP8CalculateLevelCosts(VP8Proba* const proba) {
|
||||
for(ctx = 0; ctx < NUM_CTX; ++ctx) {
|
||||
const uint8_t* const p = proba->coeffs_[ctype][band][ctx];
|
||||
uint16_t* const table = proba->level_cost_[ctype][band][ctx];
|
||||
const int cost_base = VP8BitCost(0, p[0]) + VP8BitCost(1, p[1]);
|
||||
const int cost_base = VP8BitCost(1, p[1]);
|
||||
int v;
|
||||
table[0] = VP8BitCost(0, p[1]);
|
||||
for (v = 1; v <= MAX_VARIABLE_LEVEL; ++v) {
|
||||
|
Reference in New Issue
Block a user