Quantization and transform functions.
More...
#include "cu.h"
#include "encoder.h"
#include "encoderstate.h"
#include "global.h"
Go to the source code of this file.
|
void | kvz_transformskip (const encoder_control_t *encoder, int16_t *block, int16_t *coeff, int8_t block_size) |
| NxN inverse transform (2D) More...
|
|
void | kvz_itransformskip (const encoder_control_t *encoder, int16_t *block, int16_t *coeff, int8_t block_size) |
| inverse transform skip More...
|
|
void | kvz_transform2d (const encoder_control_t *const encoder, int16_t *block, int16_t *coeff, int8_t block_size, color_t color, cu_type_t type) |
| forward transform (2D) More...
|
|
void | kvz_itransform2d (const encoder_control_t *const encoder, int16_t *block, int16_t *coeff, int8_t block_size, color_t color, cu_type_t type) |
|
int32_t | kvz_get_scaled_qp (int8_t type, int8_t qp, int8_t qp_offset) |
| Get scaled QP used in quantization. More...
|
|
void | kvz_quantize_lcu_residual (encoder_state_t *state, bool luma, bool chroma, int32_t x, int32_t y, uint8_t depth, cu_info_t *cur_cu, lcu_t *lcu, bool early_skip) |
| This function calculates the residual coefficients for a region of the LCU (defined by x, y and depth) and updates the reconstruction with the kvantized residual. More...
|
|
◆ kvz_get_scaled_qp()
int32_t kvz_get_scaled_qp |
( |
int8_t |
type, |
|
|
int8_t |
qp, |
|
|
int8_t |
qp_offset |
|
) |
| |
◆ kvz_itransform2d()
◆ kvz_itransformskip()
void kvz_itransformskip |
( |
const encoder_control_t *const |
encoder, |
|
|
int16_t * |
block, |
|
|
int16_t * |
coeff, |
|
|
int8_t |
block_size |
|
) |
| |
- Parameters
-
coeff | input data (transform coefficients) |
block | output data (residual) |
block_size | width of transform |
◆ kvz_quantize_lcu_residual()
void kvz_quantize_lcu_residual |
( |
encoder_state_t *const |
state, |
|
|
const bool |
luma, |
|
|
const bool |
chroma, |
|
|
const int32_t |
x, |
|
|
const int32_t |
y, |
|
|
const uint8_t |
depth, |
|
|
cu_info_t * |
cur_pu, |
|
|
lcu_t * |
lcu, |
|
|
bool |
early_skip |
|
) |
| |
Processes the TU tree recursively.
Inputs are:
- lcu->rec pixels after prediction for the area
- lcu->ref reference pixels for the area
- lcu->cu for the area
- early_skip if this is used for early skip, bypass IT and IQ
Outputs are:
- lcu->rec reconstruction after quantized residual
- lcu->coeff quantized coefficients for the area
- lcu->cbf coded block flags for the area
- lcu->cu.intra.tr_skip tr skip flags for the area (in case of luma)
◆ kvz_transform2d()
- Parameters
-
block | input residual |
coeff | transform coefficients |
block_size | width of transform |
◆ kvz_transformskip()
void kvz_transformskip |
( |
const encoder_control_t *const |
encoder, |
|
|
int16_t * |
block, |
|
|
int16_t * |
coeff, |
|
|
int8_t |
block_size |
|
) |
| |
- Parameters
-
coeff | input data (transform coefficients) |
block | output data (residual) |
block_size | input data (width of transform) |
◆ kvz_g_chroma_scale
const uint8_t kvz_g_chroma_scale[58] |
|
extern |
◆ kvz_g_inv_quant_scales
const int16_t kvz_g_inv_quant_scales[6] |
|
extern |