Try making ultrafast all intra a bit faster

This commit is contained in:
Joose Sainio 2022-08-29 14:11:08 +03:00
parent cd2d4066d5
commit b0b2b0e536
2 changed files with 12 additions and 11 deletions

View file

@ -974,13 +974,14 @@ static double search_cu(
else {
intra_search.pred_cu.intra.mode_chroma = 0;
}
uvg_intra_recon_cu(state,
x, y,
depth, &intra_search,
&intra_search.pred_cu,
lcu,
tree_type, false, true);
if(tree_type != UVG_CHROMA_T) {
if(tree_type != UVG_CHROMA_T && ctrl->cfg.rdo >= 2) {
uvg_intra_recon_cu(state,
x, y,
depth, &intra_search,
&intra_search.pred_cu,
lcu,
tree_type, false, true);
intra_cost += uvg_cu_rd_cost_chroma(state, x_local, y_local, depth, &intra_search.pred_cu, lcu);
}
else {
@ -1201,9 +1202,9 @@ static double search_cu(
// the split costs at least as much as not splitting.
if (cur_cu->type == CU_NOTSET || cbf || state->encoder_control->cfg.cu_split_termination == UVG_CU_SPLIT_TERMINATION_OFF) {
if (split_cost < cost) split_cost += search_cu(state, x, y, depth + 1, work_tree, tree_type);
if (split_cost < cost || 1) split_cost += search_cu(state, x + half_cu, y, depth + 1, work_tree, tree_type);
if (split_cost < cost || 1) split_cost += search_cu(state, x, y + half_cu, depth + 1, work_tree, tree_type);
if (split_cost < cost || 1) split_cost += search_cu(state, x + half_cu, y + half_cu, depth + 1, work_tree, tree_type);
if (split_cost < cost) split_cost += search_cu(state, x + half_cu, y, depth + 1, work_tree, tree_type);
if (split_cost < cost) split_cost += search_cu(state, x, y + half_cu, depth + 1, work_tree, tree_type);
if (split_cost < cost) split_cost += search_cu(state, x + half_cu, y + half_cu, depth + 1, work_tree, tree_type);
} else {
split_cost = INT_MAX;
}

View file

@ -1075,7 +1075,7 @@ static uint8_t search_intra_rough(
FILL(search_proxy, 0);
search_proxy.pred_cu = *pred_cu;
int offset = 4;
int offset = 8;
search_proxy.pred_cu.intra.mode = 0;
uvg_intra_predict(state, refs, &loc, COLOR_Y, preds[0], &search_proxy, NULL, UVG_LUMA_T);
search_proxy.pred_cu.intra.mode = 1;