libavcodec/cabac.h File Reference

Context Adaptive Binary Arithmetic Coder. More...

#include "bitstream.h"
#include <assert.h>
#include "libavutil/x86_cpu.h"

Go to the source code of this file.

Data Structures

struct  CABACContext

Defines

#define CABAC_BITS   16
#define CABAC_MASK   ((1<<CABAC_BITS)-1)
#define BRANCHLESS_CABAC_DECODER   1
#define LOW   "0"
#define RANGE   "4"
#define BYTESTART   "12"
#define BYTE   "16"
#define BYTEEND   "20"

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)
static void put_cabac_bit (CABACContext *c, int b)
static void renorm_cabac_encoder (CABACContext *c)
static void refill (CABACContext *c)
static void refill2 (CABACContext *c)
static void renorm_cabac_decoder (CABACContext *c)
static void renorm_cabac_decoder_once (CABACContext *c)
static av_always_inline int get_cabac_inline (CABACContext *c, uint8_t *const state)
static int av_noinline av_unused get_cabac_noinline (CABACContext *c, uint8_t *const state)
static int av_unused get_cabac (CABACContext *c, uint8_t *const state)
static int av_unused get_cabac_bypass (CABACContext *c)
static av_always_inline int get_cabac_bypass_sign (CABACContext *c, int val)
static int av_unused get_cabac_terminate (CABACContext *c)

Variables

uint8_t ff_h264_mlps_state [4 *64]
uint8_t ff_h264_lps_range [4 *2 *64]
 rangeTabLPS
uint8_t ff_h264_mps_state [2 *64]
 transIdxMPS
uint8_t ff_h264_lps_state [2 *64]
 transIdxLPS
const uint8_t ff_h264_norm_shift [512]


Detailed Description

Context Adaptive Binary Arithmetic Coder.

Definition in file cabac.h.


Define Documentation

#define BRANCHLESS_CABAC_DECODER   1

Definition at line 38 of file cabac.h.

#define BYTE   "16"

#define BYTEEND   "20"

#define BYTESTART   "12"

#define CABAC_BITS   16

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

#define LOW   "0"

#define RANGE   "4"


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 134 of file cabac.c.

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 117 of file cabac.c.

void ff_init_cabac_states ( CABACContext c  ) 

Definition at line 149 of file cabac.c.

Referenced by decode_slice().

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

static int av_unused get_cabac_bypass ( CABACContext c  )  [static]

Definition at line 591 of file cabac.h.

Referenced by decode_cabac_mb_mvd(), and decode_cabac_residual_internal().

static av_always_inline int get_cabac_bypass_sign ( CABACContext c,
int  val 
) [static]

Definition at line 639 of file cabac.h.

Referenced by decode_cabac_mb_mvd(), and decode_cabac_residual_internal().

static av_always_inline int get_cabac_inline ( CABACContext c,
uint8_t *const   state 
) [static]

Definition at line 371 of file cabac.h.

Referenced by get_cabac(), and get_cabac_noinline().

static int av_noinline av_unused get_cabac_noinline ( CABACContext c,
uint8_t *const   state 
) [static]

static int av_unused get_cabac_terminate ( CABACContext c  )  [static]

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

Definition at line 690 of file cabac.h.

Referenced by decode_cabac_intra_mb_type(), and decode_slice().

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

Definition at line 66 of file cabac.h.

Referenced by renorm_cabac_encoder().

static void refill ( CABACContext c  )  [static]

static void refill2 ( CABACContext c  )  [static]

Definition at line 274 of file cabac.h.

Referenced by get_cabac_inline().

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

Definition at line 293 of file cabac.h.

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

Definition at line 302 of file cabac.h.

Referenced by get_cabac_inline(), and get_cabac_terminate().

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

Definition at line 73 of file cabac.h.


Variable Documentation

uint8_t ff_h264_lps_range[4 *2 *64]

rangeTabLPS

Definition at line 53 of file cabac.c.

Referenced by ff_init_cabac_states(), and get_cabac_inline().

uint8_t ff_h264_lps_state[2 *64]

transIdxLPS

Definition at line 54 of file cabac.c.

Referenced by ff_init_cabac_states(), and get_cabac_inline().

uint8_t ff_h264_mlps_state[4 *64]

Definition at line 52 of file cabac.c.

Referenced by ff_init_cabac_states(), and get_cabac_inline().

uint8_t ff_h264_mps_state[2 *64]

transIdxMPS

Definition at line 55 of file cabac.c.

Referenced by ff_init_cabac_states(), and get_cabac_inline().

const uint8_t ff_h264_norm_shift[512]

Definition at line 90 of file cabac.c.

Referenced by get_cabac_inline(), and refill2().


Generated on Fri Oct 26 02:35:42 2012 for FFmpeg by  doxygen 1.5.8