Index: third_party/libwebp/dec/tree.c |
diff --git a/third_party/libwebp/dec/tree.c b/third_party/libwebp/dec/tree.c |
index 31208d9d4cca3ff1ac8e8755a250913938afbda3..c2007ea733dd1ef926118b6f107fda26c1a1d6cf 100644 |
--- a/third_party/libwebp/dec/tree.c |
+++ b/third_party/libwebp/dec/tree.c |
@@ -494,6 +494,12 @@ static const uint8_t |
}; |
// Paragraph 9.9 |
+ |
+static const int kBands[16 + 1] = { |
+ 0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, |
+ 0 // extra entry as sentinel |
+}; |
+ |
void VP8ParseProba(VP8BitReader* const br, VP8Decoder* const dec) { |
VP8Proba* const proba = &dec->proba_; |
int t, b, c, p; |
@@ -507,6 +513,9 @@ void VP8ParseProba(VP8BitReader* const br, VP8Decoder* const dec) { |
} |
} |
} |
+ for (b = 0; b < 16 + 1; ++b) { |
+ proba->bands_ptr_[t][b] = &proba->bands_[t][kBands[b]]; |
+ } |
} |
dec->use_skip_proba_ = VP8Get(br); |
if (dec->use_skip_proba_) { |