27 #ifndef AVCODEC_CABAC_FUNCTIONS_H
28 #define AVCODEC_CABAC_FUNCTIONS_H
35 #ifndef UNCHECKED_BITSTREAM_READER
36 #define UNCHECKED_BITSTREAM_READER !CONFIG_SAFE_BITSTREAM_READER
54 #if !defined(get_cabac_bypass) || !defined(get_cabac_terminate)
62 #if !UNCHECKED_BITSTREAM_READER
69 #ifndef get_cabac_terminate
79 #ifndef get_cabac_inline
99 #if !UNCHECKED_BITSTREAM_READER
106 #ifndef get_cabac_inline
112 c->
range -= RangeLPS;
123 c->
range<<= lps_mask;
139 #ifndef get_cabac_bypass
157 #ifndef get_cabac_bypass_sign
170 return (val^mask)-
mask;
178 #ifndef get_cabac_terminate
const char const char void * val
static int shift(int a, int b)
const uint8_t * bytestream_end
static void renorm_cabac_decoder_once(CABACContext *c)
static int av_unused get_cabac(CABACContext *c, uint8_t *const state)
static const uint8_t *const ff_h264_last_coeff_flag_offset_8x8
static int av_noinline av_unused get_cabac_noinline(CABACContext *c, uint8_t *const state)
const uint8_t * bytestream
static av_unused const uint8_t * skip_bytes(CABACContext *c, int n)
Skip n bytes and reset the decoder.
static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t *const state)
static const uint16_t mask[17]
const uint8_t * bytestream_start
#define H264_LAST_COEFF_FLAG_OFFSET_8x8_OFFSET
int ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size)
static int av_unused get_cabac_terminate(CABACContext *c)
static void refill(CABACContext *c)
#define H264_MLPS_STATE_OFFSET
const uint8_t ff_h264_cabac_tables[512+4 *2 *64+4 *64+63]
static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val)
static int av_unused get_cabac_bypass(CABACContext *c)
#define H264_NORM_SHIFT_OFFSET
static void refill2(CABACContext *c)
static const uint8_t *const ff_h264_lps_range
static const uint8_t *const ff_h264_mlps_state
Context Adaptive Binary Arithmetic Coder.
static const uint8_t *const ff_h264_norm_shift
#define H264_LPS_RANGE_OFFSET