Update VAQ help text. Update docs. Change some lingering tabs to spaces.

This commit is contained in:
siivonek 2020-04-20 15:21:40 +02:00
parent 35facb20e8
commit 54f438a75c
5 changed files with 16 additions and 13 deletions

View file

@ -165,8 +165,9 @@ Video structure:
--high-tier : Used with --level. Use high tier bitrate limits --high-tier : Used with --level. Use high tier bitrate limits
instead of the main tier limits during encoding. instead of the main tier limits during encoding.
High tier requires level 4 or higher. High tier requires level 4 or higher.
--vaq <integer> : Enable variance adaptive quantization with given --(no-)vaq <integer> : Enable variance adaptive quantization with given
strength, in range 1..20. strength, in range 1..20. Recommended: 5.
[disabled]
Compression tools: Compression tools:
--(no-)deblock <beta:tc> : Deblocking filter. [0:0] --(no-)deblock <beta:tc> : Deblocking filter. [0:0]

View file

@ -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 .SH NAME
kvazaar \- open source HEVC encoder kvazaar \- open source HEVC encoder
.SH SYNOPSIS .SH SYNOPSIS
@ -196,9 +196,10 @@ Used with \-\-level. Use high tier bitrate limits
instead of the main tier limits during encoding. instead of the main tier limits during encoding.
High tier requires level 4 or higher. High tier requires level 4 or higher.
.TP .TP
\fB\-\-vaq <integer> \fB\-\-(no\-)vaq <integer>
Enable variance adaptive quantization with given Enable variance adaptive quantization with given
strength, in range 1..20. strength, in range 1..20. Recommended: 5.
[disabled]
.SS "Compression tools:" .SS "Compression tools:"
.TP .TP

View file

@ -1307,9 +1307,9 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
} }
else if (OPT("fast-residual-cost")) else if (OPT("fast-residual-cost"))
cfg->fast_residual_cost_limit = atoi(value); cfg->fast_residual_cost_limit = atoi(value);
else if (OPT("vaq")) { else if (OPT("vaq")) {
cfg->vaq = (int)atoi(value); cfg->vaq = (int)atoi(value);
} }
else if (OPT("max-merge")) { else if (OPT("max-merge")) {
int max_merge = atoi(value); int max_merge = atoi(value);
if (max_merge < 1 || max_merge > 5) { if (max_merge < 1 || max_merge > 5) {

View file

@ -133,7 +133,7 @@ static const struct option long_options[] = {
{ "set-qp-in-cu", no_argument, NULL, 0 }, { "set-qp-in-cu", no_argument, NULL, 0 },
{ "open-gop", no_argument, NULL, 0 }, { "open-gop", no_argument, NULL, 0 },
{ "no-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 }, { "no-vaq", no_argument, NULL, 0 },
{ "scaling-list", required_argument, NULL, 0 }, { "scaling-list", required_argument, NULL, 0 },
{ "max-merge", 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" " --high-tier : Used with --level. Use high tier bitrate limits\n"
" instead of the main tier limits during encoding.\n" " instead of the main tier limits during encoding.\n"
" High tier requires level 4 or higher.\n" " High tier requires level 4 or higher.\n"
" --vaq <integer> : Enable variance adaptive quantization with given\n" " --(no-)vaq <integer> : Enable variance adaptive quantization with given\n"
" strength, in range 1..20.\n" " strength, in range 1..20. Recommended: 5.\n"
" [disabled]\n"
"\n" "\n"
/* Word wrap to this width to stay under 80 characters (including ") *************/ /* Word wrap to this width to stay under 80 characters (including ") *************/
"Compression tools:\n" "Compression tools:\n"

View file

@ -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; 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 temp_x = 0.0;
double part1 = 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); best_lambda = exp(temp_x);
} }
else { 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); best_lambda = CLIP(0.001, 100000000.0, best_lambda);