TUT HEVC Encoder
Loading...
Searching...
No Matches
context.h File Reference

Context derivation for CABAC.

#include "cabac.h"
#include "encoderstate.h"
#include "global.h"
Include dependency graph for context.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CNU   154
 

Functions

void kvz_ctx_init (cabac_ctx_t *ctx, uint32_t qp, uint32_t init_value)
 Initialize struct cabac_ctx.
 
void kvz_init_contexts (encoder_state_t *state, int8_t QP, int8_t slice)
 Initialize cabac context to be used for coding.
 
void kvz_context_copy (encoder_state_t *target_state, const encoder_state_t *source_state)
 
int32_t kvz_context_calc_pattern_sig_ctx (const uint32_t *sig_coeff_group_flag, uint32_t pos_x, uint32_t pos_y, int32_t width)
 Pattern decision for context derivation process of significant_coeff_flag.
 
uint32_t kvz_context_get_sig_coeff_group (uint32_t *sig_coeff_group_flag, uint32_t pos_x, uint32_t pos_y, int32_t width)
 
int32_t kvz_context_get_sig_ctx_inc (int32_t pattern_sig_ctx, uint32_t scan_idx, int32_t pos_x, int32_t pos_y, int32_t block_type, int8_t texture_type)
 Context derivation process of coeff_abs_significant_flag.
 

Macro Definition Documentation

◆ CNU

#define CNU   154

Function Documentation

◆ kvz_context_calc_pattern_sig_ctx()

int32_t kvz_context_calc_pattern_sig_ctx ( const uint32_t * sig_coeff_group_flag,
uint32_t pos_x,
uint32_t pos_y,
int32_t width )
Parameters
sig_coeff_group_flagpointer to prior coded significant coeff group
pos_xcolumn of current coefficient group
pos_yrow of current coefficient group
widthwidth of the block
Returns
pattern for current coefficient group
Here is the caller graph for this function:

◆ kvz_context_copy()

void kvz_context_copy ( encoder_state_t * target_state,
const encoder_state_t * source_state )
Here is the caller graph for this function:

◆ kvz_context_get_sig_coeff_group()

uint32_t kvz_context_get_sig_coeff_group ( uint32_t * sig_coeff_group_flag,
uint32_t pos_x,
uint32_t pos_y,
int32_t width )
Here is the caller graph for this function:

◆ kvz_context_get_sig_ctx_inc()

int32_t kvz_context_get_sig_ctx_inc ( int32_t pattern_sig_ctx,
uint32_t scan_idx,
int32_t pos_x,
int32_t pos_y,
int32_t block_type,
int8_t texture_type )
Parameters
pattern_sig_ctxpattern for current coefficient group
scan_idxpixel scan type in use
pos_xcolumn of current scan position
pos_yrow of current scan position
block_typelog2 value of block size if square block, or 4 otherwise
widthwidth of the block
texture_typetexture type (TEXT_LUMA...)
Returns
ctx_inc for current scan position
Here is the caller graph for this function:

◆ kvz_ctx_init()

void kvz_ctx_init ( cabac_ctx_t * ctx,
uint32_t qp,
uint32_t init_value )
Here is the caller graph for this function:

◆ kvz_init_contexts()

void kvz_init_contexts ( encoder_state_t * state,
int8_t QP,
int8_t slice )
Parameters
encoderencoder control struct
slicetype of slice we are coding (P/B/I)
Here is the call graph for this function:
Here is the caller graph for this function: