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

Side by Side Diff: third_party/libwebp/enc/tree.c

Issue 12942006: libwebp: update snapshot to v0.3.0-rc6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/libwebp/enc/token.c ('k') | third_party/libwebp/enc/vp8enci.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 Google Inc. All Rights Reserved. 1 // Copyright 2011 Google Inc. All Rights Reserved.
2 // 2 //
3 // This code is licensed under the same terms as WebM: 3 // This code is licensed under the same terms as WebM:
4 // Software License Agreement: http://www.webmproject.org/license/software/ 4 // Software License Agreement: http://www.webmproject.org/license/software/
5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/ 5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/
6 // ----------------------------------------------------------------------------- 6 // -----------------------------------------------------------------------------
7 // 7 //
8 // Token probabilities 8 // Token probabilities
9 // 9 //
10 // Author: Skal (pascal.massimino@gmail.com) 10 // Author: Skal (pascal.massimino@gmail.com)
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 }, 151 },
152 { { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, 152 { { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
153 { 244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, 153 { 244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
154 { 238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 } 154 { 238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }
155 } 155 }
156 } 156 }
157 }; 157 };
158 158
159 void VP8DefaultProbas(VP8Encoder* const enc) { 159 void VP8DefaultProbas(VP8Encoder* const enc) {
160 VP8Proba* const probas = &enc->proba_; 160 VP8Proba* const probas = &enc->proba_;
161 probas->use_skip_proba_ = 0;
161 memset(probas->segments_, 255u, sizeof(probas->segments_)); 162 memset(probas->segments_, 255u, sizeof(probas->segments_));
162 memcpy(probas->coeffs_, VP8CoeffsProba0, sizeof(VP8CoeffsProba0)); 163 memcpy(probas->coeffs_, VP8CoeffsProba0, sizeof(VP8CoeffsProba0));
163 probas->use_skip_proba_ = 0; 164 // Note: we could hard-code the level_costs_ corresponding to VP8CoeffsProba0,
165 // but that's ~11k of static data. Better call VP8CalculateLevelCosts() later.
166 probas->dirty_ = 1;
164 } 167 }
165 168
166 // Paragraph 11.5. 900bytes. 169 // Paragraph 11.5. 900bytes.
167 static const uint8_t kBModesProba[NUM_BMODES][NUM_BMODES][NUM_BMODES - 1] = { 170 static const uint8_t kBModesProba[NUM_BMODES][NUM_BMODES][NUM_BMODES - 1] = {
168 { { 231, 120, 48, 89, 115, 113, 120, 152, 112 }, 171 { { 231, 120, 48, 89, 115, 113, 120, 152, 112 },
169 { 152, 179, 64, 126, 170, 118, 46, 70, 95 }, 172 { 152, 179, 64, 126, 170, 118, 46, 70, 95 },
170 { 175, 69, 143, 80, 85, 82, 72, 155, 103 }, 173 { 175, 69, 143, 80, 85, 82, 72, 155, 103 },
171 { 56, 58, 10, 171, 218, 189, 17, 13, 152 }, 174 { 56, 58, 10, 171, 218, 189, 17, 13, 152 },
172 { 114, 26, 17, 163, 44, 195, 21, 10, 173 }, 175 { 114, 26, 17, 163, 44, 195, 21, 10, 173 },
173 { 121, 24, 80, 195, 26, 62, 44, 64, 85 }, 176 { 121, 24, 80, 195, 26, 62, 44, 64, 85 },
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 501 }
499 } 502 }
500 if (VP8PutBitUniform(bw, probas->use_skip_proba_)) { 503 if (VP8PutBitUniform(bw, probas->use_skip_proba_)) {
501 VP8PutValue(bw, probas->skip_proba_, 8); 504 VP8PutValue(bw, probas->skip_proba_, 8);
502 } 505 }
503 } 506 }
504 507
505 #if defined(__cplusplus) || defined(c_plusplus) 508 #if defined(__cplusplus) || defined(c_plusplus)
506 } // extern "C" 509 } // extern "C"
507 #endif 510 #endif
OLDNEW
« no previous file with comments | « third_party/libwebp/enc/token.c ('k') | third_party/libwebp/enc/vp8enci.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698