OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 #include <stdlib.h> | 10 #include <stdlib.h> |
11 | 11 |
12 #include "./vpx_config.h" | 12 #include "./vpx_config.h" |
13 | 13 |
14 #include "vpx_dsp/bitreader.h" | 14 #include "vpx_dsp/bitreader.h" |
15 #include "vpx_dsp/prob.h" | 15 #include "vpx_dsp/prob.h" |
| 16 #include "vpx_dsp/vpx_dsp_common.h" |
16 #include "vpx_ports/mem.h" | 17 #include "vpx_ports/mem.h" |
17 #include "vpx_mem/vpx_mem.h" | 18 #include "vpx_mem/vpx_mem.h" |
18 #include "vpx_util/endian_inl.h" | 19 #include "vpx_util/endian_inl.h" |
19 | 20 |
20 int vpx_reader_init(vpx_reader *r, | 21 int vpx_reader_init(vpx_reader *r, |
21 const uint8_t *buffer, | 22 const uint8_t *buffer, |
22 size_t size, | 23 size_t size, |
23 vpx_decrypt_cb decrypt_cb, | 24 vpx_decrypt_cb decrypt_cb, |
24 void *decrypt_state) { | 25 void *decrypt_state) { |
25 if (size && !buffer) { | 26 if (size && !buffer) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 94 } |
94 | 95 |
95 const uint8_t *vpx_reader_find_end(vpx_reader *r) { | 96 const uint8_t *vpx_reader_find_end(vpx_reader *r) { |
96 // Find the end of the coded buffer | 97 // Find the end of the coded buffer |
97 while (r->count > CHAR_BIT && r->count < BD_VALUE_SIZE) { | 98 while (r->count > CHAR_BIT && r->count < BD_VALUE_SIZE) { |
98 r->count -= CHAR_BIT; | 99 r->count -= CHAR_BIT; |
99 r->buffer--; | 100 r->buffer--; |
100 } | 101 } |
101 return r->buffer; | 102 return r->buffer; |
102 } | 103 } |
OLD | NEW |