| 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 |  | 
| 29 int vp8dx_start_decode(BOOL_DECODER *br, | 16 int vp8dx_start_decode(BOOL_DECODER *br, | 
| 30                        const unsigned char *source, | 17                        const unsigned char *source, | 
| 31                        unsigned int source_sz) | 18                        unsigned int source_sz) | 
| 32 { | 19 { | 
| 33     br->user_buffer_end = source+source_sz; | 20     br->user_buffer_end = source+source_sz; | 
| 34     br->user_buffer     = source; | 21     br->user_buffer     = source; | 
| 35     br->value    = 0; | 22     br->value    = 0; | 
| 36     br->count    = -8; | 23     br->count    = -8; | 
| 37     br->range    = 255; | 24     br->range    = 255; | 
| 38 | 25 | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
| 56     bufptr = br->user_buffer; | 43     bufptr = br->user_buffer; | 
| 57     value = br->value; | 44     value = br->value; | 
| 58     count = br->count; | 45     count = br->count; | 
| 59 | 46 | 
| 60     VP8DX_BOOL_DECODER_FILL(count, value, bufptr, bufend); | 47     VP8DX_BOOL_DECODER_FILL(count, value, bufptr, bufend); | 
| 61 | 48 | 
| 62     br->user_buffer = bufptr; | 49     br->user_buffer = bufptr; | 
| 63     br->value = value; | 50     br->value = value; | 
| 64     br->count = count; | 51     br->count = count; | 
| 65 } | 52 } | 
| OLD | NEW | 
|---|