[FFmpeg-devel] [PATCH 3/3] lavfi/vf_libvmaf: add warning when color ranges differ
Kyle Swanson
k at ylo.ph
Mon Apr 17 22:09:22 EEST 2023
Hi,
I think the warning is probably OK, but maybe better to put it into
config_input_ref along with the other input checks.
On Sat, Apr 1, 2023 at 10:48 AM Chema Gonzalez <chemag at gmail.com> wrote:
> ---
> libavfilter/vf_libvmaf.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c
> index 2586f37d99..67f0d6a22f 100644
> --- a/libavfilter/vf_libvmaf.c
> +++ b/libavfilter/vf_libvmaf.c
> @@ -141,6 +141,13 @@ static int do_vmaf(FFFrameSync *fs)
> if (ctx->is_disabled || !ref)
> return ff_filter_frame(ctx->outputs[0], dist);
>
> + if (dist->color_range != ref->color_range) {
> + av_log(ctx, AV_LOG_WARNING, "distorted and reference "
> + "frames use different color ranges (%s != %s)\n",
> + av_color_range_name(dist->color_range),
> + av_color_range_name(ref->color_range));
> + }
> +
> err = copy_picture_data(ref, &pic_ref, s->bpc);
> if (err) {
> av_log(s, AV_LOG_ERROR, "problem during vmaf_picture_alloc.\n");
> --
> 2.39.2
>
Thanks,
Kyle
More information about the ffmpeg-devel
mailing list