From: Carl Hetherington Date: Thu, 31 Jan 2019 19:39:27 +0000 (+0000) Subject: Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic X-Git-Tag: v2.13.112~21 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=0fb8f8c4ec481e342d26a332595d39fcf8cd4e94;hp=9fa17d52810490359f899cc0cbdb4c25ac74bc92 Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic --- diff --git a/src/lib/image.cc b/src/lib/image.cc index 41582f307..46c085ff2 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -185,6 +185,18 @@ Image::crop_scale_window ( SWS_CS_ITU709 }; + /* The 3rd parameter here is: + 0 -> source range MPEG (i.e. "video", 16-235) + 1 -> source range JPEG (i.e. "full", 0-255) + And the 5th: + 0 -> destination range MPEG (i.e. "video", 16-235) + 1 -> destination range JPEG (i.e. "full", 0-255) + + But remember: sws_setColorspaceDetails ignores + these parameters unless the image isYUV or isGray + (if it's neither, it uses video range for source + and destination). + */ sws_setColorspaceDetails ( scale_context, sws_getCoefficients (lut[yuv_to_rgb]), 0, @@ -271,6 +283,18 @@ Image::scale (dcp::Size out_size, dcp::YUVToRGB yuv_to_rgb, AVPixelFormat out_fo SWS_CS_ITU709 }; + /* The 3rd parameter here is: + 0 -> source range MPEG (i.e. "video", 16-235) + 1 -> source range JPEG (i.e. "full", 0-255) + And the 5th: + 0 -> destination range MPEG (i.e. "video", 16-235) + 1 -> destination range JPEG (i.e. "full", 0-255) + + But remember: sws_setColorspaceDetails ignores + these parameters unless the image isYUV or isGray + (if it's neither, it uses video range for source + and destination). + */ sws_setColorspaceDetails ( scale_context, sws_getCoefficients (lut[yuv_to_rgb]), 0,