TUT HEVC Encoder
Functions
sao.c File Reference
#include "sao.h"
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include "cabac.h"
#include "image.h"
#include "rdo.h"
#include "strategies/strategies-sao.h"
Include dependency graph for sao.c:

Functions

static void init_sao_info (sao_info_t *sao)
 
static double sao_mode_bits_none (const encoder_state_t *const state, sao_info_t *sao_top, sao_info_t *sao_left)
 
static double sao_mode_bits_merge (const encoder_state_t *const state, int8_t merge_cand)
 
static double sao_mode_bits_edge (const encoder_state_t *const state, int edge_class, int offsets[NUM_SAO_EDGE_CATEGORIES], sao_info_t *sao_top, sao_info_t *sao_left, unsigned buf_cnt)
 
static double sao_mode_bits_band (const encoder_state_t *const state, int band_position[2], int offsets[10], sao_info_t *sao_top, sao_info_t *sao_left, unsigned buf_cnt)
 
void kvz_calc_sao_offset_array (const encoder_control_t *const encoder, const sao_info_t *sao, int *offset, color_t color_i)
 calculate an array of intensity correlations for each intensity value More...
 
static int calc_sao_band_offsets (int sao_bands[2][32], int offsets[4], int *band_position)
 
static void calc_sao_bands (const encoder_state_t *const state, const kvz_pixel *orig_data, const kvz_pixel *rec_data, int block_width, int block_height, int sao_bands[2][32])
 
void kvz_sao_reconstruct (const encoder_state_t *state, const kvz_pixel *buffer, int stride, int frame_x, int frame_y, int width, int height, const sao_info_t *sao, color_t color)
 Reconstruct SAO. More...
 
static void sao_search_edge_sao (const encoder_state_t *const state, const kvz_pixel *data[], const kvz_pixel *recdata[], int block_width, int block_height, unsigned buf_cnt, sao_info_t *sao_out, sao_info_t *sao_top, sao_info_t *sao_left)
 
static void sao_search_band_sao (const encoder_state_t *const state, const kvz_pixel *data[], const kvz_pixel *recdata[], int block_width, int block_height, unsigned buf_cnt, sao_info_t *sao_out, sao_info_t *sao_top, sao_info_t *sao_left)
 
static void sao_search_best_mode (const encoder_state_t *const state, const kvz_pixel *data[], const kvz_pixel *recdata[], int block_width, int block_height, unsigned buf_cnt, sao_info_t *sao_out, sao_info_t *sao_top, sao_info_t *sao_left, int32_t merge_cost[3])
 
static void sao_search_chroma (const encoder_state_t *const state, const videoframe_t *frame, unsigned x_ctb, unsigned y_ctb, sao_info_t *sao, sao_info_t *sao_top, sao_info_t *sao_left, int32_t merge_cost[3])
 
static void sao_search_luma (const encoder_state_t *const state, const videoframe_t *frame, unsigned x_ctb, unsigned y_ctb, sao_info_t *sao, sao_info_t *sao_top, sao_info_t *sao_left, int32_t merge_cost[3])
 
void kvz_sao_search_lcu (const encoder_state_t *const state, int lcu_x, int lcu_y)
 

Function Documentation

◆ calc_sao_band_offsets()

static int calc_sao_band_offsets ( int  sao_bands[2][32],
int  offsets[4],
int *  band_position 
)
static
Parameters
orig_dataOriginal pixel data. 64x64 for luma, 32x32 for chroma.
rec_dataReconstructed pixel data. 64x64 for luma, 32x32 for chroma.
sao_bandsan array of bands for original and reconstructed block
Here is the caller graph for this function:

◆ calc_sao_bands()

static void calc_sao_bands ( const encoder_state_t *const  state,
const kvz_pixel orig_data,
const kvz_pixel rec_data,
int  block_width,
int  block_height,
int  sao_bands[2][32] 
)
static
Parameters
orig_dataOriginal pixel data. 64x64 for luma, 32x32 for chroma.
rec_dataReconstructed pixel data. 64x64 for luma, 32x32 for chroma.
sao_bandsan array of bands for original and reconstructed block
Here is the caller graph for this function:

◆ init_sao_info()

static void init_sao_info ( sao_info_t sao)
static
Here is the caller graph for this function:

◆ kvz_calc_sao_offset_array()

void kvz_calc_sao_offset_array ( const encoder_control_t *const  encoder,
const sao_info_t sao,
int *  offset,
color_t  color_i 
)
Here is the caller graph for this function:

◆ kvz_sao_reconstruct()

void kvz_sao_reconstruct ( const encoder_state_t state,
const kvz_pixel buffer,
int  stride,
int  frame_x,
int  frame_y,
int  width,
int  height,
const sao_info_t sao,
color_t  color 
)
Parameters
encoderencoder state
bufferBuffer containing the deblocked input pixels. The area to filter starts at index 0.
stridestride of buffer
frame_xx-coordinate of the top-left corner in pixels
frame_yy-coordinate of the top-left corner in pixels
widthwidth of the area to filter
heightheight of the area to filter
saoSAO information
colorcolor plane index
Here is the caller graph for this function:

◆ kvz_sao_search_lcu()

void kvz_sao_search_lcu ( const encoder_state_t *const  state,
int  lcu_x,
int  lcu_y 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sao_mode_bits_band()

static double sao_mode_bits_band ( const encoder_state_t *const  state,
int  band_position[2],
int  offsets[10],
sao_info_t sao_top,
sao_info_t sao_left,
unsigned  buf_cnt 
)
static
Here is the caller graph for this function:

◆ sao_mode_bits_edge()

static double sao_mode_bits_edge ( const encoder_state_t *const  state,
int  edge_class,
int  offsets[NUM_SAO_EDGE_CATEGORIES],
sao_info_t sao_top,
sao_info_t sao_left,
unsigned  buf_cnt 
)
static
Here is the caller graph for this function:

◆ sao_mode_bits_merge()

static double sao_mode_bits_merge ( const encoder_state_t *const  state,
int8_t  merge_cand 
)
static
Here is the caller graph for this function:

◆ sao_mode_bits_none()

static double sao_mode_bits_none ( const encoder_state_t *const  state,
sao_info_t sao_top,
sao_info_t sao_left 
)
static
Here is the caller graph for this function:

◆ sao_search_band_sao()

static void sao_search_band_sao ( const encoder_state_t *const  state,
const kvz_pixel data[],
const kvz_pixel recdata[],
int  block_width,
int  block_height,
unsigned  buf_cnt,
sao_info_t sao_out,
sao_info_t sao_top,
sao_info_t sao_left 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sao_search_best_mode()

static void sao_search_best_mode ( const encoder_state_t *const  state,
const kvz_pixel data[],
const kvz_pixel recdata[],
int  block_width,
int  block_height,
unsigned  buf_cnt,
sao_info_t sao_out,
sao_info_t sao_top,
sao_info_t sao_left,
int32_t  merge_cost[3] 
)
static
Parameters
dataArray of pointers to reference pixels.
recdataArray of pointers to reconstructed pixels.
block_widthWidth of the area to be examined.
block_heightHeight of the area to be examined.
buf_cntNumber of pointers data and recdata have.
sao_outOutput parameter for the best sao parameters.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sao_search_chroma()

static void sao_search_chroma ( const encoder_state_t *const  state,
const videoframe_t frame,
unsigned  x_ctb,
unsigned  y_ctb,
sao_info_t sao,
sao_info_t sao_top,
sao_info_t sao_left,
int32_t  merge_cost[3] 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sao_search_edge_sao()

static void sao_search_edge_sao ( const encoder_state_t *const  state,
const kvz_pixel data[],
const kvz_pixel recdata[],
int  block_width,
int  block_height,
unsigned  buf_cnt,
sao_info_t sao_out,
sao_info_t sao_top,
sao_info_t sao_left 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sao_search_luma()

static void sao_search_luma ( const encoder_state_t *const  state,
const videoframe_t frame,
unsigned  x_ctb,
unsigned  y_ctb,
sao_info_t sao,
sao_info_t sao_top,
sao_info_t sao_left,
int32_t  merge_cost[3] 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: