From 507d817f19d8fcaffd7aad0b6af6de4b36f1ce93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Thu, 2 Feb 2023 19:54:39 +0100 Subject: [PATCH] f_swscale: do not reset color levels to default There is no good reason to do so, both zimg and swscale supports full range output. If downstream something expects limited range yuv always, it needs to be comunicated in different way. --- filters/f_swscale.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/filters/f_swscale.c b/filters/f_swscale.c index 2971b154eb..4aca6095c5 100644 --- a/filters/f_swscale.c +++ b/filters/f_swscale.c @@ -106,12 +106,6 @@ static void process(struct mp_filter *f) mp_image_copy_attributes(dst, src); - // If we convert from RGB to YUV, guess a default. - if (mp_imgfmt_get_forced_csp(src->imgfmt) == MP_CSP_RGB && - mp_imgfmt_get_forced_csp(dst->imgfmt) == MP_CSP_AUTO) - { - dst->params.color.levels = MP_CSP_LEVELS_AUTO; - } if (s->use_out_params) dst->params = s->out_params; mp_image_params_guess_csp(&dst->params);