From e64a1a9aae0200d14feed49a4c6cf537bf5708a4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 8 Nov 2020 22:34:18 +0100 Subject: Obey requests to change the video range of RGB content. Video that comes in with RGB pixels will not have its video level ranges changed by libswscale (it only does this for YUV and greyscale). Here we add code to do it ourselves for RGB content coming in via image files (e.g. PNG/DPX etc). Part of #1851. --- src/lib/util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/util.cc') diff --git a/src/lib/util.cc b/src/lib/util.cc index ac868c173..0a060e960 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -953,7 +953,7 @@ void emit_subtitle_image (ContentTimePeriod period, dcp::SubtitleImage sub, dcp::Size size, shared_ptr decoder) { /* XXX: this is rather inefficient; decoding the image just to get its size */ - FFmpegImageProxy proxy (sub.png_image()); + FFmpegImageProxy proxy (sub.png_image(), VIDEO_RANGE_FULL); shared_ptr image = proxy.image().image; /* set up rect with height and width */ dcpomatic::Rect rect(0, 0, image->size().width / double(size.width), image->size().height / double(size.height)); -- cgit v1.2.3