mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
Add a cli option to control whether intra cus are tried to combine on the lower depth when search for said depth is disabled
This commit is contained in:
parent
9e40f435cb
commit
f1f0033bf5
|
@ -183,6 +183,8 @@ int kvz_config_init(kvz_config *cfg)
|
|||
cfg->fastrd_sampling_on = 0;
|
||||
cfg->fastrd_accuracy_check_on = 0;
|
||||
cfg->fastrd_learning_outdir_fn = NULL;
|
||||
|
||||
cfg->combine_intra_cus = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1421,6 +1423,9 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
|
|||
else if OPT("stats-file-prefix") {
|
||||
cfg->stats_file_prefix = strdup(value);
|
||||
}
|
||||
else if OPT("combine-intra-cus") {
|
||||
cfg->combine_intra_cus = atobool(value);
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -167,6 +167,8 @@ static const struct option long_options[] = {
|
|||
{ "fastrd-sampling", no_argument, NULL, 0 },
|
||||
{ "fastrd-accuracy-check", no_argument, NULL, 0 },
|
||||
{ "fastrd-outdir", required_argument, NULL, 0 },
|
||||
{ "combine-intra-cus", no_argument, NULL, 0 },
|
||||
{ "no-combine-intra-cus", no_argument, NULL, 0 },
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
|
@ -578,6 +580,12 @@ void print_help(void)
|
|||
" --ml-pu-depth-intra : Predict the pu-depth-intra using machine\n"
|
||||
" learning trees, overrides the\n"
|
||||
" --pu-depth-intra parameter. [disabled]\n"
|
||||
" --(no-)combine-intra-cus: Whether the encoder tries to code a cu\n"
|
||||
" on lower depth even when search is not\n"
|
||||
" performed on said depth. Should only\n"
|
||||
" be disabled if cus absolutely must not\n"
|
||||
" be larger than limited by the search.\n"
|
||||
" [enabled]"
|
||||
" --tr-depth-intra <int> : Transform split depth for intra blocks [0]\n"
|
||||
" --(no-)bipred : Bi-prediction [disabled]\n"
|
||||
" --cu-split-termination <string> : CU split search termination [zero]\n"
|
||||
|
|
|
@ -479,6 +479,9 @@ typedef struct kvz_config
|
|||
|
||||
char *fastrd_learning_outdir_fn;
|
||||
|
||||
/** \brief whether to try combining intra cus at the lower depth when search
|
||||
* is not performed at said depth*/
|
||||
uint8_t combine_intra_cus;
|
||||
} kvz_config;
|
||||
|
||||
/**
|
||||
|
|
|
@ -754,7 +754,8 @@ static double search_cu(encoder_state_t * const state, int x, int y, int depth,
|
|||
// gets used, at least in the most obvious cases, while avoiding any
|
||||
// searching.
|
||||
if (cur_cu->type == CU_NOTSET && depth < MAX_PU_DEPTH
|
||||
&& x + cu_width <= frame->width && y + cu_width <= frame->height)
|
||||
&& x + cu_width <= frame->width && y + cu_width <= frame->height
|
||||
&& state->encoder_control->cfg.combine_intra_cus)
|
||||
{
|
||||
cu_info_t *cu_d1 = LCU_GET_CU_AT_PX(&work_tree[depth + 1], x_local, y_local);
|
||||
|
||||
|
|
Loading…
Reference in a new issue