bitwriter_buffer.h 1.04 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
/*
 *  Copyright (c) 2013 The WebM project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

11 12
#ifndef VPX_DSP_BITWRITER_BUFFER_H_
#define VPX_DSP_BITWRITER_BUFFER_H_
13

Yaowu Xu's avatar
Yaowu Xu committed
14
#include "aom/vpx_integer.h"
15

16 17 18 19
#ifdef __cplusplus
extern "C" {
#endif

20
struct vpx_write_bit_buffer {
21 22 23 24
  uint8_t *bit_buffer;
  size_t bit_offset;
};

25
size_t vpx_wb_bytes_written(const struct vpx_write_bit_buffer *wb);
26

27
void vpx_wb_write_bit(struct vpx_write_bit_buffer *wb, int bit);
28

29
void vpx_wb_write_literal(struct vpx_write_bit_buffer *wb, int data, int bits);
30

31 32
void vpx_wb_write_inv_signed_literal(struct vpx_write_bit_buffer *wb, int data,
                                     int bits);
33

34 35 36 37
#ifdef __cplusplus
}  // extern "C"
#endif

38
#endif  // VPX_DSP_BITWRITER_BUFFER_H_