From 765499bf5568d000af567a1aa850a544d3b9bb1e Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Thu, 19 Dec 2019 20:46:35 -0500 Subject: [PATCH 1/4] Fix doxygen typo and other various typos --- rtengine/cJSON.h | 2 +- rtengine/camconst.cc | 2 +- rtengine/color.h | 2 +- rtengine/improcfun.cc | 2 +- rtgui/cropwindow.cc | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rtengine/cJSON.h b/rtengine/cJSON.h index 786dd2e0e..49fd67b72 100644 --- a/rtengine/cJSON.h +++ b/rtengine/cJSON.h @@ -195,7 +195,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateObject(void); /* Create a string where valuestring references a string so * it will not be freed by cJSON_Delete */ CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string); -/* Create an object/arrray that only references it's elements so +/* Create an object/array that only references it's elements so * they will not be freed by cJSON_Delete */ CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child); CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child); diff --git a/rtengine/camconst.cc b/rtengine/camconst.cc index e8f7b1cbf..d136d6a21 100644 --- a/rtengine/camconst.cc +++ b/rtengine/camconst.cc @@ -253,7 +253,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) } if (i % 4 != 0) { - fprintf(stderr, "\"masked_areas\" array length must be divisable by 4\n"); + fprintf(stderr, "\"masked_areas\" array length must be divisible by 4\n"); goto parse_error; } } diff --git a/rtengine/color.h b/rtengine/color.h index d9c344c27..ec2f17e6f 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -1372,7 +1372,7 @@ public: * @param HH hue before [-PI ; +PI] * @param Chprov1 chroma after [0 ; 180 (can be superior)] * @param CC chroma before [0 ; 180] - * @param corectionHuechroma hue correction depending on chromaticity (saturation), in radians [0 ; 0.45] (return value) + * @param correctionHuechroma hue correction depending on chromaticity (saturation), in radians [0 ; 0.45] (return value) * @param correctlum hue correction depending on luminance (brightness, contrast,...), in radians [0 ; 0.45] (return value) * @param munsDbgInfo (Debug target only) object to collect information */ diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index cb0834570..59fb0f016 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -5590,7 +5590,7 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double whiteclipg = CurveFactory::igamma2 ((float) (whiteclipg / 65535.0)) * 65535.0; //need to inverse gamma transform to get correct exposure compensation parameter - //corection with gamma + //correction with gamma black = (int) ((65535 * black) / whiteclipg); //expcomp = log(65535.0 / (whiteclipg)) / log(2.0); diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index b00032191..0a9b81112 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -1492,9 +1492,9 @@ void CropWindow::expose (Cairo::RefPtr cr) const float kernel_size2 = SQR(2.f * blur_radius2 + 1.f); // count of pixels in the small blur kernel const float rkernel_size2 = 1.0f / kernel_size2; // reciprocal of kernel_size to avoid divisions - // aloocate buffer for precalculated Luminance + // allocate buffer for precalculated Luminance float* tmpL = (float*)malloc(bHeight * bWidth * sizeof(float) ); - // aloocate buffers for sums and sums of squares of small kernel + // allocate buffers for sums and sums of squares of small kernel float* tmpLsum = (float*)malloc((bHeight) * (bWidth) * sizeof(float) ); float* tmpLsumSq = (float*)malloc((bHeight) * (bWidth) * sizeof(float) ); float* tmpstdDev2 = (float*)malloc((bHeight) * (bWidth) * sizeof(float) ); @@ -1631,7 +1631,7 @@ void CropWindow::expose (Cairo::RefPtr cr) && stdDev_L2 > stdDev_L //this is the key to select fine detail within lower contrast on larger scale && stdDev_L > focus_threshby10 //options.highlightThreshold ) { - // transpareny depends on sdtDev_L2 and maxstdDev_L2 + // transparency depends on sdtDev_L2 and maxstdDev_L2 float transparency = 1.f - std::min(stdDev_L2 / maxstdDev_L2, 1.0f) ; // first row of circle guint8* currtmp = &curr[0] + (-3 * pixRowStride); From c5d2e00ba32353a4361ac0af1221cce6d4c9dc9b Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Fri, 20 Dec 2019 06:06:52 -0500 Subject: [PATCH 2/4] Fixed previous commit per review feedback --- rtengine/color.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/color.h b/rtengine/color.h index ec2f17e6f..211615de1 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -1372,7 +1372,7 @@ public: * @param HH hue before [-PI ; +PI] * @param Chprov1 chroma after [0 ; 180 (can be superior)] * @param CC chroma before [0 ; 180] - * @param correctionHuechroma hue correction depending on chromaticity (saturation), in radians [0 ; 0.45] (return value) + * @param correctionHueChroma hue correction depending on chromaticity (saturation), in radians [0 ; 0.45] (return value) * @param correctlum hue correction depending on luminance (brightness, contrast,...), in radians [0 ; 0.45] (return value) * @param munsDbgInfo (Debug target only) object to collect information */ From 7f425e7fe64e0aa5917cc49594b37cde9fab1c9e Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Fri, 20 Dec 2019 06:07:52 -0500 Subject: [PATCH 3/4] Found a few more typos --- rtgui/editwidgets.h | 2 +- rtgui/options.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rtgui/editwidgets.h b/rtgui/editwidgets.h index 55b4ca3cc..0fa7a91bf 100644 --- a/rtgui/editwidgets.h +++ b/rtgui/editwidgets.h @@ -55,7 +55,7 @@ class RTSurface; * - drag1 * - button1Released * - * Actually, only curves does use this class, and everything is handled for curve implementor (as much as possible). + * Actually, only curves does use this class, and everything is handled for curve implementer (as much as possible). * See the curve's class documentation to see how to implement the curve's pipette feature. * * ### Event handling diff --git a/rtgui/options.cc b/rtgui/options.cc index f5b6b5b60..dcb16e1ea 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -225,7 +225,7 @@ Glib::ustring Options::getPreferredProfilePath() * *@param profName path + filename of the procparam to look for. A filename without path can be provided for backward compatibility. * In this case, this parameter will be updated with the new format. - *@return Send back the absolute path of the given filename or "Neutral" if "Neutral" has been set to profName. Implementor will have + *@return Send back the absolute path of the given filename or "Neutral" if "Neutral" has been set to profName. Implementer will have * to test for this particular value. If the absolute path is invalid (e.g. the file doesn't exist), it will return an empty string. */ Glib::ustring Options::findProfilePath(Glib::ustring &profName) From bd6088837c99b95f9a9c53fdd5ff4990f1c550c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Fri, 20 Dec 2019 13:34:37 +0100 Subject: [PATCH 4/4] Fix crash on `DCraw::data_error` (fixes #5571) --- rtengine/dcraw.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index d5348286c..812f122b3 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -4433,6 +4433,10 @@ void CLASS foveon_interpolate() void CLASS crop_masked_pixels() { + if (data_error) { + return; + } + int row, col; unsigned r, c, m, mblack[8], zero, val;