mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-14 21:09:55 +02:00
further speed-up/cleanup of RecordCoeffs() and GetResidualCost()
(note: Incorporated the cost of bin #1 into the LevelCost[]) Change-Id: I6408b2a822efdb97ad6a3a21d380bc7b0da9c715
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(1, p[1]);
|
||||
const int cost_base = VP8BitCost(0, p[0]) + 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