TUT HEVC Encoder
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
sao.h File Reference

Sample Adaptive Offset filter. More...

#include "checkpoint.h"
#include "cu.h"
#include "encoder.h"
#include "encoderstate.h"
#include "global.h"
#include "kvazaar.h"
#include "videoframe.h"
Include dependency graph for sao.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sao_info_t
 

Macros

#define CHECKPOINT_SAO_INFO(prefix_str, sao)
 

Typedefs

typedef struct sao_info_t sao_info_t
 

Enumerations

enum  sao_type { SAO_TYPE_NONE = 0 , SAO_TYPE_BAND , SAO_TYPE_EDGE }
 
enum  sao_eo_class {
  SAO_EO0 = 0 , SAO_EO1 , SAO_EO2 , SAO_EO3 ,
  SAO_NUM_EO
}
 
enum  sao_eo_cat {
  SAO_EO_CAT0 = 0 , SAO_EO_CAT1 , SAO_EO_CAT2 , SAO_EO_CAT3 ,
  SAO_EO_CAT4 , NUM_SAO_EDGE_CATEGORIES
}
 

Functions

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...
 
void kvz_sao_search_lcu (const encoder_state_t *const state, int lcu_x, int lcu_y)
 
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...
 

Variables

static const vector2d_t g_sao_edge_offsets [SAO_NUM_EO][2]
 

Macro Definition Documentation

◆ CHECKPOINT_SAO_INFO

#define CHECKPOINT_SAO_INFO (   prefix_str,
  sao 
)
Value:
CHECKPOINT(prefix_str " type=%d eo_class=%d ddistortion=%d " \
"merge_left_flag=%d merge_up_flag=%d band_position=%d " \
"offsets[0]=%d offsets[1]=%d offsets[2]=%d offsets[3]=%d offsets[4]=%d", \
(sao).type, (sao).eo_class, (sao).ddistortion, \
(sao).merge_left_flag, (sao).merge_up_flag, (sao).band_position[0], \
(sao).offsets[0], (sao).offsets[1], (sao).offsets[2], (sao).offsets[3], (sao).offsets[4])
#define CHECKPOINT(str,...)
Definition: checkpoint.h:117

Typedef Documentation

◆ sao_info_t

typedef struct sao_info_t sao_info_t

Enumeration Type Documentation

◆ sao_eo_cat

enum sao_eo_cat
Enumerator
SAO_EO_CAT0 
SAO_EO_CAT1 
SAO_EO_CAT2 
SAO_EO_CAT3 
SAO_EO_CAT4 
NUM_SAO_EDGE_CATEGORIES 

◆ sao_eo_class

Enumerator
SAO_EO0 
SAO_EO1 
SAO_EO2 
SAO_EO3 
SAO_NUM_EO 

◆ sao_type

enum sao_type
Enumerator
SAO_TYPE_NONE 
SAO_TYPE_BAND 
SAO_TYPE_EDGE 

Function Documentation

◆ 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:

Variable Documentation

◆ g_sao_edge_offsets

const vector2d_t g_sao_edge_offsets[SAO_NUM_EO][2]
static
Initial value:
= {
{ { -1, 0 }, { 1, 0 } },
{ { 0, -1 }, { 0, 1 } },
{ { -1, -1 }, { 1, 1 } },
{ { 1, -1 }, { -1, 1 } }
}