mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
config: Fix fullrange option parsing and so that it matches what x264 CLI does.
This commit is contained in:
parent
c18b6f53e1
commit
af25c36ac4
|
@ -32,8 +32,8 @@ meant to be user configurable later.
|
||||||
- undef, show, crop
|
- undef, show, crop
|
||||||
--videoformat <string> : Specify video format ["undef"]
|
--videoformat <string> : Specify video format ["undef"]
|
||||||
- component, pal, ntsc, secam, mac, undef
|
- component, pal, ntsc, secam, mac, undef
|
||||||
--range <string> : Specify color range ["off"]
|
--range <string> : Specify color range ["tv"]
|
||||||
- off, on
|
- tv, pc
|
||||||
--colorprim <string> : Specify color primaries ["undef"]
|
--colorprim <string> : Specify color primaries ["undef"]
|
||||||
- undef, bt709, bt470m, bt470bg,
|
- undef, bt709, bt470m, bt470bg,
|
||||||
smpte170m, smpte240m, film, bt2020
|
smpte170m, smpte240m, film, bt2020
|
||||||
|
|
|
@ -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 overscan_names[] = { "undef", "show", "crop", NULL };
|
||||||
static const char * const videoformat_names[] = { "component", "pal", "ntsc", "secam", "mac", "undef", 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",
|
static const char * const colorprim_names[] = { "", "bt709", "undef", "", "bt470m", "bt470bg", "smpte170m",
|
||||||
"smpte240m", "film", "bt2020", NULL };
|
"smpte240m", "film", "bt2020", NULL };
|
||||||
static const char * const transfer_names[] = { "", "bt709", "undef", "", "bt470m", "bt470bg", "smpte170m",
|
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);
|
error = !parse_enum(value, overscan_names, &cfg->vui.overscan);
|
||||||
OPT("videoformat")
|
OPT("videoformat")
|
||||||
error = !parse_enum(value, videoformat_names, &cfg->vui.videoformat);
|
error = !parse_enum(value, videoformat_names, &cfg->vui.videoformat);
|
||||||
OPT("fullrange")
|
OPT("range")
|
||||||
error = !parse_enum(value, fullrange_names, &cfg->vui.fullrange);
|
error = !parse_enum(value, range_names, &cfg->vui.fullrange);
|
||||||
OPT("colorprim")
|
OPT("colorprim")
|
||||||
error = !parse_enum(value, colorprim_names, &cfg->vui.colorprim);
|
error = !parse_enum(value, colorprim_names, &cfg->vui.colorprim);
|
||||||
OPT("transfer")
|
OPT("transfer")
|
||||||
|
|
|
@ -109,8 +109,8 @@ int main(int argc, char *argv[])
|
||||||
" - undef, show, crop\n"
|
" - undef, show, crop\n"
|
||||||
" --videoformat <string> : Specify video format [\"undef\"]\n"
|
" --videoformat <string> : Specify video format [\"undef\"]\n"
|
||||||
" - component, pal, ntsc, secam, mac, undef\n"
|
" - component, pal, ntsc, secam, mac, undef\n"
|
||||||
" --range <string> : Specify color range [\"off\"]\n"
|
" --range <string> : Specify color range [\"tv\"]\n"
|
||||||
" - off, on\n"
|
" - tv, pc\n"
|
||||||
" --colorprim <string> : Specify color primaries [\"undef\"]\n"
|
" --colorprim <string> : Specify color primaries [\"undef\"]\n"
|
||||||
" - undef, bt709, bt470m, bt470bg,\n"
|
" - undef, bt709, bt470m, bt470bg,\n"
|
||||||
" smpte170m, smpte240m, film, bt2020\n"
|
" smpte170m, smpte240m, film, bt2020\n"
|
||||||
|
|
Loading…
Reference in a new issue