[FFmpeg-devel] [PATCH] avfilter/vf_zscale: fix output color_range discrepancy
Paul B Mahol
onemda at gmail.com
Fri Sep 17 09:45:31 EEST 2021
I doubt this is correct, something is fishy here.
On Fri, Sep 17, 2021 at 4:17 AM Pavel Koshevoy <pkoshevoy at gmail.com> wrote:
> This filter chain was supposed to convert from narrow range
> to full range yuv444p, but didn't:
>
> buffer=width=1280:height=720:pix_fmt=yuv444p:frame_rate=25/1:\
> time_base=1/25:sar=1/1,zscale=min=709:rin=limited:pin=709:\
> tin=709:t=linear,format=gbrpf32le,zscale=tin=linear:p=709:m=709:\
> r=full:t=709,format=pix_fmts=yuv444p,buffersink
> ---
> libavfilter/vf_zscale.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c
> index dfea00f9eb..06a025e6e6 100644
> --- a/libavfilter/vf_zscale.c
> +++ b/libavfilter/vf_zscale.c
> @@ -676,7 +676,7 @@ static int filter_frame(AVFilterLink *link, AVFrame
> *in)
> out->color_primaries = (int)s->dst_format.color_primaries;
>
> if (s->range != -1)
> - out->color_range = (int)s->dst_format.pixel_range;
> + out->color_range = (int)s->dst_format.pixel_range + 1;
>
> if (s->trc != -1)
> out->color_trc = (int)s->dst_format.transfer_characteristics;
> --
> 2.26.2
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list