From 54f438a75cf2d33b056066701161ed0aac31df57 Mon Sep 17 00:00:00 2001 From: siivonek Date: Mon, 20 Apr 2020 15:21:40 +0200 Subject: [PATCH] Update VAQ help text. Update docs. Change some lingering tabs to spaces. --- README.md | 5 +++-- doc/kvazaar.1 | 7 ++++--- src/cfg.c | 6 +++--- src/cli.c | 7 ++++--- src/rate_control.c | 4 ++-- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e32ddeef..db4241e2 100644 --- a/README.md +++ b/README.md @@ -165,8 +165,9 @@ Video structure: --high-tier : Used with --level. Use high tier bitrate limits instead of the main tier limits during encoding. High tier requires level 4 or higher. - --vaq : Enable variance adaptive quantization with given - strength, in range 1..20. + --(no-)vaq : Enable variance adaptive quantization with given + strength, in range 1..20. Recommended: 5. + [disabled] Compression tools: --(no-)deblock : Deblocking filter. [0:0] diff --git a/doc/kvazaar.1 b/doc/kvazaar.1 index 1e58ca90..a829d671 100644 --- a/doc/kvazaar.1 +++ b/doc/kvazaar.1 @@ -1,4 +1,4 @@ -.TH KVAZAAR "1" "March 2020" "kvazaar v1.3.0" "User Commands" +.TH KVAZAAR "1" "April 2020" "kvazaar v1.3.0" "User Commands" .SH NAME kvazaar \- open source HEVC encoder .SH SYNOPSIS @@ -196,9 +196,10 @@ Used with \-\-level. Use high tier bitrate limits instead of the main tier limits during encoding. High tier requires level 4 or higher. .TP -\fB\-\-vaq +\fB\-\-(no\-)vaq Enable variance adaptive quantization with given -strength, in range 1..20. +strength, in range 1..20. Recommended: 5. +[disabled] .SS "Compression tools:" .TP diff --git a/src/cfg.c b/src/cfg.c index 4f4cf419..e6d6427b 100644 --- a/src/cfg.c +++ b/src/cfg.c @@ -1307,9 +1307,9 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) } else if (OPT("fast-residual-cost")) cfg->fast_residual_cost_limit = atoi(value); - else if (OPT("vaq")) { - cfg->vaq = (int)atoi(value); - } + else if (OPT("vaq")) { + cfg->vaq = (int)atoi(value); + } else if (OPT("max-merge")) { int max_merge = atoi(value); if (max_merge < 1 || max_merge > 5) { diff --git a/src/cli.c b/src/cli.c index 7888d430..a7db1205 100644 --- a/src/cli.c +++ b/src/cli.c @@ -133,7 +133,7 @@ static const struct option long_options[] = { { "set-qp-in-cu", no_argument, NULL, 0 }, { "open-gop", no_argument, NULL, 0 }, { "no-open-gop", no_argument, NULL, 0 }, - { "vaq", required_argument, NULL, 0 }, + { "vaq", required_argument, NULL, 0 }, { "no-vaq", no_argument, NULL, 0 }, { "scaling-list", required_argument, NULL, 0 }, { "max-merge", required_argument, NULL, 0 }, @@ -459,8 +459,9 @@ void print_help(void) " --high-tier : Used with --level. Use high tier bitrate limits\n" " instead of the main tier limits during encoding.\n" " High tier requires level 4 or higher.\n" - " --vaq : Enable variance adaptive quantization with given\n" - " strength, in range 1..20.\n" + " --(no-)vaq : Enable variance adaptive quantization with given\n" + " strength, in range 1..20. Recommended: 5.\n" + " [disabled]\n" "\n" /* Word wrap to this width to stay under 80 characters (including ") *************/ "Compression tools:\n" diff --git a/src/rate_control.c b/src/rate_control.c index 56bff2c9..68f4d41a 100644 --- a/src/rate_control.c +++ b/src/rate_control.c @@ -399,7 +399,7 @@ static double solve_cubic_equation(const encoder_state_config_frame_t * const st delta = para_bb * para_bb - 4 * para_aa*para_cc; - if (delta > 0.0) //Check whether delta is right + if (delta > 0.0) //Check whether delta is right { double temp_x = 0.0; double part1 = 0.0; @@ -426,7 +426,7 @@ static double solve_cubic_equation(const encoder_state_config_frame_t * const st best_lambda = exp(temp_x); } else { - best_lambda = est_lambda; //Use the original picture estimated lambda for the current CTU + best_lambda = est_lambda; //Use the original picture estimated lambda for the current CTU } best_lambda = CLIP(0.001, 100000000.0, best_lambda);