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 #include <assert.h> | 11 #include <assert.h> |
12 #include "vp9/encoder/vp9_writer.h" | 12 #include "vp9/encoder/vp9_writer.h" |
13 #include "vp9/common/vp9_entropy.h" | 13 #include "vp9/common/vp9_entropy.h" |
14 | 14 |
15 #if defined(SECTIONBITS_OUTPUT) | |
16 unsigned __int64 Sectionbits[500]; | |
17 | |
18 #endif | |
19 | |
20 #ifdef ENTROPY_STATS | 15 #ifdef ENTROPY_STATS |
21 unsigned int active_section = 0; | 16 unsigned int active_section = 0; |
22 #endif | 17 #endif |
23 | 18 |
24 const unsigned int vp9_prob_cost[256] = { | 19 const unsigned int vp9_prob_cost[256] = { |
25 2047, 2047, 1791, 1641, 1535, 1452, 1385, 1328, 1279, 1235, 1196, 1161, | 20 2047, 2047, 1791, 1641, 1535, 1452, 1385, 1328, 1279, 1235, 1196, 1161, |
26 1129, 1099, 1072, 1046, 1023, 1000, 979, 959, 940, 922, 905, 889, | 21 1129, 1099, 1072, 1046, 1023, 1000, 979, 959, 940, 922, 905, 889, |
27 873, 858, 843, 829, 816, 803, 790, 778, 767, 755, 744, 733, | 22 873, 858, 843, 829, 816, 803, 790, 778, 767, 755, 744, 733, |
28 723, 713, 703, 693, 684, 675, 666, 657, 649, 641, 633, 625, | 23 723, 713, 703, 693, 684, 675, 666, 657, 649, 641, 633, 625, |
29 617, 609, 602, 594, 587, 580, 573, 567, 560, 553, 547, 541, | 24 617, 609, 602, 594, 587, 580, 573, 567, 560, 553, 547, 541, |
(...skipping 29 matching lines...) Expand all Loading... |
59 int i; | 54 int i; |
60 | 55 |
61 for (i = 0; i < 32; i++) | 56 for (i = 0; i < 32; i++) |
62 vp9_write_bit(br, 0); | 57 vp9_write_bit(br, 0); |
63 | 58 |
64 // Ensure there's no ambigous collision with any index marker bytes | 59 // Ensure there's no ambigous collision with any index marker bytes |
65 if ((br->buffer[br->pos - 1] & 0xe0) == 0xc0) | 60 if ((br->buffer[br->pos - 1] & 0xe0) == 0xc0) |
66 br->buffer[br->pos++] = 0; | 61 br->buffer[br->pos++] = 0; |
67 } | 62 } |
68 | 63 |
OLD | NEW |