hvirtual/quicktime/ffmpeg/libavcodec/cabac.h File Reference

#include <assert.h>

Include dependency graph for cabac.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CABACContext

Defines

#define CABAC_BITS   8
#define CABAC_MASK   ((1<<CABAC_BITS)-1)

Functions

void ff_init_cabac_encoder (CABACContext *c, uint8_t *buf, int buf_size)
void ff_init_cabac_decoder (CABACContext *c, const uint8_t *buf, int buf_size)
void ff_init_cabac_states (CABACContext *c, uint8_t const (*lps_range)[4], uint8_t const *mps_state, uint8_t const *lps_state, int state_count)
static void put_cabac_bit (CABACContext *c, int b)
static void renorm_cabac_encoder (CABACContext *c)
static void put_cabac (CABACContext *c, uint8_t *const state, int bit)
static void put_cabac_static (CABACContext *c, int RangeLPS, int bit)
static void put_cabac_bypass (CABACContext *c, int bit)
static int put_cabac_terminate (CABACContext *c, int bit)
static void put_cabac_u (CABACContext *c, uint8_t *state, int v, int max, int max_index, int truncated)
static void put_cabac_ueg (CABACContext *c, uint8_t *state, int v, int max, int is_signed, int k, int max_index)
static void refill (CABACContext *c)
static void renorm_cabac_decoder (CABACContext *c)
static void renorm_cabac_decoder_once (CABACContext *c)
static int get_cabac (CABACContext *c, uint8_t *const state)
static int get_cabac_bypass (CABACContext *c)
static int get_cabac_terminate (CABACContext *c)
static int get_cabac_u (CABACContext *c, uint8_t *state, int max, int max_index, int truncated)
static int get_cabac_ueg (CABACContext *c, uint8_t *state, int max, int is_signed, int k, int max_index)

Variables

const uint8_t ff_h264_lps_range [64][4]
const uint8_t ff_h264_mps_state [64]
const uint8_t ff_h264_lps_state [64]
const uint8_t ff_h264_norm_shift [256]


Detailed Description

Context Adaptive Binary Arithmetic Coder.

Definition in file cabac.h.


Define Documentation

#define CABAC_BITS   8

#define CABAC_MASK   ((1<<CABAC_BITS)-1)


Function Documentation

void ff_init_cabac_decoder ( CABACContext c,
const uint8_t *  buf,
int  buf_size 
)

Parameters:
buf_size size of buf in bits

Definition at line 113 of file cabac.c.

References CABACContext::bytestream, CABACContext::bytestream_end, CABACContext::bytestream_start, CABAC_BITS, CABACContext::low, and CABACContext::range.

Referenced by decode_mb_cabac(), and decode_slice().

void ff_init_cabac_encoder ( CABACContext c,
uint8_t *  buf,
int  buf_size 
)

Parameters:
buf_size size of buf in bits

Definition at line 96 of file cabac.c.

References PutBitContext::bit_left, init_put_bits(), CABACContext::low, CABACContext::outstanding_count, CABACContext::pb, and CABACContext::range.

Here is the call graph for this function:

void ff_init_cabac_states ( CABACContext c,
uint8_t const (*)  lps_range[4],
uint8_t const *  mps_state,
uint8_t const *  lps_state,
int  state_count 
)

Definition at line 128 of file cabac.c.

References CABACContext::lps_range, CABACContext::lps_state, and CABACContext::mps_state.

Referenced by decode_slice().

static int get_cabac ( CABACContext c,
uint8_t *const   state 
) [inline, static]

static int get_cabac_bypass ( CABACContext c  )  [inline, static]

Definition at line 347 of file cabac.h.

References CABAC_MASK, CABACContext::low, CABACContext::range, and refill().

Referenced by decode_cabac_mb_mvd(), decode_cabac_residual(), and get_cabac_ueg().

Here is the call graph for this function:

static int get_cabac_terminate ( CABACContext c  )  [inline, static]

Returns:
the number of bytes read or 0 if no end

Definition at line 365 of file cabac.h.

References CABACContext::bytestream, CABACContext::bytestream_start, CABAC_BITS, CABACContext::low, CABACContext::range, and renorm_cabac_decoder_once().

Referenced by decode_cabac_intra_mb_type(), and decode_slice().

Here is the call graph for this function:

static int get_cabac_u ( CABACContext c,
uint8_t *  state,
int  max,
int  max_index,
int  truncated 
) [inline, static]

get (truncated) unnary binarization.

Definition at line 378 of file cabac.h.

References get_cabac().

Here is the call graph for this function:

static int get_cabac_ueg ( CABACContext c,
uint8_t *  state,
int  max,
int  is_signed,
int  k,
int  max_index 
) [inline, static]

get unary exp golomb k-th order binarization.

Definition at line 394 of file cabac.h.

References get_cabac(), and get_cabac_bypass().

Here is the call graph for this function:

static void put_cabac ( CABACContext c,
uint8_t *const   state,
int  bit 
) [inline, static]

Definition at line 86 of file cabac.h.

References CABACContext::low, CABACContext::lps_range, CABACContext::lps_state, CABACContext::mps_state, CABACContext::range, and renorm_cabac_encoder().

Referenced by put_cabac_u(), and put_cabac_ueg().

Here is the call graph for this function:

static void put_cabac_bit ( CABACContext c,
int  b 
) [inline, static]

Definition at line 61 of file cabac.h.

References CABACContext::outstanding_count, CABACContext::pb, and put_bits().

Referenced by put_cabac_bypass(), put_cabac_terminate(), and renorm_cabac_encoder().

Here is the call graph for this function:

static void put_cabac_bypass ( CABACContext c,
int  bit 
) [inline, static]

Parameters:
bit 0 -> write zero bit, !=0 write one bit

Definition at line 125 of file cabac.h.

References CABACContext::low, CABACContext::outstanding_count, put_cabac_bit(), and CABACContext::range.

Referenced by put_cabac_ueg().

Here is the call graph for this function:

static void put_cabac_static ( CABACContext c,
int  RangeLPS,
int  bit 
) [inline, static]

Definition at line 105 of file cabac.h.

References CABACContext::low, CABACContext::range, and renorm_cabac_encoder().

Here is the call graph for this function:

static int put_cabac_terminate ( CABACContext c,
int  bit 
) [inline, static]

Returns:
the number of bytes written

Definition at line 151 of file cabac.h.

References flush_put_bits(), CABACContext::low, CABACContext::pb, put_bits(), put_bits_count(), put_cabac_bit(), CABACContext::range, and renorm_cabac_encoder().

Here is the call graph for this function:

static void put_cabac_u ( CABACContext c,
uint8_t *  state,
int  v,
int  max,
int  max_index,
int  truncated 
) [inline, static]

put (truncated) unary binarization.

Definition at line 179 of file cabac.h.

References put_cabac().

Here is the call graph for this function:

static void put_cabac_ueg ( CABACContext c,
uint8_t *  state,
int  v,
int  max,
int  is_signed,
int  k,
int  max_index 
) [inline, static]

put unary exp golomb k-th order binarization.

Definition at line 214 of file cabac.h.

References ABS, put_cabac(), and put_cabac_bypass().

Here is the call graph for this function:

static void refill ( CABACContext c  )  [static]

static void renorm_cabac_decoder ( CABACContext c  )  [inline, static]

Definition at line 288 of file cabac.h.

References CABAC_BITS, CABAC_MASK, CABACContext::low, CABACContext::range, and refill().

Referenced by get_cabac().

Here is the call graph for this function:

static void renorm_cabac_decoder_once ( CABACContext c  )  [inline, static]

Definition at line 297 of file cabac.h.

References CABAC_BITS, CABAC_MASK, CABACContext::low, CABACContext::range, and refill().

Referenced by get_cabac(), and get_cabac_terminate().

Here is the call graph for this function:

static void renorm_cabac_encoder ( CABACContext c  )  [inline, static]

Definition at line 68 of file cabac.h.

References CABACContext::low, CABACContext::outstanding_count, put_cabac_bit(), and CABACContext::range.

Referenced by put_cabac(), put_cabac_static(), and put_cabac_terminate().

Here is the call graph for this function:


Variable Documentation

const uint8_t ff_h264_lps_range[64][4]

Definition at line 32 of file cabac.c.

Referenced by decode_slice().

const uint8_t ff_h264_lps_state[64]

Definition at line 62 of file cabac.c.

Referenced by decode_slice().

const uint8_t ff_h264_mps_state[64]

Definition at line 51 of file cabac.c.

Referenced by decode_slice().

const uint8_t ff_h264_norm_shift[256]

Definition at line 73 of file cabac.c.

Referenced by get_cabac().


Generated on Mon Apr 28 14:03:37 2008 for Cinelerra by  doxygen 1.5.5