[FFmpeg-devel] [PATCH 3/4] avfilter: Set output link colour range where appropriate
Michael Niedermayer
michael at niedermayer.cc
Tue Feb 20 03:26:48 EET 2018
On Mon, Feb 19, 2018 at 10:48:24AM -0800, Philip Langdale wrote:
[...]
> diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
> index 9f45032e85..21ae709d6b 100644
> --- a/libavfilter/vf_scale.c
> +++ b/libavfilter/vf_scale.c
> @@ -342,11 +342,16 @@ static int config_props(AVFilterLink *outlink)
> } else
> outlink->sample_aspect_ratio = inlink0->sample_aspect_ratio;
>
> - av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d fmt:%s sar:%d/%d -> w:%d h:%d fmt:%s sar:%d/%d flags:0x%0x\n",
> + if (scale->out_range != AVCOL_RANGE_UNSPECIFIED)
> + outlink->color_range = scale->out_range;
> +
> + av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d fmt:%s sar:%d/%d range:%d -> w:%d h:%d fmt:%s sar:%d/%d range:%d flags:0x%0x\n",
> inlink ->w, inlink ->h, av_get_pix_fmt_name( inlink->format),
> inlink->sample_aspect_ratio.num, inlink->sample_aspect_ratio.den,
> + inlink->color_range,
> outlink->w, outlink->h, av_get_pix_fmt_name(outlink->format),
> outlink->sample_aspect_ratio.num, outlink->sample_aspect_ratio.den,
> + outlink->color_range,
> scale->flags);
> return 0;
>
> @@ -363,6 +368,7 @@ static int config_props_ref(AVFilterLink *outlink)
> outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
> outlink->time_base = inlink->time_base;
> outlink->frame_rate = inlink->frame_rate;
> + outlink->color_range = inlink->color_range;
>
> return 0;
> }
this should be ok, iam not maintainer of the rest
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180220/ed9ad9de/attachment.sig>
More information about the ffmpeg-devel
mailing list