summaryrefslogtreecommitdiffstats
path: root/libvpx/vp9/encoder/vp9_write_bit_buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'libvpx/vp9/encoder/vp9_write_bit_buffer.h')
-rw-r--r--libvpx/vp9/encoder/vp9_write_bit_buffer.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/libvpx/vp9/encoder/vp9_write_bit_buffer.h b/libvpx/vp9/encoder/vp9_write_bit_buffer.h
index 6f91cfc..1795e05 100644
--- a/libvpx/vp9/encoder/vp9_write_bit_buffer.h
+++ b/libvpx/vp9/encoder/vp9_write_bit_buffer.h
@@ -8,13 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef VP9_BIT_WRITE_BUFFER_H_
-#define VP9_BIT_WRITE_BUFFER_H_
+#ifndef VP9_ENCODER_VP9_WRITE_BIT_BUFFER_H_
+#define VP9_ENCODER_VP9_WRITE_BIT_BUFFER_H_
#include <limits.h>
#include "vpx/vpx_integer.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct vp9_write_bit_buffer {
uint8_t *bit_buffer;
size_t bit_offset;
@@ -25,7 +29,7 @@ static size_t vp9_rb_bytes_written(struct vp9_write_bit_buffer *wb) {
}
static void vp9_wb_write_bit(struct vp9_write_bit_buffer *wb, int bit) {
- const int off = wb->bit_offset;
+ const int off = (int)wb->bit_offset;
const int p = off / CHAR_BIT;
const int q = CHAR_BIT - 1 - off % CHAR_BIT;
if (q == CHAR_BIT -1) {
@@ -45,4 +49,8 @@ static void vp9_wb_write_literal(struct vp9_write_bit_buffer *wb,
}
-#endif // VP9_BIT_WRITE_BUFFER_H_
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // VP9_ENCODER_VP9_WRITE_BIT_BUFFER_H_