#include <assert.h>


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] |
Definition in file cabac.h.
| #define CABAC_BITS 8 |
Definition at line 30 of file cabac.h.
Referenced by decode_mb_cabac(), ff_init_cabac_decoder(), get_cabac(), get_cabac_terminate(), refill(), renorm_cabac_decoder(), and renorm_cabac_decoder_once().
| #define CABAC_MASK ((1<<CABAC_BITS)-1) |
Definition at line 31 of file cabac.h.
Referenced by get_cabac(), get_cabac_bypass(), refill(), renorm_cabac_decoder(), and renorm_cabac_decoder_once().
| void ff_init_cabac_decoder | ( | CABACContext * | c, | |
| const uint8_t * | buf, | |||
| int | buf_size | |||
| ) |
| 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 | |||
| ) |
| 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.

| 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] |
Definition at line 305 of file cabac.h.
References attribute_unused, CABAC_BITS, CABAC_MASK, ff_h264_norm_shift, CABACContext::low, CABACContext::lps_range, CABACContext::lps_state, CABACContext::mps_state, CABACContext::range, renorm_cabac_decoder(), and renorm_cabac_decoder_once().
Referenced by decode_cabac_b_mb_sub_type(), decode_cabac_field_decoding_flag(), decode_cabac_intra_mb_type(), decode_cabac_mb_cbp_chroma(), decode_cabac_mb_cbp_luma(), decode_cabac_mb_chroma_pre_mode(), decode_cabac_mb_dqp(), decode_cabac_mb_intra4x4_pred_mode(), decode_cabac_mb_mvd(), decode_cabac_mb_ref(), decode_cabac_mb_skip(), decode_cabac_mb_transform_size(), decode_cabac_mb_type(), decode_cabac_p_mb_sub_type(), decode_cabac_residual(), get_cabac_u(), and get_cabac_ueg().

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

| static int get_cabac_terminate | ( | CABACContext * | c | ) | [inline, static] |
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().

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

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

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

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

| static void put_cabac_bypass | ( | CABACContext * | c, | |
| int | bit | |||
| ) | [inline, static] |
| 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().

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

| static int put_cabac_terminate | ( | CABACContext * | c, | |
| int | bit | |||
| ) | [inline, static] |
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().

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

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

| static void refill | ( | CABACContext * | c | ) | [static] |
Definition at line 256 of file cabac.h.
References CABACContext::bytestream, CABACContext::bytestream_end, CABAC_BITS, CABAC_MASK, and CABACContext::low.
Referenced by get_cabac_bypass(), get_rac(), renorm_cabac_decoder(), and renorm_cabac_decoder_once().
| 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().

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

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

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