| 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 | |
| 12 #ifndef VP9_DECODER_VP9_DBOOLHUFF_H_ | 11 #ifndef VP9_DECODER_VP9_DBOOLHUFF_H_ |
| 13 #define VP9_DECODER_VP9_DBOOLHUFF_H_ | 12 #define VP9_DECODER_VP9_DBOOLHUFF_H_ |
| 13 |
| 14 #include <stddef.h> | 14 #include <stddef.h> |
| 15 #include <limits.h> | 15 #include <limits.h> |
| 16 #include "vpx_ports/config.h" | 16 #include "./vpx_config.h" |
| 17 #include "vpx_ports/mem.h" | 17 #include "vpx_ports/mem.h" |
| 18 #include "vpx/vpx_integer.h" | 18 #include "vpx/vpx_integer.h" |
| 19 | 19 |
| 20 typedef size_t VP9_BD_VALUE; | 20 typedef size_t VP9_BD_VALUE; |
| 21 | 21 |
| 22 # define VP9_BD_VALUE_SIZE ((int)sizeof(VP9_BD_VALUE)*CHAR_BIT) | 22 # define VP9_BD_VALUE_SIZE ((int)sizeof(VP9_BD_VALUE)*CHAR_BIT) |
| 23 /*This is meant to be a large, positive constant that can still be efficiently | 23 /*This is meant to be a large, positive constant that can still be efficiently |
| 24 loaded as an immediate (on platforms like ARM, for example). | 24 loaded as an immediate (on platforms like ARM, for example). |
| 25 Even relatively modest values like 100 would work fine.*/ | 25 Even relatively modest values like 100 would work fine.*/ |
| 26 # define VP9_LOTS_OF_BITS (0x40000000) | 26 # define VP9_LOTS_OF_BITS (0x40000000) |
| 27 | 27 |
| 28 typedef struct { | 28 typedef struct { |
| 29 const unsigned char *user_buffer_end; | 29 const unsigned char *user_buffer_end; |
| 30 const unsigned char *user_buffer; | 30 const unsigned char *user_buffer; |
| 31 VP9_BD_VALUE value; | 31 VP9_BD_VALUE value; |
| 32 int count; | 32 int count; |
| 33 unsigned int range; | 33 unsigned int range; |
| 34 } BOOL_DECODER; | 34 } BOOL_DECODER; |
| 35 | 35 |
| 36 DECLARE_ALIGNED(16, extern const unsigned char, vp9_norm[256]); | 36 DECLARE_ALIGNED(16, extern const uint8_t, vp9_norm[256]); |
| 37 | 37 |
| 38 int vp9_start_decode(BOOL_DECODER *br, | 38 int vp9_start_decode(BOOL_DECODER *br, |
| 39 const unsigned char *source, | 39 const unsigned char *source, |
| 40 unsigned int source_sz); | 40 unsigned int source_sz); |
| 41 | 41 |
| 42 void vp9_bool_decoder_fill(BOOL_DECODER *br); | 42 void vp9_bool_decoder_fill(BOOL_DECODER *br); |
| 43 | 43 |
| 44 int vp9_decode_uniform(BOOL_DECODER *br, int n); | 44 int vp9_decode_uniform(BOOL_DECODER *br, int n); |
| 45 int vp9_decode_term_subexp(BOOL_DECODER *br, int k, int num_syms); | 45 int vp9_decode_term_subexp(BOOL_DECODER *br, int k, int num_syms); |
| 46 int vp9_inv_recenter_nonneg(int v, int m); | 46 int vp9_inv_recenter_nonneg(int v, int m); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 */ | 145 */ |
| 146 return 1; | 146 return 1; |
| 147 } | 147 } |
| 148 | 148 |
| 149 /* No error. */ | 149 /* No error. */ |
| 150 return 0; | 150 return 0; |
| 151 } | 151 } |
| 152 | 152 |
| 153 extern int vp9_decode_unsigned_max(BOOL_DECODER *br, int max); | 153 extern int vp9_decode_unsigned_max(BOOL_DECODER *br, int max); |
| 154 | 154 |
| 155 #endif | 155 #endif // VP9_DECODER_VP9_DBOOLHUFF_H_ |
| OLD | NEW |