mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
[intra rdo] Raise maximum rd level to 4
Separate the rd option for chroma intra mode search from the full intra mode search, i.e., rd=3 enables chroma mode search and rd=4 enables full intra mode search.
This commit is contained in:
parent
ce175c503f
commit
385e91399a
|
@ -552,8 +552,8 @@ void print_help(void)
|
|||
" - 0: Skip intra if inter is good enough.\n"
|
||||
" - 1: Rough intra mode search with SATD.\n"
|
||||
" - 2: Refine intra mode search with SSE.\n"
|
||||
" - 3: Try all intra modes and enable intra\n"
|
||||
" chroma mode search.\n"
|
||||
" - 3: Enable intra chroma mode search.\n"
|
||||
" - 4: Try all intra modes.\n"
|
||||
" --(no-)mv-rdo : Rate-distortion optimized motion vector costs\n"
|
||||
" [disabled]\n"
|
||||
" --(no-)zero-coeff-rdo : If a CU is set inter, check if forcing zero\n"
|
||||
|
|
|
@ -760,7 +760,7 @@ static double search_cu(encoder_state_t * const state, int x, int y, int depth,
|
|||
// into account, so there is less of a chanse of luma mode being
|
||||
// really bad for chroma.
|
||||
cclm_parameters_t cclm_params[2];
|
||||
if (ctrl->cfg.rdo == 3) {
|
||||
if (ctrl->cfg.rdo >= 3) {
|
||||
cur_cu->intra.mode_chroma = kvz_search_cu_intra_chroma(state, x, y, depth, lcu, cclm_params);
|
||||
lcu_fill_cu_info(lcu, x_local, y_local, cu_width, cu_width, cur_cu);
|
||||
}
|
||||
|
|
|
@ -1937,7 +1937,7 @@ static void search_pu_inter(encoder_state_t * const state,
|
|||
}
|
||||
|
||||
// TODO: this probably should have a separate command line option
|
||||
if (cfg->rdo == 3) {
|
||||
if (cfg->rdo >= 3) {
|
||||
search_pu_inter_bipred(&info, depth, lcu, cur_cu, inter_cost, inter_bitcost);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -969,7 +969,7 @@ int8_t kvz_search_cu_intra_chroma(encoder_state_t * const state,
|
|||
const int8_t modes_in_depth[5] = { 1, 1, 1, 1, 2 };
|
||||
int num_modes = modes_in_depth[depth];
|
||||
|
||||
if (state->encoder_control->cfg.rdo == 3) {
|
||||
if (state->encoder_control->cfg.rdo >= 3) {
|
||||
num_modes = state->encoder_control->cfg.cclm ? 8 : 5;
|
||||
}
|
||||
|
||||
|
@ -1054,7 +1054,7 @@ void kvz_search_cu_intra(encoder_state_t * const state,
|
|||
kvz_pixel *ref_pixels = &lcu->ref.y[lcu_px.x + lcu_px.y * LCU_WIDTH];
|
||||
|
||||
int8_t number_of_modes = 0;
|
||||
bool skip_rough_search = (depth == 0 || state->encoder_control->cfg.rdo >= 3);
|
||||
bool skip_rough_search = (depth == 0 || state->encoder_control->cfg.rdo >= 4);
|
||||
if (!skip_rough_search) {
|
||||
number_of_modes = search_intra_rough(state,
|
||||
ref_pixels, LCU_WIDTH,
|
||||
|
@ -1075,9 +1075,9 @@ void kvz_search_cu_intra(encoder_state_t * const state,
|
|||
const int32_t rdo_level = state->encoder_control->cfg.rdo;
|
||||
if (rdo_level >= 2 || skip_rough_search) {
|
||||
int number_of_modes_to_search;
|
||||
if (rdo_level == 3) {
|
||||
if (rdo_level == 4) {
|
||||
number_of_modes_to_search = 67;
|
||||
} else if (rdo_level == 2) {
|
||||
} else if (rdo_level == 2 || rdo_level == 3) {
|
||||
number_of_modes_to_search = (cu_width == 4) ? 3 : 2;
|
||||
} else {
|
||||
// Check only the predicted modes.
|
||||
|
|
Loading…
Reference in a new issue