added alf parameter to cli

This commit is contained in:
Arttu Mäkinen 2019-07-04 10:20:18 +03:00 committed by Arttu Makinen
parent 0baf96d99a
commit 06233b5d3b
4 changed files with 7 additions and 1 deletions

View file

@ -49,6 +49,7 @@ int kvz_config_init(kvz_config *cfg)
cfg->deblock_beta = 0;
cfg->deblock_tc = 0;
cfg->sao_type = 3;
cfg->alf_enable = 0;
cfg->rdoq_enable = 1;
cfg->rdoq_skip = 1;
cfg->signhide_enable = true;
@ -796,6 +797,8 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
if (!parse_enum(value, sao_names, &sao_type)) sao_type = atobool(value) ? 3 : 0;
cfg->sao_type = sao_type;
}
else if OPT("alf")
cfg->alf_enable = atobool(value);
else if OPT("rdoq")
cfg->rdoq_enable = atobool(value);
else if OPT("signhide")

View file

@ -49,6 +49,8 @@ static const struct option long_options[] = {
{ "no-deblock", no_argument, NULL, 0 },
{ "sao", required_argument, NULL, 0 },
{ "no-sao", no_argument, NULL, 0 },
{ "alf", no_argument, NULL, 0 },
{ "no-alf", no_argument, NULL, 0 },
{ "rdoq", no_argument, NULL, 0 },
{ "no-rdoq", no_argument, NULL, 0 },
{ "signhide", no_argument, NULL, 0 },

View file

@ -614,7 +614,7 @@ static void encoder_state_write_bitstream_seq_parameter_set(bitstream_t* stream,
// if(!no_sao_constraint_flag)
WRITE_U(stream, encoder->cfg.sao_type ? 1 : 0, 1, "sps_sao_enabled_flag");
// if(!no_alf_constraint_flag)
WRITE_U(stream, 0, 1, "sps_alf_enabled_flag");
WRITE_U(stream, encoder->cfg.alf_enable, 1, "sps_alf_enable_flag");
WRITE_U(stream, 0, 1, "sps_lmcs_enable_flag");

View file

@ -286,6 +286,7 @@ typedef struct kvz_config
int32_t framerate_denom; /*!< \brief Framerate denominator */
int32_t deblock_enable; /*!< \brief Flag to enable deblocking filter */
enum kvz_sao sao_type; /*!< \brief Flag to enable sample adaptive offset filter */
int8_t alf_enable; /*!< \brief Flag to enable advanced loop filter */
int32_t rdoq_enable; /*!< \brief Flag to enable RD optimized quantization. */
int32_t signhide_enable; /*!< \brief Flag to enable sign hiding. */
int32_t smp_enable; /*!< \brief Flag to enable SMP blocks. */