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 | 10 |
11 | 11 |
12 #include "dboolhuff.h" | 12 #include "dboolhuff.h" |
13 #include "vpx_ports/mem.h" | 13 #include "vpx_ports/mem.h" |
14 #include "vpx_mem/vpx_mem.h" | 14 #include "vpx_mem/vpx_mem.h" |
15 | 15 |
| 16 DECLARE_ALIGNED(16, const unsigned char, vp8dx_bitreader_norm[256]) = |
| 17 { |
| 18 0, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
, 3, 3, 3, 3, 3, 3, |
| 19 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
, 2, 2, 2, 2, 2, 2, |
| 20 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 1, |
| 21 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 1, |
| 22 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
, 0, 0, 0, 0, 0, 0, |
| 23 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
, 0, 0, 0, 0, 0, 0, |
| 24 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
, 0, 0, 0, 0, 0, 0, |
| 25 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
, 0, 0, 0, 0, 0, 0 |
| 26 }; |
| 27 |
| 28 |
16 int vp8dx_start_decode(BOOL_DECODER *br, | 29 int vp8dx_start_decode(BOOL_DECODER *br, |
17 const unsigned char *source, | 30 const unsigned char *source, |
18 unsigned int source_sz) | 31 unsigned int source_sz) |
19 { | 32 { |
20 br->user_buffer_end = source+source_sz; | 33 br->user_buffer_end = source+source_sz; |
21 br->user_buffer = source; | 34 br->user_buffer = source; |
22 br->value = 0; | 35 br->value = 0; |
23 br->count = -8; | 36 br->count = -8; |
24 br->range = 255; | 37 br->range = 255; |
25 | 38 |
(...skipping 17 matching lines...) Expand all Loading... |
43 bufptr = br->user_buffer; | 56 bufptr = br->user_buffer; |
44 value = br->value; | 57 value = br->value; |
45 count = br->count; | 58 count = br->count; |
46 | 59 |
47 VP8DX_BOOL_DECODER_FILL(count, value, bufptr, bufend); | 60 VP8DX_BOOL_DECODER_FILL(count, value, bufptr, bufend); |
48 | 61 |
49 br->user_buffer = bufptr; | 62 br->user_buffer = bufptr; |
50 br->value = value; | 63 br->value = value; |
51 br->count = count; | 64 br->count = count; |
52 } | 65 } |
OLD | NEW |