From: John Stebbins Date: Wed, 3 Apr 2019 18:20:30 +0000 (-0600) Subject: cropscale: force output pixfmt to YUV420P X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=460fdf4f39b87969954c338aabd80bac6470023a;p=handbrake cropscale: force output pixfmt to YUV420P It appears some color prim/tran/matrix settings result in high bit depth output of the scale filter. --- diff --git a/libhb/cropscale.c b/libhb/cropscale.c index 38d8560e9..09af92e09 100644 --- a/libhb/cropscale.c +++ b/libhb/cropscale.c @@ -139,6 +139,15 @@ static int crop_scale_init(hb_filter_object_t * filter, hb_filter_init_t * init) hb_dict_set(avfilter, "scale", avsettings); hb_value_array_append(avfilters, avfilter); + avfilter = hb_dict_init(); + avsettings = hb_dict_init(); + + // TODO: Support other pix formats + // Force output to YUV420P for until other formats are supported + hb_dict_set(avsettings, "pix_fmts", hb_value_string("yuv420p")); + hb_dict_set(avfilter, "format", avsettings); + hb_value_array_append(avfilters, avfilter); + init->crop[0] = top; init->crop[1] = bottom; init->crop[2] = left;