Add --(no-)open-gop option

This commit is contained in:
Marko Viitanen 2018-10-02 09:55:30 +03:00
parent 8bef85e056
commit 954f07e3d7
5 changed files with 15 additions and 1 deletions

View file

@ -117,6 +117,7 @@ Video structure:
- 8: B-frame pyramid of length 8 - 8: B-frame pyramid of length 8
- lp-<string>: Low-delay P-frame GOP - lp-<string>: Low-delay P-frame GOP
(e.g. lp-g8d4t2, see README) (e.g. lp-g8d4t2, see README)
--(no-)open-gop : Use open GOP configuration. [enabled]
--cqmfile <filename> : Read custom quantization matrices from a file. --cqmfile <filename> : Read custom quantization matrices from a file.
--bitrate <integer> : Target bitrate [0] --bitrate <integer> : Target bitrate [0]
- 0: Disable rate control. - 0: Disable rate control.

View file

@ -1,4 +1,4 @@
.TH KVAZAAR "1" "August 2018" "kvazaar v1.2.0" "User Commands" .TH KVAZAAR "1" "October 2018" "kvazaar v1.2.0" "User Commands"
.SH NAME .SH NAME
kvazaar \- open source HEVC encoder kvazaar \- open source HEVC encoder
.SH SYNOPSIS .SH SYNOPSIS
@ -121,6 +121,9 @@ GOP structure [8]
\- lp\-<string>: Low\-delay P\-frame GOP \- lp\-<string>: Low\-delay P\-frame GOP
(e.g. lp\-g8d4t2, see README) (e.g. lp\-g8d4t2, see README)
.TP .TP
\fB\-\-(no\-)open\-gop
Use open GOP configuration. [enabled]
.TP
\fB\-\-cqmfile <filename> \fB\-\-cqmfile <filename>
Read custom quantization matrices from a file. Read custom quantization matrices from a file.
.TP .TP

View file

@ -117,6 +117,7 @@ int kvz_config_init(kvz_config *cfg)
cfg->gop_lp_definition.d = 3; cfg->gop_lp_definition.d = 3;
cfg->gop_lp_definition.t = 1; cfg->gop_lp_definition.t = 1;
cfg->open_gop = true;
cfg->roi.width = 0; cfg->roi.width = 0;
cfg->roi.height = 0; cfg->roi.height = 0;
@ -939,6 +940,9 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
return 0; return 0;
} }
} }
else if OPT("open-gop") {
cfg->open_gop = (bool)atobool(value);
}
else if OPT("bipred") else if OPT("bipred")
cfg->bipred = atobool(value); cfg->bipred = atobool(value);
else if OPT("bitrate") else if OPT("bitrate")

View file

@ -131,6 +131,8 @@ static const struct option long_options[] = {
{ "me-steps", required_argument, NULL, 0 }, { "me-steps", required_argument, NULL, 0 },
{ "fast-residual-cost", required_argument, NULL, 0 }, { "fast-residual-cost", required_argument, NULL, 0 },
{ "set-qp-in-cu", no_argument, NULL, 0 }, { "set-qp-in-cu", no_argument, NULL, 0 },
{ "open-gop", no_argument, NULL, 0 },
{ "no-open-gop", no_argument, NULL, 0 },
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
@ -395,6 +397,7 @@ void print_help(void)
" - 8: B-frame pyramid of length 8\n" " - 8: B-frame pyramid of length 8\n"
" - lp-<string>: Low-delay P-frame GOP\n" " - lp-<string>: Low-delay P-frame GOP\n"
" (e.g. lp-g8d4t2, see README)\n" " (e.g. lp-g8d4t2, see README)\n"
" --(no-)open-gop : Use open GOP configuration. [enabled]\n"
" --cqmfile <filename> : Read custom quantization matrices from a file.\n" " --cqmfile <filename> : Read custom quantization matrices from a file.\n"
" --bitrate <integer> : Target bitrate [0]\n" " --bitrate <integer> : Target bitrate [0]\n"
" - 0: Disable rate control.\n" " - 0: Disable rate control.\n"

View file

@ -372,6 +372,9 @@ typedef struct kvz_config
/** \brief Set QP at CU level keeping pic_init_qp_minus26 in PPS zero */ /** \brief Set QP at CU level keeping pic_init_qp_minus26 in PPS zero */
int8_t set_qp_in_cu; int8_t set_qp_in_cu;
/** \brief Flag to enable/disable open GOP configuration */
int8_t open_gop;
} kvz_config; } kvz_config;
/** /**