uvgVPCCenc 1.0.0
uvgVPCCenc is an open-source real-time V-PCC encoder library written in C++ from scratch.
Loading...
Searching...
No Matches
Functions | Variables
bitstream_util.cpp File Reference
#include "bitstream_util.hpp"
#include <array>
#include <cassert>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <new>
Include dependency graph for bitstream_util.cpp:

Functions

void uvg_bitstream_init (bitstream_t *const stream)
 
uvg_data_chunkuvg_bitstream_alloc_chunk ()
 
void uvg_bitstream_free_chunks (uvg_data_chunk *chunk)
 
void uvg_bitstream_writebyte (bitstream_t *const stream, const uint8_t byte)
 Write a byte to bitstream.
 
void uvg_bitstream_put (bitstream_t *const stream, const uint32_t data, uint8_t bits)
 
uvg_data_chunkuvg_bitstream_take_chunks (bitstream_t *const stream)
 
void uvg_bitstream_finalize (bitstream_t *const stream)
 
void uvg_bitstream_clear (bitstream_t *const stream)
 
uint64_t uvg_bitstream_tell (const bitstream_t *const stream)
 
void uvg_bitstream_put_ue (bitstream_t *stream, uint32_t code_num)
 
size_t uvg_calculate_ue_len (uint32_t number)
 
void uvg_bitstream_add_rbsp_trailing_bits (bitstream_t *const stream)
 
void uvg_bitstream_align (bitstream_t *const stream)
 
void uvg_bitstream_move (bitstream_t *const dst, bitstream_t *const src)
 
void uvg_bitstream_copy_bytes (bitstream_t *const stream, const uint8_t *bytes, uint32_t len)
 Copy array of bytes to a byte-aligned bitstream.
 
uint32_t uvg_bitstream_peek_last_byte (bitstream_t *const stream)
 

Variables

const std::array< uint32_t, 32 > uvg_bit_set_mask
 

Function Documentation

◆ uvg_bitstream_add_rbsp_trailing_bits()

void uvg_bitstream_add_rbsp_trailing_bits ( bitstream_t *const  stream)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uvg_bitstream_align()

void uvg_bitstream_align ( bitstream_t *const  stream)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uvg_bitstream_alloc_chunk()

uvg_data_chunk * uvg_bitstream_alloc_chunk ( )
Here is the caller graph for this function:

◆ uvg_bitstream_clear()

void uvg_bitstream_clear ( bitstream_t *const  stream)

Reset stream.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uvg_bitstream_copy_bytes()

void uvg_bitstream_copy_bytes ( bitstream_t *const  stream,
const uint8_t *  bytes,
uint32_t  len 
)

Copy array of bytes to a byte-aligned bitstream.

Parameters
streampointer bitstream to put the data
bytesbytes to copy
lenlength of bytes array
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uvg_bitstream_finalize()

void uvg_bitstream_finalize ( bitstream_t *const  stream)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uvg_bitstream_free_chunks()

void uvg_bitstream_free_chunks ( uvg_data_chunk chunk)
Here is the caller graph for this function:

◆ uvg_bitstream_init()

void uvg_bitstream_init ( bitstream_t *const  stream)
Here is the caller graph for this function:

◆ uvg_bitstream_move()

void uvg_bitstream_move ( bitstream_t *const  dst,
bitstream_t *const  src 
)
Here is the call graph for this function:

◆ uvg_bitstream_peek_last_byte()

uint32_t uvg_bitstream_peek_last_byte ( bitstream_t *const  stream)

◆ uvg_bitstream_put()

void uvg_bitstream_put ( bitstream_t *const  stream,
const uint32_t  data,
uint8_t  bits 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uvg_bitstream_put_ue()

void uvg_bitstream_put_ue ( bitstream_t stream,
uint32_t  code_num 
)
Here is the call graph for this function:

◆ uvg_bitstream_take_chunks()

uvg_data_chunk * uvg_bitstream_take_chunks ( bitstream_t *const  stream)
Here is the caller graph for this function:

◆ uvg_bitstream_tell()

uint64_t uvg_bitstream_tell ( const bitstream_t *const  stream)
Here is the caller graph for this function:

◆ uvg_bitstream_writebyte()

void uvg_bitstream_writebyte ( bitstream_t *const  stream,
const uint8_t  byte 
)

Write a byte to bitstream.

The stream must be byte-aligned.

Parameters
streampointer bitstream to put the data
bytebyte to write
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uvg_calculate_ue_len()

size_t uvg_calculate_ue_len ( uint32_t  number)
Here is the caller graph for this function:

Variable Documentation

◆ uvg_bit_set_mask

const std::array<uint32_t, 32> uvg_bit_set_mask
Initial value:
= {
0x00000001, 0x00000002, 0x00000004, 0x00000008, 0x00000010, 0x00000020, 0x00000040, 0x00000080, 0x00000100, 0x00000200, 0x00000400,
0x00000800, 0x00001000, 0x00002000, 0x00004000, 0x00008000, 0x00010000, 0x00020000, 0x00040000, 0x00080000, 0x00100000, 0x00200000,
0x00400000, 0x00800000, 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000}