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)   bs_write_align( s, 0 )
 
#define bs_align_1(s)   bs_write_align( s, 1 )
 

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)    bs_write_align( s, 0 )

◆ bs_align_1

#define bs_align_1 (   s)    bs_write_align( s, 1 )

Typedef Documentation

◆ bs_t

typedef struct bs_s bs_t

Function Documentation

◆ bs_align()

static void bs_align ( bs_t s)
inlinestatic

References bs_s::i_left.

◆ bs_aligned()

static bool bs_aligned ( bs_t s)
inlinestatic

References bs_s::i_left.

◆ bs_eof()

static bool bs_eof ( bs_t s)
inlinestatic

References bs_refill().

◆ bs_error()

static bool bs_error ( const bs_t s)
inlinestatic

References bs_s::b_error.

◆ bs_impl_bytes_forward()

static 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()

static 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()

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

◆ bs_init_custom()

static 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()

static size_t bs_pos ( const bs_t s)
inlinestatic

◆ bs_read()

static uint32_t bs_read ( bs_t s,
uint8_t  i_count 
)
inlinestatic

◆ bs_read1()

static 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()

static int_fast32_t bs_read_se ( bs_t s)
inlinestatic

References bs_read_ue().

◆ bs_read_ue()

static 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()

static int bs_refill ( bs_t s)
inlinestatic

◆ bs_skip()

static void bs_skip ( bs_t s,
size_t  i_count 
)
inlinestatic

◆ bs_write()

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

◆ bs_write_align()

static void bs_write_align ( bs_t s,
uint8_t  v 
)
inlinestatic

◆ bs_write_init()

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

References bs_s::b_read_only, and bs_init().