VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_bits.h File Reference

This file defines functions, structures for handling streams of bits in vlc. More...

Include dependency graph for vlc_bits.h:

Go to the source code of this file.

Data Structures

struct  bs_byte_callbacks_t
struct  bs_s

Macros

#define bs_align_0(s)
#define bs_align_1(s)

Typedefs

typedef struct bs_s bs_t

Functions

static size_t bs_impl_bytes_forward (bs_t *s, size_t i_count)
static size_t bs_impl_bytes_pos (const bs_t *s)
static void bs_init_custom (bs_t *s, const void *p_data, size_t i_data, const bs_byte_callbacks_t *cb, void *priv)
static void bs_init (bs_t *s, const void *p_data, size_t i_data)
static void bs_write_init (bs_t *s, void *p_data, size_t i_data)
static int bs_refill (bs_t *s)
static bool bs_error (const bs_t *s)
static bool bs_eof (bs_t *s)
static size_t bs_pos (const bs_t *s)
static void bs_skip (bs_t *s, size_t i_count)
static uint32_t bs_read (bs_t *s, uint8_t i_count)
static uint32_t bs_read1 (bs_t *s)
static void bs_write (bs_t *s, uint8_t i_count, uint32_t i_bits)
static bool bs_aligned (bs_t *s)
static void bs_align (bs_t *s)
static void bs_write_align (bs_t *s, uint8_t v)
static uint_fast32_t bs_read_ue (bs_t *bs)
static int_fast32_t bs_read_se (bs_t *s)

Detailed Description

This file defines functions, structures for handling streams of bits in vlc.

Macro Definition Documentation

◆ bs_align_0

#define bs_align_0 ( s)
Value:
static void bs_write_align(bs_t *s, uint8_t v)
Definition vlc_bits.h:271

◆ bs_align_1

#define bs_align_1 ( s)
Value:

Typedef Documentation

◆ bs_t

typedef struct bs_s bs_t

Function Documentation

◆ bs_align()

void bs_align ( bs_t * s)
inlinestatic

References bs_s::i_left.

◆ bs_aligned()

bool bs_aligned ( bs_t * s)
inlinestatic

References bs_s::i_left.

◆ bs_eof()

bool bs_eof ( bs_t * s)
inlinestatic

References bs_refill().

Referenced by rtp_mpeg4_decode().

◆ bs_error()

bool bs_error ( const bs_t * s)
inlinestatic

References bs_s::b_error.

Referenced by rtp_mpeg4_decode().

◆ bs_impl_bytes_forward()

size_t bs_impl_bytes_forward ( bs_t * s,
size_t i_count )
static

References bs_s::p, bs_s::p_end, and bs_s::p_start.

Referenced by bs_init().

◆ bs_impl_bytes_pos()

size_t bs_impl_bytes_pos ( const bs_t * s)
static

References bs_s::p, bs_s::p_end, and bs_s::p_start.

Referenced by bs_init().

◆ bs_init()

void bs_init ( bs_t * s,
const void * p_data,
size_t i_data )
inlinestatic

◆ bs_init_custom()

void bs_init_custom ( bs_t * s,
const void * p_data,
size_t i_data,
const bs_byte_callbacks_t * cb,
void * priv )
inlinestatic

◆ bs_pos()

size_t bs_pos ( const bs_t * s)
inlinestatic

◆ bs_read()

uint32_t bs_read ( bs_t * s,
uint8_t i_count )
inlinestatic

◆ bs_read1()

uint32_t bs_read1 ( bs_t * s)
inlinestatic

References bs_s::b_error, bs_refill(), bs_s::i_left, and bs_s::p.

Referenced by bs_read_ue().

◆ bs_read_se()

int_fast32_t bs_read_se ( bs_t * s)
inlinestatic

References bs_read_ue().

◆ bs_read_ue()

uint_fast32_t bs_read_ue ( bs_t * bs)
inlinestatic

References bs_s::b_error, bs_read(), bs_read1(), bs_s::p, and bs_s::p_end.

Referenced by bs_read_se().

◆ bs_refill()

int bs_refill ( bs_t * s)
inlinestatic

◆ bs_skip()

void bs_skip ( bs_t * s,
size_t i_count )
inlinestatic

◆ bs_write()

void bs_write ( bs_t * s,
uint8_t i_count,
uint32_t i_bits )
inlinestatic

◆ bs_write_align()

void bs_write_align ( bs_t * s,
uint8_t v )
inlinestatic

◆ bs_write_init()

void bs_write_init ( bs_t * s,
void * p_data,
size_t i_data )
inlinestatic

References bs_s::b_read_only, and bs_init().