2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
4 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
12 #ifndef AOM_AOM_DSP_BITWRITER_BUFFER_H_
13 #define AOM_AOM_DSP_BITWRITER_BUFFER_H_
15 #include "aom/aom_integer.h"
21 struct aom_write_bit_buffer
{
26 int aom_wb_is_byte_aligned(const struct aom_write_bit_buffer
*wb
);
28 uint32_t aom_wb_bytes_written(const struct aom_write_bit_buffer
*wb
);
30 void aom_wb_write_bit(struct aom_write_bit_buffer
*wb
, int bit
);
32 void aom_wb_overwrite_bit(struct aom_write_bit_buffer
*wb
, int bit
);
34 void aom_wb_write_literal(struct aom_write_bit_buffer
*wb
, int data
, int bits
);
36 void aom_wb_write_unsigned_literal(struct aom_write_bit_buffer
*wb
,
37 uint32_t data
, int bits
);
39 void aom_wb_overwrite_literal(struct aom_write_bit_buffer
*wb
, int data
,
42 void aom_wb_write_inv_signed_literal(struct aom_write_bit_buffer
*wb
, int data
,
45 void aom_wb_write_uvlc(struct aom_write_bit_buffer
*wb
, uint32_t v
);
47 void aom_wb_write_signed_primitive_refsubexpfin(struct aom_write_bit_buffer
*wb
,
48 uint16_t n
, uint16_t k
,
49 int16_t ref
, int16_t v
);
55 #endif // AOM_AOM_DSP_BITWRITER_BUFFER_H_