TUT HEVC Encoder
Loading...
Searching...
No Matches
Functions | Variables
intra.c File Reference
#include "intra.h"
#include <stdlib.h>
#include "image.h"
#include "kvz_math.h"
#include "strategies/strategies-intra.h"
#include "tables.h"
#include "transform.h"
#include "videoframe.h"
Include dependency graph for intra.c:

Functions

int8_t kvz_intra_get_dir_luma_predictor (const uint32_t x, const uint32_t y, int8_t *preds, const cu_info_t *const cur_pu, const cu_info_t *const left_pu, const cu_info_t *const above_pu)
 Function for deriving intra luma predictions.
 
static void intra_filter_reference (int_fast8_t log2_width, kvz_intra_references *refs)
 
static void intra_post_process_angular (unsigned width, unsigned stride, const kvz_pixel *ref, kvz_pixel *block)
 
static void intra_pred_dc (const int_fast8_t log2_width, const kvz_pixel *const ref_top, const kvz_pixel *const ref_left, kvz_pixel *const out_block)
 Generage planar prediction.
 
void kvz_intra_predict (kvz_intra_references *refs, int_fast8_t log2_width, int_fast8_t mode, color_t color, kvz_pixel *dst, bool filter_boundary)
 Generate intra predictions.
 
void kvz_intra_build_reference_any (const int_fast8_t log2_width, const color_t color, const vector2d_t *const luma_px, const vector2d_t *const pic_px, const lcu_t *const lcu, kvz_intra_references *const refs)
 
void kvz_intra_build_reference_inner (const int_fast8_t log2_width, const color_t color, const vector2d_t *const luma_px, const vector2d_t *const pic_px, const lcu_t *const lcu, kvz_intra_references *const refs)
 
void kvz_intra_build_reference (const int_fast8_t log2_width, const color_t color, const vector2d_t *const luma_px, const vector2d_t *const pic_px, const lcu_t *const lcu, kvz_intra_references *const refs)
 Generage angular predictions.
 
static void intra_recon_tb_leaf (encoder_state_t *const state, int x, int y, int depth, int8_t intra_mode, lcu_t *lcu, color_t color)
 
void kvz_intra_recon_cu (encoder_state_t *const state, int x, int y, int depth, int8_t mode_luma, int8_t mode_chroma, cu_info_t *cur_cu, lcu_t *lcu)
 Reconstruct an intra CU.
 

Variables

static const uint8_t num_ref_pixels_top [16][16]
 
static const uint8_t num_ref_pixels_left [16][16]
 

Function Documentation

◆ intra_filter_reference()

static void intra_filter_reference ( int_fast8_t  log2_width,
kvz_intra_references refs 
)
static
Here is the caller graph for this function:

◆ intra_post_process_angular()

static void intra_post_process_angular ( unsigned  width,
unsigned  stride,
const kvz_pixel ref,
kvz_pixel block 
)
static
Here is the caller graph for this function:

◆ intra_pred_dc()

static void intra_pred_dc ( const int_fast8_t  log2_width,
const kvz_pixel *const  ref_top,
const kvz_pixel *const  ref_left,
kvz_pixel *const  out_block 
)
static
Parameters
log2_widthLog2 of width, range 2..5.
in_ref_abovePointer to -1 index of above reference, length=width*2+1.
in_ref_leftPointer to -1 index of left reference, length=width*2+1.
dstBuffer of size width*width.
Here is the caller graph for this function:

◆ intra_recon_tb_leaf()

static void intra_recon_tb_leaf ( encoder_state_t *const  state,
int  x,
int  y,
int  depth,
int8_t  intra_mode,
lcu_t lcu,
color_t  color 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kvz_intra_build_reference()

void kvz_intra_build_reference ( const int_fast8_t  log2_width,
const color_t  color,
const vector2d_t *const  luma_px,
const vector2d_t *const  pic_px,
const lcu_t *const  lcu,
kvz_intra_references *const  refs 
)
Parameters
widthWidth in pixels, range 4..32.
colorWhat color pixels to use.
luma_pxLuma coordinates of the prediction block.
pic_pxPicture dimensions in luma pixels.
lcuLCU struct.
out_left_refLeft reference pixels, index 0 is the top-left.
out_top_refTop reference pixels, index 0 is the top-left.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kvz_intra_build_reference_any()

void kvz_intra_build_reference_any ( const int_fast8_t  log2_width,
const color_t  color,
const vector2d_t *const  luma_px,
const vector2d_t *const  pic_px,
const lcu_t *const  lcu,
kvz_intra_references *const  refs 
)
Here is the caller graph for this function:

◆ kvz_intra_build_reference_inner()

void kvz_intra_build_reference_inner ( const int_fast8_t  log2_width,
const color_t  color,
const vector2d_t *const  luma_px,
const vector2d_t *const  pic_px,
const lcu_t *const  lcu,
kvz_intra_references *const  refs 
)
Here is the caller graph for this function:

◆ kvz_intra_get_dir_luma_predictor()

int8_t kvz_intra_get_dir_luma_predictor ( const uint32_t  x,
const uint32_t  y,
int8_t preds,
const cu_info_t *const  cur_pu,
const cu_info_t *const  left_pu,
const cu_info_t *const  above_pu 
)
Parameters
xx-coordinate of the PU in pixels
yy-coordinate of the PU in pixels
predsoutput buffer for 3 predictions
cur_puPU to check
left_puPU to the left of cur_pu
above_puPU above cur_pu
Returns
1 if predictions are found, otherwise 0
Here is the caller graph for this function:

◆ kvz_intra_predict()

void kvz_intra_predict ( kvz_intra_references refs,
int_fast8_t  log2_width,
int_fast8_t  mode,
color_t  color,
kvz_pixel dst,
bool  filter_boundary 
)
Parameters
refsReference pixels used for the prediction.
log2_widthWidth of the predicted block.
modeIntra mode used for the prediction.
colorColor of the prediction.
dstBuffer for the predicted pixels.
filter_boundaryWhether to filter the boundary on modes 10 and 26.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kvz_intra_recon_cu()

void kvz_intra_recon_cu ( encoder_state_t *const  state,
int  x,
int  y,
int  depth,
int8_t  mode_luma,
int8_t  mode_chroma,
cu_info_t cur_cu,
lcu_t lcu 
)
Parameters
stateencoder state
xx-coordinate of the CU in luma pixels
yy-coordinate of the CU in luma pixels
depthdepth in the CU tree
mode_lumaintra mode for luma, or -1 to skip luma recon
mode_chromaintra mode for chroma, or -1 to skip chroma recon
cur_cupointer to the CU, or NULL to fetch CU from LCU
lcucontaining LCU
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ num_ref_pixels_left

const uint8_t num_ref_pixels_left[16][16]
static
Initial value:
= {
{ 64, 4, 8, 4, 16, 4, 8, 4, 32, 4, 8, 4, 16, 4, 8, 4 },
{ 60, 4, 4, 4, 12, 4, 4, 4, 28, 4, 4, 4, 12, 4, 4, 4 },
{ 56, 4, 8, 4, 8, 4, 8, 4, 24, 4, 8, 4, 8, 4, 8, 4 },
{ 52, 4, 4, 4, 4, 4, 4, 4, 20, 4, 4, 4, 4, 4, 4, 4 },
{ 48, 4, 8, 4, 16, 4, 8, 4, 16, 4, 8, 4, 16, 4, 8, 4 },
{ 44, 4, 4, 4, 12, 4, 4, 4, 12, 4, 4, 4, 12, 4, 4, 4 },
{ 40, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 },
{ 36, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 },
{ 32, 4, 8, 4, 16, 4, 8, 4, 32, 4, 8, 4, 16, 4, 8, 4 },
{ 28, 4, 4, 4, 12, 4, 4, 4, 28, 4, 4, 4, 12, 4, 4, 4 },
{ 24, 4, 8, 4, 8, 4, 8, 4, 24, 4, 8, 4, 8, 4, 8, 4 },
{ 20, 4, 4, 4, 4, 4, 4, 4, 20, 4, 4, 4, 4, 4, 4, 4 },
{ 16, 4, 8, 4, 16, 4, 8, 4, 16, 4, 8, 4, 16, 4, 8, 4 },
{ 12, 4, 4, 4, 12, 4, 4, 4, 12, 4, 4, 4, 12, 4, 4, 4 },
{ 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 },
{ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }
}

◆ num_ref_pixels_top

const uint8_t num_ref_pixels_top[16][16]
static
Initial value:
= {
{ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 },
{ 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 },
{ 16, 12, 8, 4, 16, 12, 8, 4, 16, 12, 8, 4, 16, 12, 8, 4 },
{ 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 },
{ 32, 28, 24, 20, 16, 12, 8, 4, 32, 28, 24, 20, 16, 12, 8, 4 },
{ 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 },
{ 16, 12, 8, 4, 16, 12, 8, 4, 16, 12, 8, 4, 16, 12, 8, 4 },
{ 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 },
{ 64, 60, 56, 52, 48, 44, 40, 36, 32, 28, 24, 20, 16, 12, 8, 4 },
{ 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 },
{ 16, 12, 8, 4, 16, 12, 8, 4, 16, 12, 8, 4, 16, 12, 8, 4 },
{ 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 },
{ 32, 28, 24, 20, 16, 12, 8, 4, 32, 28, 24, 20, 16, 12, 8, 4 },
{ 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 },
{ 16, 12, 8, 4, 16, 12, 8, 4, 16, 12, 8, 4, 16, 12, 8, 4 },
{ 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 }
}