OLD | NEW |
1 // Copyright 2010 Google Inc. All Rights Reserved. | 1 // Copyright 2010 Google Inc. All Rights Reserved. |
2 // | 2 // |
3 // Use of this source code is governed by a BSD-style license | 3 // Use of this source code is governed by a BSD-style license |
4 // that can be found in the COPYING file in the root of the source | 4 // that can be found in the COPYING file in the root of the source |
5 // tree. An additional intellectual property rights grant can be found | 5 // tree. An additional intellectual property rights grant can be found |
6 // in the file PATENTS. All contributing project authors may | 6 // in the file PATENTS. All contributing project authors may |
7 // be found in the AUTHORS file in the root of the source tree. | 7 // be found in the AUTHORS file in the root of the source tree. |
8 // ----------------------------------------------------------------------------- | 8 // ----------------------------------------------------------------------------- |
9 // | 9 // |
10 // Boolean decoder | 10 // Boolean decoder |
11 // | 11 // |
12 // Author: Skal (pascal.massimino@gmail.com) | 12 // Author: Skal (pascal.massimino@gmail.com) |
13 | 13 |
14 #include "./bit_reader.h" | 14 #include "./bit_reader.h" |
15 | 15 |
16 #if defined(__cplusplus) || defined(c_plusplus) | |
17 extern "C" { | |
18 #endif | |
19 | |
20 #ifndef USE_RIGHT_JUSTIFY | 16 #ifndef USE_RIGHT_JUSTIFY |
21 #define MK(X) (((range_t)(X) << (BITS)) | (MASK)) | 17 #define MK(X) (((range_t)(X) << (BITS)) | (MASK)) |
22 #else | 18 #else |
23 #define MK(X) ((range_t)(X)) | 19 #define MK(X) ((range_t)(X)) |
24 #endif | 20 #endif |
25 | 21 |
26 //------------------------------------------------------------------------------ | 22 //------------------------------------------------------------------------------ |
27 // VP8BitReader | 23 // VP8BitReader |
28 | 24 |
29 void VP8InitBitReader(VP8BitReader* const br, | 25 void VP8InitBitReader(VP8BitReader* const br, |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 ShiftBytes(br); | 198 ShiftBytes(br); |
203 return val; | 199 return val; |
204 } else { | 200 } else { |
205 br->error_ = 1; | 201 br->error_ = 1; |
206 return 0; | 202 return 0; |
207 } | 203 } |
208 } | 204 } |
209 | 205 |
210 //------------------------------------------------------------------------------ | 206 //------------------------------------------------------------------------------ |
211 | 207 |
212 #if defined(__cplusplus) || defined(c_plusplus) | |
213 } // extern "C" | |
214 #endif | |
OLD | NEW |