TUT HEVC Encoder
|
#include "ml_intra_cu_depth_pred.h"
Functions | |
static int | tree_predict_merge_depth_1 (features_s *p_features, double *p_nb_iter, double *p_nb_bad) |
static int | tree_predict_merge_depth_2 (features_s *p_features, double *p_nb_iter, double *p_nb_bad) |
static int | tree_predict_merge_depth_3 (features_s *p_features, double *p_nb_iter, double *p_nb_bad) |
static int | tree_predict_merge_depth_4 (features_s *p_features, double *p_nb_iter, double *p_nb_bad) |
static int | tree_predict_split_depth_0 (features_s *p_features, double *p_nb_iter, double *p_nb_bad) |
static int | tree_predict_split_depth_1 (features_s *p_features, double *p_nb_iter, double *p_nb_bad) |
static int | tree_predict_split_depth_2 (features_s *p_features, double *p_nb_iter, double *p_nb_bad) |
static int | tree_predict_split_depth_3 (features_s *p_features, double *p_nb_iter, double *p_nb_bad) |
ml_intra_ctu_pred_t * | kvz_init_ml_intra_depth_const () |
Allocate the structure and buffer. More... | |
void | kvz_end_ml_intra_depth_const (ml_intra_ctu_pred_t *ml_intra_depth_ctu) |
Fee the bufer and structure. More... | |
static void | features_init_array (features_s *arr_features, int16_t _size, int _qp) |
static double | vect_average_blck_int8 (const kvz_pixel *_mat_src, size_t _x, size_t _x_end, size_t _y, size_t _y_end, size_t _width) |
Compute the average of a block inside an 8 bits 2D vector. More... | |
static double | vect_variance_blck_int8 (const kvz_pixel *_mat_src, size_t _x, size_t _x_end, size_t _y, size_t _y_end, double _avg_blck, size_t _width) |
Compute the variance of a block inside an 8 bits 2D vector. More... | |
static void | features_var_avg_blck (kvz_pixel *arr_luma_px, uint32_t i_xLcu, uint32_t i_yLcu, uint32_t i_xBlck, uint32_t i_yBlck, uint8_t i_blockSize, int32_t i_width, int32_t i_height, double *p_average, double *p_variance) |
Function to compute the average and the variance of a pixel block inside of a LCU. More... | |
static void | features_combine_var (double *arr_var, double *arr_avgLuma, uint32_t i_x, uint32_t i_y, uint32_t i_depth, double *p_varianceC, double *p_avgLumaC) |
Function to combine the variance and mean values of four blocks. More... | |
static double | features_get_var_of_sub_mean (double *arr_avgLuma, int16_t i_sb0, int16_t i_sb1, int16_t i_sb2, int16_t i_sb3) |
Function to combine the variance of the mean values of the sub block. More... | |
static void | features_var_neighbor (features_s *arr_features, int16_t _x, int16_t _y, int16_t _depth) |
Build the neighboring variances of four cu's. More... | |
static void | features_compute (features_s *arr_features, uint8_t i_depth, double *arr_var, double *arr_avg) |
Extract the features from the pixels for a given different depth. More... | |
static void | features_sub_var (features_s *arr_features, features_s *arr_sub_features, uint8_t i_depth) |
Set the features Sub_var from the sub level for a given different depth. More... | |
static void | features_merge_var (features_s *arr_features, features_s *arr_up_features, uint8_t i_rdepth) |
Set the features Merge_var from the up level for a given different depth. More... | |
static void | features_var_of_sub_var (features_s *arr_features, uint8_t i_depth) |
Set the features Var_of_sub_var from the sub level for a given different depth. More... | |
static void | features_compute_all (features_s *arr_features[5], kvz_pixel *luma_px) |
Extract the features from the pixels for all the depth. More... | |
static int | neighbor_constrain_bu (uint8_t *arr_depthMap, int _x, int _y, int _depth, int _level) |
Compute the constrain on the neighboring depth of a cu for a given depth for a BU approach. More... | |
static int8_t | combined_tree_function (int8_t merge_prediction[4], int8_t split_prediction, uint8_t test_id, uint8_t depth) |
static void | fill_depth_matrix_8 (uint8_t *matrix, vect_2D *cu, int8_t curr_depth, int8_t val) |
static void | ml_os_qt_gen (uint8_t *arr_depthMap, features_s *arr_features_cur, features_s *arr_features_up, uint8_t i_depth, int _level, uint8_t limited_flag) |
Generate the PUM depth map in a 8*8 array for a given depth with a Buttom-Up approach. More... | |
static void | os_luma_qt_pred (ml_intra_ctu_pred_t *ml_intra_depth_ctu, kvz_pixel *luma_px, int8_t qp, uint8_t *arr_CDM) |
static void | fill_matrix_with_depth (uint8_t *matrix, int32_t x, int32_t y, int8_t depth) |
static uint8_t | merge_matrix_64 (uint8_t *_mat_seed, uint8_t *_mat_dst) |
Merge the depth of the blocks of a depth map if four blocks of the same depths are found. More... | |
static void | matrix_mask (uint8_t *_mat_mask, const uint8_t *_mat_src, size_t _size_w, size_t _size_h) |
Perform an in place element wise mask between the two matrix. More... | |
static void | matrix_add_level_roi (const uint8_t *_mat_sup, uint8_t *_mat_inf, uint8_t *_mat_sup_dst, int8_t _nb_level, const uint8_t *_mat_roi) |
Add 1 depth level to the depth map. If d + 1 > 4 then d - 1 is done. This function use a mask to add level only on selected roi. More... | |
static void | generate_interval_from_os_pred (ml_intra_ctu_pred_t *ml_intra_depth_ctu, uint8_t *_mat_depth_MEP) |
Generate a search interval of controlled level around a MEP seed. More... | |
void | kvz_lcu_luma_depth_pred (ml_intra_ctu_pred_t *ml_intra_depth_ctu, kvz_pixel *luma_px, int8_t qp) |
Generate the interval of depth predictions based on the luma samples. More... | |
|
static |
|
inlinestatic |
arr_var | Array of 4*4 variances of the LCU. |
arr_avgLuma | Array of 4*4 mean values of the LCU. |
i_x | X coordinate of the top left block. |
i_y | Y coordinate of the top left block. |
i_depth | Depth of the blocks (0,1,2,3 or 4). |
p_varianceC | Pointer to be filled with the combined variance. |
p_avgLumaC | Pointer to be filled with the combined average. |
< Top left sub block index
< Top right sub block index
< Bottom left sub block index
< Bottom right sub block index
|
static |
arr_features | Array of features to be retrieved for the current depth. |
i_depth | Depth to be evaluated. |
arr_var | Array of 16*16 variances. |
arr_avg | Array of 16*16 average lumas. |
|
static |
main_handler | Pointer to the main high level reduction handler. |
p_state | Pointer to the state of the current LCU. |
arr_features_4 | Array of features for level of depth 4. |
arr_features_8 | Array of features for level of depth 3. |
arr_features_16 | Array of features for level of depth 2. |
arr_features_32 | Array of features for level of depth 1. |
p_features64 | Pointer to the features of depth 0. |
< Top left X of the lcu
< Top left Y of the lcu
< Compute the variance for all 4*4 blocs
|
inlinestatic |
arr_avgLuma | Array of 4*4 mean values of the LCU. |
i_sb0 | Index of the sub_blocks 0 in the array of avg values . |
i_sb1 | Index of the sub_blocks 1 in the array of avg values. |
i_sb2 | Index of the sub_blocks 2 in the array of avg values |
i_sb3 | Index of the sub_blocks 3 in the array of avg values |
|
static |
|
static |
arr_features | Array of features to be retrieved for the current depth. |
arr_up_features | Array of features to be retrieved for the upper depth (depth - 1). |
i_rdepth | Depth to be evaluated. |
< Top left sub block index
< Top right sub block index
< Bottom left sub block index
< Bottom right sub block index
|
static |
arr_features | Array of features to be retrieved for the current depth. |
arr_sub_features | Array of features to be retrieved for the sub depth (depth - 1). |
i_rdepth | Depth to be evaluated. |
< Top left sub block index
< Top right sub block index
< Bottom left sub block index
< Bottom right sub block index
|
inlinestatic |
arr_luma_px | Array of the pixels of the block. |
i_xLcu | X coordinate of the lcu. |
i_yLcu | Y coordinate of the lcu. |
i_xBlck | X coordinate of the pixel block inside the LCU. |
i_yBlck | Y coordinate of the pixel block inside the LCU. |
i_blockSize | Size of the block in pixels (4, 8, 16, 32 or 64). |
i_width | Width of the frame in pixels. |
i_height | Height of the frame in pixels. |
p_average | Pointer to be filled with the average. |
p_variance | Pointer to be filled with the variance; |
|
static |
arr_features | Array of features for current depth. |
_x | X position of the first cu in the array. |
_y | Y position of the first cu in the array. |
_depth | Evaluated depth. |
|
static |
arr_features | Array of features to be retrieved for the current depth. |
i_rdepth | Depth to be evaluated. |
|
static |
|
static |
|
static |
_mat_depth_min | Upper depth map (considered as the MEP on call). |
_mat_depth_max | Lower depth map (considered initialized with the MEP values). |
_nb_level | Fixed distance between the two generated depth map. |
< Matrix used to store the ref map
< Matrix used as mask
< Matrix used to store current depth map max
< Copy the original map seed
< Apply the RCDM on the upper map
< Extract the mask
< Add a level only on the masked area
void kvz_end_ml_intra_depth_const | ( | ml_intra_ctu_pred_t * | ml_intra_depth_ctu | ) |
ml_intra_ctu_pred_t * kvz_init_ml_intra_depth_const | ( | void | ) |
void kvz_lcu_luma_depth_pred | ( | ml_intra_ctu_pred_t * | ml_intra_depth_ctu, |
kvz_pixel * | luma_px, | ||
int8_t | qp | ||
) |
|
static |
_mat_sup | Original upper depth map . |
_mat_inf | Lower depth map. |
_mat_sup_dst | Final upper depth map (WARNING: must be a different array as _mat_sup as it can be modified). |
_nb_level | The number of level there should be between inf and sup_dst. |
_mat_roi | Mask used to determine which area should be modified on the _mat_inf (convention is 0 for changed area and 1 else). |
|
static |
_mat_mask | Matrix containing result of the mask (input/output). |
_mat_src | Matrix used for the mask (input). |
_size_w | Width of the matrix. |
_size_h | Height of the matrix. |
|
static |
_mat_seed | Array of the depth used as seed for the merge (WARNING: must be the same as arrDepthMerge (tmp)). |
_mat_dst | Array of the depth merged. |
< All depth 4 blocks are merged by default to depth 3
< Skip the modulo operations and conditional tests
< Skip all the loop process, since 0 depth means there will be no other depths tested
< Offset to go check the three other blocks
< Check if we are on the fourth block of a depth
< Generate the real offset for the array
|
static |
arr_depthMap | Array of the depth map. |
arr_features_cur | Array of features for current depth (i_depth). |
arr_features_up | Array of features for up depth (i_depth-1). |
i_depth | Current depth tested. |
_level | Number of level tested when the algo is Restrained (limited) |
limited_flag | 0 to not test that the 4 blocks are at the same depth 1 to only merge a bloc if the 4 sub blocks are at the same depth |
depth_flag | 0 to not use depth features 1 to use use depth features |
< Check if neighboring blocks are of the same size
|
static |
arr_depthMap | 8*8 depth map. |
_x | X coordinate of the cu in the 8*8 depth map; |
_y | Y coordinate of the cu in the 8*8 depth map; |
_depth | Current depth tested. |
_level | number of depth gap that we want |
|
static |
< Set the depth map to 4 by default
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
_mat_src | First depth map. |
_x | X coordinate of the start of the block inside the matrix. |
_x_end | X coordinate of the end of the block inside the matrix. |
_y | Y coordinate of the start of the block inside the matrix. |
_y_end | Y coordinate of the end of the block inside the matrix. |
_width | Width of the matrix. |
|
inlinestatic |
_mat_src | First depth map. |
_x | X coordinate of the start of the block inside the matrix. |
_x_end | X coordinate of the end of the block inside the matrix. |
_y | Y coordinate of the start of the block inside the matrix. |
_y_end | Y coordinate of the end of the block inside the matrix. |
_avg_blck | Average value of the block. |
_width | Width of the matrix. |