mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Remove split attribute from cu_info.
It is no longer used.
This commit is contained in:
parent
4a8088be20
commit
9bd35fcdb1
|
@ -20,29 +20,6 @@
|
|||
#define PSNRMAX (255.0 * 255.0)
|
||||
|
||||
|
||||
/**
|
||||
* \brief Set block splitflag
|
||||
* \param pic picture to use
|
||||
* \param x_scu x SCU position (smallest CU)
|
||||
* \param y_scu y SCU position (smallest CU)
|
||||
* \param depth current CU depth
|
||||
* \param mode mode to set
|
||||
*/
|
||||
void picture_set_block_split(picture *pic, uint32_t x_scu, uint32_t y_scu,
|
||||
uint8_t depth, int8_t split)
|
||||
{
|
||||
uint32_t x, y;
|
||||
int width_in_scu = pic->width_in_lcu << MAX_DEPTH;
|
||||
int block_scu_width = (LCU_WIDTH >> depth) / (LCU_WIDTH >> MAX_DEPTH);
|
||||
|
||||
for (y = y_scu; y < y_scu + block_scu_width; ++y) {
|
||||
int cu_row = y * width_in_scu;
|
||||
for (x = x_scu; x < x_scu + block_scu_width; ++x) {
|
||||
pic->cu_array[depth][cu_row + x].split = split;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set block coded status
|
||||
* \param pic picture to use
|
||||
|
|
|
@ -57,7 +57,6 @@ typedef struct
|
|||
int8_t coded;
|
||||
cu_info_intra intra;
|
||||
cu_info_inter inter;
|
||||
int8_t split;
|
||||
} cu_info;
|
||||
|
||||
/**
|
||||
|
|
|
@ -327,7 +327,6 @@ void search_tree(encoder_control *encoder,
|
|||
if (border) {
|
||||
// Split blocks and remember to change x and y block positions
|
||||
uint8_t change = 1 << (MAX_DEPTH - 1 - depth);
|
||||
SET_SPLITDATA(cur_cu, 1);
|
||||
search_tree(encoder, x_ctb, y_ctb, depth + 1);
|
||||
if (!border_x || border_split_x) {
|
||||
search_tree(encoder, x_ctb + change, y_ctb, depth + 1);
|
||||
|
@ -451,19 +450,16 @@ uint32_t search_best_mode(encoder_control *encoder,
|
|||
&& encoder->in.cur_pic->slicetype != SLICE_I))
|
||||
{
|
||||
// Set split to 1
|
||||
picture_set_block_split(encoder->in.cur_pic, x_ctb, y_ctb, depth, 1);
|
||||
best_cost = cost + lambdaCost;
|
||||
} else if (best_inter_cost != 0 // Else, check if inter cost is smaller or the same as intra
|
||||
&& (best_inter_cost <= best_intra_cost || best_intra_cost == 0)
|
||||
&& encoder->in.cur_pic->slicetype != SLICE_I)
|
||||
{
|
||||
// Set split to 0 and mode to inter.mode
|
||||
picture_set_block_split(encoder->in.cur_pic, x_ctb, y_ctb, depth, 0);
|
||||
inter_set_block(encoder->in.cur_pic, x_ctb, y_ctb, depth, cur_cu);
|
||||
best_cost = best_inter_cost;
|
||||
} else { // Else, dont split and recursively set block mode
|
||||
// Set split to 0 and mode to intra.mode
|
||||
picture_set_block_split(encoder->in.cur_pic, x_ctb, y_ctb, depth, 0);
|
||||
intra_set_block_mode(encoder->in.cur_pic, x_ctb, y_ctb, depth,
|
||||
cur_cu->intra.mode);
|
||||
best_cost = best_intra_cost;
|
||||
|
@ -473,12 +469,10 @@ uint32_t search_best_mode(encoder_control *encoder,
|
|||
&& encoder->in.cur_pic->slicetype != SLICE_I)
|
||||
{
|
||||
// Set split to 0 and mode to inter.mode
|
||||
picture_set_block_split(encoder->in.cur_pic, x_ctb, y_ctb, depth, 0);
|
||||
inter_set_block(encoder->in.cur_pic, x_ctb, y_ctb, depth, cur_cu);
|
||||
best_cost = best_inter_cost;
|
||||
} else {
|
||||
// Set split to 0 and mode to intra.mode
|
||||
picture_set_block_split(encoder->in.cur_pic, x_ctb, y_ctb, depth, 0);
|
||||
intra_set_block_mode(encoder->in.cur_pic, x_ctb, y_ctb, depth,
|
||||
cur_cu->intra.mode);
|
||||
best_cost = best_intra_cost;
|
||||
|
|
Loading…
Reference in a new issue