diff options
author | Yaowu Xu <yaowu@google.com> | 2015-07-17 13:38:54 -0700 |
---|---|---|
committer | Yaowu Xu <yaowu@google.com> | 2015-07-17 15:38:40 -0700 |
commit | 97279ed2e2c03d0fb31e2361ed9a25276a9247d5 (patch) | |
tree | ea4e45f6dba459432e3654da29f61b2f84e84c3c /vpx_dsp/vp9_read_bit_buffer.h | |
parent | 55e80a3cc6a2ba123b9f8df25e51a58bedc5fbfc (diff) | |
download | libvpx-97279ed2e2c03d0fb31e2361ed9a25276a9247d5.tar libvpx-97279ed2e2c03d0fb31e2361ed9a25276a9247d5.tar.gz libvpx-97279ed2e2c03d0fb31e2361ed9a25276a9247d5.tar.bz2 libvpx-97279ed2e2c03d0fb31e2361ed9a25276a9247d5.zip |
Move bit reader files to vpx_dsp
Change-Id: Ib1cb1fbe92a39ff5312cee069559be6d3ea458d0
Diffstat (limited to 'vpx_dsp/vp9_read_bit_buffer.h')
-rw-r--r-- | vpx_dsp/vp9_read_bit_buffer.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/vpx_dsp/vp9_read_bit_buffer.h b/vpx_dsp/vp9_read_bit_buffer.h new file mode 100644 index 000000000..fc88bd70a --- /dev/null +++ b/vpx_dsp/vp9_read_bit_buffer.h @@ -0,0 +1,45 @@ +/* + * 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. + */ + +#ifndef VP9_DECODER_VP9_READ_BIT_BUFFER_H_ +#define VP9_DECODER_VP9_READ_BIT_BUFFER_H_ + +#include <limits.h> + +#include "vpx/vpx_integer.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void (*vp9_rb_error_handler)(void *data); + +struct vp9_read_bit_buffer { + const uint8_t *bit_buffer; + const uint8_t *bit_buffer_end; + size_t bit_offset; + + void *error_handler_data; + vp9_rb_error_handler error_handler; +}; + +size_t vp9_rb_bytes_read(struct vp9_read_bit_buffer *rb); + +int vp9_rb_read_bit(struct vp9_read_bit_buffer *rb); + +int vp9_rb_read_literal(struct vp9_read_bit_buffer *rb, int bits); + +int vp9_rb_read_signed_literal(struct vp9_read_bit_buffer *rb, int bits); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // VP9_DECODER_VP9_READ_BIT_BUFFER_H_ |