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

Side by Side Diff: third_party/brotli/dec/context.h

Issue 2537133002: Update brotli to v1.0.0-snapshot. (Closed)
Patch Set: Fixed typo Created 4 years 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
« no previous file with comments | « third_party/brotli/dec/bit_reader.c ('k') | third_party/brotli/dec/decode.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 2013 Google Inc. All Rights Reserved. 1 /* Copyright 2013 Google Inc. All Rights Reserved.
2 2
3 Distributed under MIT license. 3 Distributed under MIT license.
4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT 4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5 */ 5 */
6 6
7 /* Lookup table to map the previous two bytes to a context id. 7 /* Lookup table to map the previous two bytes to a context id.
8 8
9 There are four different context modeling modes defined here: 9 There are four different context modeling modes defined here:
10 CONTEXT_LSB6: context id is the least significant 6 bits of the last byte, 10 CONTEXT_LSB6: context id is the least significant 6 bits of the last byte,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 together two lookups from one table using context model dependent offsets: 92 together two lookups from one table using context model dependent offsets:
93 93
94 context = kContextLookup[offset1 + p1] | kContextLookup[offset2 + p2]. 94 context = kContextLookup[offset1 + p1] | kContextLookup[offset2 + p2].
95 95
96 where offset1 and offset2 are dependent on the context mode. 96 where offset1 and offset2 are dependent on the context mode.
97 */ 97 */
98 98
99 #ifndef BROTLI_DEC_CONTEXT_H_ 99 #ifndef BROTLI_DEC_CONTEXT_H_
100 #define BROTLI_DEC_CONTEXT_H_ 100 #define BROTLI_DEC_CONTEXT_H_
101 101
102 #include "./types.h" 102 #include <brotli/types.h>
103 103
104 enum ContextType { 104 enum ContextType {
105 CONTEXT_LSB6 = 0, 105 CONTEXT_LSB6 = 0,
106 CONTEXT_MSB6 = 1, 106 CONTEXT_MSB6 = 1,
107 CONTEXT_UTF8 = 2, 107 CONTEXT_UTF8 = 2,
108 CONTEXT_SIGNED = 3 108 CONTEXT_SIGNED = 3
109 }; 109 };
110 110
111 /* Common context lookup table for all context modes. */ 111 /* Common context lookup table for all context modes. */
112 static const uint8_t kContextLookup[1792] = { 112 static const uint8_t kContextLookup[1792] = {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 1024, 1536, 242 1024, 1536,
243 /* CONTEXT_MSB6 */ 243 /* CONTEXT_MSB6 */
244 1280, 1536, 244 1280, 1536,
245 /* CONTEXT_UTF8 */ 245 /* CONTEXT_UTF8 */
246 0, 256, 246 0, 256,
247 /* CONTEXT_SIGNED */ 247 /* CONTEXT_SIGNED */
248 768, 512, 248 768, 512,
249 }; 249 };
250 250
251 #endif /* BROTLI_DEC_CONTEXT_H_ */ 251 #endif /* BROTLI_DEC_CONTEXT_H_ */
OLDNEW
« no previous file with comments | « third_party/brotli/dec/bit_reader.c ('k') | third_party/brotli/dec/decode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698