Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1598)

Unified Diff: third_party/libwebp/enc/cost.c

Issue 12942006: libwebp: update snapshot to v0.3.0-rc6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: local webkit layout expectations Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libwebp/enc/cost.c
diff --git a/third_party/libwebp/enc/cost.c b/third_party/libwebp/enc/cost.c
index 14b357bab9efa8ecd8d8feaa29f9aa9dc16a7b0c..92e0cc713c2c1c83188dd132f030b0ca77e4a539 100644
--- a/third_party/libwebp/enc/cost.c
+++ b/third_party/libwebp/enc/cost.c
@@ -354,6 +354,9 @@ static int VariableLevelCost(int level, const uint8_t probas[NUM_PROBAS]) {
void VP8CalculateLevelCosts(VP8Proba* const proba) {
int ctype, band, ctx;
+
+ if (!proba->dirty_) return; // nothing to do.
+
for (ctype = 0; ctype < NUM_TYPES; ++ctype) {
for (band = 0; band < NUM_BANDS; ++band) {
for(ctx = 0; ctx < NUM_CTX; ++ctx) {
@@ -370,6 +373,7 @@ void VP8CalculateLevelCosts(VP8Proba* const proba) {
}
}
}
+ proba->dirty_ = 0;
}
//------------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698