diff mbox

[FFmpeg-devel,2/3] vf_colorspace: Add support for full range yuv

Message ID 20160825231459.15314-2-vittorio.giovara@gmail.com
State Accepted
Commit 69abf4f93cb67cc52ff55f318ae09f261e7ad27e
Headers show

Commit Message

Vittorio Giovara Aug. 25, 2016, 11:14 p.m. UTC
Whenever a full range video is input, since the YUVJ* formats are not
listed as supported for this filter, a range reduction takes place
through the auto-inserted format filter, forcing the conversion to
operate on a limited range,

However the filter handles full range videos perfectly fine, so adding
support to YUVJ* formats will allow skipping a conversion step, while
providing completely identical results.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
---
Please keep me in CC.
Vittorio

 libavfilter/vf_colorspace.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ronald S. Bultje Aug. 26, 2016, 5:01 a.m. UTC | #1
Hi,

On Thu, Aug 25, 2016 at 7:14 PM, Vittorio Giovara <
vittorio.giovara@gmail.com> wrote:

> Whenever a full range video is input, since the YUVJ* formats are not
> listed as supported for this filter, a range reduction takes place
> through the auto-inserted format filter, forcing the conversion to
> operate on a limited range,
>
> However the filter handles full range videos perfectly fine, so adding
> support to YUVJ* formats will allow skipping a conversion step, while
> providing completely identical results.
>
> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
> ---
> Please keep me in CC.
> Vittorio
>
>  libavfilter/vf_colorspace.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
> index bf51c83..37e77d1 100644
> --- a/libavfilter/vf_colorspace.c
> +++ b/libavfilter/vf_colorspace.c
> @@ -960,6 +960,7 @@ static int query_formats(AVFilterContext *ctx)
>          AV_PIX_FMT_YUV420P,   AV_PIX_FMT_YUV422P,   AV_PIX_FMT_YUV444P,
>          AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10,
>          AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12,
> +        AV_PIX_FMT_YUVJ420P,  AV_PIX_FMT_YUVJ422P,  AV_PIX_FMT_YUVJ444P,
>          AV_PIX_FMT_NONE
>      };
>      int res;
> --
> 2.9.3


I guess this is OK, I thought they were deprecated but I guess there is
natural conversion mechanism in place (passthrough to re-stamp yuvjN as
yuvN,range=full)...

Ronald
Michael Niedermayer Aug. 27, 2016, 11:10 a.m. UTC | #2
On Fri, Aug 26, 2016 at 01:01:09AM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> On Thu, Aug 25, 2016 at 7:14 PM, Vittorio Giovara <
> vittorio.giovara@gmail.com> wrote:
> 
> > Whenever a full range video is input, since the YUVJ* formats are not
> > listed as supported for this filter, a range reduction takes place
> > through the auto-inserted format filter, forcing the conversion to
> > operate on a limited range,
> >
> > However the filter handles full range videos perfectly fine, so adding
> > support to YUVJ* formats will allow skipping a conversion step, while
> > providing completely identical results.
> >
> > Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
> > ---
> > Please keep me in CC.
> > Vittorio
> >
> >  libavfilter/vf_colorspace.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
> > index bf51c83..37e77d1 100644
> > --- a/libavfilter/vf_colorspace.c
> > +++ b/libavfilter/vf_colorspace.c
> > @@ -960,6 +960,7 @@ static int query_formats(AVFilterContext *ctx)
> >          AV_PIX_FMT_YUV420P,   AV_PIX_FMT_YUV422P,   AV_PIX_FMT_YUV444P,
> >          AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10,
> >          AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12,
> > +        AV_PIX_FMT_YUVJ420P,  AV_PIX_FMT_YUVJ422P,  AV_PIX_FMT_YUVJ444P,
> >          AV_PIX_FMT_NONE
> >      };
> >      int res;
> > --
> > 2.9.3
> 
> 
> I guess this is OK, I thought they were deprecated but I guess there is
> natural conversion mechanism in place (passthrough to re-stamp yuvjN as
> yuvN,range=full)...

applied

thnx

[...]
diff mbox

Patch

diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index bf51c83..37e77d1 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -960,6 +960,7 @@  static int query_formats(AVFilterContext *ctx)
         AV_PIX_FMT_YUV420P,   AV_PIX_FMT_YUV422P,   AV_PIX_FMT_YUV444P,
         AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10,
         AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12,
+        AV_PIX_FMT_YUVJ420P,  AV_PIX_FMT_YUVJ422P,  AV_PIX_FMT_YUVJ444P,
         AV_PIX_FMT_NONE
     };
     int res;