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 #ifndef VP9_ENCODER_VP9_WRITER_H_ | 11 #ifndef VP9_ENCODER_VP9_WRITER_H_ |
12 #define VP9_ENCODER_VP9_WRITER_H_ | 12 #define VP9_ENCODER_VP9_WRITER_H_ |
13 | 13 |
14 #include "vpx_ports/mem.h" | 14 #include "vpx_ports/mem.h" |
15 | 15 |
16 #include "vp9/common/vp9_prob.h" | 16 #include "vp9/common/vp9_prob.h" |
17 | 17 |
18 #ifdef __cplusplus | 18 #ifdef __cplusplus |
19 extern "C" { | 19 extern "C" { |
20 #endif | 20 #endif |
21 | 21 |
22 typedef struct { | 22 typedef struct vp9_writer { |
23 unsigned int lowvalue; | 23 unsigned int lowvalue; |
24 unsigned int range; | 24 unsigned int range; |
25 int count; | 25 int count; |
26 unsigned int pos; | 26 unsigned int pos; |
27 uint8_t *buffer; | 27 uint8_t *buffer; |
28 } vp9_writer; | 28 } vp9_writer; |
29 | 29 |
30 void vp9_start_encode(vp9_writer *bc, uint8_t *buffer); | 30 void vp9_start_encode(vp9_writer *bc, uint8_t *buffer); |
31 void vp9_stop_encode(vp9_writer *bc); | 31 void vp9_stop_encode(vp9_writer *bc); |
32 | 32 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 vp9_write_bit(w, 1 & (data >> bit)); | 89 vp9_write_bit(w, 1 & (data >> bit)); |
90 } | 90 } |
91 | 91 |
92 #define vp9_write_prob(w, v) vp9_write_literal((w), (v), 8) | 92 #define vp9_write_prob(w, v) vp9_write_literal((w), (v), 8) |
93 | 93 |
94 #ifdef __cplusplus | 94 #ifdef __cplusplus |
95 } // extern "C" | 95 } // extern "C" |
96 #endif | 96 #endif |
97 | 97 |
98 #endif // VP9_ENCODER_VP9_WRITER_H_ | 98 #endif // VP9_ENCODER_VP9_WRITER_H_ |
OLD | NEW |