summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-01-31 01:34:56 +0000
committerCarl Hetherington <cth@carlh.net>2019-01-31 01:34:56 +0000
commitd31bb9dd64630718fe7faa607e61be7ba88e9097 (patch)
treecc0f9a702cdcec54fb34e0f992b93ffefa29a0d0 /src
parent69752192994292e90a2dc347416fc5a1aeca9468 (diff)
Add some comments.
Diffstat (limited to 'src')
-rw-r--r--src/lib/image.cc24
1 files changed, 24 insertions, 0 deletions
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,