[FFmpeg-devel] [PATCH] vf_colorspace: don't enable passthrough if bitdepth doesn't match.

Michael Niedermayer michael at niedermayer.cc
Fri May 6 21:23:08 CEST 2016


On Fri, May 06, 2016 at 12:27:02PM -0400, Ronald S. Bultje wrote:
> ---
>  libavfilter/vf_colorspace.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
> index 7776a61..f932ce9 100644
> --- a/libavfilter/vf_colorspace.c
> +++ b/libavfilter/vf_colorspace.c
> @@ -754,7 +754,8 @@ static int create_filtergraph(AVFilterContext *ctx,
>      s->yuv2yuv_fastmode = s->rgb2rgb_passthrough && fmt_identical;
>      s->yuv2yuv_passthrough = s->yuv2yuv_fastmode && s->in_rng == s->out_rng &&
>                               !memcmp(s->in_lumacoef, s->out_lumacoef,
> -                                     sizeof(*s->in_lumacoef));
> +                                     sizeof(*s->in_lumacoef)) &&
> +                             in_desc->comp[0].depth == out_desc->comp[0].depth;
>      if (!s->yuv2yuv_passthrough) {
>          if (redo_yuv2rgb) {
>              double rgb2yuv[3][3], (*yuv2rgb)[3] = s->yuv2rgb_dbl_coeffs;

LGTM


> @@ -986,7 +987,9 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
>      td.in_ss_h = av_pix_fmt_desc_get(in->format)->log2_chroma_h;
>      td.out_ss_h = av_pix_fmt_desc_get(out->format)->log2_chroma_h;
>      if (s->yuv2yuv_passthrough) {
> -        av_frame_copy(out, in);
> +        res = av_frame_copy(out, in);
> +        if (res < 0)
> +            return res;
>      } else {

unrelated ?
but LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160506/b186c6ae/attachment.sig>


More information about the ffmpeg-devel mailing list