config: Fix fullrange option parsing and so that it matches what x264 CLI does.

This commit is contained in:
Yusuke Nakamura 2014-02-08 11:29:50 +09:00
parent c18b6f53e1
commit af25c36ac4
3 changed files with 7 additions and 7 deletions

View file

@ -32,8 +32,8 @@ meant to be user configurable later.
- undef, show, crop
--videoformat <string> : Specify video format ["undef"]
- component, pal, ntsc, secam, mac, undef
--range <string> : Specify color range ["off"]
- off, on
--range <string> : Specify color range ["tv"]
- tv, pc
--colorprim <string> : Specify color primaries ["undef"]
- undef, bt709, bt470m, bt470bg,
smpte170m, smpte240m, film, bt2020

View file

@ -141,7 +141,7 @@ static int config_parse(config *cfg, const char *name, const char *value)
{
static const char * const overscan_names[] = { "undef", "show", "crop", NULL };
static const char * const videoformat_names[] = { "component", "pal", "ntsc", "secam", "mac", "undef", NULL };
static const char * const fullrange_names[] = { "off", "on", NULL };
static const char * const range_names[] = { "tv", "pc", NULL };
static const char * const colorprim_names[] = { "", "bt709", "undef", "", "bt470m", "bt470bg", "smpte170m",
"smpte240m", "film", "bt2020", NULL };
static const char * const transfer_names[] = { "", "bt709", "undef", "", "bt470m", "bt470bg", "smpte170m",
@ -217,8 +217,8 @@ static int config_parse(config *cfg, const char *name, const char *value)
error = !parse_enum(value, overscan_names, &cfg->vui.overscan);
OPT("videoformat")
error = !parse_enum(value, videoformat_names, &cfg->vui.videoformat);
OPT("fullrange")
error = !parse_enum(value, fullrange_names, &cfg->vui.fullrange);
OPT("range")
error = !parse_enum(value, range_names, &cfg->vui.fullrange);
OPT("colorprim")
error = !parse_enum(value, colorprim_names, &cfg->vui.colorprim);
OPT("transfer")

View file

@ -109,8 +109,8 @@ int main(int argc, char *argv[])
" - undef, show, crop\n"
" --videoformat <string> : Specify video format [\"undef\"]\n"
" - component, pal, ntsc, secam, mac, undef\n"
" --range <string> : Specify color range [\"off\"]\n"
" - off, on\n"
" --range <string> : Specify color range [\"tv\"]\n"
" - tv, pc\n"
" --colorprim <string> : Specify color primaries [\"undef\"]\n"
" - undef, bt709, bt470m, bt470bg,\n"
" smpte170m, smpte240m, film, bt2020\n"