FFmpeg
Macros | Functions | Variables
cabac_functions.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "libavutil/attributes.h"
#include "libavutil/intmath.h"
#include "cabac.h"
#include "config.h"

Go to the source code of this file.

Macros

#define UNCHECKED_BITSTREAM_READER   !CONFIG_SAFE_BITSTREAM_READER
 

Functions

static void refill (CABACContext *c)
 
static void renorm_cabac_decoder_once (CABACContext *c)
 
static void refill2 (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)
 
static const av_unused uint8_t * skip_bytes (CABACContext *c, int n)
 Skip n bytes and reset the decoder. More...
 

Variables

static const uint8_t *const ff_h264_norm_shift = ff_h264_cabac_tables + H264_NORM_SHIFT_OFFSET
 
static const uint8_t *const ff_h264_lps_range = ff_h264_cabac_tables + H264_LPS_RANGE_OFFSET
 
static const uint8_t *const ff_h264_mlps_state = ff_h264_cabac_tables + H264_MLPS_STATE_OFFSET
 
static const uint8_t *const ff_h264_last_coeff_flag_offset_8x8 = ff_h264_cabac_tables + H264_LAST_COEFF_FLAG_OFFSET_8x8_OFFSET
 

Detailed Description

Context Adaptive Binary Arithmetic Coder inline functions

Definition in file cabac_functions.h.

Macro Definition Documentation

◆ UNCHECKED_BITSTREAM_READER

#define UNCHECKED_BITSTREAM_READER   !CONFIG_SAFE_BITSTREAM_READER

Definition at line 39 of file cabac_functions.h.

Function Documentation

◆ refill()

static void refill ( CABACContext c)
static

◆ renorm_cabac_decoder_once()

static void renorm_cabac_decoder_once ( CABACContext c)
inlinestatic

Definition at line 79 of file cabac_functions.h.

Referenced by get_cabac_terminate().

◆ refill2()

static void refill2 ( CABACContext c)
static

Definition at line 89 of file cabac_functions.h.

Referenced by get_cabac_inline().

◆ get_cabac_inline()

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

Definition at line 116 of file cabac_functions.h.

Referenced by get_cabac(), and get_cabac_noinline().

◆ get_cabac_noinline()

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

◆ get_cabac()

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

◆ get_cabac_bypass()

static int av_unused get_cabac_bypass ( CABACContext c)
static

Definition at line 149 of file cabac_functions.h.

◆ get_cabac_bypass_sign()

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

Definition at line 167 of file cabac_functions.h.

◆ get_cabac_terminate()

static int av_unused get_cabac_terminate ( CABACContext c)
static

◆ skip_bytes()

static const av_unused uint8_t* skip_bytes ( CABACContext c,
int  n 
)
static

Skip n bytes and reset the decoder.

Returns
the address of the first skipped byte or NULL if there's less than n bytes left

Definition at line 203 of file cabac_functions.h.

Referenced by cabac_reinit(), ff_mms_asf_header_parser(), hls_pcm_sample(), main(), read_header(), and run_psnr().

Variable Documentation

◆ ff_h264_norm_shift

const uint8_t* const ff_h264_norm_shift = ff_h264_cabac_tables + H264_NORM_SHIFT_OFFSET
static

Definition at line 58 of file cabac_functions.h.

Referenced by get_cabac_inline(), refill2(), vvc_get_cabac(), and vvc_refill2().

◆ ff_h264_lps_range

const uint8_t* const ff_h264_lps_range = ff_h264_cabac_tables + H264_LPS_RANGE_OFFSET
static

Definition at line 59 of file cabac_functions.h.

Referenced by get_cabac_inline(), and put_cabac().

◆ ff_h264_mlps_state

const uint8_t* const ff_h264_mlps_state = ff_h264_cabac_tables + H264_MLPS_STATE_OFFSET
static

Definition at line 60 of file cabac_functions.h.

Referenced by get_cabac_inline(), and put_cabac().

◆ ff_h264_last_coeff_flag_offset_8x8

const uint8_t* const ff_h264_last_coeff_flag_offset_8x8 = ff_h264_cabac_tables + H264_LAST_COEFF_FLAG_OFFSET_8x8_OFFSET
static

Definition at line 61 of file cabac_functions.h.

Referenced by decode_cabac_residual_internal().