Merge cherrypicks of [11520371, 11520372, 11521176, 11521177, 11520373, 11520374, 11521196, 11521216, 11520730, 11521236, 11520430, 11521256, 11521276, 11520277, 11520278] into qt-qpr3-release

Change-Id: I76e197d1b55ff1812ee8650a2a716d65f59526d5
diff --git a/source/dng_lossless_jpeg.cpp b/source/dng_lossless_jpeg.cpp
index e3b0576..9d0d01a 100644
--- a/source/dng_lossless_jpeg.cpp
+++ b/source/dng_lossless_jpeg.cpp
@@ -2277,7 +2277,7 @@
 	
 	#if qSupportHasselblad_3FR
 	
-	if (info.Ss == 8)
+	if (info.Ss == 8 && (numCOL & 1) == 0)
 		{
 		
 		fHasselblad3FR = true;
@@ -2412,7 +2412,7 @@
         // For the rest of the column on this row, predictor
         // calculations are based on PSV. 
 
-     	if (compsInScan == 2 && info.Ss == 1)
+     	if (compsInScan == 2 && info.Ss == 1 && numCOL > 1)
     		{
     		
     		// This is the combination used by both the Canon and Kodak raw formats.