diff mbox

[FFmpeg-devel,2/2] vf_colorspace: Add modern names for color range option

Message ID 20160914210903.57936-2-vittorio.giovara@gmail.com
State Accepted
Commit 76c28360b5612fac068b25107e43e4bc5c4652de
Headers show

Commit Message

Vittorio Giovara Sept. 14, 2016, 9:09 p.m. UTC
Allows to use values returned from API and from ffprobe directly.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
---
 libavfilter/vf_colorspace.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ronald S. Bultje Sept. 14, 2016, 9:26 p.m. UTC | #1
Hi,

On Wed, Sep 14, 2016 at 5:09 PM, Vittorio Giovara <
vittorio.giovara@gmail.com> wrote:

> Allows to use values returned from API and from ffprobe directly.
>
> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
> ---
>  libavfilter/vf_colorspace.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
> index 7e87cd8..b993928 100644
> --- a/libavfilter/vf_colorspace.c
> +++ b/libavfilter/vf_colorspace.c
> @@ -1039,7 +1039,9 @@ static const AVOption colorspace_options[] = {
>      { "range",      "Output color range",
>        OFFSET(user_rng),   AV_OPT_TYPE_INT, { .i64 =
> AVCOL_RANGE_UNSPECIFIED },
>        AVCOL_RANGE_UNSPECIFIED, AVCOL_RANGE_NB - 1, FLAGS, "rng" },
> +    ENUM("tv",          AVCOL_RANGE_MPEG,      "rng"),
>      ENUM("mpeg",        AVCOL_RANGE_MPEG,      "rng"),
> +    ENUM("pc",          AVCOL_RANGE_JPEG,      "rng"),
>      ENUM("jpeg",        AVCOL_RANGE_JPEG,      "rng"),
>
>      { "primaries",  "Output color primaries",
> --
> 2.9.3


OK, and pushed.

Ronald
diff mbox

Patch

diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index 7e87cd8..b993928 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -1039,7 +1039,9 @@  static const AVOption colorspace_options[] = {
     { "range",      "Output color range",
       OFFSET(user_rng),   AV_OPT_TYPE_INT, { .i64 = AVCOL_RANGE_UNSPECIFIED },
       AVCOL_RANGE_UNSPECIFIED, AVCOL_RANGE_NB - 1, FLAGS, "rng" },
+    ENUM("tv",          AVCOL_RANGE_MPEG,      "rng"),
     ENUM("mpeg",        AVCOL_RANGE_MPEG,      "rng"),
+    ENUM("pc",          AVCOL_RANGE_JPEG,      "rng"),
     ENUM("jpeg",        AVCOL_RANGE_JPEG,      "rng"),
 
     { "primaries",  "Output color primaries",