diff --git a/src/cfg.c b/src/cfg.c index 6c858448..435fa525 100644 --- a/src/cfg.c +++ b/src/cfg.c @@ -328,7 +328,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "deblock", "0:0", "signhide", "0", "subme", "0", - "sao", "0", + "sao", "off", "rdoq", "0", "rdoq-skip", "1", "transform-skip", "0", @@ -351,7 +351,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "deblock", "0:0", "signhide", "0", "subme", "0", - "sao", "3", + "sao", "full", "rdoq", "0", "rdoq-skip", "1", "transform-skip", "0", @@ -374,7 +374,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "deblock", "0:0", "signhide", "0", "subme", "2", - "sao", "3", + "sao", "full", "rdoq", "0", "rdoq-skip", "1", "transform-skip", "0", @@ -397,7 +397,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "deblock", "0:0", "signhide", "0", "subme", "2", - "sao", "3", + "sao", "full", "rdoq", "0", "rdoq-skip", "1", "transform-skip", "0", @@ -420,7 +420,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "deblock", "0:0", "signhide", "0", "subme", "4", - "sao", "3", + "sao", "full", "rdoq", "0", "rdoq-skip", "1", "transform-skip", "0", @@ -443,7 +443,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "deblock", "0:0", "signhide", "0", "subme", "4", - "sao", "3", + "sao", "full", "rdoq", "1", "rdoq-skip", "1", "transform-skip", "0", @@ -466,7 +466,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "deblock", "0:0", "signhide", "1", "subme", "4", - "sao", "3", + "sao", "full", "rdoq", "1", "rdoq-skip", "1", "transform-skip", "0", @@ -489,7 +489,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "deblock", "0:0", "signhide", "1", "subme", "4", - "sao", "3", + "sao", "full", "rdoq", "1", "rdoq-skip", "1", "transform-skip", "0", @@ -512,7 +512,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "deblock", "0:0", "signhide", "1", "subme", "4", - "sao", "3", + "sao", "full", "rdoq", "1", "rdoq-skip", "1", "transform-skip", "0", @@ -535,7 +535,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "deblock", "0:0", "signhide", "1", "subme", "4", - "sao", "3", + "sao", "full", "rdoq", "1", "rdoq-skip", "0", "transform-skip", "1", @@ -605,7 +605,8 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) } else if OPT("sao") { int8_t sao_type = 0; - if (!parse_enum(value, sao_names, &sao_type)) return 0; + if (!parse_enum(value, sao_names, &sao_type)) sao_type = atoi(value); + if (sao_type > 3) return 0; cfg->sao_type = sao_type; } else if OPT("rdoq") diff --git a/src/cli.c b/src/cli.c index d13dc602..e3b6e8b8 100644 --- a/src/cli.c +++ b/src/cli.c @@ -47,7 +47,7 @@ static const struct option long_options[] = { { "input-fps", required_argument, NULL, 0 }, { "deblock", required_argument, NULL, 0 }, { "no-deblock", no_argument, NULL, 0 }, - { "sao", required_argument, NULL, 0 }, + { "sao", optional_argument, NULL, 0 }, { "no-sao", no_argument, NULL, 0 }, { "rdoq", no_argument, NULL, 0 }, { "no-rdoq", no_argument, NULL, 0 },