TUT HEVC Encoder
Loading...
Searching...
No Matches
Macros | Functions
quant-generic.c File Reference
#include "strategies/generic/quant-generic.h"
#include <stdlib.h>
#include "encoder.h"
#include "rdo.h"
#include "scalinglist.h"
#include "strategies/strategies-quant.h"
#include "strategyselector.h"
#include "transform.h"
#include "fast_coeff_cost.h"
Include dependency graph for quant-generic.c:

Macros

#define QUANT_SHIFT   14
 
#define SCAN_SET_SIZE   16
 
#define LOG2_SCAN_SET_SIZE   4
 

Functions

void kvz_quant_generic (const encoder_state_t *const state, coeff_t *coef, coeff_t *q_coef, int32_t width, int32_t height, int8_t type, int8_t scan_idx, int8_t block_type)
 quantize transformed coefficents
 
int kvz_quantize_residual_generic (encoder_state_t *const state, const cu_info_t *const cur_cu, const int width, const color_t color, const coeff_scan_order_t scan_order, const int use_trskip, const int in_stride, const int out_stride, const kvz_pixel *const ref_in, const kvz_pixel *const pred_in, kvz_pixel *rec_out, coeff_t *coeff_out, bool early_skip)
 Quantize residual and get both the reconstruction and coeffs.
 
void kvz_dequant_generic (const encoder_state_t *const state, coeff_t *q_coef, coeff_t *coef, int32_t width, int32_t height, int8_t type, int8_t block_type)
 inverse quantize transformed and quantized coefficents
 
static uint32_t coeff_abs_sum_generic (const coeff_t *coeffs, size_t length)
 
static INLINE void get_coeff_weights (uint64_t wts_packed, uint16_t *weights)
 
static double fast_coeff_cost_generic (const coeff_t *coeff, int32_t width, uint64_t weights)
 
static void find_last_scanpos_generic (coeff_t *coef, coeff_t *dest_coeff, int8_t type, int32_t q_bits, const coeff_t *quant_coeff, struct kvz_sh_rates_t *sh_rates, const uint32_t cg_size, uint16_t *ctx_set, const uint32_t *scan, int32_t *cg_last_scanpos, int32_t *last_scanpos, uint32_t cg_num, int32_t *cg_scanpos, int32_t width, int8_t scan_mode)
 
int kvz_strategy_register_quant_generic (void *opaque, uint8_t bitdepth)
 

Macro Definition Documentation

◆ LOG2_SCAN_SET_SIZE

#define LOG2_SCAN_SET_SIZE   4

◆ QUANT_SHIFT

#define QUANT_SHIFT   14

◆ SCAN_SET_SIZE

#define SCAN_SET_SIZE   16

Function Documentation

◆ coeff_abs_sum_generic()

static uint32_t coeff_abs_sum_generic ( const coeff_t coeffs,
size_t  length 
)
static
Here is the caller graph for this function:

◆ fast_coeff_cost_generic()

static double fast_coeff_cost_generic ( const coeff_t coeff,
int32_t  width,
uint64_t  weights 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_last_scanpos_generic()

static void find_last_scanpos_generic ( coeff_t coef,
coeff_t dest_coeff,
int8_t  type,
int32_t  q_bits,
const coeff_t quant_coeff,
struct kvz_sh_rates_t sh_rates,
const uint32_t  cg_size,
uint16_t ctx_set,
const uint32_t scan,
int32_t cg_last_scanpos,
int32_t last_scanpos,
uint32_t  cg_num,
int32_t cg_scanpos,
int32_t  width,
int8_t  scan_mode 
)
static
Here is the caller graph for this function:

◆ get_coeff_weights()

static INLINE void get_coeff_weights ( uint64_t  wts_packed,
uint16_t weights 
)
static
Here is the caller graph for this function:

◆ kvz_dequant_generic()

void kvz_dequant_generic ( const encoder_state_t *const  state,
coeff_t q_coef,
coeff_t coef,
int32_t  width,
int32_t  height,
int8_t  type,
int8_t  block_type 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kvz_quant_generic()

void kvz_quant_generic ( const encoder_state_t *const  state,
coeff_t coef,
coeff_t q_coef,
int32_t  width,
int32_t  height,
int8_t  type,
int8_t  scan_idx,
int8_t  block_type 
)

< Represents scaling through forward transform

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kvz_quantize_residual_generic()

int kvz_quantize_residual_generic ( encoder_state_t *const  state,
const cu_info_t *const  cur_cu,
const int  width,
const color_t  color,
const coeff_scan_order_t  scan_order,
const int  use_trskip,
const int  in_stride,
const int  out_stride,
const kvz_pixel *const  ref_in,
const kvz_pixel *const  pred_in,
kvz_pixel rec_out,
coeff_t coeff_out,
bool  early_skip 
)
Parameters
widthTransform width.
colorColor.
scan_orderCoefficient scan order.
use_trskipWhether transform skip is used.
strideStride for ref_in, pred_in and rec_out.
ref_inReference pixels.
pred_inPredicted pixels.
rec_outReconstructed pixels.
coeff_outCoefficients used for reconstruction of rec_out.
early_skipif this is used for early skip, bypass IT and IQ
Returns
Whether coeff_out contains any non-zero coefficients.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kvz_strategy_register_quant_generic()

int kvz_strategy_register_quant_generic ( void opaque,
uint8_t  bitdepth 
)
Here is the call graph for this function:
Here is the caller graph for this function: