TUT HEVC Encoder
Macros | Typedefs | Enumerations | Functions
search_inter.h File Reference

Inter prediction parameter search. More...

#include "cu.h"
#include "encoderstate.h"
#include "global.h"
#include "inter.h"
#include "kvazaar.h"
Include dependency graph for search_inter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define KVZ_LUMA_FILTER_TAPS   8
 
#define KVZ_LUMA_FILTER_OFFSET   3
 
#define KVZ_CHROMA_FILTER_TAPS   4
 
#define KVZ_CHROMA_FILTER_OFFSET   1
 
#define KVZ_EXT_PADDING_LUMA   (KVZ_LUMA_FILTER_TAPS - 1)
 
#define KVZ_EXT_PADDING_CHROMA   (KVZ_CHROMA_FILTER_TAPS - 1)
 
#define KVZ_EXT_BLOCK_W_LUMA   (LCU_WIDTH + KVZ_EXT_PADDING_LUMA)
 
#define KVZ_EXT_BLOCK_W_CHROMA   (LCU_WIDTH_C + KVZ_EXT_PADDING_CHROMA)
 

Typedefs

typedef double kvz_mvd_cost_func(const encoder_state_t *state, int x, int y, int mv_shift, int16_t mv_cand[2][2], inter_merge_cand_t merge_cand[5], int16_t num_cand, int32_t ref_idx, double *bitcost)
 

Enumerations

enum  hpel_position { HPEL_POS_HOR = 0 , HPEL_POS_VER = 1 , HPEL_POS_DIA = 2 }
 

Functions

void kvz_search_cu_inter (encoder_state_t *const state, int x, int y, int depth, lcu_t *lcu, double *inter_cost, double *inter_bitcost)
 Update CU to have best modes at this depth. More...
 
void kvz_search_cu_smp (encoder_state_t *const state, int x, int y, int depth, part_mode_t part_mode, lcu_t *lcu, double *inter_cost, double *inter_bitcost)
 Update CU to have best modes at this depth. More...
 
unsigned kvz_inter_satd_cost (const encoder_state_t *state, const lcu_t *lcu, int x, int y)
 
void kvz_cu_cost_inter_rd2 (encoder_state_t *const state, int x, int y, int depth, cu_info_t *cur_cu, lcu_t *lcu, double *inter_cost, double *inter_bitcost)
 Calculate inter coding cost for luma and chroma CBs (–rd=2 accuracy). More...
 
int kvz_get_skip_context (int x, int y, lcu_t *const lcu, cu_array_t *const cu_a)
 

Macro Definition Documentation

◆ KVZ_CHROMA_FILTER_OFFSET

#define KVZ_CHROMA_FILTER_OFFSET   1

◆ KVZ_CHROMA_FILTER_TAPS

#define KVZ_CHROMA_FILTER_TAPS   4

◆ KVZ_EXT_BLOCK_W_CHROMA

#define KVZ_EXT_BLOCK_W_CHROMA   (LCU_WIDTH_C + KVZ_EXT_PADDING_CHROMA)

◆ KVZ_EXT_BLOCK_W_LUMA

#define KVZ_EXT_BLOCK_W_LUMA   (LCU_WIDTH + KVZ_EXT_PADDING_LUMA)

◆ KVZ_EXT_PADDING_CHROMA

#define KVZ_EXT_PADDING_CHROMA   (KVZ_CHROMA_FILTER_TAPS - 1)

◆ KVZ_EXT_PADDING_LUMA

#define KVZ_EXT_PADDING_LUMA   (KVZ_LUMA_FILTER_TAPS - 1)

◆ KVZ_LUMA_FILTER_OFFSET

#define KVZ_LUMA_FILTER_OFFSET   3

◆ KVZ_LUMA_FILTER_TAPS

#define KVZ_LUMA_FILTER_TAPS   8

Typedef Documentation

◆ kvz_mvd_cost_func

typedef double kvz_mvd_cost_func(const encoder_state_t *state, int x, int y, int mv_shift, int16_t mv_cand[2][2], inter_merge_cand_t merge_cand[5], int16_t num_cand, int32_t ref_idx, double *bitcost)

Enumeration Type Documentation

◆ hpel_position

Enumerator
HPEL_POS_HOR 
HPEL_POS_VER 
HPEL_POS_DIA 

Function Documentation

◆ kvz_cu_cost_inter_rd2()

void kvz_cu_cost_inter_rd2 ( encoder_state_t *const  state,
int  x,
int  y,
int  depth,
cu_info_t cur_cu,
lcu_t lcu,
double *  inter_cost,
double *  inter_bitcost 
)

Calculate inter coding cost of each CB. This should match the intra coding cost calculation that is used on this RDO accuracy, since CU type decision is based on this.

The cost includes SSD distortion, transform unit tree bits and motion vector bits for both luma and chroma if enabled.

Parameters
stateencoder state
xx-coordinate of the CU
yy-coordinate of the CU
depthdepth of the CU in the quadtree
lcucontaining LCU
inter_costReturn inter cost
inter_bitcostReturn inter bitcost
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kvz_get_skip_context()

int kvz_get_skip_context ( int  x,
int  y,
lcu_t *const  lcu,
cu_array_t *const  cu_a 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kvz_inter_satd_cost()

unsigned kvz_inter_satd_cost ( const encoder_state_t state,
const lcu_t lcu,
int  x,
int  y 
)

◆ kvz_search_cu_inter()

void kvz_search_cu_inter ( encoder_state_t *const  state,
int  x,
int  y,
int  depth,
lcu_t lcu,
double *  inter_cost,
double *  inter_bitcost 
)

Only searches the 2Nx2N partition mode.

Parameters
stateencoder state
xx-coordinate of the CU
yy-coordinate of the CU
depthdepth of the CU in the quadtree
lcucontaining LCU
inter_costReturn inter cost
inter_bitcostReturn inter bitcost
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kvz_search_cu_smp()

void kvz_search_cu_smp ( encoder_state_t *const  state,
int  x,
int  y,
int  depth,
part_mode_t  part_mode,
lcu_t lcu,
double *  inter_cost,
double *  inter_bitcost 
)

Only searches the given partition mode.

Parameters
stateencoder state
xx-coordinate of the CU
yy-coordinate of the CU
depthdepth of the CU in the quadtree
part_modepartition mode to search
lcucontaining LCU
inter_costReturn inter cost
inter_bitcostReturn inter bitcost
Here is the call graph for this function:
Here is the caller graph for this function: