| 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 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 return 0; | 60 return 0; |
| 61 } | 61 } |
| 62 static void vp8_encode_bool(BOOL_CODER *br, int bit, int probability) | 62 static void vp8_encode_bool(BOOL_CODER *br, int bit, int probability) |
| 63 { | 63 { |
| 64 unsigned int split; | 64 unsigned int split; |
| 65 int count = br->count; | 65 int count = br->count; |
| 66 unsigned int range = br->range; | 66 unsigned int range = br->range; |
| 67 unsigned int lowvalue = br->lowvalue; | 67 unsigned int lowvalue = br->lowvalue; |
| 68 register unsigned int shift; | 68 register unsigned int shift; |
| 69 | 69 |
| 70 #ifdef ENTROPY_STATS | 70 #ifdef VP8_ENTROPY_STATS |
| 71 #if defined(SECTIONBITS_OUTPUT) | 71 #if defined(SECTIONBITS_OUTPUT) |
| 72 | 72 |
| 73 if (bit) | 73 if (bit) |
| 74 Sectionbits[active_section] += vp8_prob_cost[255-probability]; | 74 Sectionbits[active_section] += vp8_prob_cost[255-probability]; |
| 75 else | 75 else |
| 76 Sectionbits[active_section] += vp8_prob_cost[probability]; | 76 Sectionbits[active_section] += vp8_prob_cost[probability]; |
| 77 | 77 |
| 78 #endif | 78 #endif |
| 79 #endif | 79 #endif |
| 80 | 80 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 count -= 8 ; | 119 count -= 8 ; |
| 120 } | 120 } |
| 121 | 121 |
| 122 lowvalue <<= shift; | 122 lowvalue <<= shift; |
| 123 br->count = count; | 123 br->count = count; |
| 124 br->lowvalue = lowvalue; | 124 br->lowvalue = lowvalue; |
| 125 br->range = range; | 125 br->range = range; |
| 126 } | 126 } |
| 127 | 127 |
| 128 #endif | 128 #endif |
| OLD | NEW |