uvgVPCCenc 1.0.0
uvgVPCCenc is an open-source real-time V-PCC encoder library written in C++ from scratch.
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
bitstream_util.hpp File Reference
#include <cassert>
#include <cstring>
#include <cstdint>
Include dependency graph for bitstream_util.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  uvg_data_chunk
 
struct  bitstream_t
 

Macros

#define BITSTREAM_DEBUG   false
 
#define UVG_DATA_CHUNK_SIZE   4096
 
#define WRITE_U(stream, data, bits, name)
 
#define WRITE_UE(stream, data, name)
 

Typedefs

typedef struct uvg_data_chunk uvg_data_chunk
 
typedef struct bitstream_t bitstream_t
 

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 *stream)
 
void uvg_bitstream_finalize (bitstream_t *stream)
 
void uvg_bitstream_clear (bitstream_t *const stream)
 
uint64_t uvg_bitstream_tell (const bitstream_t *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)
 

Macro Definition Documentation

◆ BITSTREAM_DEBUG

#define BITSTREAM_DEBUG   false

◆ UVG_DATA_CHUNK_SIZE

#define UVG_DATA_CHUNK_SIZE   4096

◆ WRITE_U

#define WRITE_U (   stream,
  data,
  bits,
  name 
)
Value:
{ \
uvg_bitstream_put(stream, data, bits); \
}

◆ WRITE_UE

#define WRITE_UE (   stream,
  data,
  name 
)
Value:
{ \
uvg_bitstream_put_ue(stream, data); \
}

Typedef Documentation

◆ bitstream_t

typedef struct bitstream_t bitstream_t

◆ uvg_data_chunk

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 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 stream)
Here is the caller graph for this function:

◆ uvg_bitstream_tell()

uint64_t uvg_bitstream_tell ( const bitstream_t 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: