|
TUT HEVC Encoder
|
#include "bitstream.h"#include <math.h>#include <stdarg.h>#include <stdlib.h>#include <string.h>#include "kvz_math.h"Functions | |
| void | kvz_bitstream_init (bitstream_t *const stream) |
| Initialize a new bitstream. | |
| kvz_data_chunk * | kvz_bitstream_take_chunks (bitstream_t *const stream) |
| Take chunks from a bitstream. | |
| kvz_data_chunk * | kvz_bitstream_alloc_chunk () |
| Allocates a new bitstream chunk. | |
| void | kvz_bitstream_free_chunks (kvz_data_chunk *chunk) |
| Free a list of chunks. | |
| void | kvz_bitstream_finalize (bitstream_t *const stream) |
| Free resources used by a bitstream. | |
| uint64_t | kvz_bitstream_tell (const bitstream_t *const stream) |
| Get the number of bits written. | |
| void | kvz_bitstream_writebyte (bitstream_t *const stream, const uint8_t byte) |
| Write a byte to bitstream. | |
| void | kvz_bitstream_move (bitstream_t *const dst, bitstream_t *const src) |
| Move data from one stream to another. | |
| void | kvz_bitstream_clear (bitstream_t *const stream) |
| Reset stream. | |
| void | kvz_bitstream_put_byte (bitstream_t *const stream, uint32_t data) |
| Write a byte to a byte aligned bitstream. | |
| void | kvz_bitstream_put (bitstream_t *const stream, const uint32_t data, uint8_t bits) |
| Write bits to bitstream Buffers individual bits untill they make a full byte. | |
| void | kvz_bitstream_put_ue (bitstream_t *stream, uint32_t code_num) |
| Write unsigned Exp-Golomb bit string. | |
| void | kvz_bitstream_put_se (bitstream_t *stream, int32_t data) |
| Write signed Exp-Golomb bit string. | |
| void | kvz_bitstream_add_rbsp_trailing_bits (bitstream_t *const stream) |
| Add rbsp_trailing_bits syntax element, which aligns the bitstream. | |
| void | kvz_bitstream_align (bitstream_t *const stream) |
| Align the bitstream, unless it's already aligned. | |
| void | kvz_bitstream_align_zero (bitstream_t *const stream) |
| Align the bitstream with zero. | |
Variables | |
| const uint32_t | kvz_bit_set_mask [] |
| void kvz_bitstream_add_rbsp_trailing_bits | ( | bitstream_t *const | stream | ) |
| void kvz_bitstream_align | ( | bitstream_t *const | stream | ) |
| void kvz_bitstream_align_zero | ( | bitstream_t *const | stream | ) |
| kvz_data_chunk * kvz_bitstream_alloc_chunk | ( | ) |
| void kvz_bitstream_clear | ( | bitstream_t *const | stream | ) |
| void kvz_bitstream_finalize | ( | bitstream_t *const | stream | ) |
| void kvz_bitstream_free_chunks | ( | kvz_data_chunk * | chunk | ) |
| void kvz_bitstream_init | ( | bitstream_t *const | stream | ) |
| void kvz_bitstream_move | ( | bitstream_t *const | dst, |
| bitstream_t *const | src | ||
| ) |
Destination stream must be byte-aligned. Source stream will be cleared.
| stream | stream the data is to be appended to |
| data | input data |
| bits | number of bits to write from data to stream |
| void kvz_bitstream_put_byte | ( | bitstream_t *const | stream, |
| uint32_t | data | ||
| ) |
| stream | stream the data is to be appended to |
| data | input data |
| void kvz_bitstream_put_se | ( | bitstream_t * | stream, |
| int32_t | data | ||
| ) |
| void kvz_bitstream_put_ue | ( | bitstream_t * | stream, |
| uint32_t | code_num | ||
| ) |
| kvz_data_chunk * kvz_bitstream_take_chunks | ( | bitstream_t *const | stream | ) |
Move ownership of the chunks to the caller and clear the bitstream.
The bitstream must be byte-aligned.
| uint64_t kvz_bitstream_tell | ( | const bitstream_t *const | stream | ) |
| stream | bitstream |
| void kvz_bitstream_writebyte | ( | bitstream_t *const | stream, |
| const uint8_t | byte | ||
| ) |
The stream must be byte-aligned.
| stream | pointer bitstream to put the data |
| byte | byte to write |