diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7368f115..7c60fa37c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -252,10 +252,6 @@ if(NOT DEFINED APPDATADIR)
endif()
endif()
-if(DEFINED LENSFUNDBDIR AND NOT IS_ABSOLUTE "${LENSFUNDBDIR}")
- set(LENSFUNDBDIR "${DATADIR}/${LENSFUNDBDIR}")
-endif()
-
if(APPLE)
if("${CODESIGNID}")
set(CODESIGNID "${CODESIGNID}" CACHE STRING "Codesigning Identity")
@@ -263,7 +259,11 @@ if(APPLE)
if("${NOTARY}")
set(NOTARY "${NOTARY}" CACHE STRING "Notarization Identity")
endif()
-
+ if("${LOCAL_PREFIX}")
+ set(LOCAL_PREFIX "${LOCAL_PREFIX}" CACHE STRING "macos/gtk parent directory ie /usr or /opt")
+ elseif(NOT DEFINED LOCAL_PREFIX)
+ set(LOCAL_PREFIX "/usr")
+ endif()
endif()
# Enforce absolute paths for non-bundle builds:
diff --git a/rtdata/dcpprofiles/Canon EOS RP.dcp b/rtdata/dcpprofiles/Canon EOS RP.dcp
new file mode 100644
index 000000000..8379d9703
Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS RP.dcp differ
diff --git a/rtdata/dcpprofiles/FUJIFILM X-T10.dcp b/rtdata/dcpprofiles/FUJIFILM X-T10.dcp
new file mode 100644
index 000000000..e77837f3e
Binary files /dev/null and b/rtdata/dcpprofiles/FUJIFILM X-T10.dcp differ
diff --git a/rtdata/dcpprofiles/FUJIFILM X-T30.dcp b/rtdata/dcpprofiles/FUJIFILM X-T30.dcp
new file mode 100644
index 000000000..97917b810
Binary files /dev/null and b/rtdata/dcpprofiles/FUJIFILM X-T30.dcp differ
diff --git a/rtdata/dcpprofiles/SONY ILCE-6300.dcp b/rtdata/dcpprofiles/SONY ILCE-6300.dcp
new file mode 100644
index 000000000..53194d35d
Binary files /dev/null and b/rtdata/dcpprofiles/SONY ILCE-6300.dcp differ
diff --git a/rtdata/dcpprofiles/SONY ILCE-6500.dcp b/rtdata/dcpprofiles/SONY ILCE-6500.dcp
new file mode 100644
index 000000000..66be8b1de
Binary files /dev/null and b/rtdata/dcpprofiles/SONY ILCE-6500.dcp differ
diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala
index 31614c7b3..ac4c9565b 100644
--- a/rtdata/languages/Catala
+++ b/rtdata/languages/Catala
@@ -1354,6 +1354,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: -
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
!HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s
!ICCPROFCREATOR_COPYRIGHT;Copyright:
!ICCPROFCREATOR_COPYRIGHT_RESET_TOOLTIP;Reset to the default copyright, granted to "RawTherapee, CC0"
@@ -1920,6 +1921,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: -
!TP_LABCURVE_CURVEEDITOR_LH;LH
!TP_LABCURVE_CURVEEDITOR_LH_TOOLTIP;Luminance according to hue L=f(H)
!TP_LABCURVE_CURVEEDITOR_LL_TOOLTIP;Luminance according to luminance L=f(L)
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified)
index 5be2958e8..61cbd58ac 100644
--- a/rtdata/languages/Chinese (Simplified)
+++ b/rtdata/languages/Chinese (Simplified)
@@ -1401,6 +1401,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: -
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
!HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!ICCPROFCREATOR_COPYRIGHT;Copyright:
!ICCPROFCREATOR_COPYRIGHT_RESET_TOOLTIP;Reset to the default copyright, granted to "RawTherapee, CC0"
!ICCPROFCREATOR_CUSTOM;Custom
@@ -1885,6 +1886,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: -
!TP_LABCURVE_LCREDSK_TIP;If enabled, the LC Curve affects only red and skin-tones.\nIf disabled, it applies to all tones.
!TP_LABCURVE_RSTPROTECTION;Red and skin-tones protection
!TP_LABCURVE_RSTPRO_TOOLTIP;Works on the Chromaticity slider and the CC curve.
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech
index 25bcf2820..19182a1e5 100644
--- a/rtdata/languages/Czech
+++ b/rtdata/languages/Czech
@@ -2335,6 +2335,7 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: -
!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!PARTIALPASTE_FILMNEGATIVE;Film Negative
!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!TP_DEHAZE_LUMINANCE;Luminance only
@@ -2344,6 +2345,8 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: -
!TP_FILMNEGATIVE_LABEL;Film Negative
!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_SHARPENING_ITERCHECK;Auto limit iterations
!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch
index 592801054..99835591a 100644
--- a/rtdata/languages/Deutsch
+++ b/rtdata/languages/Deutsch
@@ -2392,4 +2392,7 @@ ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: -
!GENERAL_HELP;Help
!HISTORY_MSG_PDSHARPEN_CHECKITER;CS - Auto limit iterations
+!HISTORY_MSG_TRANS_Method;Geometry - Method
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_SHARPENING_ITERCHECK;Auto limit iterations
diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK)
index e30425b68..2cb1d526d 100644
--- a/rtdata/languages/English (UK)
+++ b/rtdata/languages/English (UK)
@@ -876,6 +876,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
!HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!HISTORY_NEWSNAPSHOT;Add
!HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s
!HISTORY_SNAPSHOT;Snapshot
@@ -1792,6 +1793,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!TP_LENSGEOM_AUTOCROP;Auto-Crop
!TP_LENSGEOM_FILL;Auto-fill
!TP_LENSGEOM_LABEL;Lens / Geometry
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US)
index a1e0050a8..d8c497f16 100644
--- a/rtdata/languages/English (US)
+++ b/rtdata/languages/English (US)
@@ -788,6 +788,7 @@
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
!HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!HISTORY_NEWSNAPSHOT;Add
!HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s
!HISTORY_SNAPSHOT;Snapshot
@@ -1776,6 +1777,8 @@
!TP_LENSGEOM_AUTOCROP;Auto-Crop
!TP_LENSGEOM_FILL;Auto-fill
!TP_LENSGEOM_LABEL;Lens / Geometry
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol
index ee8b0d17d..c1468a6d9 100644
--- a/rtdata/languages/Espanol
+++ b/rtdata/languages/Espanol
@@ -2334,6 +2334,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nTecla de Atajo: -
!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!MAIN_FRAME_PLACES_DEL;Remove
!MAIN_TAB_FAVORITES;Favorites
!MAIN_TAB_FAVORITES_TOOLTIP;Shortcut: Alt-u
@@ -2362,6 +2363,8 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nTecla de Atajo: -
!TP_FILMNEGATIVE_LABEL;Film Negative
!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
!TP_LENSPROFILE_MODE_HEADER;Lens Profile
diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais
index 9ecf43733..a98b6eded 100644
--- a/rtdata/languages/Francais
+++ b/rtdata/languages/Francais
@@ -2278,6 +2278,7 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: -
!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!MAIN_FRAME_PLACES_DEL;Remove
!PARTIALPASTE_FILMNEGATIVE;Film Negative
!PROGRESSBAR_DECODING;Decoding...
@@ -2295,6 +2296,8 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: -
!TP_FILMNEGATIVE_LABEL;Film Negative
!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
!TP_LENSPROFILE_MODE_HEADER;Lens Profile
diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano
index 0fd256d7c..340309b9f 100644
--- a/rtdata/languages/Italiano
+++ b/rtdata/languages/Italiano
@@ -1579,6 +1579,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: -
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
!HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!ICCPROFCREATOR_COPYRIGHT;Copyright:
!ICCPROFCREATOR_COPYRIGHT_RESET_TOOLTIP;Reset to the default copyright, granted to "RawTherapee, CC0"
!ICCPROFCREATOR_CUSTOM;Custom
@@ -1946,6 +1947,8 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: -
!TP_ICM_WORKING_TRC_NONE;None
!TP_ICM_WORKING_TRC_SLOPE;Slope
!TP_ICM_WORKING_TRC_TOOLTIP;Only for built-in profiles.
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese
index 588a817f2..b7c0b7e22 100644
--- a/rtdata/languages/Japanese
+++ b/rtdata/languages/Japanese
@@ -2314,3 +2314,6 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: -
!!!!!!!!!!!!!!!!!!!!!!!!!
!GENERAL_HELP;Help
+!HISTORY_MSG_TRANS_Method;Geometry - Method
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar
index 4b6f2811b..7ecdc6f3b 100644
--- a/rtdata/languages/Magyar
+++ b/rtdata/languages/Magyar
@@ -1288,6 +1288,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés -
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
!HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s
!ICCPROFCREATOR_COPYRIGHT;Copyright:
!ICCPROFCREATOR_COPYRIGHT_RESET_TOOLTIP;Reset to the default copyright, granted to "RawTherapee, CC0"
@@ -1912,6 +1913,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés -
!TP_LABCURVE_LCREDSK_TIP;If enabled, the LC Curve affects only red and skin-tones.\nIf disabled, it applies to all tones.
!TP_LABCURVE_RSTPROTECTION;Red and skin-tones protection
!TP_LABCURVE_RSTPRO_TOOLTIP;Works on the Chromaticity slider and the CC curve.
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands
index c230323f5..c43f6314e 100644
--- a/rtdata/languages/Nederlands
+++ b/rtdata/languages/Nederlands
@@ -2076,6 +2076,7 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: -
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
!HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!ICCPROFCREATOR_COPYRIGHT;Copyright:
!ICCPROFCREATOR_COPYRIGHT_RESET_TOOLTIP;Reset to the default copyright, granted to "RawTherapee, CC0"
!ICCPROFCREATOR_CUSTOM;Custom
@@ -2256,6 +2257,8 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: -
!TP_ICM_WORKING_TRC_NONE;None
!TP_ICM_WORKING_TRC_SLOPE;Slope
!TP_ICM_WORKING_TRC_TOOLTIP;Only for built-in profiles.
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish
index 4e5d950fc..b6d116479 100644
--- a/rtdata/languages/Polish
+++ b/rtdata/languages/Polish
@@ -1661,6 +1661,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: -
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
!HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!ICCPROFCREATOR_COPYRIGHT;Copyright:
!ICCPROFCREATOR_COPYRIGHT_RESET_TOOLTIP;Reset to the default copyright, granted to "RawTherapee, CC0"
!ICCPROFCREATOR_CUSTOM;Custom
@@ -1967,6 +1968,8 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: -
!TP_ICM_WORKING_TRC_NONE;None
!TP_ICM_WORKING_TRC_SLOPE;Slope
!TP_ICM_WORKING_TRC_TOOLTIP;Only for built-in profiles.
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
diff --git a/rtdata/languages/Portugues b/rtdata/languages/Portugues
index 789d26cd6..0896214a0 100644
--- a/rtdata/languages/Portugues
+++ b/rtdata/languages/Portugues
@@ -2276,6 +2276,7 @@ ZOOMPANEL_ZOOMOUT;Afastar\nAtalho: -
!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!MAIN_FRAME_PLACES_DEL;Remove
!PARTIALPASTE_FILMNEGATIVE;Film Negative
!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
@@ -2294,6 +2295,8 @@ ZOOMPANEL_ZOOMOUT;Afastar\nAtalho: -
!TP_FILMNEGATIVE_LABEL;Film Negative
!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
!TP_LENSPROFILE_MODE_HEADER;Lens Profile
diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil)
index d619356a9..85dbf377f 100644
--- a/rtdata/languages/Portugues (Brasil)
+++ b/rtdata/languages/Portugues (Brasil)
@@ -2283,6 +2283,7 @@ ZOOMPANEL_ZOOMOUT;Menos Zoom\nAtalho: -
!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!PARTIALPASTE_FILMNEGATIVE;Film Negative
!PREFERENCES_CACHECLEAR_SAFETY;Only files in the cache are cleared. Processing profiles stored alongside the source images are not touched.
!PROGRESSBAR_DECODING;Decoding...
@@ -2295,6 +2296,8 @@ ZOOMPANEL_ZOOMOUT;Menos Zoom\nAtalho: -
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
!TP_FILMNEGATIVE_GUESS_TOOLTIP;Automatically set the red and blue ratios by picking two patches which had a neutral hue (no color) in the original scene. The patches should differ in brightness. Set the white balance afterwards.
!TP_FILMNEGATIVE_LABEL;Film Negative
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_LENS_WARNING;Warning: the crop factor used for lens profiling is larger than the crop factor of the camera, the results might be wrong.
!TP_LENSPROFILE_USE_HEADER;Correct
!TP_PDSHARPENING_LABEL;Capture Sharpening
diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian
index 4246ecbb6..27f4cff0c 100644
--- a/rtdata/languages/Russian
+++ b/rtdata/languages/Russian
@@ -1736,6 +1736,7 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: -
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
!HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!ICCPROFCREATOR_COPYRIGHT;Copyright:
!ICCPROFCREATOR_COPYRIGHT_RESET_TOOLTIP;Reset to the default copyright, granted to "RawTherapee, CC0"
!ICCPROFCREATOR_CUSTOM;Custom
@@ -2014,6 +2015,8 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: -
!TP_ICM_WORKING_TRC_NONE;None
!TP_ICM_WORKING_TRC_SLOPE;Slope
!TP_ICM_WORKING_TRC_TOOLTIP;Only for built-in profiles.
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
!TP_LENSPROFILE_MODE_HEADER;Lens Profile
diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters)
index 7fd0ca378..27da76acc 100644
--- a/rtdata/languages/Serbian (Cyrilic Characters)
+++ b/rtdata/languages/Serbian (Cyrilic Characters)
@@ -1554,6 +1554,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике -
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
!HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!ICCPROFCREATOR_COPYRIGHT;Copyright:
!ICCPROFCREATOR_COPYRIGHT_RESET_TOOLTIP;Reset to the default copyright, granted to "RawTherapee, CC0"
!ICCPROFCREATOR_CUSTOM;Custom
@@ -1947,6 +1948,8 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике -
!TP_ICM_WORKING_TRC_NONE;None
!TP_ICM_WORKING_TRC_SLOPE;Slope
!TP_ICM_WORKING_TRC_TOOLTIP;Only for built-in profiles.
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
diff --git a/rtdata/languages/Slovenian b/rtdata/languages/Slovenian
index 0afaa83e9..73c1bd2d1 100644
--- a/rtdata/languages/Slovenian
+++ b/rtdata/languages/Slovenian
@@ -2308,4 +2308,7 @@ ZOOMPANEL_ZOOMOUT;Zoom Out\nBližnjica: -
!GENERAL_HELP;Help
!HISTORY_MSG_PDSHARPEN_CHECKITER;CS - Auto limit iterations
+!HISTORY_MSG_TRANS_Method;Geometry - Method
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_SHARPENING_ITERCHECK;Auto limit iterations
diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish
index 6dbea54d8..f54b4de30 100644
--- a/rtdata/languages/Swedish
+++ b/rtdata/languages/Swedish
@@ -1903,6 +1903,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: -
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
!HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
+!HISTORY_MSG_TRANS_Method;Geometry - Method
!ICCPROFCREATOR_COPYRIGHT;Copyright:
!ICCPROFCREATOR_COPYRIGHT_RESET_TOOLTIP;Reset to the default copyright, granted to "RawTherapee, CC0"
!ICCPROFCREATOR_CUSTOM;Custom
@@ -2150,6 +2151,8 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: -
!TP_ICM_WORKING_TRC_NONE;None
!TP_ICM_WORKING_TRC_SLOPE;Slope
!TP_ICM_WORKING_TRC_TOOLTIP;Only for built-in profiles.
+!TP_LENSGEOM_LIN;Linear
+!TP_LENSGEOM_LOG;Logarithmic
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
diff --git a/rtdata/languages/default b/rtdata/languages/default
index 5004bf25c..922c50c51 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -787,6 +787,7 @@ HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
+HISTORY_MSG_TRANS_Method;Geometry - Method
HISTORY_NEWSNAPSHOT;Add
HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s
HISTORY_SNAPSHOT;Snapshot
@@ -1775,6 +1776,8 @@ TP_LABCURVE_RSTPRO_TOOLTIP;Works on the Chromaticity slider and the CC curve.
TP_LENSGEOM_AUTOCROP;Auto-Crop
TP_LENSGEOM_FILL;Auto-fill
TP_LENSGEOM_LABEL;Lens / Geometry
+TP_LENSGEOM_LIN;Linear
+TP_LENSGEOM_LOG;Logarithmic
TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file
TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
diff --git a/rtengine/array2D.h b/rtengine/array2D.h
index 208dab1aa..de6381aeb 100644
--- a/rtengine/array2D.h
+++ b/rtengine/array2D.h
@@ -188,6 +188,16 @@ public:
}
}
+ void fill(const T val, bool multiThread = false)
+ {
+#ifdef _OPENMP
+ #pragma omp parallel for if(multiThread)
+#endif
+ for (int i = 0; i < x * y; ++i) {
+ data[i] = val;
+ }
+ }
+
void free()
{
if ((owner) && (data)) {
diff --git a/rtengine/capturesharpening.cc b/rtengine/capturesharpening.cc
index e5bfde555..9b60694f2 100644
--- a/rtengine/capturesharpening.cc
+++ b/rtengine/capturesharpening.cc
@@ -33,6 +33,50 @@
namespace {
+void compute13x13kernel(float sigma, float kernel[13][13]) {
+
+ const double temp = -2.f * rtengine::SQR(sigma);
+ float sum = 0.f;
+ for (int i = -6; i <= 6; ++i) {
+ for (int j = -6; j <= 6; ++j) {
+ if((rtengine::SQR(i) + rtengine::SQR(j)) <= rtengine::SQR(3.0 * 2.0)) {
+ kernel[i + 6][j + 6] = std::exp((rtengine::SQR(i) + rtengine::SQR(j)) / temp);
+ sum += kernel[i + 6][j + 6];
+ } else {
+ kernel[i + 6][j + 6] = 0.f;
+ }
+ }
+ }
+
+ for (int i = 0; i < 13; ++i) {
+ for (int j = 0; j < 13; ++j) {
+ kernel[i][j] /= sum;
+ }
+ }
+}
+
+void compute9x9kernel(float sigma, float kernel[9][9]) {
+
+ const double temp = -2.f * rtengine::SQR(sigma);
+ float sum = 0.f;
+ for (int i = -4; i <= 4; ++i) {
+ for (int j = -4; j <= 4; ++j) {
+ if((rtengine::SQR(i) + rtengine::SQR(j)) <= rtengine::SQR(3.0 * 1.5)) {
+ kernel[i + 4][j + 4] = std::exp((rtengine::SQR(i) + rtengine::SQR(j)) / temp);
+ sum += kernel[i + 4][j + 4];
+ } else {
+ kernel[i + 4][j + 4] = 0.f;
+ }
+ }
+ }
+
+ for (int i = 0; i < 9; ++i) {
+ for (int j = 0; j < 9; ++j) {
+ kernel[i][j] /= sum;
+ }
+ }
+}
+
void compute7x7kernel(float sigma, float kernel[7][7]) {
const double temp = -2.f * rtengine::SQR(sigma);
@@ -99,31 +143,7 @@ void compute3x3kernel(float sigma, float kernel[3][3]) {
}
}
-inline void initTile(float** dst, const int tileSize)
-{
-
- // first rows
- for (int i = 0; i < 3; ++i) {
- for (int j = 0; j < tileSize; ++j) {
- dst[i][j] = 1.f;
- }
- }
-
- // left and right border
- for (int i = 3; i < tileSize - 3; ++i) {
- dst[i][0] = dst[i][1] = dst[i][2] = 1.f;
- dst[i][tileSize - 3] = dst[i][tileSize - 2] = dst[i][tileSize - 1] = 1.f;
- }
-
- // last rows
- for (int i = tileSize - 3 ; i < tileSize; ++i) {
- for (int j = 0; j < tileSize; ++j) {
- dst[i][j] = 1.f;
- }
- }
-}
-
-inline void gauss3x3div (float** RESTRICT src, float** RESTRICT dst, float** RESTRICT divBuffer, const int tileSize, const float kernel[3][3])
+void gauss3x3div (float** RESTRICT src, float** RESTRICT dst, float** RESTRICT divBuffer, const int tileSize, const float kernel[3][3])
{
const float c11 = kernel[0][0];
@@ -131,6 +151,11 @@ inline void gauss3x3div (float** RESTRICT src, float** RESTRICT dst, float** RES
const float c00 = kernel[1][1];
for (int i = 1; i < tileSize - 1; i++) {
+#if defined(__clang__)
+ #pragma clang loop vectorize(assume_safety)
+#elif defined(__GNUC__)
+ #pragma GCC ivdep
+#endif
for (int j = 1; j < tileSize - 1; j++) {
const float val = c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) +
c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) +
@@ -140,7 +165,7 @@ inline void gauss3x3div (float** RESTRICT src, float** RESTRICT dst, float** RES
}
}
-inline void gauss5x5div (float** RESTRICT src, float** RESTRICT dst, float** RESTRICT divBuffer, const int tileSize, const float kernel[5][5])
+void gauss5x5div (float** RESTRICT src, float** RESTRICT dst, float** RESTRICT divBuffer, const int tileSize, const float kernel[5][5])
{
const float c21 = kernel[0][1];
@@ -151,6 +176,11 @@ inline void gauss5x5div (float** RESTRICT src, float** RESTRICT dst, float** RES
for (int i = 2; i < tileSize - 2; ++i) {
// I tried hand written SSE code but gcc vectorizes better
+#if defined(__clang__)
+ #pragma clang loop vectorize(assume_safety)
+#elif defined(__GNUC__)
+ #pragma GCC ivdep
+#endif
for (int j = 2; j < tileSize - 2; ++j) {
const float val = c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) +
c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) +
@@ -163,7 +193,7 @@ inline void gauss5x5div (float** RESTRICT src, float** RESTRICT dst, float** RES
}
}
-inline void gauss7x7div(float** RESTRICT src, float** RESTRICT dst, float** RESTRICT divBuffer, const int tileSize, const float kernel[7][7])
+void gauss7x7div(float** RESTRICT src, float** RESTRICT dst, float** RESTRICT divBuffer, const int tileSize, const float kernel[7][7])
{
const float c31 = kernel[0][2];
@@ -177,6 +207,11 @@ inline void gauss7x7div(float** RESTRICT src, float** RESTRICT dst, float** REST
for (int i = 3; i < tileSize - 3; ++i) {
// I tried hand written SSE code but gcc vectorizes better
+#if defined(__clang__)
+ #pragma clang loop vectorize(assume_safety)
+#elif defined(__GNUC__)
+ #pragma GCC ivdep
+#endif
for (int j = 3; j < tileSize - 3; ++j) {
const float val = c31 * ((src[i - 3][j - 1] + src[i - 3][j + 1]) + (src[i - 1][j - 3] + src[i - 1][j + 3]) + (src[i + 1][j - 3] + src[i + 1][j + 3]) + (src[i + 3][j - 1] + src[i + 3][j + 1])) +
c30 * (src[i - 3][j] + src[i][j - 3] + src[i][j + 3] + src[i + 3][j]) +
@@ -192,13 +227,117 @@ inline void gauss7x7div(float** RESTRICT src, float** RESTRICT dst, float** REST
}
}
-inline void gauss3x3mult(float** RESTRICT src, float** RESTRICT dst, const int tileSize, const float kernel[3][3])
+void gauss9x9div(float** RESTRICT src, float** RESTRICT dst, float** RESTRICT divBuffer, const int tileSize, const float kernel[9][9])
+{
+
+ const float c42 = kernel[0][2];
+ const float c41 = kernel[0][3];
+ const float c40 = kernel[0][4];
+ const float c33 = kernel[1][1];
+ const float c32 = kernel[1][2];
+ const float c31 = kernel[1][3];
+ const float c30 = kernel[1][4];
+ const float c22 = kernel[2][2];
+ const float c21 = kernel[2][3];
+ const float c20 = kernel[2][4];
+ const float c11 = kernel[3][3];
+ const float c10 = kernel[3][4];
+ const float c00 = kernel[4][4];
+
+ for (int i = 4; i < tileSize - 4; ++i) {
+ // I tried hand written SSE code but gcc vectorizes better
+#if defined(__clang__)
+ #pragma clang loop vectorize(assume_safety)
+#elif defined(__GNUC__)
+ #pragma GCC ivdep
+#endif
+ for (int j = 4; j < tileSize - 4; ++j) {
+ const float val = c42 * ((src[i - 4][j - 2] + src[i - 4][j + 2]) + (src[i - 2][j - 4] + src[i - 2][j + 4]) + (src[i + 2][j - 4] + src[i + 2][j + 4]) + (src[i + 4][j - 2] + src[i + 4][j + 2])) +
+ c41 * ((src[i - 4][j - 1] + src[i - 4][j + 1]) + (src[i - 1][j - 4] + src[i - 1][j + 4]) + (src[i + 1][j - 4] + src[i + 1][j + 4]) + (src[i + 4][j - 1] + src[i + 4][j + 1])) +
+ c40 * (src[i - 4][j] + src[i][j - 4] + src[i][j + 4] + src[i + 4][j]) +
+ c33 * (src[i - 3][j - 3] + src[i - 3][j + 3] + src[i + 3][j - 3] + src[i + 3][j + 3]) +
+ c32 * ((src[i - 3][j - 2] + src[i - 3][j + 2]) + (src[i - 2][j - 3] + src[i - 2][j + 3]) + (src[i + 2][j - 3] + src[i + 2][j + 3]) + (src[i + 3][j - 2] + src[i + 3][j + 2])) +
+ c31 * ((src[i - 3][j - 1] + src[i - 3][j + 1]) + (src[i - 1][j - 3] + src[i - 1][j + 3]) + (src[i + 1][j - 3] + src[i + 1][j + 3]) + (src[i + 3][j - 1] + src[i + 3][j + 1])) +
+ c30 * (src[i - 3][j] + src[i][j - 3] + src[i][j + 3] + src[i + 3][j]) +
+ c22 * (src[i - 2][j - 2] + src[i - 2][j + 2] + src[i + 2][j - 2] + src[i + 2][j + 2]) +
+ c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) +
+ c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) +
+ c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) +
+ c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) +
+ c00 * src[i][j];
+
+ dst[i][j] = divBuffer[i][j] / std::max(val, 0.00001f);
+ }
+ }
+}
+
+void gauss13x13div(float** RESTRICT src, float** RESTRICT dst, float** RESTRICT divBuffer, const int tileSize, const float kernel[13][13])
+{
+ const float c60 = kernel[0][6];
+ const float c53 = kernel[1][3];
+ const float c52 = kernel[1][4];
+ const float c51 = kernel[1][5];
+ const float c50 = kernel[1][6];
+ const float c44 = kernel[2][2];
+ const float c42 = kernel[2][4];
+ const float c41 = kernel[2][5];
+ const float c40 = kernel[2][6];
+ const float c33 = kernel[3][3];
+ const float c32 = kernel[3][4];
+ const float c31 = kernel[3][5];
+ const float c30 = kernel[3][6];
+ const float c22 = kernel[4][4];
+ const float c21 = kernel[4][5];
+ const float c20 = kernel[4][6];
+ const float c11 = kernel[5][5];
+ const float c10 = kernel[5][6];
+ const float c00 = kernel[6][6];
+
+ for (int i = 6; i < tileSize - 6; ++i) {
+ // I tried hand written SSE code but gcc vectorizes better
+#if defined(__clang__)
+ #pragma clang loop vectorize(assume_safety)
+#elif defined(__GNUC__)
+ #pragma GCC ivdep
+#endif
+ for (int j = 6; j < tileSize - 6; ++j) {
+ const float val = c60 * (src[i - 6][j] + src[i][j - 6] + src[i][j + 6] + src[i + 6][j]) +
+ c53 * ((src[i - 5][j - 3] + src[i - 5][j + 3]) + (src[i - 3][j - 5] + src[i - 3][j + 5]) + (src[i + 3][j - 5] + src[i + 3][j + 5]) + (src[i + 5][j - 3] + src[i + 5][j + 3])) +
+ c52 * ((src[i - 5][j - 2] + src[i - 5][j + 2]) + (src[i - 2][j - 5] + src[i - 2][j + 5]) + (src[i + 2][j - 5] + src[i + 2][j + 5]) + (src[i + 5][j - 2] + src[i + 5][j + 2])) +
+ c51 * ((src[i - 5][j - 1] + src[i - 5][j + 1]) + (src[i - 1][j - 5] + src[i - 1][j + 5]) + (src[i + 1][j - 5] + src[i + 1][j + 5]) + (src[i + 5][j - 1] + src[i + 5][j + 1])) +
+ c50 * ((src[i - 5][j] + src[i][j - 5] + src[i][j + 5] + src[i + 5][j]) + ((src[i - 4][j - 3] + src[i - 4][j + 3]) + (src[i - 3][j - 4] + src[i - 3][j + 4]) + (src[i + 3][j - 4] + src[i + 3][j + 4]) + (src[i + 4][j - 3] + src[i + 4][j + 3]))) +
+ c44 * (src[i - 4][j - 4] + src[i - 4][j + 4] + src[i + 4][j - 4] + src[i + 4][j + 4]) +
+ c42 * ((src[i - 4][j - 2] + src[i - 4][j + 2]) + (src[i - 2][j - 4] + src[i - 2][j + 4]) + (src[i + 2][j - 4] + src[i + 2][j + 4]) + (src[i + 4][j - 2] + src[i + 4][j + 2])) +
+ c41 * ((src[i - 4][j - 1] + src[i - 4][j + 1]) + (src[i - 1][j - 4] + src[i - 1][j + 4]) + (src[i + 1][j - 4] + src[i + 1][j + 4]) + (src[i + 4][j - 1] + src[i + 4][j + 1])) +
+ c40 * (src[i - 4][j] + src[i][j - 4] + src[i][j + 4] + src[i + 4][j]) +
+ c33 * (src[i - 3][j - 3] + src[i - 3][j + 3] + src[i + 3][j - 3] + src[i + 3][j + 3]) +
+ c32 * ((src[i - 3][j - 2] + src[i - 3][j + 2]) + (src[i - 2][j - 3] + src[i - 2][j + 3]) + (src[i + 2][j - 3] + src[i + 2][j + 3]) + (src[i + 3][j - 2] + src[i + 3][j + 2])) +
+ c31 * ((src[i - 3][j - 1] + src[i - 3][j + 1]) + (src[i - 1][j - 3] + src[i - 1][j + 3]) + (src[i + 1][j - 3] + src[i + 1][j + 3]) + (src[i + 3][j - 1] + src[i + 3][j + 1])) +
+ c30 * (src[i - 3][j] + src[i][j - 3] + src[i][j + 3] + src[i + 3][j]) +
+ c22 * (src[i - 2][j - 2] + src[i - 2][j + 2] + src[i + 2][j - 2] + src[i + 2][j + 2]) +
+ c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) +
+ c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) +
+ c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) +
+ c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) +
+ c00 * src[i][j];
+
+ dst[i][j] = divBuffer[i][j] / std::max(val, 0.00001f);
+ }
+ }
+}
+
+void gauss3x3mult(float** RESTRICT src, float** RESTRICT dst, const int tileSize, const float kernel[3][3])
{
const float c11 = kernel[0][0];
const float c10 = kernel[0][1];
const float c00 = kernel[1][1];
for (int i = 1; i < tileSize - 1; i++) {
+#if defined(__clang__)
+ #pragma clang loop vectorize(assume_safety)
+#elif defined(__GNUC__)
+ #pragma GCC ivdep
+#endif
for (int j = 1; j < tileSize - 1; j++) {
const float val = c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) +
c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) +
@@ -209,7 +348,7 @@ inline void gauss3x3mult(float** RESTRICT src, float** RESTRICT dst, const int t
}
-inline void gauss5x5mult (float** RESTRICT src, float** RESTRICT dst, const int tileSize, const float kernel[5][5])
+void gauss5x5mult (float** RESTRICT src, float** RESTRICT dst, const int tileSize, const float kernel[5][5])
{
const float c21 = kernel[0][1];
@@ -220,6 +359,11 @@ inline void gauss5x5mult (float** RESTRICT src, float** RESTRICT dst, const int
for (int i = 2; i < tileSize - 2; ++i) {
// I tried hand written SSE code but gcc vectorizes better
+#if defined(__clang__)
+ #pragma clang loop vectorize(assume_safety)
+#elif defined(__GNUC__)
+ #pragma GCC ivdep
+#endif
for (int j = 2; j < tileSize - 2; ++j) {
const float val = c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) +
c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) +
@@ -232,7 +376,7 @@ inline void gauss5x5mult (float** RESTRICT src, float** RESTRICT dst, const int
}
}
-inline void gauss7x7mult(float** RESTRICT src, float** RESTRICT dst, const int tileSize, const float kernel[7][7])
+void gauss7x7mult(float** RESTRICT src, float** RESTRICT dst, const int tileSize, const float kernel[7][7])
{
const float c31 = kernel[0][2];
@@ -246,6 +390,11 @@ inline void gauss7x7mult(float** RESTRICT src, float** RESTRICT dst, const int t
for (int i = 3; i < tileSize - 3; ++i) {
// I tried hand written SSE code but gcc vectorizes better
+#if defined(__clang__)
+ #pragma clang loop vectorize(assume_safety)
+#elif defined(__GNUC__)
+ #pragma GCC ivdep
+#endif
for (int j = 3; j < tileSize - 3; ++j) {
const float val = c31 * ((src[i - 3][j - 1] + src[i - 3][j + 1]) + (src[i - 1][j - 3] + src[i - 1][j + 3]) + (src[i + 1][j - 3] + src[i + 1][j + 3]) + (src[i + 3][j - 1] + src[i + 3][j + 1])) +
c30 * (src[i - 3][j] + src[i][j - 3] + src[i][j + 3] + src[i + 3][j]) +
@@ -261,6 +410,105 @@ inline void gauss7x7mult(float** RESTRICT src, float** RESTRICT dst, const int t
}
}
+void gauss9x9mult(float** RESTRICT src, float** RESTRICT dst, const int tileSize, const float kernel[9][9])
+{
+
+ const float c42 = kernel[0][2];
+ const float c41 = kernel[0][3];
+ const float c40 = kernel[0][4];
+ const float c33 = kernel[1][1];
+ const float c32 = kernel[1][2];
+ const float c31 = kernel[1][3];
+ const float c30 = kernel[1][4];
+ const float c22 = kernel[2][2];
+ const float c21 = kernel[2][3];
+ const float c20 = kernel[2][4];
+ const float c11 = kernel[3][3];
+ const float c10 = kernel[3][4];
+ const float c00 = kernel[4][4];
+
+ for (int i = 4; i < tileSize - 4; ++i) {
+ // I tried hand written SSE code but gcc vectorizes better
+#if defined(__clang__)
+ #pragma clang loop vectorize(assume_safety)
+#elif defined(__GNUC__)
+ #pragma GCC ivdep
+#endif
+ for (int j = 4; j < tileSize - 4; ++j) {
+ const float val = c42 * ((src[i - 4][j - 2] + src[i - 4][j + 2]) + (src[i - 2][j - 4] + src[i - 2][j + 4]) + (src[i + 2][j - 4] + src[i + 2][j + 4]) + (src[i + 4][j - 2] + src[i + 4][j + 2])) +
+ c41 * ((src[i - 4][j - 1] + src[i - 4][j + 1]) + (src[i - 1][j - 4] + src[i - 1][j + 4]) + (src[i + 1][j - 4] + src[i + 1][j + 4]) + (src[i + 4][j - 1] + src[i + 4][j + 1])) +
+ c40 * (src[i - 4][j] + src[i][j - 4] + src[i][j + 4] + src[i + 4][j]) +
+ c33 * (src[i - 3][j - 3] + src[i - 3][j + 3] + src[i + 3][j - 3] + src[i + 3][j + 3]) +
+ c32 * ((src[i - 3][j - 2] + src[i - 3][j + 2]) + (src[i - 2][j - 3] + src[i - 2][j + 3]) + (src[i + 2][j - 3] + src[i + 2][j + 3]) + (src[i + 3][j - 2] + src[i + 3][j + 2])) +
+ c31 * ((src[i - 3][j - 1] + src[i - 3][j + 1]) + (src[i - 1][j - 3] + src[i - 1][j + 3]) + (src[i + 1][j - 3] + src[i + 1][j + 3]) + (src[i + 3][j - 1] + src[i + 3][j + 1])) +
+ c30 * (src[i - 3][j] + src[i][j - 3] + src[i][j + 3] + src[i + 3][j]) +
+ c22 * (src[i - 2][j - 2] + src[i - 2][j + 2] + src[i + 2][j - 2] + src[i + 2][j + 2]) +
+ c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) +
+ c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) +
+ c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) +
+ c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) +
+ c00 * src[i][j];
+ dst[i][j] *= val;
+ }
+ }
+}
+
+void gauss13x13mult(float** RESTRICT src, float** RESTRICT dst, const int tileSize, const float kernel[13][13])
+{
+
+ const float c60 = kernel[0][6];
+ const float c53 = kernel[1][3];
+ const float c52 = kernel[1][4];
+ const float c51 = kernel[1][5];
+ const float c50 = kernel[1][6];
+ const float c44 = kernel[2][2];
+ const float c42 = kernel[2][4];
+ const float c41 = kernel[2][5];
+ const float c40 = kernel[2][6];
+ const float c33 = kernel[3][3];
+ const float c32 = kernel[3][4];
+ const float c31 = kernel[3][5];
+ const float c30 = kernel[3][6];
+ const float c22 = kernel[4][4];
+ const float c21 = kernel[4][5];
+ const float c20 = kernel[4][6];
+ const float c11 = kernel[5][5];
+ const float c10 = kernel[5][6];
+ const float c00 = kernel[6][6];
+
+ for (int i = 6; i < tileSize - 6; ++i) {
+ // I tried hand written SSE code but gcc vectorizes better
+#if defined(__clang__)
+ #pragma clang loop vectorize(assume_safety)
+#elif defined(__GNUC__)
+ #pragma GCC ivdep
+#endif
+ for (int j = 6; j < tileSize - 6; ++j) {
+ const float val = c60 * (src[i - 6][j] + src[i][j - 6] + src[i][j + 6] + src[i + 6][j]) +
+ c53 * ((src[i - 5][j - 3] + src[i - 5][j + 3]) + (src[i - 3][j - 5] + src[i - 3][j + 5]) + (src[i + 3][j - 5] + src[i + 3][j + 5]) + (src[i + 5][j - 3] + src[i + 5][j + 3])) +
+ c52 * ((src[i - 5][j - 2] + src[i - 5][j + 2]) + (src[i - 2][j - 5] + src[i - 2][j + 5]) + (src[i + 2][j - 5] + src[i + 2][j + 5]) + (src[i + 5][j - 2] + src[i + 5][j + 2])) +
+ c51 * ((src[i - 5][j - 1] + src[i - 5][j + 1]) + (src[i - 1][j - 5] + src[i - 1][j + 5]) + (src[i + 1][j - 5] + src[i + 1][j + 5]) + (src[i + 5][j - 1] + src[i + 5][j + 1])) +
+ c50 * ((src[i - 5][j] + src[i][j - 5] + src[i][j + 5] + src[i + 5][j]) + ((src[i - 4][j - 3] + src[i - 4][j + 3]) + (src[i - 3][j - 4] + src[i - 3][j + 4]) + (src[i + 3][j - 4] + src[i + 3][j + 4]) + (src[i + 4][j - 3] + src[i + 4][j + 3]))) +
+ c44 * (src[i - 4][j - 4] + src[i - 4][j + 4] + src[i + 4][j - 4] + src[i + 4][j + 4]) +
+ c42 * ((src[i - 4][j - 2] + src[i - 4][j + 2]) + (src[i - 2][j - 4] + src[i - 2][j + 4]) + (src[i + 2][j - 4] + src[i + 2][j + 4]) + (src[i + 4][j - 2] + src[i + 4][j + 2])) +
+ c41 * ((src[i - 4][j - 1] + src[i - 4][j + 1]) + (src[i - 1][j - 4] + src[i - 1][j + 4]) + (src[i + 1][j - 4] + src[i + 1][j + 4]) + (src[i + 4][j - 1] + src[i + 4][j + 1])) +
+ c40 * (src[i - 4][j] + src[i][j - 4] + src[i][j + 4] + src[i + 4][j]) +
+ c33 * (src[i - 3][j - 3] + src[i - 3][j + 3] + src[i + 3][j - 3] + src[i + 3][j + 3]) +
+ c32 * ((src[i - 3][j - 2] + src[i - 3][j + 2]) + (src[i - 2][j - 3] + src[i - 2][j + 3]) + (src[i + 2][j - 3] + src[i + 2][j + 3]) + (src[i + 3][j - 2] + src[i + 3][j + 2])) +
+ c31 * ((src[i - 3][j - 1] + src[i - 3][j + 1]) + (src[i - 1][j - 3] + src[i - 1][j + 3]) + (src[i + 1][j - 3] + src[i + 1][j + 3]) + (src[i + 3][j - 1] + src[i + 3][j + 1])) +
+ c30 * (src[i - 3][j] + src[i][j - 3] + src[i][j + 3] + src[i + 3][j]) +
+ c22 * (src[i - 2][j - 2] + src[i - 2][j + 2] + src[i + 2][j - 2] + src[i + 2][j + 2]) +
+ c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) +
+ c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) +
+ c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) +
+ c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) +
+ c00 * src[i][j];
+
+ dst[i][j] *= val;
+ }
+ }
+}
+
void buildClipMaskBayer(const float * const *rawData, int W, int H, float** clipMask, const float whites[2][2])
{
@@ -495,32 +743,33 @@ float calcRadiusXtrans(const float * const *rawData, int W, int H, float lowerLi
bool checkForStop(float** tmpIThr, float** iterCheck, int fullTileSize, int border)
{
- bool stopped = false;
- for (int ii = border; !stopped && ii < fullTileSize - border; ++ii) {
+ for (int ii = border; ii < fullTileSize - border; ++ii) {
#ifdef __SSE2__
for (int jj = border; jj < fullTileSize - border; jj += 4) {
- if (_mm_movemask_ps((vfloat)vmaskf_lt(LVFU(tmpIThr[ii][jj]), LVFU(iterCheck[ii - border][jj - border])))) {
- stopped = true;
- break;
+ if (UNLIKELY(_mm_movemask_ps((vfloat)vmaskf_lt(LVFU(tmpIThr[ii][jj]), LVFU(iterCheck[ii - border][jj - border]))))) {
+ return true;
}
}
#else
for (int jj = border; jj < fullTileSize - border; ++jj) {
if (tmpIThr[ii][jj] < iterCheck[ii - border][jj - border]) {
- stopped = true;
- break;
+ return true;
}
}
#endif
}
- return stopped;
+ return false;
}
-void CaptureDeconvSharpening (float ** clipmask, float** luminance, float** oldLuminance, const float * const * blend, int W, int H, double sigma, double sigmaCornerOffset, int iterations, bool checkIterStop, rtengine::ProgressListener* plistener, double startVal, double endVal)
+void CaptureDeconvSharpening (float** luminance, const float* const * oldLuminance, const float * const * blend, int W, int H, double sigma, double sigmaCornerOffset, int iterations, bool checkIterStop, rtengine::ProgressListener* plistener, double startVal, double endVal)
{
BENCHFUN
+ const bool is9x9 = (sigma <= 1.50 && sigmaCornerOffset == 0.0);
+ const bool is7x7 = (sigma <= 1.15 && sigmaCornerOffset == 0.0);
const bool is5x5 = (sigma <= 0.84 && sigmaCornerOffset == 0.0);
const bool is3x3 = (sigma < 0.6 && sigmaCornerOffset == 0.0);
+ float kernel13[13][13];
+ float kernel9[9][9];
float kernel7[7][7];
float kernel5[5][5];
float kernel3[3][3];
@@ -528,19 +777,24 @@ BENCHFUN
compute3x3kernel(sigma, kernel3);
} else if (is5x5) {
compute5x5kernel(sigma, kernel5);
- } else {
+ } else if (is7x7) {
compute7x7kernel(sigma, kernel7);
+ } else if (is9x9) {
+ compute9x9kernel(sigma, kernel9);
+ } else {
+ compute13x13kernel(sigma, kernel13);
}
constexpr int tileSize = 32;
- const int border = iterations <= 30 ? 5 : 7;
+ const int border = (is3x3 || is5x5 || is7x7) ? iterations <= 30 ? 5 : 7 : 8;
const int fullTileSize = tileSize + 2 * border;
- const float cornerRadius = std::min(1.15f, sigma + sigmaCornerOffset);
+ const float cornerRadius = std::min(2.f, sigma + sigmaCornerOffset);
const float cornerDistance = sqrt(rtengine::SQR(W * 0.5f) + rtengine::SQR(H * 0.5f));
const float distanceFactor = (cornerRadius - sigma) / cornerDistance;
double progress = startVal;
const double progressStep = (endVal - startVal) * rtengine::SQR(tileSize) / (W * H);
+
constexpr float minBlend = 0.01f;
#ifdef _OPENMP
@@ -550,9 +804,9 @@ BENCHFUN
int progresscounter = 0;
array2D tmpIThr(fullTileSize, fullTileSize);
array2D tmpThr(fullTileSize, fullTileSize);
+ tmpThr.fill(1.f);
array2D lumThr(fullTileSize, fullTileSize);
array2D iterCheck(tileSize, tileSize);
- initTile(tmpThr, fullTileSize);
#ifdef _OPENMP
#pragma omp for schedule(dynamic,16) collapse(2)
#endif
@@ -567,14 +821,14 @@ BENCHFUN
if (checkIterStop) {
for (int k = 0, ii = endOfCol ? H - fullTileSize + border : i; k < tileSize; ++k, ++ii) {
for (int l = 0, jj = endOfRow ? W - fullTileSize + border : j; l < tileSize; ++l, ++jj) {
- iterCheck[k][l] = oldLuminance[ii][jj] * clipmask[ii][jj] * 0.5f;
- maxVal = std::max(maxVal, clipmask[ii][jj]);
+ iterCheck[k][l] = oldLuminance[ii][jj] * blend[ii][jj] * 0.5f;
+ maxVal = std::max(maxVal, blend[ii][jj]);
}
}
} else {
for (int k = 0, ii = endOfCol ? H - fullTileSize + border : i; k < tileSize; ++k, ++ii) {
for (int l = 0, jj = endOfRow ? W - fullTileSize + border : j; l < tileSize; ++l, ++jj) {
- maxVal = std::max(maxVal, clipmask[ii][jj]);
+ maxVal = std::max(maxVal, blend[ii][jj]);
}
}
}
@@ -593,14 +847,14 @@ BENCHFUN
if (checkIterStop) {
for (int ii = 0; ii < tileSize; ++ii) {
for (int jj = 0; jj < tileSize; ++jj) {
- iterCheck[ii][jj] = oldLuminance[i + ii][j + jj] * clipmask[i + ii][j + jj] * 0.5f;
- maxVal = std::max(maxVal, clipmask[i + ii][j + jj]);
+ iterCheck[ii][jj] = oldLuminance[i + ii][j + jj] * blend[i + ii][j + jj] * 0.5f;
+ maxVal = std::max(maxVal, blend[i + ii][j + jj]);
}
}
} else {
for (int ii = 0; ii < tileSize; ++ii) {
for (int jj = 0; jj < tileSize; ++jj) {
- maxVal = std::max(maxVal, clipmask[i + ii][j + jj]);
+ maxVal = std::max(maxVal, blend[i + ii][j + jj]);
}
}
}
@@ -615,23 +869,40 @@ BENCHFUN
}
}
}
- bool stopped = false;
if (is3x3) {
- for (int k = 0; k < iterations && !stopped; ++k) {
+ for (int k = 0; k < iterations; ++k) {
// apply 3x3 gaussian blur and divide luminance by result of gaussian blur
gauss3x3div(tmpIThr, tmpThr, lumThr, fullTileSize, kernel3);
gauss3x3mult(tmpThr, tmpIThr, fullTileSize, kernel3);
- if (checkIterStop) {
- stopped = checkForStop(tmpIThr, iterCheck, fullTileSize, border);
+ if (checkIterStop && k < iterations - 1 && checkForStop(tmpIThr, iterCheck, fullTileSize, border)) {
+ break;
}
}
} else if (is5x5) {
- for (int k = 0; k < iterations && !stopped; ++k) {
+ for (int k = 0; k < iterations; ++k) {
// apply 5x5 gaussian blur and divide luminance by result of gaussian blur
gauss5x5div(tmpIThr, tmpThr, lumThr, fullTileSize, kernel5);
gauss5x5mult(tmpThr, tmpIThr, fullTileSize, kernel5);
- if (checkIterStop) {
- stopped = checkForStop(tmpIThr, iterCheck, fullTileSize, border);
+ if (checkIterStop && k < iterations - 1 && checkForStop(tmpIThr, iterCheck, fullTileSize, border)) {
+ break;
+ }
+ }
+ } else if (is7x7) {
+ for (int k = 0; k < iterations; ++k) {
+ // apply 5x5 gaussian blur and divide luminance by result of gaussian blur
+ gauss7x7div(tmpIThr, tmpThr, lumThr, fullTileSize, kernel7);
+ gauss7x7mult(tmpThr, tmpIThr, fullTileSize, kernel7);
+ if (checkIterStop && k < iterations - 1 && checkForStop(tmpIThr, iterCheck, fullTileSize, border)) {
+ break;
+ }
+ }
+ } else if (is9x9) {
+ for (int k = 0; k < iterations; ++k) {
+ // apply 5x5 gaussian blur and divide luminance by result of gaussian blur
+ gauss9x9div(tmpIThr, tmpThr, lumThr, fullTileSize, kernel9);
+ gauss9x9mult(tmpThr, tmpIThr, fullTileSize, kernel9);
+ if (checkIterStop && k < iterations - 1 && checkForStop(tmpIThr, iterCheck, fullTileSize, border)) {
+ break;
}
}
} else {
@@ -639,37 +910,59 @@ BENCHFUN
const float distance = sqrt(rtengine::SQR(i + tileSize / 2 - H / 2) + rtengine::SQR(j + tileSize / 2 - W / 2));
const float sigmaTile = static_cast(sigma) + distanceFactor * distance;
if (sigmaTile >= 0.4f) {
- if (sigmaTile > 0.84) { // have to use 7x7 kernel
+ if (sigmaTile > 1.50) { // have to use 13x13 kernel
+ float lkernel13[13][13];
+ compute13x13kernel(static_cast(sigma) + distanceFactor * distance, lkernel13);
+ for (int k = 0; k < iterations; ++k) {
+ // apply 13x13 gaussian blur and divide luminance by result of gaussian blur
+ gauss13x13div(tmpIThr, tmpThr, lumThr, fullTileSize, lkernel13);
+ gauss13x13mult(tmpThr, tmpIThr, fullTileSize, lkernel13);
+ if (checkIterStop && k < iterations - 1 && checkForStop(tmpIThr, iterCheck, fullTileSize, border)) {
+ break;
+ }
+ }
+ } else if (sigmaTile > 1.15) { // have to use 9x9 kernel
+ float lkernel9[9][9];
+ compute9x9kernel(static_cast(sigma) + distanceFactor * distance, lkernel9);
+ for (int k = 0; k < iterations; ++k) {
+ // apply 9x9 gaussian blur and divide luminance by result of gaussian blur
+ gauss9x9div(tmpIThr, tmpThr, lumThr, fullTileSize, lkernel9);
+ gauss9x9mult(tmpThr, tmpIThr, fullTileSize, lkernel9);
+ if (checkIterStop && k < iterations - 1 && checkForStop(tmpIThr, iterCheck, fullTileSize, border)) {
+ break;
+ }
+ }
+ } else if (sigmaTile > 0.84) { // have to use 7x7 kernel
float lkernel7[7][7];
compute7x7kernel(static_cast(sigma) + distanceFactor * distance, lkernel7);
- for (int k = 0; k < iterations && !stopped; ++k) {
+ for (int k = 0; k < iterations; ++k) {
// apply 7x7 gaussian blur and divide luminance by result of gaussian blur
gauss7x7div(tmpIThr, tmpThr, lumThr, fullTileSize, lkernel7);
gauss7x7mult(tmpThr, tmpIThr, fullTileSize, lkernel7);
- if (checkIterStop) {
- stopped = checkForStop(tmpIThr, iterCheck, fullTileSize, border);
+ if (checkIterStop && k < iterations - 1 && checkForStop(tmpIThr, iterCheck, fullTileSize, border)) {
+ break;
}
}
} else { // can use 5x5 kernel
- float lkernel7[5][5];
- compute5x5kernel(static_cast(sigma) + distanceFactor * distance, lkernel7);
- for (int k = 0; k < iterations && !stopped; ++k) {
+ float lkernel5[5][5];
+ compute5x5kernel(static_cast(sigma) + distanceFactor * distance, lkernel5);
+ for (int k = 0; k < iterations; ++k) {
// apply 7x7 gaussian blur and divide luminance by result of gaussian blur
- gauss5x5div(tmpIThr, tmpThr, lumThr, fullTileSize, lkernel7);
- gauss5x5mult(tmpThr, tmpIThr, fullTileSize, lkernel7);
- if (checkIterStop) {
- stopped = checkForStop(tmpIThr, iterCheck, fullTileSize, border);
+ gauss5x5div(tmpIThr, tmpThr, lumThr, fullTileSize, lkernel5);
+ gauss5x5mult(tmpThr, tmpIThr, fullTileSize, lkernel5);
+ if (checkIterStop && k < iterations - 1 && checkForStop(tmpIThr, iterCheck, fullTileSize, border)) {
+ break;
}
}
}
}
} else {
- for (int k = 0; k < iterations && !stopped; ++k) {
- // apply 7x7 gaussian blur and divide luminance by result of gaussian blur
- gauss7x7div(tmpIThr, tmpThr, lumThr, fullTileSize, kernel7);
- gauss7x7mult(tmpThr, tmpIThr, fullTileSize, kernel7);
- if (checkIterStop) {
- stopped = checkForStop(tmpIThr, iterCheck, fullTileSize, border);
+ for (int k = 0; k < iterations; ++k) {
+ // apply 13x13 gaussian blur and divide luminance by result of gaussian blur
+ gauss13x13div(tmpIThr, tmpThr, lumThr, fullTileSize, kernel13);
+ gauss13x13mult(tmpThr, tmpIThr, fullTileSize, kernel13);
+ if (checkIterStop && k < iterations - 1 && checkForStop(tmpIThr, iterCheck, fullTileSize, border)) {
+ break;
}
}
}
@@ -678,23 +971,23 @@ BENCHFUN
// special handling for small tiles at end of row or column
for (int k = border, ii = endOfCol ? H - fullTileSize : i - border; k < fullTileSize - border; ++k) {
for (int l = border, jj = endOfRow ? W - fullTileSize : j - border; l < fullTileSize - border; ++l) {
- luminance[ii + k][jj + l] = rtengine::intp(blend[ii + k][jj + l], std::max(tmpIThr[k][l], 0.0f), luminance[ii + k][jj + l]);
+ luminance[ii + k][jj + l] = rtengine::intp(blend[ii + k][jj + l], tmpIThr[k][l], luminance[ii + k][jj + l]);
}
}
} else {
for (int ii = border; ii < fullTileSize - border; ++ii) {
for (int jj = border; jj < fullTileSize - border; ++jj) {
- luminance[i + ii - border][j + jj - border] = rtengine::intp(blend[i + ii - border][j + jj - border], std::max(tmpIThr[ii][jj], 0.0f), luminance[i + ii - border][j + jj - border]);
+ luminance[i + ii - border][j + jj - border] = rtengine::intp(blend[i + ii - border][j + jj - border], tmpIThr[ii][jj], luminance[i + ii - border][j + jj - border]);
}
}
}
if (plistener) {
- if (++progresscounter % 16 == 0) {
+ if (++progresscounter % 32 == 0) {
#ifdef _OPENMP
#pragma omp critical(csprogress)
#endif
{
- progress += 16.0 * progressStep;
+ progress += 32.0 * progressStep;
progress = rtengine::min(progress, endVal);
plistener->setProgress(progress);
}
@@ -721,6 +1014,7 @@ void RawImageSource::captureSharpening(const procparams::CaptureSharpeningParams
plistener->setProgress(0.0);
}
BENCHFUN
+
constexpr float xyz_rgb[3][3] = { // XYZ from RGB
{ 0.412453, 0.357580, 0.180423 },
{ 0.212671, 0.715160, 0.072169 },
@@ -737,7 +1031,7 @@ BENCHFUN
array2D clipMask(W, H);
constexpr float clipLimit = 0.95f;
- constexpr float maxSigma = 1.15f;
+ constexpr float maxSigma = 2.f;
if (getSensorType() == ST_BAYER) {
const float whites[2][2] = {
@@ -786,6 +1080,10 @@ BENCHFUN
}
}
+ if (std::isnan(radius)) {
+ return;
+ }
+
if (showMask) {
array2D& L = blue; // blue will be overridden anyway => we can use its buffer to store L
#ifdef _OPENMP
@@ -799,8 +1097,7 @@ BENCHFUN
plistener->setProgress(0.1);
}
- array2D& blend = red; // red will be overridden anyway => we can use its buffer to store the blend mask
- buildBlendMask(L, blend, W, H, contrast, sharpeningParams.autoContrast, clipMask);
+ buildBlendMask(L, clipMask, W, H, contrast, sharpeningParams.autoContrast, clipMask);
if (plistener) {
plistener->setProgress(0.2);
}
@@ -810,7 +1107,7 @@ BENCHFUN
#endif
for (int i = 0; i < H; ++i) {
for (int j = 0; j < W; ++j) {
- red[i][j] = green[i][j] = blue[i][j] = blend[i][j] * 16384.f;
+ red[i][j] = green[i][j] = blue[i][j] = clipMask[i][j] * 16384.f;
}
}
if (plistener) {
@@ -847,18 +1144,18 @@ BENCHFUN
if (plistener) {
plistener->setProgress(0.1);
}
+
// calculate contrast based blend factors to reduce sharpening in regions with low contrast
- array2D& blend = clipMask; // we can share blend and clipMask buffer here
- buildBlendMask(L, blend, W, H, contrast, sharpeningParams.autoContrast, clipMask);
+ buildBlendMask(L, clipMask, W, H, contrast, sharpeningParams.autoContrast, clipMask);
if (plistener) {
plistener->setProgress(0.2);
}
conrastThreshold = contrast * 100.f;
-
- CaptureDeconvSharpening(clipMask, YNew, YOld, blend, W, H, radius, sharpeningParams.deconvradiusOffset, sharpeningParams.deconviter, sharpeningParams.deconvitercheck, plistener, 0.2, 0.9);
+ CaptureDeconvSharpening(YNew, YOld, clipMask, W, H, radius, sharpeningParams.deconvradiusOffset, sharpeningParams.deconviter, sharpeningParams.deconvitercheck, plistener, 0.2, 0.9);
if (plistener) {
plistener->setProgress(0.9);
}
+
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic, 16)
#endif
@@ -866,7 +1163,7 @@ BENCHFUN
int j = 0;
#ifdef __SSE2__
for (; j < W - 3; j += 4) {
- const vfloat factor = vmaxf(LVFU(YNew[i][j]), ZEROV) / vmaxf(LVFU(YOld[i][j]), F2V(0.00001f));
+ const vfloat factor = LVFU(YNew[i][j]) / vmaxf(LVFU(YOld[i][j]), F2V(0.00001f));
STVFU(red[i][j], LVFU(redVals[i][j]) * factor);
STVFU(green[i][j], LVFU(greenVals[i][j]) * factor);
STVFU(blue[i][j], LVFU(blueVals[i][j]) * factor);
@@ -874,7 +1171,7 @@ BENCHFUN
#endif
for (; j < W; ++j) {
- const float factor = std::max(YNew[i][j], 0.f) / std::max(YOld[i][j], 0.00001f);
+ const float factor = YNew[i][j] / std::max(YOld[i][j], 0.00001f);
red[i][j] = redVals[i][j] * factor;
green[i][j] = greenVals[i][j] * factor;
blue[i][j] = blueVals[i][j] * factor;
diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc
index a6889b954..890003ee0 100644
--- a/rtengine/dcrop.cc
+++ b/rtengine/dcrop.cc
@@ -173,8 +173,6 @@ void Crop::update(int todo)
int widIm = parent->fw;//full image
int heiIm = parent->fh;
- bool needstransform = parent->ipf.needsTransform();
-
if (todo & (M_INIT | M_LINDENOISE | M_HDR)) {
MyMutex::MyLock lock(parent->minit); // Also used in improccoord
@@ -766,8 +764,9 @@ void Crop::update(int todo)
}
}
+ const bool needstransform = parent->ipf.needsTransform(skips(parent->fw, skip), skips(parent->fh, skip), parent->imgsrc->getRotateDegree(), parent->imgsrc->getMetaData());
// transform
- if (needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) {
+ if (needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) {
if (!transCrop) {
transCrop = new Imagefloat(cropw, croph);
}
@@ -784,10 +783,7 @@ void Crop::update(int todo)
baseCrop = transCrop;
}
} else {
- if (transCrop) {
- delete transCrop;
- }
-
+ delete transCrop;
transCrop = nullptr;
}
@@ -1167,41 +1163,42 @@ bool Crop::setCropSizes(int rcx, int rcy, int rcw, int rch, int skip, bool inter
parent->ipf.transCoord(parent->fw, parent->fh, bx1, by1, bw, bh, orx, ory, orw, orh);
- if (check_need_larger_crop_for_lcp_distortion(parent->fw, parent->fh, orx, ory, orw, orh, *parent->params)) {
- // TODO - this is an estimate of the max distortion relative to the image size. ATM it is hardcoded to be 15%, which seems enough. If not, need to revise
- int dW = int (double (parent->fw) * 0.15 / (2 * skip));
- int dH = int (double (parent->fh) * 0.15 / (2 * skip));
- int x1 = orx - dW;
- int x2 = orx + orw + dW;
- int y1 = ory - dH;
- int y2 = ory + orh + dH;
+ if (parent->ipf.needsTransform(skips(parent->fw, skip), skips(parent->fh, skip), parent->imgsrc->getRotateDegree(), parent->imgsrc->getMetaData())) {
+ if (check_need_larger_crop_for_lcp_distortion(parent->fw, parent->fh, orx, ory, orw, orh, *parent->params)) {
+ // TODO - this is an estimate of the max distortion relative to the image size. ATM it is hardcoded to be 15%, which seems enough. If not, need to revise
+ int dW = int (double (parent->fw) * 0.15 / (2 * skip));
+ int dH = int (double (parent->fh) * 0.15 / (2 * skip));
+ int x1 = orx - dW;
+ int x2 = orx + orw + dW;
+ int y1 = ory - dH;
+ int y2 = ory + orh + dH;
- if (x1 < 0) {
- x2 += -x1;
- x1 = 0;
+ if (x1 < 0) {
+ x2 += -x1;
+ x1 = 0;
+ }
+
+ if (x2 > parent->fw) {
+ x1 -= x2 - parent->fw;
+ x2 = parent->fw;
+ }
+
+ if (y1 < 0) {
+ y2 += -y1;
+ y1 = 0;
+ }
+
+ if (y2 > parent->fh) {
+ y1 -= y2 - parent->fh;
+ y2 = parent->fh;
+ }
+
+ orx = max(x1, 0);
+ ory = max(y1, 0);
+ orw = min(x2 - x1, parent->fw - orx);
+ orh = min(y2 - y1, parent->fh - ory);
}
-
- if (x2 > parent->fw) {
- x1 -= x2 - parent->fw;
- x2 = parent->fw;
- }
-
- if (y1 < 0) {
- y2 += -y1;
- y1 = 0;
- }
-
- if (y2 > parent->fh) {
- y1 -= y2 - parent->fh;
- y2 = parent->fh;
- }
-
- orx = max(x1, 0);
- ory = max(y1, 0);
- orw = min(x2 - x1, parent->fw - orx);
- orh = min(y2 - y1, parent->fh - ory);
}
-
leftBorder = skips(rqx1 - bx1, skip);
upperBorder = skips(rqy1 - by1, skip);
diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc
index a4ca0ea0b..e915a11b0 100644
--- a/rtengine/improccoordinator.cc
+++ b/rtengine/improccoordinator.cc
@@ -545,7 +545,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
oprevi = orig_prev;
// Remove transformation if unneeded
- bool needstransform = ipf.needsTransform();
+ bool needstransform = ipf.needsTransform(fw, fh, imgsrc->getRotateDegree(), imgsrc->getMetaData());
if ((needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params->dirpyrequalizer.cbdlMethod == "bef" && params->dirpyrequalizer.enabled && !params->colorappearance.enabled))) {
assert(oprevi);
@@ -1349,7 +1349,7 @@ void ImProcCoordinator::saveInputICCReference(const Glib::ustring& fname, bool a
imgsrc->getImage(currWB, tr, im, pp, ppar.toneCurve, ppar.raw);
ImProcFunctions ipf(&ppar, true);
- if (ipf.needsTransform()) {
+ if (ipf.needsTransform(fW, fH, imgsrc->getRotateDegree(), imgsrc->getMetaData())) {
Imagefloat* trImg = new Imagefloat(fW, fH);
ipf.transform(im, trImg, 0, 0, 0, 0, fW, fH, fW, fH,
imgsrc->getMetaData(), imgsrc->getRotateDegree(), true);
diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc
index 59fb0f016..d5c69773e 100644
--- a/rtengine/improcfun.cc
+++ b/rtengine/improcfun.cc
@@ -5131,11 +5131,11 @@ void ImProcFunctions::EPDToneMapCIE (CieImage *ncie, float a_w, float c_, int Wi
if (!params->epd.enabled) {
return;
}
-
+/*
if (params->wavelet.enabled && params->wavelet.tmrs != 0) {
return;
}
-
+*/
float stren = params->epd.strength;
float edgest = params->epd.edgeStopping;
float sca = params->epd.scale;
@@ -5245,11 +5245,11 @@ void ImProcFunctions::EPDToneMap (LabImage *lab, unsigned int Iterates, int skip
if (!params->epd.enabled) {
return;
}
-
+/*
if (params->wavelet.enabled && params->wavelet.tmrs != 0) {
return;
}
-
+*/
float stren = params->epd.strength;
float edgest = params->epd.edgeStopping;
float sca = params->epd.scale;
diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h
index 661f399ef..8f4ae7771 100644
--- a/rtengine/improcfun.h
+++ b/rtengine/improcfun.h
@@ -84,8 +84,8 @@ class ImProcFunctions
void calcVignettingParams(int oW, int oH, const procparams::VignettingParams& vignetting, double &w2, double &h2, double& maxRadius, double &v, double &b, double &mul);
void transformLuminanceOnly(Imagefloat* original, Imagefloat* transformed, int cx, int cy, int oW, int oH, int fW, int fH);
- void transformGeneral(bool highQuality, Imagefloat *original, Imagefloat *transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LensCorrection *pLCPMap);
- void transformLCPCAOnly(Imagefloat *original, Imagefloat *transformed, int cx, int cy, const LensCorrection *pLCPMap);
+ void transformGeneral(bool highQuality, Imagefloat *original, Imagefloat *transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LensCorrection *pLCPMap, bool useOriginalBuffer);
+ void transformLCPCAOnly(Imagefloat *original, Imagefloat *transformed, int cx, int cy, const LensCorrection *pLCPMap, bool useOriginalBuffer);
bool needsCA() const;
bool needsDistortion() const;
@@ -119,7 +119,7 @@ public:
}
void setScale(double iscale);
- bool needsTransform() const;
+ bool needsTransform(int oW, int oH, int rawRotationDeg, const FramesMetaData *metadata) const;
bool needsPCVignetting() const;
void firstAnalysis(const Imagefloat* const working, const procparams::ProcParams ¶ms, LUTu & vhist16);
@@ -156,7 +156,7 @@ public:
// void colorCurve (LabImage* lold, LabImage* lnew);
void sharpening(LabImage* lab, const procparams::SharpeningParams &sharpenParam, bool showMask = false);
void sharpeningcam(CieImage* ncie, float** buffer, bool showMask = false);
- void transform(Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const FramesMetaData *metadata, int rawRotationDeg, bool fullImage);
+ void transform(Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const FramesMetaData *metadata, int rawRotationDeg, bool fullImage, bool useOriginalBuffer = false);
float resizeScale(const procparams::ProcParams* params, int fw, int fh, int &imw, int &imh);
void lab2monitorRgb(LabImage* lab, Image8* image);
void resize(Imagefloat* src, Imagefloat* dst, float dScale);
diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc
index 1d3f2f494..e366184b0 100644
--- a/rtengine/iplab2rgb.cc
+++ b/rtengine/iplab2rgb.cc
@@ -38,14 +38,8 @@ namespace {
inline void copyAndClampLine(const float *src, unsigned char *dst, const int W)
{
- for (int j = 0, iy = 0; j < W; ++j) {
- float r = src[iy] * MAXVALF;
- float g = src[iy+1] * MAXVALF;
- float b = src[iy+2] * MAXVALF;
- dst[iy] = uint16ToUint8Rounded(CLIP(r));
- dst[iy+1] = uint16ToUint8Rounded(CLIP(g));
- dst[iy+2] = uint16ToUint8Rounded(CLIP(b));
- iy += 3;
+ for (int j = 0; j < W * 3; ++j) {
+ dst[j] = uint16ToUint8Rounded(CLIP(src[j] * MAXVALF));
}
}
@@ -90,8 +84,8 @@ void ImProcFunctions::lab2monitorRgb(LabImage* lab, Image8* image)
{
if (monitorTransform) {
- int W = lab->W;
- int H = lab->H;
+ const int W = lab->W;
+ const int H = lab->H;
unsigned char * data = image->data;
// cmsDoTransform is relatively expensive
@@ -100,18 +94,19 @@ void ImProcFunctions::lab2monitorRgb(LabImage* lab, Image8* image)
#endif
{
AlignedBuffer pBuf(3 * lab->W);
- AlignedBuffer mBuf(3 * lab->W);
+ AlignedBuffer mBuf;
AlignedBuffer gwBuf1;
AlignedBuffer gwBuf2;
if (gamutWarning) {
gwBuf1.resize(3 * lab->W);
gwBuf2.resize(3 * lab->W);
+ mBuf.resize(3 * lab->W);
}
float *buffer = pBuf.data;
- float *outbuffer = mBuf.data;
+ float *outbuffer = gamutWarning ? mBuf.data : pBuf.data; // make in place transformations when gamutWarning is not needed
#ifdef _OPENMP
#pragma omp for schedule(dynamic,16)
@@ -132,7 +127,7 @@ void ImProcFunctions::lab2monitorRgb(LabImage* lab, Image8* image)
buffer[iy++] = rb[j] / 327.68f;
}
- cmsDoTransform (monitorTransform, buffer, outbuffer, W);
+ cmsDoTransform(monitorTransform, buffer, outbuffer, W);
copyAndClampLine(outbuffer, data + ix, W);
if (gamutWarning) {
diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc
index af513536e..9e7c61dcf 100644
--- a/rtengine/iptransform.cc
+++ b/rtengine/iptransform.cc
@@ -86,6 +86,29 @@ float normn (float a, float b, int n)
}
}
+void logEncode(rtengine::Imagefloat *src, rtengine::Imagefloat *dest, bool multiThread) {
+
+#ifdef _OPENMP
+ #pragma omp parallel for schedule(dynamic, 16) if(multiThread)
+#endif
+
+ for (int y = 0; y < src->getHeight(); ++y) {
+ int x = 0;
+#ifdef __SSE2__
+ for (; x < src->getWidth() - 3; x += 4) {
+ STVFU(dest->r(y, x), xlogf1(LVFU(src->r(y, x))));
+ STVFU(dest->g(y, x), xlogf1(LVFU(src->g(y, x))));
+ STVFU(dest->b(y, x), xlogf1(LVFU(src->b(y, x))));
+ }
+#endif
+ for (; x < src->getWidth(); ++x) {
+ dest->r(y, x) = xlogf1(src->r(y, x));
+ dest->g(y, x) = xlogf1(src->g(y, x));
+ dest->b(y, x) = xlogf1(src->b(y, x));
+ }
+ }
+}
+
#ifdef __SSE2__
inline void interpolateTransformCubic(rtengine::Imagefloat* src, int xs, int ys, float Dx, float Dy, float &r, float &g, float &b, float mul)
{
@@ -111,6 +134,33 @@ inline void interpolateTransformCubic(rtengine::Imagefloat* src, int xs, int ys,
g = vhadd(weight * gv);
b = vhadd(weight * bv);
}
+
+inline void interpolateTransformCubicLog(rtengine::Imagefloat* src, int xs, int ys, float Dx, float Dy, float &r, float &g, float &b, float mul)
+{
+ constexpr float A = -0.85f;
+
+ // Vertical
+ const float t1Vert = A * (Dy - Dy * Dy);
+ const float t2Vert = (3.f - 2.f * Dy) * Dy * Dy;
+ const vfloat w3Vert = F2V(t1Vert * Dy);
+ const vfloat w2Vert = F2V(t1Vert * Dy - t1Vert + t2Vert);
+ const vfloat w1Vert = F2V(1.f - (t1Vert * Dy) - t2Vert);
+ const vfloat w0Vert = F2V(t1Vert - (t1Vert * Dy));
+
+ const vfloat rv = (w0Vert * LVFU(src->r(ys, xs)) + w1Vert * LVFU(src->r(ys + 1, xs))) + (w2Vert * LVFU(src->r(ys + 2, xs)) + w3Vert * LVFU(src->r(ys + 3, xs)));
+ const vfloat gv = (w0Vert * LVFU(src->g(ys, xs)) + w1Vert * LVFU(src->g(ys + 1, xs))) + (w2Vert * LVFU(src->g(ys + 2, xs)) + w3Vert * LVFU(src->g(ys + 3, xs)));
+ const vfloat bv = (w0Vert * LVFU(src->b(ys, xs)) + w1Vert * LVFU(src->b(ys + 1, xs))) + (w2Vert * LVFU(src->b(ys + 2, xs)) + w3Vert * LVFU(src->b(ys + 3, xs)));
+
+ // Horizontal
+ const float t1Hor = A * (Dx - Dx * Dx);
+ const float t2Hor = (3.f - 2.f * Dx) * Dx * Dx;
+ const vfloat weight = _mm_set_ps(t1Hor * Dx, t1Hor * Dx - t1Hor + t2Hor, 1.f - (t1Hor * Dx) - t2Hor, t1Hor - (t1Hor * Dx));
+ const vfloat tempv = _mm_setr_ps(vhadd(weight * rv), vhadd(weight * gv), vhadd(weight * bv), 0.f);
+ const vfloat resultv = xexpf(tempv);
+ r = mul * resultv[0];
+ g = mul * resultv[1];
+ b = mul * resultv[2];
+}
#else
inline void interpolateTransformCubic(rtengine::Imagefloat* src, int xs, int ys, float Dx, float Dy, float &r, float &g, float &b, float mul)
{
@@ -143,6 +193,38 @@ inline void interpolateTransformCubic(rtengine::Imagefloat* src, int xs, int ys,
g = mul * (gv[0] * w0Hor + gv[1] * w1Hor + gv[2] * w2Hor + gv[3] * w3Hor);
b = mul * (bv[0] * w0Hor + bv[1] * w1Hor + bv[2] * w2Hor + bv[3] * w3Hor);
}
+
+inline void interpolateTransformCubicLog(rtengine::Imagefloat* src, int xs, int ys, float Dx, float Dy, float &r, float &g, float &b, float mul)
+{
+ constexpr float A = -0.85f;
+
+ // Vertical
+ const float t1Vert = A * (Dy - Dy * Dy);
+ const float t2Vert = (3.f - 2.f * Dy) * Dy * Dy;
+ const float w3Vert = t1Vert * Dy;
+ const float w2Vert = t1Vert * Dy - t1Vert + t2Vert;
+ const float w1Vert = 1.f - (t1Vert * Dy) - t2Vert;
+ const float w0Vert = t1Vert - (t1Vert * Dy);
+
+ float rv[4], gv[4], bv[4];
+ for (int i = 0; i < 4; ++i) {
+ rv[i] = w0Vert * src->r(ys, xs + i) + w1Vert * src->r(ys + 1, xs + i) + w2Vert * src->r(ys + 2, xs + i) + w3Vert * src->r(ys + 3, xs + i);
+ gv[i] = w0Vert * src->g(ys, xs + i) + w1Vert * src->g(ys + 1, xs + i) + w2Vert * src->g(ys + 2, xs + i) + w3Vert * src->g(ys + 3, xs + i);
+ bv[i] = w0Vert * src->b(ys, xs + i) + w1Vert * src->b(ys + 1, xs + i) + w2Vert * src->b(ys + 2, xs + i) + w3Vert * src->b(ys + 3, xs + i);
+ }
+
+ // Horizontal
+ const float t1Hor = A * (Dx - Dx * Dx);
+ const float t2Hor = (3.f - 2.f * Dx) * Dx * Dx;
+ const float w3Hor = t1Hor * Dx;
+ const float w2Hor = t1Hor * Dx - t1Hor + t2Hor;
+ const float w1Hor = 1.f - (t1Hor * Dx) - t2Hor;
+ const float w0Hor = t1Hor - (t1Hor * Dx);
+
+ r = mul * xexpf(rv[0] * w0Hor + rv[1] * w1Hor + rv[2] * w2Hor + rv[3] * w3Hor);
+ g = mul * xexpf(gv[0] * w0Hor + gv[1] * w1Hor + gv[2] * w2Hor + gv[3] * w3Hor);
+ b = mul * xexpf(bv[0] * w0Hor + bv[1] * w1Hor + bv[2] * w2Hor + bv[3] * w3Hor);
+}
#endif
#ifdef __SSE2__
inline void interpolateTransformChannelsCubic(const float* const* src, int xs, int ys, float Dx, float Dy, float& dest, float mul)
@@ -165,6 +247,27 @@ inline void interpolateTransformChannelsCubic(const float* const* src, int xs, i
const vfloat weight = _mm_set_ps(t1Hor * Dx, t1Hor * Dx - t1Hor + t2Hor, 1.f - (t1Hor * Dx) - t2Hor, t1Hor - (t1Hor * Dx));
dest = mul * vhadd(weight * cv);
}
+
+inline void interpolateTransformChannelsCubicLog(const float* const* src, int xs, int ys, float Dx, float Dy, float& dest, float mul)
+{
+ constexpr float A = -0.85f;
+
+ // Vertical
+ const float t1Vert = A * (Dy - Dy * Dy);
+ const float t2Vert = (3.f - 2.f * Dy) * Dy * Dy;
+ const vfloat w3Vert = F2V(t1Vert * Dy);
+ const vfloat w2Vert = F2V(t1Vert * Dy - t1Vert + t2Vert);
+ const vfloat w1Vert = F2V(1.f - (t1Vert * Dy) - t2Vert);
+ const vfloat w0Vert = F2V(t1Vert - (t1Vert * Dy));
+
+ const vfloat cv = (w0Vert * LVFU(src[ys][xs]) + w1Vert * LVFU(src[ys + 1][xs])) + (w2Vert * LVFU(src[ys + 2][xs]) + w3Vert * LVFU(src[ys + 3][xs]));
+
+ // Horizontal
+ const float t1Hor = A * (Dx - Dx * Dx);
+ const float t2Hor = (3.f - 2.f * Dx) * Dx * Dx;
+ const vfloat weight = _mm_set_ps(t1Hor * Dx, t1Hor * Dx - t1Hor + t2Hor, 1.f - (t1Hor * Dx) - t2Hor, t1Hor - (t1Hor * Dx));
+ dest = mul * xexpf(vhadd(weight * cv));
+}
#else
inline void interpolateTransformChannelsCubic(const float* const* src, int xs, int ys, float Dx, float Dy, float& dest, float mul)
{
@@ -193,6 +296,34 @@ inline void interpolateTransformChannelsCubic(const float* const* src, int xs, i
dest = mul * (cv[0] * w0Hor + cv[1] * w1Hor + cv[2] * w2Hor + cv[3] * w3Hor);
}
+
+inline void interpolateTransformChannelsCubicLog(const float* const* src, int xs, int ys, float Dx, float Dy, float& dest, float mul)
+{
+ constexpr float A = -0.85f;
+
+ // Vertical
+ const float t1Vert = A * (Dy - Dy * Dy);
+ const float t2Vert = (3.f - 2.f * Dy) * Dy * Dy;
+ const float w3Vert = t1Vert * Dy;
+ const float w2Vert = t1Vert * Dy - t1Vert + t2Vert;
+ const float w1Vert = 1.f - (t1Vert * Dy) - t2Vert;
+ const float w0Vert = t1Vert - (t1Vert * Dy);
+
+ float cv[4];
+ for (int i = 0; i < 4; ++i) {
+ cv[i] = w0Vert * src[ys][xs + i] + w1Vert * src[ys + 1][xs + i] + w2Vert * src[ys + 2][xs + i] + w3Vert * src[ys + 3][xs + i];
+ }
+
+ // Horizontal
+ const float t1Hor = A * (Dx - Dx * Dx);
+ const float t2Hor = (3.f - 2.f * Dx) * Dx * Dx;
+ const float w3Hor = t1Hor * Dx;
+ const float w2Hor = t1Hor * Dx - t1Hor + t2Hor;
+ const float w1Hor = 1.f - (t1Hor * Dx) - t2Hor;
+ const float w0Hor = t1Hor - (t1Hor * Dx);
+
+ dest = mul * xexpf(cv[0] * w0Hor + cv[1] * w1Hor + cv[2] * w2Hor + cv[3] * w3Hor);
+}
#endif
}
@@ -405,7 +536,7 @@ bool ImProcFunctions::transCoord (int W, int H, int x, int y, int w, int h, int&
void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH,
const FramesMetaData *metadata,
- int rawRotationDeg, bool fullImage)
+ int rawRotationDeg, bool fullImage, bool useOriginalBuffer)
{
double focalLen = metadata->getFocalLen();
double focalLen35mm = metadata->getFocalLen35mm();
@@ -453,10 +584,10 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed,
dest = tmpimg.get();
}
}
- transformGeneral(highQuality, original, dest, cx, cy, sx, sy, oW, oH, fW, fH, pLCPMap.get());
+ transformGeneral(highQuality, original, dest, cx, cy, sx, sy, oW, oH, fW, fH, pLCPMap.get(), useOriginalBuffer);
if (highQuality && dest != transformed) {
- transformLCPCAOnly(dest, transformed, cx, cy, pLCPMap.get());
+ transformLCPCAOnly(dest, transformed, cx, cy, pLCPMap.get(), useOriginalBuffer);
}
}
}
@@ -845,8 +976,9 @@ void ImProcFunctions::transformLuminanceOnly (Imagefloat* original, Imagefloat*
}
-void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, Imagefloat *transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LensCorrection *pLCPMap)
+void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, Imagefloat *transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LensCorrection *pLCPMap, bool useOriginalBuffer)
{
+
// set up stuff, depending on the mode we are
const bool enableLCPDist = pLCPMap && params->lensProf.useDist;
const bool enableCA = highQuality && needsCA();
@@ -874,11 +1006,6 @@ void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, I
calcPCVignetteParams(fW, fH, oW, oH, params->pcvignette, params->crop, pcv);
}
- const std::array chOrig = {
- original->r.ptrs,
- original->g.ptrs,
- original->b.ptrs
- };
const std::array chTrans = {
transformed->r.ptrs,
transformed->g.ptrs,
@@ -922,9 +1049,27 @@ void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, I
const double ascale = params->commonTrans.autofill ? getTransformAutoFill(oW, oH, pLCPMap) : 1.0;
const bool darkening = (params->vignetting.amount <= 0.0);
+ const bool useLog = params->commonTrans.method == "log" && highQuality;
const double centerFactorx = cx - w2;
const double centerFactory = cy - h2;
+ std::unique_ptr tempLog;
+ if (useLog) {
+ if (!useOriginalBuffer) {
+ tempLog.reset(new Imagefloat(original->getWidth(), original->getHeight()));
+ logEncode(original, tempLog.get(), multiThread);
+ original = tempLog.get();
+ } else {
+ logEncode(original, original, multiThread);
+ }
+ }
+
+ const std::array chOrig = {
+ original->r.ptrs,
+ original->g.ptrs,
+ original->b.ptrs
+ };
+
// main cycle
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic, 16) if(multiThread)
@@ -1011,14 +1156,22 @@ void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, I
if (yc > 0 && yc < original->getHeight() - 2 && xc > 0 && xc < original->getWidth() - 2) {
// all interpolation pixels inside image
- if (enableCA) {
- interpolateTransformChannelsCubic(chOrig[c], xc - 1, yc - 1, Dx, Dy, chTrans[c][y][x], vignmul);
- } else if (!highQuality) {
+ if (!highQuality) {
transformed->r(y, x) = vignmul * (original->r(yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->r(yc, xc + 1) * Dx * (1.0 - Dy) + original->r(yc + 1, xc) * (1.0 - Dx) * Dy + original->r(yc + 1, xc + 1) * Dx * Dy);
transformed->g(y, x) = vignmul * (original->g(yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->g(yc, xc + 1) * Dx * (1.0 - Dy) + original->g(yc + 1, xc) * (1.0 - Dx) * Dy + original->g(yc + 1, xc + 1) * Dx * Dy);
transformed->b(y, x) = vignmul * (original->b(yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->b(yc, xc + 1) * Dx * (1.0 - Dy) + original->b(yc + 1, xc) * (1.0 - Dx) * Dy + original->b(yc + 1, xc + 1) * Dx * Dy);
+ } else if (!useLog) {
+ if (enableCA) {
+ interpolateTransformChannelsCubic(chOrig[c], xc - 1, yc - 1, Dx, Dy, chTrans[c][y][x], vignmul);
+ } else {
+ interpolateTransformCubic(original, xc - 1, yc - 1, Dx, Dy, transformed->r(y, x), transformed->g(y, x), transformed->b(y, x), vignmul);
+ }
} else {
- interpolateTransformCubic(original, xc - 1, yc - 1, Dx, Dy, transformed->r(y, x), transformed->g(y, x), transformed->b(y, x), vignmul);
+ if (enableCA) {
+ interpolateTransformChannelsCubicLog(chOrig[c], xc - 1, yc - 1, Dx, Dy, chTrans[c][y][x], vignmul);
+ } else {
+ interpolateTransformCubicLog(original, xc - 1, yc - 1, Dx, Dy, transformed->r(y, x), transformed->g(y, x), transformed->b(y, x), vignmul);
+ }
}
} else {
// edge pixels
@@ -1027,12 +1180,22 @@ void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, I
const int x1 = LIM(xc, 0, original->getWidth() - 1);
const int x2 = LIM(xc + 1, 0, original->getWidth() - 1);
- if (enableCA) {
- chTrans[c][y][x] = vignmul * (chOrig[c][y1][x1] * (1.0 - Dx) * (1.0 - Dy) + chOrig[c][y1][x2] * Dx * (1.0 - Dy) + chOrig[c][y2][x1] * (1.0 - Dx) * Dy + chOrig[c][y2][x2] * Dx * Dy);
+ if (useLog) {
+ if (enableCA) {
+ chTrans[c][y][x] = vignmul * xexpf(chOrig[c][y1][x1] * (1.0 - Dx) * (1.0 - Dy) + chOrig[c][y1][x2] * Dx * (1.0 - Dy) + chOrig[c][y2][x1] * (1.0 - Dx) * Dy + chOrig[c][y2][x2] * Dx * Dy);
+ } else {
+ transformed->r(y, x) = vignmul * xexpf(original->r(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->r(y1, x2) * Dx * (1.0 - Dy) + original->r(y2, x1) * (1.0 - Dx) * Dy + original->r(y2, x2) * Dx * Dy);
+ transformed->g(y, x) = vignmul * xexpf(original->g(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->g(y1, x2) * Dx * (1.0 - Dy) + original->g(y2, x1) * (1.0 - Dx) * Dy + original->g(y2, x2) * Dx * Dy);
+ transformed->b(y, x) = vignmul * xexpf(original->b(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->b(y1, x2) * Dx * (1.0 - Dy) + original->b(y2, x1) * (1.0 - Dx) * Dy + original->b(y2, x2) * Dx * Dy);
+ }
} else {
- transformed->r(y, x) = vignmul * (original->r(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->r(y1, x2) * Dx * (1.0 - Dy) + original->r(y2, x1) * (1.0 - Dx) * Dy + original->r(y2, x2) * Dx * Dy);
- transformed->g(y, x) = vignmul * (original->g(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->g(y1, x2) * Dx * (1.0 - Dy) + original->g(y2, x1) * (1.0 - Dx) * Dy + original->g(y2, x2) * Dx * Dy);
- transformed->b(y, x) = vignmul * (original->b(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->b(y1, x2) * Dx * (1.0 - Dy) + original->b(y2, x1) * (1.0 - Dx) * Dy + original->b(y2, x2) * Dx * Dy);
+ if (enableCA) {
+ chTrans[c][y][x] = vignmul * (chOrig[c][y1][x1] * (1.0 - Dx) * (1.0 - Dy) + chOrig[c][y1][x2] * Dx * (1.0 - Dy) + chOrig[c][y2][x1] * (1.0 - Dx) * Dy + chOrig[c][y2][x2] * Dx * Dy);
+ } else {
+ transformed->r(y, x) = vignmul * (original->r(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->r(y1, x2) * Dx * (1.0 - Dy) + original->r(y2, x1) * (1.0 - Dx) * Dy + original->r(y2, x2) * Dx * Dy);
+ transformed->g(y, x) = vignmul * (original->g(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->g(y1, x2) * Dx * (1.0 - Dy) + original->g(y2, x1) * (1.0 - Dx) * Dy + original->g(y2, x2) * Dx * Dy);
+ transformed->b(y, x) = vignmul * (original->b(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->b(y1, x2) * Dx * (1.0 - Dy) + original->b(y2, x1) * (1.0 - Dx) * Dy + original->b(y2, x2) * Dx * Dy);
+ }
}
}
} else {
@@ -1051,19 +1214,24 @@ void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, I
}
-void ImProcFunctions::transformLCPCAOnly(Imagefloat *original, Imagefloat *transformed, int cx, int cy, const LensCorrection *pLCPMap)
+void ImProcFunctions::transformLCPCAOnly(Imagefloat *original, Imagefloat *transformed, int cx, int cy, const LensCorrection *pLCPMap, bool useOriginalBuffer)
{
assert(pLCPMap && params->lensProf.useCA && pLCPMap->isCACorrectionAvailable());
+ const bool useLog = params->commonTrans.method == "log";
- float** chOrig[3];
- chOrig[0] = original->r.ptrs;
- chOrig[1] = original->g.ptrs;
- chOrig[2] = original->b.ptrs;
+ float** chTrans[3] = {transformed->r.ptrs, transformed->g.ptrs, transformed->b.ptrs};
- float** chTrans[3];
- chTrans[0] = transformed->r.ptrs;
- chTrans[1] = transformed->g.ptrs;
- chTrans[2] = transformed->b.ptrs;
+ std::unique_ptr tempLog;
+ if (useLog) {
+ if (!useOriginalBuffer) {
+ tempLog.reset(new Imagefloat(original->getWidth(), original->getHeight()));
+ logEncode(original, tempLog.get(), multiThread);
+ original = tempLog.get();
+ } else {
+ logEncode(original, original, multiThread);
+ }
+ }
+ float** chOrig[3] = {original->r.ptrs, original->g.ptrs, original->b.ptrs};
#ifdef _OPENMP
#pragma omp parallel for if (multiThread)
@@ -1089,15 +1257,22 @@ void ImProcFunctions::transformLCPCAOnly(Imagefloat *original, Imagefloat *trans
// multiplier for vignetting correction
if (yc > 0 && yc < original->getHeight() - 2 && xc > 0 && xc < original->getWidth() - 2) {
// all interpolation pixels inside image
- interpolateTransformChannelsCubic (chOrig[c], xc - 1, yc - 1, Dx, Dy, chTrans[c][y][x], 1.0);
+ if (!useLog) {
+ interpolateTransformChannelsCubic(chOrig[c], xc - 1, yc - 1, Dx, Dy, chTrans[c][y][x], 1.0);
+ } else {
+ interpolateTransformChannelsCubicLog(chOrig[c], xc - 1, yc - 1, Dx, Dy, chTrans[c][y][x], 1.0);
+ }
} else {
// edge pixels
int y1 = LIM (yc, 0, original->getHeight() - 1);
int y2 = LIM (yc + 1, 0, original->getHeight() - 1);
int x1 = LIM (xc, 0, original->getWidth() - 1);
int x2 = LIM (xc + 1, 0, original->getWidth() - 1);
-
- chTrans[c][y][x] = (chOrig[c][y1][x1] * (1.0 - Dx) * (1.0 - Dy) + chOrig[c][y1][x2] * Dx * (1.0 - Dy) + chOrig[c][y2][x1] * (1.0 - Dx) * Dy + chOrig[c][y2][x2] * Dx * Dy);
+ if (!useLog) {
+ chTrans[c][y][x] = (chOrig[c][y1][x1] * (1.0 - Dx) * (1.0 - Dy) + chOrig[c][y1][x2] * Dx * (1.0 - Dy) + chOrig[c][y2][x1] * (1.0 - Dx) * Dy + chOrig[c][y2][x2] * Dx * Dy);
+ } else {
+ chTrans[c][y][x] = xexpf(chOrig[c][y1][x1] * (1.0 - Dx) * (1.0 - Dy) + chOrig[c][y1][x2] * Dx * (1.0 - Dy) + chOrig[c][y2][x1] * (1.0 - Dx) * Dy + chOrig[c][y2][x2] * Dx * Dy);
+ }
}
} else {
// not valid (source pixel x,y not inside source image, etc.)
@@ -1178,9 +1353,14 @@ bool ImProcFunctions::needsLensfun() const
return params->lensProf.useLensfun();
}
-bool ImProcFunctions::needsTransform () const
+bool ImProcFunctions::needsTransform (int oW, int oH, int rawRotationDeg, const FramesMetaData *metadata) const
{
- return needsCA () || needsDistortion () || needsRotation () || needsPerspective () || needsGradient () || needsPCVignetting () || needsVignetting () || needsLCP() || needsLensfun();
+ bool needsLf = needsLensfun();
+ if (needsLf) {
+ std::unique_ptr pLCPMap = LFDatabase::getInstance()->findModifier(params->lensProf, metadata, oW, oH, params->coarse, rawRotationDeg);
+ needsLf = pLCPMap.get();
+ }
+ return needsCA () || needsDistortion () || needsRotation () || needsPerspective () || needsGradient () || needsPCVignetting () || needsVignetting () || needsLCP() || needsLf;
}
diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc
index ba6fc237b..99f4f4404 100644
--- a/rtengine/procparams.cc
+++ b/rtengine/procparams.cc
@@ -1732,13 +1732,14 @@ bool CoarseTransformParams::operator !=(const CoarseTransformParams& other) cons
}
CommonTransformParams::CommonTransformParams() :
+ method("log"),
autofill(true)
{
}
bool CommonTransformParams::operator ==(const CommonTransformParams& other) const
{
- return autofill == other.autofill;
+ return method == other.method && autofill == other.autofill;
}
bool CommonTransformParams::operator !=(const CommonTransformParams& other) const
@@ -3322,6 +3323,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->coarse.vflip, "Coarse Transformation", "VerticalFlip", coarse.vflip, keyFile);
// Common properties for transformations
+ saveToKeyfile(!pedited || pedited->commonTrans.method, "Common Properties for Transformations", "Method", commonTrans.method, keyFile);
saveToKeyfile(!pedited || pedited->commonTrans.autofill, "Common Properties for Transformations", "AutoFill", commonTrans.autofill, keyFile);
// Rotation
@@ -4360,6 +4362,11 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
}
if (keyFile.has_group("Common Properties for Transformations")) {
+ if (keyFile.has_key("Common Properties for Transformations", "Method")) {
+ assignFromKeyfile(keyFile, "Common Properties for Transformations", "Method", pedited, commonTrans.method, pedited->commonTrans.method);
+ } else {
+ commonTrans.method = "lin";
+ }
assignFromKeyfile(keyFile, "Common Properties for Transformations", "AutoFill", pedited, commonTrans.autofill, pedited->commonTrans.autofill);
}
diff --git a/rtengine/procparams.h b/rtengine/procparams.h
index c41e55872..0b6b2dc46 100644
--- a/rtengine/procparams.h
+++ b/rtengine/procparams.h
@@ -837,6 +837,7 @@ struct CoarseTransformParams {
* Common transformation parameters
*/
struct CommonTransformParams {
+ Glib::ustring method;
bool autofill;
CommonTransformParams();
diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc
index 0cdcbf6ed..9da601e2a 100644
--- a/rtengine/rtthumbnail.cc
+++ b/rtengine/rtthumbnail.cc
@@ -1247,12 +1247,12 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
ipf.ToneMapFattal02(baseImg);
// perform transform
- if (ipf.needsTransform()) {
+ int origFW;
+ int origFH;
+ double tscale = 0.0;
+ getDimensions (origFW, origFH, tscale);
+ if (ipf.needsTransform(origFW * tscale + 0.5, origFH * tscale + 0.5, 0, metadata)) {
Imagefloat* trImg = new Imagefloat (fw, fh);
- int origFW;
- int origFH;
- double tscale = 0.0;
- getDimensions (origFW, origFH, tscale);
ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, origFW * tscale + 0.5, origFH * tscale + 0.5, metadata, 0, true); // Raw rotate degree not detectable here
delete baseImg;
baseImg = trImg;
diff --git a/rtengine/settings.h b/rtengine/settings.h
index f261444c8..f551d0f34 100644
--- a/rtengine/settings.h
+++ b/rtengine/settings.h
@@ -80,7 +80,7 @@ public:
// bool bw_complementary;
double level0_cbdl;
double level123_cbdl;
- Glib::ustring lensfunDbDirectory; ///< The directory containing the lensfun database. If empty, the system defaults will be used (as described in http://lensfun.sourceforge.net/manual/dbsearch.html)
+ Glib::ustring lensfunDbDirectory; // The directory containing the lensfun database. If empty, the system defaults will be used, as described in https://lensfun.github.io/manual/latest/dbsearch.html
enum class ThumbnailInspectorMode {
JPEG,
diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc
index c35fc7431..1c1e46a65 100644
--- a/rtengine/simpleprocess.cc
+++ b/rtengine/simpleprocess.cc
@@ -872,7 +872,7 @@ private:
ipf.ToneMapFattal02(baseImg);
// perform transform (excepted resizing)
- if (ipf.needsTransform()) {
+ if (ipf.needsTransform(fw, fh, imgsrc->getRotateDegree(), imgsrc->getMetaData())) {
Imagefloat* trImg = nullptr;
if (ipf.needsLuminanceOnly()) {
trImg = baseImg;
@@ -880,7 +880,7 @@ private:
trImg = new Imagefloat (fw, fh);
}
ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, fw, fh,
- imgsrc->getMetaData(), imgsrc->getRotateDegree(), true);
+ imgsrc->getMetaData(), imgsrc->getRotateDegree(), true, true);
if(trImg != baseImg) {
delete baseImg;
baseImg = trImg;
diff --git a/rtengine/sleef.h b/rtengine/sleef.h
index 30c059010..fc23cbad9 100644
--- a/rtengine/sleef.h
+++ b/rtengine/sleef.h
@@ -532,7 +532,7 @@ __inline double xlog(double d) {
x = x * t + 0.693147180559945286226764 * e;
- if (xisinf(d)) x = rtengine::RT_INFINITY;
+ if (xispinf(d)) x = rtengine::RT_INFINITY;
if (d < 0) x = rtengine::RT_NAN;
if (d == 0) x = -rtengine::RT_INFINITY;
@@ -864,7 +864,7 @@ __inline double xlog10(double a) {
double2 d = mul_dd(logk(a), dd(0.43429448190325176116, 6.6494347733425473126e-17));
double x = d.x + d.y;
- if (xisinf(a)) x = rtengine::RT_INFINITY;
+ if (xispinf(a)) x = rtengine::RT_INFINITY;
if (a < 0) x = rtengine::RT_NAN;
if (a == 0) x = -rtengine::RT_INFINITY;
@@ -875,7 +875,7 @@ __inline double xlog1p(double a) {
double2 d = logk2(add2_ss(a, 1));
double x = d.x + d.y;
- if (xisinf(a)) x = rtengine::RT_INFINITY;
+ if (xispinf(a)) x = rtengine::RT_INFINITY;
if (a < -1) x = rtengine::RT_NAN;
if (a == -1) x = -rtengine::RT_INFINITY;
@@ -894,6 +894,15 @@ __inline double xlog1p(double a) {
#define R_LN2f 1.442695040888963407359924681001892137426645954152985934135449406931f
+#ifdef __SSE2__
+__inline int xrintf(float x) {
+ return _mm_cvt_ss2si(_mm_set_ss(x));
+}
+#else
+__inline int xrintf(float x) {
+ return x + (x < 0 ? -0.5f : 0.5f);
+}
+#endif
__inline int32_t floatToRawIntBits(float d) {
union {
float f;
@@ -920,7 +929,7 @@ __inline float mulsignf(float x, float y) {
return intBitsToFloat(floatToRawIntBits(x) ^ (floatToRawIntBits(y) & (1 << 31)));
}
-__inline float signf(float d) { return copysign(1, d); }
+__inline float signf(float d) { return std::copysign(1.f, d); }
__inline float mlaf(float x, float y, float z) { return x * y + z; }
__inline int xisnanf(float x) { return x != x; }
@@ -980,7 +989,7 @@ __inline float xsinf(float d) {
int q;
float u, s;
- q = rint(d * rtengine::RT_1_PI_F);
+ q = xrintf(d * rtengine::RT_1_PI_F);
d = mlaf(q, -PI4_Af*4, d);
d = mlaf(q, -PI4_Bf*4, d);
@@ -1009,7 +1018,7 @@ __inline float xcosf(float d) {
int q;
float u, s;
- q = 1 + 2*rint(d * rtengine::RT_1_PI_F - 0.5f);
+ q = 1 + 2*xrintf(d * rtengine::RT_1_PI_F - 0.5f);
d = mlaf(q, -PI4_Af*2, d);
d = mlaf(q, -PI4_Bf*2, d);
@@ -1041,7 +1050,7 @@ __inline float2 xsincosf(float d) {
float u, s, t;
float2 r;
- q = rint(d * rtengine::RT_2_PI_F);
+ q = xrintf(d * rtengine::RT_2_PI_F);
s = d;
@@ -1083,7 +1092,7 @@ __inline float xtanf(float d) {
int q;
float u, s, x;
- q = rint(d * (float)(2 * rtengine::RT_1_PI));
+ q = xrintf(d * (float)(2 * rtengine::RT_1_PI));
x = d;
@@ -1199,17 +1208,41 @@ __inline float xlogf(float d) {
x = x * t + 0.693147180559945286226764f * e;
- if (xisinff(d)) x = rtengine::RT_INFINITY_F;
+ if (xispinff(d)) x = rtengine::RT_INFINITY_F;
if (d < 0) x = rtengine::RT_NAN_F;
if (d == 0) x = -rtengine::RT_INFINITY_F;
return x;
}
+__inline float xlogf1(float d) { // does xlogf(vmaxf(d, 1.f)) but faster
+ float x, x2, t, m;
+ int e;
+
+ e = ilogbp1f(d * 0.7071f);
+ m = ldexpkf(d, -e);
+
+ x = (m-1.0f) / (m+1.0f);
+ x2 = x * x;
+
+ t = 0.2371599674224853515625f;
+ t = mlaf(t, x2, 0.285279005765914916992188f);
+ t = mlaf(t, x2, 0.400005519390106201171875f);
+ t = mlaf(t, x2, 0.666666567325592041015625f);
+ t = mlaf(t, x2, 2.0f);
+
+ x = x * t + 0.693147180559945286226764f * e;
+
+ if (xispinff(d)) x = rtengine::RT_INFINITY_F;
+ if (d <= 1.f) x = 0;
+
+ return x;
+}
+
__inline float xexpf(float d) {
if(d<=-104.0f) return 0.0f;
- int q = rint(d * R_LN2f);
+ int q = xrintf(d * R_LN2f);
float s, u;
s = mlaf(q, -L2Uf, d);
diff --git a/rtengine/sleefsseavx.c b/rtengine/sleefsseavx.c
index 1982c7c4c..0af516f9b 100644
--- a/rtengine/sleefsseavx.c
+++ b/rtengine/sleefsseavx.c
@@ -1253,6 +1253,30 @@ static INLINE vfloat xlogf(vfloat d) {
return x;
}
+static INLINE vfloat xlogf1(vfloat d) { // does xlogf(vmaxf(d, 1.f)) but faster
+ vfloat x, x2, t, m;
+ vint2 e;
+
+ e = vilogbp1f(vmulf(d, vcast_vf_f(0.7071f)));
+ m = vldexpf(d, vsubi2(vcast_vi2_i(0), e));
+
+ x = vdivf(vaddf(vcast_vf_f(-1.0f), m), vaddf(vcast_vf_f(1.0f), m));
+ x2 = vmulf(x, x);
+
+ t = vcast_vf_f(0.2371599674224853515625f);
+ t = vmlaf(t, x2, vcast_vf_f(0.285279005765914916992188f));
+ t = vmlaf(t, x2, vcast_vf_f(0.400005519390106201171875f));
+ t = vmlaf(t, x2, vcast_vf_f(0.666666567325592041015625f));
+ t = vmlaf(t, x2, vcast_vf_f(2.0f));
+
+ x = vaddf(vmulf(x, t), vmulf(vcast_vf_f(0.693147180559945286226764f), vcast_vf_vi2(e)));
+
+ x = vself(vmaskf_ispinf(d), vcast_vf_f(INFINITYf), x);
+ x = vselfnotzero(vmaskf_le(d, vcast_vf_f(1.f)), x);
+
+ return x;
+}
+
static INLINE vfloat xlogf0(vfloat d) {
vfloat x, x2, t, m;
vint2 e;
diff --git a/rtexif/canonattribs.cc b/rtexif/canonattribs.cc
index 0e6f7eb2f..ee451c7d7 100644
--- a/rtexif/canonattribs.cc
+++ b/rtexif/canonattribs.cc
@@ -557,7 +557,8 @@ public:
{
choices = {
{1, "Canon EF 50mm f/1.8"},
- {2, "Canon EF 28mm f/2.8"},
+ {2, "Canon EF 28mm f/2.8 or Sigma Lens"},
+ {2, "Sigma 24mm f/2.8 Super Wide II"},
{3, "Canon EF 135mm f/2.8 Soft"},
{4, "Canon EF 35-105mm f/3.5-4.5 or Sigma Lens"},
{4, "Sigma UC Zoom 35-135mm f/4-5.6"},
@@ -598,6 +599,8 @@ public:
{26, "Tamron SP AF 90mm f/2.8 Di Macro"},
{26, "Tamron SP AF 180mm f/3.5 Di Macro"},
{26, "Carl Zeiss Planar T* 50mm f/1.4"},
+ {26, "Voigtlander APO Lanthar 125mm F2.5 SL Macro"},
+ {26, "Carl Zeiss Planar T 85mm f/1.4 ZE"},
{27, "Canon EF 35-80mm f/4-5.6"},
{28, "Canon EF 80-200mm f/4.5-5.6 or Tamron Lens"},
{28, "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF"},
@@ -629,7 +632,7 @@ public:
{36, "Canon EF 38-76mm f/4.5-5.6"},
{37, "Canon EF 35-80mm f/4-5.6 or Tamron Lens"},
{37, "Tamron 70-200mm f/2.8 Di LD IF Macro"},
- {37, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro Model A20"},
+ {37, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro (A20)"},
{37, "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical [IF]"},
{37, "Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical [IF] Macro"},
{38, "Canon EF 80-200mm f/4.5-5.6"},
@@ -637,13 +640,14 @@ public:
{40, "Canon EF 28-80mm f/3.5-5.6"},
{41, "Canon EF 28-90mm f/4-5.6"},
{42, "Canon EF 28-200mm f/3.5-5.6 or Tamron Lens"},
- {42, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro Model A20"},
+ {42, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro (A20)"},
{43, "Canon EF 28-105mm f/4-5.6"},
{44, "Canon EF 90-300mm f/4.5-5.6"},
{45, "Canon EF-S 18-55mm f/3.5-5.6 [II]"},
{46, "Canon EF 28-90mm f/4-5.6"},
{47, "Zeiss Milvus 35mm f/2 or 50mm f/2"},
{47, "Zeiss Milvus 50mm f/2 Makro"},
+ {47, "Zeiss Milvus 135mm f/2 ZE"},
{48, "Canon EF-S 18-55mm f/3.5-5.6 IS"},
{49, "Canon EF-S 55-250mm f/4-5.6 IS"},
{50, "Canon EF-S 18-200mm f/3.5-5.6 IS"},
@@ -660,10 +664,17 @@ public:
{103, "Samyang AF 14mm f/2.8 EF or Rokinon Lens"},
{103, "Rokinon SP 14mm f/2.4"},
{103, "Rokinon AF 14mm f/2.8 EF"},
+ {106, "Rokinon SP / Samyang XP 35mm f/1.2"},
+ {112, "Sigma 28mm f/1.5 FF High-speed Prime or other Sigma Lens"},
+ {112, "Sigma 40mm f/1.5 FF High-speed Prime"},
+ {112, "Sigma 105mm f/1.5 FF High-speed Prime"},
+ {117, "Tamron 35-150mm f/2.8-4.0 Di VC OSD (A043) or other Tamron Lens"},
+ {117, "Tamron SP 35mm f/1.4 Di USD (F045)"},
{124, "Canon MP-E 65mm f/2.8 1-5x Macro Photo"},
{125, "Canon TS-E 24mm f/3.5L"},
{126, "Canon TS-E 45mm f/2.8"},
- {127, "Canon TS-E 90mm f/2.8"},
+ {127, "Canon TS-E 90mm f/2.8 or Tamron Lens"},
+ {127, "Tamron 18-200mm f/3.5-6.3 Di II VC (B018)"},
{129, "Canon EF 300mm f/2.8L USM"},
{130, "Canon EF 50mm f/1.0L USM"},
{131, "Canon EF 28-80mm f/2.8-4L USM or Sigma Lens"},
@@ -674,10 +685,12 @@ public:
{131, "Sigma APO 120-300mm f/2.8 EX DG HSM"},
{131, "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye"},
{131, "Sigma 70-200mm f/2.8 APO EX HSM"},
+ {131, "Sigma 28-70mm f/2.8-4 DG"},
{132, "Canon EF 1200mm f/5.6L USM"},
{134, "Canon EF 600mm f/4L IS USM"},
{135, "Canon EF 200mm f/1.8L USM"},
{136, "Canon EF 300mm f/2.8L USM"},
+ {136, "Tamron SP 15-30mm f/2.8 Di VC USD (A012)"},
{137, "Canon EF 85mm f/1.2L USM or Sigma or Tamron Lens"},
{137, "Sigma 18-50mm f/2.8-4.5 DC OS HSM"},
{137, "Sigma 50-200mm f/4-5.6 DC OS HSM"},
@@ -687,14 +700,15 @@ public:
{137, "Sigma 17-70mm f/2.8-4 DC Macro OS HSM | C"},
{137, "Sigma 17-50mm f/2.8 OS HSM"},
{137, "Sigma 18-200mm f/3.5-6.3 DC OS HSM [II]"},
- {137, "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD"},
+ {137, "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD (B008)"},
{137, "Sigma 8-16mm f/4.5-5.6 DC HSM"},
- {137, "Tamron SP 17-50mm f/2.8 XR Di II VC"},
- {137, "Tamron SP 60mm f/2 Macro Di II"},
+ {137, "Tamron SP 17-50mm f/2.8 XR Di II VC (B005)"},
+ {137, "Tamron SP 60mm f/2 Macro Di II (G005)"},
{137, "Sigma 10-20mm f/3.5 EX DC HSM"},
{137, "Tamron SP 24-70mm f/2.8 Di VC USD"},
{137, "Sigma 18-35mm f/1.8 DC HSM"},
{137, "Sigma 12-24mm f/4.5-5.6 DG HSM II"},
+ {137, "Sigma 70-300mm f/4-5.6 DG OS"},
{138, "Canon EF 28-80mm f/2.8-4L"},
{139, "Canon EF 400mm f/2.8L USM"},
{140, "Canon EF 500mm f/4.5L USM"},
@@ -713,23 +727,28 @@ public:
{150, "Sigma 30mm f/1.4 DC HSM"},
{150, "Sigma 24mm f/1.8 DG Macro EX"},
{150, "Sigma 28mm f/1.8 DG Macro EX"},
+ {150, "Sigma 18-35mm f/1.8 DC HSM | A"},
{151, "Canon EF 200mm f/2.8L USM"},
{152, "Canon EF 300mm f/4L IS USM or Sigma Lens"},
{152, "Sigma 12-24mm f/4.5-5.6 EX DG ASPHERICAL HSM"},
{152, "Sigma 14mm f/2.8 EX Aspherical HSM"},
{152, "Sigma 10-20mm f/4-5.6"},
{152, "Sigma 100-300mm f/4"},
+ {152, "Sigma 300-800mm f/5.6 APO EX DG HSM"},
{153, "Canon EF 35-350mm f/3.5-5.6L USM or Sigma or Tamron Lens"},
{153, "Sigma 50-500mm f/4-6.3 APO HSM EX"},
{153, "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical [IF] Macro"},
- {153, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro Model A14"},
+ {153, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro (A14)"},
{153, "Tamron 18-250mm f/3.5-6.3 Di II LD Aspherical [IF] Macro"},
{154, "Canon EF 20mm f/2.8 USM or Zeiss Lens"},
{154, "Zeiss Milvus 21mm f/2.8"},
- {155, "Canon EF 85mm f/1.8 USM"},
+ {154, "Zeiss Milvus 15mm f/2.8 ZE"},
+ {154, "Zeiss Milvus 18mm f/2.8 ZE"},
+ {155, "Canon EF 85mm f/1.8 USM or Sigma Lens"},
+ {155, "Sigma 14mm f/1.8 DG HSM | A"},
{156, "Canon EF 28-105mm f/3.5-4.5 USM or Tamron Lens"},
- {156, "Tamron SP 70-300mm f/4-5.6 Di VC USD"},
- {156, "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF"},
+ {156, "Tamron SP 70-300mm f/4-5.6 Di VC USD (A005)"},
+ {156, "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF (176D)"},
{160, "Canon EF 20-35mm f/3.5-4.5 USM or Tamron or Tokina Lens"},
{160, "Tamron AF 19-35mm f/3.5-4.5"},
{160, "Tokina AT-X 124 AF Pro DX 12-24mm f/4"},
@@ -742,7 +761,7 @@ public:
{161, "Sigma 24-60mm f/2.8 EX DG"},
{161, "Tamron AF 17-50mm f/2.8 Di-II LD Aspherical"},
{161, "Tamron 90mm f/2.8"},
- {161, "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical IF"},
+ {161, "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical IF (A05)"},
{161, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro"},
{161, "Tokina AT-X 24-70mm f/2.8 PRO FX (IF)"},
{162, "Canon EF 200mm f/2.8L USM"},
@@ -762,18 +781,30 @@ public:
{169, "Sigma 30mm f/1.4 EX DC HSM"},
{169, "Sigma 35mm f/1.4 DG HSM"},
{169, "Sigma 35mm f/1.5 FF High-Speed Prime | 017"},
- {170, "Canon EF 200mm f/2.8L II USM"},
+ {169, "Sigma 70mm f/2.8 Macro EX DG"},
+ {170, "Canon EF 200mm f/2.8L II USM or Sigma Lens"},
+ {170, "Sigma 300mm f/2.8 APO EX DG HSM"},
+ {170, "Sigma 800mm f/5.6 APO EX DG HSM"},
{171, "Canon EF 300mm f/4L USM"},
{172, "Canon EF 400mm f/5.6L USM or Sigma Lens"},
{172, "Sigma 150-600mm f/5-6.3 DG OS HSM | S"},
+ {172, "Sigma 500mm f/4.5 APO EX DG HSM"},
{173, "Canon EF 180mm Macro f/3.5L USM or Sigma Lens"},
{173, "Sigma 180mm EX HSM Macro f/3.5"},
{173, "Sigma APO Macro 150mm f/2.8 EX DG HSM"},
+ {173, "Sigma 10mm f/2.8 EX DC Fisheye"},
+ {173, "Sigma 15mm f/2.8 EX DG Diagonal Fisheye"},
+ {173, "Venus Laowa 100mm F2.8 2X Ultra Macro APO"},
{174, "Canon EF 135mm f/2L USM or Other Lens"},
{174, "Sigma 70-200mm f/2.8 EX DG APO OS HSM"},
{174, "Sigma 50-500mm f/4.5-6.3 APO DG OS HSM"},
{174, "Sigma 150-500mm f/5-6.3 APO DG OS HSM"},
{174, "Zeiss Milvus 100mm f/2 Makro"},
+ {174, "Sigma APO 50-150mm f/2.8 EX DC OS HSM"},
+ {174, "Sigma APO 120-300mm f/2.8 EX DG OS HSM"},
+ {174, "Sigma 120-300mm f/2.8 DG OS HSM S013"},
+ {174, "Sigma 120-400mm f/4.5-5.6 APO DG OS HSM"},
+ {174, "Sigma 200-500mm f/2.8 APO EX DG"},
{175, "Canon EF 400mm f/2.8L USM"},
{176, "Canon EF 24-85mm f/3.5-4.5 USM"},
{177, "Canon EF 300mm f/4L IS USM"},
@@ -788,6 +819,8 @@ public:
{180, "Sigma 24mm f/1.5 FF High-Speed Prime | 017"},
{180, "Sigma 50mm f/1.5 FF High-Speed Prime | 017"},
{180, "Sigma 85mm f/1.5 FF High-Speed Prime | 017"},
+ {180, "Tokina Opera 50mm f/1.4 FF"},
+ {180, "Sigma 20mm f/1.4 DG HSM | A"},
{181, "Canon EF 100-400mm f/4.5-5.6L IS USM + 1.4x or Sigma Lens"},
{181, "Sigma 150-600mm f/5-6.3 DG OS HSM | S + 1.4x"},
{182, "Canon EF 100-400mm f/4.5-5.6L IS USM + 2x or Sigma Lens"},
@@ -815,10 +848,13 @@ public:
{196, "Canon EF 75-300mm f/4-5.6 USM"},
{197, "Canon EF 75-300mm f/4-5.6 IS USM or Sigma Lens"},
{197, "Sigma 18-300mm f/3.5-6.3 DC Macro OS HS"},
- {198, "Canon EF 50mm f/1.4 USM or Zeiss Lens"},
+ {198, "Canon EF 50mm f/1.4 USM or Other Lens"},
{198, "Zeiss Otus 55mm f/1.4 ZE"},
{198, "Zeiss Otus 85mm f/1.4 ZE"},
{198, "Zeiss Milvus 25mm f/1.4"},
+ {198, "Zeiss Otus 100mm f/1.4"},
+ {198, "Zeiss Milvus 35mm f/1.4 ZE"},
+ {198, "Yongnuo YN 35mm f/2"},
{199, "Canon EF 28-80mm f/3.5-5.6 USM"},
{200, "Canon EF 75-300mm f/4-5.6 USM"},
{201, "Canon EF 28-80mm f/3.5-5.6 USM"},
@@ -829,13 +865,14 @@ public:
{211, "Canon EF 28-200mm f/3.5-5.6 USM"},
{212, "Canon EF 28-105mm f/4-5.6 USM"},
{213, "Canon EF 90-300mm f/4.5-5.6 USM or Tamron Lens"},
- {213, "Tamron SP 150-600mm f/5-6.3 Di VC USD"},
- {213, "Tamron 16-300mm f/3.5-6.3 Di II VC PZD Macro"},
- {213, "Tamron SP 35mm f/1.8 Di VC USD"},
- {213, "Tamron SP 45mm f/1.8 Di VC USD"},
+ {213, "Tamron SP 150-600mm f/5-6.3 Di VC USD (A011)"},
+ {213, "Tamron 16-300mm f/3.5-6.3 Di II VC PZD Macro (B016)"},
+ {213, "Tamron SP 35mm f/1.8 Di VC USD (F012)"},
+ {213, "Tamron SP 45mm f/1.8 Di VC USD (F013)"},
{214, "Canon EF-S 18-55mm f/3.5-5.6 USM"},
{215, "Canon EF 55-200mm f/4.5-5.6 II USM"},
{217, "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD"},
+ {220, "Yongnuo YN 50mm f/1.8"},
{224, "Canon EF 70-200mm f/2.8L IS USM"},
{225, "Canon EF 70-200mm f/2.8L IS USM + 1.4x"},
{226, "Canon EF 70-200mm f/2.8L IS USM + 2x"},
@@ -843,7 +880,8 @@ public:
{228, "Canon EF 28-105mm f/3.5-4.5 USM"},
{229, "Canon EF 16-35mm f/2.8L USM"},
{230, "Canon EF 24-70mm f/2.8L USM"},
- {231, "Canon EF 17-40mm f/4L USM"},
+ {231, "Canon EF 17-40mm f/4L USM or Sigma Lens"},
+ {231, "Sigma 12-24mm f/4 DG HSM A016"},
{232, "Canon EF 70-300mm f/4.5-5.6 DO IS USM"},
{233, "Canon EF 28-300mm f/3.5-5.6L IS USM"},
{234, "Canon EF-S 17-85mm f/4-5.6 IS USM or Tokina Lens"},
@@ -867,13 +905,19 @@ public:
{248, "Sigma 24-35mm f/2 DG HSM | A"},
{248, "Sigma 135mm f/2 FF High-Speed Prime | 017"},
{248, "Sigma 24-35mm f/2.2 FF Zoom | 017"},
+ {248, "Sigma 135mm f/1.8 DG HSM A017"},
{249, "Canon EF 800mm f/5.6L IS USM"},
{250, "Canon EF 24mm f/1.4L II USM or Sigma Lens"},
{250, "Sigma 20mm f/1.4 DG HSM | A"},
{250, "Sigma 20mm f/1.5 FF High-Speed Prime | 017"},
+ {250, "Tokina Opera 16-28mm f/2.8 FF"},
+ {250, "Sigma 85mm f/1.4 DG HSM A016"},
{251, "Canon EF 70-200mm f/2.8L IS II USM"},
+ {251, "Canon EF 70-200mm f/2.8L IS III USM"},
{252, "Canon EF 70-200mm f/2.8L IS II USM + 1.4x"},
+ {252, "Canon EF 70-200mm f/2.8L IS III USM + 1.4x"},
{253, "Canon EF 70-200mm f/2.8L IS II USM + 2x"},
+ {253, "Canon EF 70-200mm f/2.8L IS III USM + 2x"},
{254, "Canon EF 100mm f/2.8L Macro IS USM"},
{255, "Sigma 24-105mm f/4 DG OS HSM | A or Other Sigma Lens"},
{255, "Sigma 180mm f/2.8 EX DG OS HSM APO Macro"},
@@ -882,6 +926,12 @@ public:
{368, "Sigma 50mm f/1.4 DG HSM | A"},
{368, "Sigma 40mm f/1.4 DG HSM | A"},
{368, "Sigma 60-600mm f/4.5-6.3 DG OS HSM | S"},
+ {368, "Sigma 28mm f/1.4 DG HSM | A"},
+ {368, "Sigma 150-600mm f/5-6.3 DG OS HSM | S"},
+ {368, "Sigma 85mm f/1.4 DG HSM | A"},
+ {368, "Sigma 105mm f/1.4 DG HSM"},
+ {368, "Sigma 14-24mm f/2.8 DG HSM"},
+ {368, "Sigma 70mm f/2.8 DG Macro"},
{488, "Canon EF-S 15-85mm f/3.5-5.6 IS USM"},
{489, "Canon EF 70-300mm f/4-5.6L IS USM"},
{490, "Canon EF 8-15mm f/4L Fisheye USM"},
@@ -897,7 +947,7 @@ public:
{493, "Canon EF 24-105mm f/4L IS USM"},
{494, "Canon EF 600mm f/4L IS II USM"},
{495, "Canon EF 24-70mm f/2.8L II USM or Sigma Lens"},
- {495, "Sigma 24-70mm F2.8 DG OS HSM | A"},
+ {495, "Sigma 24-70mm f/2.8 DG OS HSM | A"},
{496, "Canon EF 200-400mm f/4L IS USM"},
{499, "Canon EF 200-400mm f/4L IS USM + 1.4x"},
{502, "Canon EF 28mm f/2.8 IS USM or Tamron Lens"},
@@ -908,14 +958,16 @@ public:
{506, "Canon EF 400mm f/4 DO IS II USM"},
{507, "Canon EF 16-35mm f/4L IS USM"},
{508, "Canon EF 11-24mm f/4L USM or Tamron Lens"},
- {508, "Tamron 10-24mm f/3.5-4.5 Di II VC HLD"},
+ {508, "Tamron 10-24mm f/3.5-4.5 Di II VC HLD (B023)"},
+ {624, "Sigma 70-200mm f/2.8 DG OS HSM | S"},
{747, "Canon EF 100-400mm f/4.5-5.6L IS II USM or Tamron Lens"},
{747, "Tamron SP 150-600mm f/5-6.3 Di VC USD G2"},
{748, "Canon EF 100-400mm f/4.5-5.6L IS II USM + 1.4x or Tamron Lens"},
{748, "Tamron 100-400mm f/4.5-6.3 Di VC USD A035E + 1.4x"},
{748, "Tamron 70-210mm f/4 Di VC USD (A034) + 2x"},
{749, "Tamron 100-400mm f/4.5-6.3 Di VC USD A035E + 2x"},
- {750, "Canon EF 35mm f/1.4L II USM"},
+ {750, "Canon EF 35mm f/1.4L II USM or Tamron Lens"},
+ {750, "Tamron SP 85mm f/1.8 Di VC USD (F016)"},
{751, "Canon EF 16-35mm f/2.8L III USM"},
{752, "Canon EF 24-105mm f/4L IS II USM"},
{753, "Canon EF 85mm f/1.4L IS USM"},
@@ -938,16 +990,21 @@ public:
{4154, "Canon EF-S 24mm f/2.8 STM"},
{4155, "Canon EF-M 28mm f/3.5 Macro IS STM"},
{4156, "Canon EF 50mm f/1.8 STM"},
- {4157, "Canon EF-M 18-150mm 1:3.5-6.3 IS STM"},
+ {4157, "Canon EF-M 18-150mm f/3.5-6.3 IS STM"},
{4158, "Canon EF-S 18-55mm f/4-5.6 IS STM"},
{4159, "Canon EF-M 32mm f/1.4 STM"},
{4160, "Canon EF-S 35mm f/2.8 Macro IS STM"},
+ {4208, "Sigma 56mm f/1.4 DC DN | C"},
{36910, "Canon EF 70-300mm f/4-5.6 IS II USM"},
{36912, "Canon EF-S 18-135mm f/3.5-5.6 IS USM"},
{61182, "Canon RF 35mm F1.8 Macro IS STM or other Canon RF Lens"},
{61182, "Canon RF 50mm F1.2 L USM"},
{61182, "Canon RF 24-105mm F4 L IS USM"},
{61182, "Canon RF 28-70mm F2 L USM"},
+ {61182, "Canon RF 85mm F1.2L USM"},
+ {61182, "Canon RF 24-240mm F4-6.3 IS USM"},
+ {61182, "Canon RF 24-70mm F2.8 L IS USM"},
+ {61182, "Canon RF 15-35mm F2.8 L IS USM"},
{61491, "Canon CN-E 14mm T3.1 L F"},
{61492, "Canon CN-E 24mm T1.5 L F"},
{61494, "Canon CN-E 85mm T1.3 L F"},
@@ -1514,7 +1571,11 @@ public:
{
choices[1042] = "EOS M50 / Kiss M";
choices[2049] = "PowerShot SX740 HS";
+ choices[2052] = "PowerShot G5 X Mark II";
choices[2053] = "PowerShot SX70 HS";
+ choices[2056] = "PowerShot G7 X Mark III";
+ choices[2065] = "EOS M6 Mark II";
+ choices[2066] = "EOS M200";
choices[16842752] = "PowerShot A30";
choices[17039360] = "PowerShot S300 / Digital IXUS 300 / IXY Digital 300";
choices[17170432] = "PowerShot A20";
@@ -1679,6 +1740,7 @@ public:
choices[52822016] = "PowerShot A3400 IS";
choices[52887552] = "PowerShot A2400 IS";
choices[52953088] = "PowerShot A2300";
+ choices[53608448] = "PowerShot S100V";
choices[53673984] = "PowerShot G15";
choices[53739520] = "PowerShot SX50 HS";
choices[53805056] = "PowerShot SX160 IS";
@@ -1737,7 +1799,7 @@ public:
choices[67239936] = "PowerShot SX420 IS";
choices[67305472] = "PowerShot ELPH 190 IS / IXUS 180 / IXY 190";
choices[67371008] = "PowerShot G1";
- choices[67371009] = "IXY 180";
+ choices[67371009] = "PowerShot ELPH 180 IS / IXUS 175 / IXY 180";
choices[67436544] = "PowerShot SX720 HS";
choices[67502080] = "PowerShot SX620 HS";
choices[67567616] = "EOS M6";
@@ -1821,7 +1883,7 @@ public:
choices[2147484453] = "EOS 70D";
choices[2147484454] = "EOS Rebel T5i / 700D / Kiss X7i";
choices[2147484455] = "EOS Rebel T5 / 1200D / Kiss X70 / Hi";
- choices[2147484456] = "EOS-1D X MARK II";
+ choices[2147484456] = "EOS-1D X Mark II";
choices[2147484465] = "EOS M";
choices[2147484486] = "EOS Rebel SL1 / 100D / Kiss X7";
choices[2147484487] = "EOS Rebel T6s / 760D / 8000D";
@@ -1837,8 +1899,14 @@ public:
choices[2147484680] = "EOS 77D / 9000D";
choices[2147484695] = "EOS Rebel SL2 / 200D / Kiss X9";
choices[2147484706] = "EOS Rebel T100 / 4000D / 3000D";
- choices[2147484708] = "EOR R";
+ choices[2147484708] = "EOS R";
+ choices[2147484712] = "EOS-1D X Mark III";
choices[2147484722] = "EOS Rebel T7 / 2000D / 1500D / Kiss X90";
+ choices[2147484723] = "EOS RP";
+ choices[2147484726] = "EOS SL3 / 250D / Kiss X10";
+ choices[2147484727] = "EOS 90D";
+ choices[2147484960] = "EOS D2000C";
+ choices[2147485024] = "EOS D6000C";
}
};
CAModelIDInterpreter caModelIDInterpreter;
diff --git a/rtexif/nikonattribs.cc b/rtexif/nikonattribs.cc
index 77720dde0..2ef37b8fb 100644
--- a/rtexif/nikonattribs.cc
+++ b/rtexif/nikonattribs.cc
@@ -627,6 +627,7 @@ const std::map NALensDataInterpreter::lenses = {
{"02 48 65 65 24 24 02 00", "Sigma Macro 90mm f/2.8"},
{"03 43 5C 81 35 35 02 00", "Soligor AF C/D Zoom UMCS 70-210mm 1:4.5"},
{"03 48 5C 81 30 30 02 00", "AF Zoom-Nikkor 70-210mm f/4"},
+ {"03 54 68 68 0C 0C 00 00", "Zeiss Otus 1.4/100"},
{"04 48 3C 3C 24 24 03 00", "AF Nikkor 28mm f/2.8"},
{"05 54 50 50 0C 0C 04 00", "AF Nikkor 50mm f/1.4"},
{"06 3F 68 68 2C 2C 06 00", "Cosina AF 100mm f/3.5 Macro"},
@@ -906,12 +907,14 @@ const std::map NALensDataInterpreter::lenses = {
{"7F 48 2B 5C 24 34 1C 06", "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF"},
{"7F 48 2D 50 24 24 1C 06", "Sigma 18-50mm f/2.8 EX DC Macro"},
{"80 48 1A 1A 24 24 85 06", "AF DX Fisheye-Nikkor 10.5mm f/2.8G ED"},
+ {"80 48 1C 29 24 24 7A 06", "Tokina atx-i 11-16mm f/2.8 CF"},
{"81 34 76 A6 38 40 4B 0E", "Sigma 150-600mm f/5-6.3 DG OS HSM | S"},
{"81 54 80 80 18 18 86 0E", "AF-S VR Nikkor 200mm f/2G IF-ED"},
{"82 34 76 A6 38 40 4B 0E", "Sigma 150-600mm f/5-6.3 DG OS HSM | C"},
{"82 48 8E 8E 24 24 87 0E", "AF-S VR Nikkor 300mm f/2.8G IF-ED"},
{"83 00 B0 B0 5A 5A 88 04", "FSA-L2, EDG 65, 800mm f/13 G"},
{"88 54 50 50 0C 0C 4B 06", "Sigma 50mm f/1.4 DG HSM | A"},
+ {"89 30 2D 80 2C 40 4B 0E", "Sigma 18-200mm f/3.5-6.3 DC Macro OS HS | C"},
{"89 3C 53 80 30 3C 8B 06", "AF-S DX Zoom-Nikkor 55-200mm f/4-5.6G ED"},
{"8A 3C 37 6A 30 30 4B 0E", "Sigma 24-105mm f/4 DG OS HSM"},
{"8A 54 6A 6A 24 24 8C 0E", "AF-S VR Micro-Nikkor 105mm f/2.8G IF-ED"},
@@ -955,6 +958,7 @@ const std::map NALensDataInterpreter::lenses = {
{"9E 38 11 29 34 3C 4B 06", "Sigma 8-16mm f/4.5-5.6 DC HSM"},
{"9E 40 2D 6A 2C 3C A0 0E", "AF-S DX VR Zoom-Nikkor 18-105mm f/3.5-5.6G ED"},
{"9F 37 50 A0 34 40 4B 0E", "Sigma 50-500mm f/4.5-6.3 DG OS HSM"},
+ {"9F 48 48 48 24 24 A1 06", "Yongnuo YN40mm f/2.8N"},
{"9F 58 44 44 14 14 A1 06", "AF-S DX Nikkor 35mm f/1.8G"},
{"A0 40 2D 53 2C 3C CA 0E", "AF-P DX Nikkor 18-55mm f/3.5-5.6G VR"},
{"A0 40 2D 53 2C 3C CA 8E", "AF-P DX Nikkor 18-55mm f/3.5-5.6G"},
@@ -1007,6 +1011,7 @@ const std::map NALensDataInterpreter::lenses = {
{"AA 48 88 A4 3C 3C D5 4E", "AF-S Nikkor 180-400mm f/4E TC1.4 FL ED VR + 1.4x TC"},
{"AB 3C A0 A0 30 30 C6 4E", "AF-S Nikkor 500mm f/4E FL ED VR"},
{"AB 44 5C 8E 34 3C D6 0E", "AF-P Nikkor 70-300mm f/4.5-5.6E ED VR"},
+ {"AB 44 5C 8E 34 3C D6 4E", "AF-P Nikkor 70-300mm f/4.5-5.6E ED VR"},
{"AB 44 5C 8E 34 3C D6 CE", "AF-P Nikkor 70-300mm f/4.5-5.6E ED VR"},
{"AC 38 53 8E 34 3C AE 0E", "AF-S DX Nikkor 55-300mm f/4.5-5.6G ED VR"},
{"AC 3C A6 A6 30 30 C7 4E", "AF-S Nikkor 600mm f/4E FL ED VR"},
@@ -1038,6 +1043,8 @@ const std::map NALensDataInterpreter::lenses = {
{"C1 48 24 37 24 24 4B 46", "Sigma 14-24mm f/2.8 DG HSM | A"},
{"C2 4C 24 24 14 14 4B 06", "Sigma 14mm f/1.8 DG HSM | A"},
{"C3 34 68 98 38 40 4B 4E", "Sigma 100-400mm f/5-6.3 DG OS HSM | C"},
+ {"C8 54 44 44 0D 0D DF 46", "Tamron SP 35mm f/1.4 Di USD (F045)"},
+ {"C8 54 62 62 0C 0C 4B 06", "Sigma 85mm f/1.4 DG HSM | A"},
{"C8 54 62 62 0C 0C 4B 46", "Sigma 85mm f/1.4 DG HSM | A"},
{"C9 48 37 5C 24 24 4B 4E", "Sigma 24-70mm f/2.8 DG OS HSM | A"},
{"CA 48 27 3E 24 24 DF 4E", "Tamron SP 15-30mm f/2.8 Di VC USD G2 (A041)"},
@@ -1051,21 +1058,22 @@ const std::map NALensDataInterpreter::lenses = {
{"DC 48 19 19 24 24 4B 06", "Sigma 10mm f/2.8 EX DC HSM Fisheye"},
{"DE 54 50 50 0C 0C 4B 06", "Sigma 50mm f/1.4 EX DG HSM"},
{"E0 3C 5C 8E 30 3C 4B 06", "Sigma 70-300mm f/4-5.6 APO DG Macro HSM"},
- {"E0 40 2D 98 2C 41 DF 4E", "Tamron AF 18-400mm f/3.5-6.3 Di II VC HLD (B028)"},
+ {"E0 40 2D 98 2C 41 DF 4E", "Tamron 18-400mm f/3.5-6.3 Di II VC HLD (B028)"},
{"E1 40 19 36 2C 35 DF 4E", "Tamron 10-24mm f/3.5-4.5 Di II VC HLD (B023)"},
{"E1 58 37 37 14 14 1C 02", "Sigma 24mm f/1.8 EX DG Aspherical Macro"},
{"E2 47 5C 80 24 24 DF 4E", "Tamron SP 70-200mm f/2.8 Di VC USD G2 (A025)"},
{"E3 40 76 A6 38 40 DF 4E", "Tamron SP 150-600mm f/5-6.3 Di VC USD G2"},
{"E3 54 50 50 24 24 35 02", "Sigma Macro 50mm f/2.8 EX DG"},
{"E4 54 64 64 24 24 DF 0E", "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 (F017)"},
+ {"E5 4C 62 62 14 14 C9 4E", "Tamron SP 85mm f/1.8 Di VC USD (F016)"},
{"E5 54 6A 6A 24 24 35 02", "Sigma Macro 105mm f/2.8 EX DG"},
- {"E6 40 2D 80 2C 40 DF 0E", "Tamron AF 18-200mm f/3.5-6.3 Di II VC (B018)"},
+ {"E6 40 2D 80 2C 40 DF 0E", "Tamron 18-200mm f/3.5-6.3 Di II VC (B018)"},
{"E6 41 3C 8E 2C 40 1C 02", "Sigma 28-300mm f/3.5-6.3 DG Macro"},
{"E7 4C 4C 4C 14 14 DF 0E", "Tamron SP 45mm f/1.8 Di VC USD (F013)"},
{"E8 4C 44 44 14 14 DF 0E", "Tamron SP 35mm f/1.8 Di VC USD (F012)"},
{"E9 48 27 3E 24 24 DF 0E", "Tamron SP 15-30mm f/2.8 Di VC USD (A012)"},
{"E9 54 37 5C 24 24 1C 02", "Sigma 24-70mm f/2.8 EX DG Macro"},
- {"EA 40 29 8E 2C 40 DF 0E", "Tamron AF 16-300mm f/3.5-6.3 Di II VC PZD (B016)"},
+ {"EA 40 29 8E 2C 40 DF 0E", "Tamron 16-300mm f/3.5-6.3 Di II VC PZD (B016)"},
{"EA 48 27 27 24 24 1C 02", "Sigma 15mm f/2.8 EX Diagonal Fisheye"},
{"EB 40 76 A6 38 40 DF 0E", "Tamron SP AF 150-600mm f/5-6.3 VC USD (A011)"},
{"ED 40 2D 80 2C 40 4B 0E", "Sigma 18-200mm f/3.5-6.3 DC OS HSM"},
@@ -1076,6 +1084,7 @@ const std::map NALensDataInterpreter::lenses = {
{"F1 47 5C 8E 30 3C DF 0E", "Tamron SP 70-300mm f/4-5.6 Di VC USD (A005)"},
{"F3 48 68 8E 30 30 4B 02", "Sigma APO 100-300mm f/4 EX IF HSM"},
{"F3 54 2B 50 24 24 84 0E", "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical (IF) (B005)"},
+ {"F4 4C 7C 7C 2C 2C 4B 02", "Sigma APO Macro 180mm f/3.5 EX DG HSM"},
{"F4 54 56 56 18 18 84 06", "Tamron SP AF 60mm f/2.0 Di II Macro 1:1 (G005)"},
{"F5 40 2C 8A 2C 40 40 0E", "Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical (IF) Macro (B003)"},
{"F5 48 76 76 24 24 4B 06", "Sigma APO Macro 150mm f/2.8 EX DG HSM"},
diff --git a/rtexif/olympusattribs.cc b/rtexif/olympusattribs.cc
index f9869f13e..f590b8154 100644
--- a/rtexif/olympusattribs.cc
+++ b/rtexif/olympusattribs.cc
@@ -130,6 +130,7 @@ public:
lenses["00 30 10"] = "Olympus M.Zuiko Digital ED 45mm f/1.2 Pro";
lenses["00 31 00"] = "Olympus Zuiko Digital ED 12-60mm f/2.8-4.0 SWD";
lenses["00 32 00"] = "Olympus Zuiko Digital ED 14-35mm f/2.0 SWD";
+ lenses["00 32 10"] = "Olympus M.Zuiko Digital ED 12-200mm f/3.5-6.3";
lenses["00 33 00"] = "Olympus Zuiko Digital 25mm f/2.8";
lenses["00 34 00"] = "Olympus Zuiko Digital ED 9-18mm f/4.0-5.6";
lenses["00 35 00"] = "Olympus Zuiko Digital 14-54mm f/2.8-3.5 II";
@@ -190,6 +191,13 @@ public:
lenses["02 26 10"] = "Lumix G 25mm f/1.7 Asph.";
lenses["02 27 10"] = "Leica DG Vario-Elmar 100-400mm f/4.0-6.3 Asph. Power OIS";
lenses["02 28 10"] = "Lumix G Vario 12-60mm f/3.5-5.6 Asph. Power OIS";
+ lenses["02 29 10"] = "Leica DG Summilux 12mm f/1.4 Asph.";
+ lenses["02 30 10"] = "Leica DG Vario-Elmarit 12-60mm f/2.8-4 Asph. Power OIS";
+ lenses["02 33 10"] = "Lumix G X Vario 12-35mm f/2.8 II Asph. Power OIS";
+ lenses["02 35 10"] = "Leica DG Vario-Elmarit 8-18mm f/2.8-4 Asph.";
+ lenses["02 36 10"] = "Leica DG Elmarit 200mm f/2.8 Power OIS";
+ lenses["02 37 10"] = "Leica DG Vario-Elmarit 50-200mm f/2.8-4 Asph. Power OIS";
+ lenses["02 38 10"] = "Leica DG Vario-Summilux 10-25mm f/1.7 Asph.";
lenses["03 01 00"] = "Leica D Vario Elmarit 14-50mm f/2.8-3.5 Asph.";
lenses["03 02 00"] = "Leica D Summilux 25mm f/1.4 Asph.";
lenses["05 01 10"] = "Tamron 14-150mm f/3.5-5.8 Di III";
diff --git a/rtexif/pentaxattribs.cc b/rtexif/pentaxattribs.cc
index 898150696..46ae9f67e 100644
--- a/rtexif/pentaxattribs.cc
+++ b/rtexif/pentaxattribs.cc
@@ -752,7 +752,7 @@ public:
choices.insert (p_t (256 * 3 + 44, "Sigma 17-70mm f/2.8-4.5 DC Macro"));
choices.insert (p_t (256 * 3 + 44, "Sigma 18-50mm f/3.5-5.6 DC"));
choices.insert (p_t (256 * 3 + 44, "Sigma 17-35mm f/2.8-4 EX DG"));
- choices.insert (p_t (256 * 3 + 44, "Tamron 35-90mm f/4 AF"));
+ choices.insert (p_t (256 * 3 + 44, "Tamron 35-90mm f/4-5.6 AF"));
choices.insert (p_t (256 * 3 + 44, "Sigma AF 18-35mm f/3.5-4.5 Aspherical"));
choices.insert (p_t (256 * 3 + 46, "Sigma or Samsung Lens (3 46)"));
choices.insert (p_t (256 * 3 + 46, "Sigma APO 70-200mm f/2.8 EX"));
@@ -908,8 +908,9 @@ public:
choices.insert (p_t (256 * 7 + 243, "smc PENTAX-DA 70mm f/2.4 Limited"));
choices.insert (p_t (256 * 7 + 244, "smc PENTAX-DA 21mm f/3.2 AL Limited"));
choices.insert (p_t (256 * 8 + 0, "Sigma 50-150mm f/2.8 II APO EX DC HSM"));
- choices.insert (p_t (256 * 8 + 3, "Sigma AF 18-125mm f/3.5-5.6 DC"));
+ choices.insert (p_t (256 * 8 + 3, "Sigma 18-125mm f/3.8-5.6 DC HSM"));
choices.insert (p_t (256 * 8 + 4, "Sigma 50mm f/1.4 EX DG HSM"));
+ choices.insert (p_t (256 * 8 + 6, "Sigma 4.5mm f/2.8 EX DC Fisheye"));
choices.insert (p_t (256 * 8 + 7, "Sigma 24-70mm f/2.8 IF EX DG HSM"));
choices.insert (p_t (256 * 8 + 8, "Sigma 18-250mm f/3.5-6.3 DC OS HSM"));
choices.insert (p_t (256 * 8 + 11, "Sigma 10-20mm f/3.5 EX DC HSM"));
@@ -920,6 +921,7 @@ public:
choices.insert (p_t (256 * 8 + 16, "Sigma 70-200mm f/2.8 EX DG Macro HSM II"));
choices.insert (p_t (256 * 8 + 17, "Sigma 50-500mm f/4.5-6.3 DG OS HSM"));
choices.insert (p_t (256 * 8 + 18, "Sigma 8-16mm f/4.5-5.6 DC HSM"));
+ choices.insert (p_t (256 * 8 + 20, "Sigma 18-50mm f/2.8-4.5 DC HSM"));
choices.insert (p_t (256 * 8 + 21, "Sigma 17-50mm f/2.8 EX DC OS HSM"));
choices.insert (p_t (256 * 8 + 22, "Sigma 85mm f/1.4 EX DG HSM"));
choices.insert (p_t (256 * 8 + 23, "Sigma 70-200mm f/2.8 APO EX DG OS HSM"));
@@ -938,6 +940,7 @@ public:
choices.insert (p_t (256 * 8 + 62, "HD PENTAX-D FA 24-70mm f/2.8 ED SDM WR"));
choices.insert (p_t (256 * 8 + 63, "HD PENTAX-D FA 15-30mm f/2.8 ED SDM WR"));
choices.insert (p_t (256 * 8 + 64, "HD PENTAX-D FA* 50mm f/1.4 SDM AW"));
+ choices.insert (p_t (256 * 8 + 196, "HD PENTAX-DA* 11-18mm f/2.8 ED DC AW"));
choices.insert (p_t (256 * 8 + 197, "HD PENTAX-DA 55-300mm f/4.5-6.3 ED PLM WR RE"));
choices.insert (p_t (256 * 8 + 198, "smc PENTAX-DA L 18-50mm f/4-5.6 DC WR RE"));
choices.insert (p_t (256 * 8 + 199, "HD PENTAX-DA 18-50mm f/4-5.6 DC WR RE"));
@@ -992,6 +995,7 @@ public:
choices.insert (p_t (256 * 22 + 3, "03 Fish-eye 3.2mm f/5.6"));
choices.insert (p_t (256 * 22 + 4, "04 Toy Lens Wide 6.3mm f/7.1"));
choices.insert (p_t (256 * 22 + 5, "05 Toy Lens Telephoto 18mm f/8"));
+ choices.insert (p_t (256 * 31 + 1, "GR Lens"));
}
std::string toString (const Tag* t) const override
{
diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc
index 4410a4051..61223edf0 100644
--- a/rtexif/sonyminoltaattribs.cc
+++ b/rtexif/sonyminoltaattribs.cc
@@ -574,11 +574,12 @@ public:
{23, "Minolta AF 200mm f/4 Macro APO G"},
{24, "Minolta/Sony AF 24-105mm f/3.5-4.5 (D) or Sigma or Tamron Lens"},
{24, "Sigma 18-50mm f/2.8"},
- {24, "Sigma 17-70mm f/2.8-4.5 (D)"},
+ {24, "Sigma 17-70mm f/2.8-4.5 DC Macro"},
{24, "Sigma 20-40mm f/2.8 EX DG Aspherical IF"},
{24, "Sigma 18-200mm f/3.5-6.3 DC"},
{24, "Sigma DC 18-125mm f/4-5,6 D"},
{24, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro"},
+ {24, "Sigma 15-30mm f/3.5-4.5 EX DG Aspherical"},
{25, "Minolta AF 100-300mm f/4.5-5.6 APO (D) or Sigma Lens"},
{25, "Sigma 100-300mm f/4 EX (APO (D) or D IF)"},
{25, "Sigma 70mm f/2.8 EX DG Macro"},
@@ -612,8 +613,9 @@ public:
{45, "Carl Zeiss Planar T* 85mm f/1.4 ZA (SAL85F14Z)"},
{46, "Carl Zeiss Vario-Sonnar T* DT 16-80mm f/3.5-4.5 ZA (SAL1680Z)"},
{47, "Carl Zeiss Sonnar T* 135mm f/1.8 ZA (SAL135F18Z)"},
- {48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM (SAL2470Z) or ZA SSM II"},
+ {48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM (SAL2470Z) or Other Lens"},
{48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM II (SAL2470Z2)"},
+ {48, "Tamron SP 24-70mm f/2.8 Di USD"},
{49, "Sony DT 55-200mm f/4-5.6 (SAL55200)"},
{50, "Sony DT 18-250mm f/3.5-6.3 (SAL18250)"},
{51, "Sony DT 16-105mm f/3.5-5.6 (SAL16105)"},
@@ -645,7 +647,6 @@ public:
{128, "Tamron or Sigma Lens (128)"},
{128, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro"},
{128, "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical [IF] Macro"},
- {128, "Tamron 80-300mm f/3.5-6.3"},
{128, "Tamron AF 28-200mm f/3.8-5.6 XR Di Aspherical [IF] Macro"},
{128, "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical IF"},
{128, "Sigma AF 50-150mm f/2.8 EX DC APO HSM II"},
@@ -680,7 +681,7 @@ public:
{137, "Cosina 70-210mm f/2.8-4 AF"},
{138, "Soligor 19-35mm f/3.5-4.5"},
{139, "Tokina AF 28-300mm f/4-6.3"},
- {142, "Voigtlander 70-300mm f/4.5-5.6"},
+ {142, "Cosina AF 70-300mm f/4.5-5.6 MC"},
{146, "Voigtlander Macro APO-Lanthar 125mm f/2.5 SL"},
{194, "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical [IF]"},
{202, "Tamron SP AF 70-200mm f/2.8 Di LD [IF] Macro"},
@@ -723,10 +724,11 @@ public:
{2552, "Angenieux AF 28-70mm f/2.6"},
{2552, "Tokina AT-X 17 AF 17mm f/3.5"},
{2552, "Tokina 20-35mm f/3.5-4.5 II AF"},
- {2553, "Minolta AF 28-135mm f/4-4.5 or Sigma Lens"},
+ {2553, "Minolta AF 28-135mm f/4-4.5 or Other Lens"},
{2553, "Sigma ZOOM-alpha 35-135mm f/3.5-4.5"},
{2553, "Sigma 28-105mm f/2.8-4 Aspherical"},
{2553, "Sigma 28-105mm f/4-5.6 UC"},
+ {2553, "Tokina AT-X 242 AF 24-200mm f/3.5-5.6"},
{2554, "Minolta AF 35-105mm f/3.5-4.5"},
{2555, "Minolta AF 70-210mm f/4 Macro or Sigma Lens"},
{2555, "Sigma 70-210mm f/4-5.6 APO"},
@@ -805,7 +807,7 @@ public:
{2624, "Minolta AF 35-80mm f/4-5.6 Power Zoom"},
{2628, "Minolta AF 80-200mm f/2.8 HS-APO G"},
{2629, "Minolta AF 85mm f/1.4 New"},
- {2631, "Minolta/Sony AF 100-300mm f/4.5-5.6 APO"},
+ {2631, "Minolta AF 100-300mm f/4.5-5.6 APO"},
{2632, "Minolta AF 24-50mm f/4 New"},
{2638, "Minolta AF 50mm f/2.8 Macro New"},
{2639, "Minolta AF 100mm f/2.8 Macro"},
@@ -818,6 +820,7 @@ public:
{2672, "Minolta AF 24-105mm f/3.5-4.5 (D)"},
{3046, "Metabones Canon EF Speed Booster"},
{4567, "Tokina 70-210mm f/4-5.6"},
+ {4568, "Tokina AF 35-200mm f/4-5.6 Zoom SD"},
{4570, "Tamron AF 35-135mm f/3.5-4.5"},
{4571, "Vivitar 70-210mm f/4.5-5.6"},
{4574, "2x Teleconverter or Tamron or Tokina Lens"},
@@ -832,97 +835,6 @@ public:
{6118, "Canon EF Adapter"},
{6528, "Sigma 16mm f/2.8 Filtermatic Fisheye"},
{6553, "E-Mount, T-Mount, Other Lens or no lens"},
- {6553, "Sony E 16mm f/2.8"},
- {6553, "Sony E 18-55mm f/3.5-5.6 OSS"},
- {6553, "Sony E 55-210mm f/4.5-6.3 OSS"},
- {6553, "Sony E 18-200mm f/3.5-6.3 OSS"},
- {6553, "Sony E 30mm f/3.5 Macro"},
- {6553, "Sony E 24mm f/1.8 ZA"},
- {6553, "Sony E 50mm f/1.8 OSS"},
- {6553, "Sony E 16-70mm f/4 ZA OSS"},
- {6553, "Sony E 10-18mm f/4 OSS"},
- {6553, "Sony E PZ 16-50mm f/3.5-5.6 OSS"},
- {6553, "Sony FE 35mm f/2.8 ZA"},
- {6553, "Sony FE 24-70mm f/4 ZA OSS"},
- {6553, "Sony FE 85mm f/1.8"},
- {6553, "Sony E 18-200mm f/3.5-6.3 OSS LE"},
- {6553, "Sony E 20mm f/2.8"},
- {6553, "Sony E 35mm f/1.8 OSS"},
- {6553, "Sony E PZ 18-105mm f/4 G OSS"},
- {6553, "Sony FE 12-24mm f/4 G"},
- {6553, "Sony FE 90mm f/2.8 Macro G OSS"},
- {6553, "Sony E 18-50mm f/4-5.6"},
- {6553, "Sony FE 24mm f/1.4 GM"},
- {6553, "Sony FE 24-105mm f/4 G OSS"},
- {6553, "Sony E PZ 18-200mm f/3.5-6.3 OSS"},
- {6553, "Sony FE 55mm f/1.8 ZA"},
- {6553, "Sony FE 70-200mm f/4 G OSS"},
- {6553, "Sony FE 16-35mm f/4 ZA OSS"},
- {6553, "Sony FE 50mm f/2.8 Macro"},
- {6553, "Sony FE 28-70mm f/3.5-5.6 OSS"},
- {6553, "Sony FE 35mm f/1.4 ZA"},
- {6553, "Sony FE 24-240mm f/3.5-6.3 OSS"},
- {6553, "Sony FE 28mm f/2"},
- {6553, "Sony FE PZ 28-135mm f/4 G OSS"},
- {6553, "Sony FE 100mm f/2.8 STF GM OSS"},
- {6553, "Sony E PZ 18-110mm f/4 G OSS"},
- {6553, "Sony FE 24-70mm f/2.8 GM"},
- {6553, "Sony FE 50mm f/1.4 ZA"},
- {6553, "Sony FE 85mm f/1.4 GM"},
- {6553, "Sony FE 50mm f/1.8"},
- {6553, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"},
- {6553, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"},
- {6553, "Sony FE 70-300mm f/4.5-5.6 G OSS"},
- {6553, "Sony FE 100-400mm f/4.5-5.6 GM OSS"},
- {6553, "Sony FE 70-200mm f/2.8 GM OSS"},
- {6553, "Sony FE 16-35mm f/2.8 GM"},
- {6553, "Sony FE 400mm f/2.8 GM OSS"},
- {6553, "Sony E 18-135mm f/3.5-5.6 OSS"},
- {6553, "Sony FE 70-200mm f/2.8 GM OSS + 1.4X Teleconverter"},
- {6553, "Sony FE 70-200mm f/2.8 GM OSS + 2X Teleconverter"},
- {6553, "Sony FE 100-400mm f/4.5-5.6 GM OSS + 1.4X Teleconverter"},
- {6553, "Sony FE 100-400mm f/4.5-5.6 GM OSS + 2X Teleconverter"},
- {6553, "Sony FE 400mm f/2.8 GM OSS + 1.4X Teleconverter"},
- {6553, "Sony FE 400mm f/2.8 GM OSS + 2X Teleconverter"},
- {6553, "Samyang AF 50mm f/1.4 FE"},
- {6553, "Samyang AF 14mm f/2.8 FE"},
- {6553, "Samyang AF 24mm f/2.8"},
- {6553, "Samyang AF 35mm f/2.8 FE"},
- {6553, "Samyang AF 35mm f/1.4"},
- {6553, "Sigma 19mm f/2.8 [EX] DN"},
- {6553, "Sigma 30mm f/2.8 [EX] DN"},
- {6553, "Sigma 60mm f/2.8 DN"},
- {6553, "Sigma 30mm f/1.4 DC DN | C"},
- {6553, "Sigma 85mm f/1.4 DG HSM | A"},
- {6553, "Sigma 16mm f/1.4 DC DN | C"},
- {6553, "Sigma 105mm f/1.4 DG HSM | A"},
- {6553, "Sigma 56mm f/1.4 DC DN | C"},
- {6553, "Sigma 70-200mm f/2.8 DG OS HSM | S"},
- {6553, "Sigma 70mm f/2.8 DG MACRO | A"},
- {6553, "Tamron 18-200mm f/3.5-6.3 Di III VC"},
- {6553, "Tamron 28-75mm f/2.8 Di III RXD"},
- {6553, "Tokina Firin 20mm f/2 FE MF"},
- {6553, "Voigtlander SUPER WIDE-HELIAR 15mm f/4.5 III"},
- {6553, "Voigtlander HELIAR-HYPER WIDE 10mm f/5.6"},
- {6553, "Voigtlander ULTRA WIDE-HELIAR 12mm f/5.6 III"},
- {6553, "Voigtlander MACRO APO-LANTHAR 65mm f/2 Aspherical"},
- {6553, "Voigtlander NOKTON 40mm f/1.2 Aspherical"},
- {6553, "Voigtlander NOKTON classic 35mm f/1.4"},
- {6553, "Voigtlander MACRO APO-LANTHAR 110mm f/2.5"},
- {6553, "Voigtlander COLOR-SKOPAR 21mm f/3.5 Aspherical"},
- {6553, "Zeiss Touit 12mm f/2.8"},
- {6553, "Zeiss Touit 32mm f/1.8"},
- {6553, "Zeiss Touit 50mm f/2.8 Macro"},
- {6553, "Zeiss Batis 25mm f/2"},
- {6553, "Zeiss Batis 85mm f/1.8"},
- {6553, "Zeiss Batis 18mm f/2.8"},
- {6553, "Zeiss Batis 135mm f/2.8"},
- {6553, "Zeiss Batis 40mm f/2 CF"},
- {6553, "Zeiss Loxia 50mm f/2"},
- {6553, "Zeiss Loxia 35mm f/2"},
- {6553, "Zeiss Loxia 21mm f/2.8"},
- {6553, "Zeiss Loxia 85mm f/2.4"},
- {6553, "Zeiss Loxia 25mm f/2.4"},
{6553, "Arax MC 35mm f/2.8 Tilt+Shift"},
{6553, "Arax MC 80mm f/2.8 Tilt+Shift"},
{6553, "Zenitar MF 16mm f/2.8 Fisheye M42"},
@@ -948,10 +860,11 @@ public:
{25521, "Angenieux AF 28-70mm f/2.6"},
{25521, "Tokina AT-X 17 AF 17mm f/3.5"},
{25521, "Tokina 20-35mm f/3.5-4.5 II AF"},
- {25531, "Minolta AF 28-135mm f/4-4.5 or Sigma Lens"},
+ {25531, "Minolta AF 28-135mm f/4-4.5 or Other Lens"},
{25531, "Sigma ZOOM-alpha 35-135mm f/3.5-4.5"},
{25531, "Sigma 28-105mm f/2.8-4 Aspherical"},
{25531, "Sigma 28-105mm f/4-5.6 UC"},
+ {25531, "Tokina AT-X 242 AF 24-200mm f/3.5-5.6"},
{25541, "Minolta AF 35-105mm f/3.5-4.5"},
{25551, "Minolta AF 70-210mm f/4 Macro or Sigma Lens"},
{25551, "Sigma 70-210mm f/4-5.6 APO"},
@@ -1030,7 +943,7 @@ public:
{26241, "Minolta AF 35-80mm f/4-5.6 Power Zoom"},
{26281, "Minolta AF 80-200mm f/2.8 HS-APO G"},
{26291, "Minolta AF 85mm f/1.4 New"},
- {26311, "Minolta/Sony AF 100-300mm f/4.5-5.6 APO"},
+ {26311, "Minolta AF 100-300mm f/4.5-5.6 APO"},
{26321, "Minolta AF 24-50mm f/4 New"},
{26381, "Minolta AF 50mm f/2.8 Macro New"},
{26391, "Minolta AF 100mm f/2.8 Macro"},
@@ -1043,6 +956,7 @@ public:
{26721, "Minolta AF 24-105mm f/3.5-4.5 (D)"},
{30464, "Metabones Canon EF Speed Booster"},
{45671, "Tokina 70-210mm f/4-5.6"},
+ {45681, "Tokina AF 35-200mm f/4-5.6 Zoom SD"},
{45701, "Tamron AF 35-135mm f/3.5-4.5"},
{45711, "Vivitar 70-210mm f/4.5-5.6"},
{45741, "2x Teleconverter or Tamron or Tokina Lens"},
@@ -1057,104 +971,13 @@ public:
{61184, "Canon EF Adapter"},
{65280, "Sigma 16mm f/2.8 Filtermatic Fisheye"},
{65535, "E-Mount, T-Mount, Other Lens or no lens"},
- {65535, "Sony E 16mm f/2.8"},
- {65535, "Sony E 18-55mm f/3.5-5.6 OSS"},
- {65535, "Sony E 55-210mm f/4.5-6.3 OSS"},
- {65535, "Sony E 18-200mm f/3.5-6.3 OSS"},
- {65535, "Sony E 30mm f/3.5 Macro"},
- {65535, "Sony E 24mm f/1.8 ZA"},
- {65535, "Sony E 50mm f/1.8 OSS"},
- {65535, "Sony E 16-70mm f/4 ZA OSS"},
- {65535, "Sony E 10-18mm f/4 OSS"},
- {65535, "Sony E PZ 16-50mm f/3.5-5.6 OSS"},
- {65535, "Sony FE 35mm f/2.8 ZA"},
- {65535, "Sony FE 24-70mm f/4 ZA OSS"},
- {65535, "Sony FE 85mm f/1.8"},
- {65535, "Sony E 18-200mm f/3.5-6.3 OSS LE"},
- {65535, "Sony E 20mm f/2.8"},
- {65535, "Sony E 35mm f/1.8 OSS"},
- {65535, "Sony E PZ 18-105mm f/4 G OSS"},
- {65535, "Sony FE 12-24mm f/4 G"},
- {65535, "Sony FE 90mm f/2.8 Macro G OSS"},
- {65535, "Sony E 18-50mm f/4-5.6"},
- {65535, "Sony FE 24mm f/1.4 GM"},
- {65535, "Sony FE 24-105mm f/4 G OSS"},
- {65535, "Sony E PZ 18-200mm f/3.5-6.3 OSS"},
- {65535, "Sony FE 55mm f/1.8 ZA"},
- {65535, "Sony FE 70-200mm f/4 G OSS"},
- {65535, "Sony FE 16-35mm f/4 ZA OSS"},
- {65535, "Sony FE 50mm f/2.8 Macro"},
- {65535, "Sony FE 28-70mm f/3.5-5.6 OSS"},
- {65535, "Sony FE 35mm f/1.4 ZA"},
- {65535, "Sony FE 24-240mm f/3.5-6.3 OSS"},
- {65535, "Sony FE 28mm f/2"},
- {65535, "Sony FE PZ 28-135mm f/4 G OSS"},
- {65535, "Sony FE 100mm f/2.8 STF GM OSS"},
- {65535, "Sony E PZ 18-110mm f/4 G OSS"},
- {65535, "Sony FE 24-70mm f/2.8 GM"},
- {65535, "Sony FE 50mm f/1.4 ZA"},
- {65535, "Sony FE 85mm f/1.4 GM"},
- {65535, "Sony FE 50mm f/1.8"},
- {65535, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"},
- {65535, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"},
- {65535, "Sony FE 70-300mm f/4.5-5.6 G OSS"},
- {65535, "Sony FE 100-400mm f/4.5-5.6 GM OSS"},
- {65535, "Sony FE 70-200mm f/2.8 GM OSS"},
- {65535, "Sony FE 16-35mm f/2.8 GM"},
- {65535, "Sony FE 400mm f/2.8 GM OSS"},
- {65535, "Sony E 18-135mm f/3.5-5.6 OSS"},
- {65535, "Sony FE 70-200mm f/2.8 GM OSS + 1.4X Teleconverter"},
- {65535, "Sony FE 70-200mm f/2.8 GM OSS + 2X Teleconverter"},
- {65535, "Sony FE 100-400mm f/4.5-5.6 GM OSS + 1.4X Teleconverter"},
- {65535, "Sony FE 100-400mm f/4.5-5.6 GM OSS + 2X Teleconverter"},
- {65535, "Sony FE 400mm f/2.8 GM OSS + 1.4X Teleconverter"},
- {65535, "Sony FE 400mm f/2.8 GM OSS + 2X Teleconverter"},
- {65535, "Samyang AF 50mm f/1.4 FE"},
- {65535, "Samyang AF 14mm f/2.8 FE"},
- {65535, "Samyang AF 24mm f/2.8"},
- {65535, "Samyang AF 35mm f/2.8 FE"},
- {65535, "Samyang AF 35mm f/1.4"},
- {65535, "Sigma 19mm f/2.8 [EX] DN"},
- {65535, "Sigma 30mm f/2.8 [EX] DN"},
- {65535, "Sigma 60mm f/2.8 DN"},
- {65535, "Sigma 30mm f/1.4 DC DN | C"},
- {65535, "Sigma 85mm f/1.4 DG HSM | A"},
- {65535, "Sigma 16mm f/1.4 DC DN | C"},
- {65535, "Sigma 105mm f/1.4 DG HSM | A"},
- {65535, "Sigma 56mm f/1.4 DC DN | C"},
- {65535, "Sigma 70-200mm f/2.8 DG OS HSM | S"},
- {65535, "Sigma 70mm f/2.8 DG MACRO | A"},
- {65535, "Tamron 18-200mm f/3.5-6.3 Di III VC"},
- {65535, "Tamron 28-75mm f/2.8 Di III RXD"},
- {65535, "Tokina Firin 20mm f/2 FE MF"},
- {65535, "Voigtlander SUPER WIDE-HELIAR 15mm f/4.5 III"},
- {65535, "Voigtlander HELIAR-HYPER WIDE 10mm f/5.6"},
- {65535, "Voigtlander ULTRA WIDE-HELIAR 12mm f/5.6 III"},
- {65535, "Voigtlander MACRO APO-LANTHAR 65mm f/2 Aspherical"},
- {65535, "Voigtlander NOKTON 40mm f/1.2 Aspherical"},
- {65535, "Voigtlander NOKTON classic 35mm f/1.4"},
- {65535, "Voigtlander MACRO APO-LANTHAR 110mm f/2.5"},
- {65535, "Voigtlander COLOR-SKOPAR 21mm f/3.5 Aspherical"},
- {65535, "Zeiss Touit 12mm f/2.8"},
- {65535, "Zeiss Touit 32mm f/1.8"},
- {65535, "Zeiss Touit 50mm f/2.8 Macro"},
- {65535, "Zeiss Batis 25mm f/2"},
- {65535, "Zeiss Batis 85mm f/1.8"},
- {65535, "Zeiss Batis 18mm f/2.8"},
- {65535, "Zeiss Batis 135mm f/2.8"},
- {65535, "Zeiss Batis 40mm f/2 CF"},
- {65535, "Zeiss Loxia 50mm f/2"},
- {65535, "Zeiss Loxia 35mm f/2"},
- {65535, "Zeiss Loxia 21mm f/2.8"},
- {65535, "Zeiss Loxia 85mm f/2.4"},
- {65535, "Zeiss Loxia 25mm f/2.4"},
{65535, "Arax MC 35mm f/2.8 Tilt+Shift"},
{65535, "Arax MC 80mm f/2.8 Tilt+Shift"},
{65535, "Zenitar MF 16mm f/2.8 Fisheye M42"},
{65535, "Samyang 500mm Mirror f/8.0"},
{65535, "Pentacon Auto 135mm f/2.8"},
{65535, "Pentacon Auto 29mm f/2.8"},
- {65535, "Helios 44-2 58mm f/2.0"},
+ {65535, "Helios 44-2 58mm f/2.0"}
};
}
@@ -1198,12 +1021,25 @@ public:
SALensID2Interpreter ()
{
choices.insert (p_t (0, "Unknown E-mount lens or other lens"));
+ choices.insert (p_t (0, "Sigma 19mm f/2.8 [EX] DN"));
+ choices.insert (p_t (0, "Sigma 30mm f/2.8 [EX] DN"));
+ choices.insert (p_t (0, "Sigma 60mm f/2.8 DN"));
+ choices.insert (p_t (0, "Sony E 18-200mm f/3.5-6.3 OSS LE"));
+ choices.insert (p_t (0, "Tamron 18-200mm f/3.5-6.3 Di III VC"));
+ choices.insert (p_t (0, "Tokina FiRIN 20mm f/2 FE AF"));
+ choices.insert (p_t (0, "Tokina FiRIN 20mm f/2 FE MF"));
+ choices.insert (p_t (0, "Zeiss Touit 12mm f/2.8"));
+ choices.insert (p_t (0, "Zeiss Touit 32mm f/1.8"));
+ choices.insert (p_t (0, "Zeiss Touit 50mm f/2.8 Macro"));
+ choices.insert (p_t (0, "Zeiss Loxia 50mm f/2"));
+ choices.insert (p_t (0, "Zeiss Loxia 35mm f/2"));
choices.insert (p_t (1, "Sony LA-EA1 or Sigma MC-11 Adapter"));
choices.insert (p_t (2, "Sony LA-EA2 Adapter"));
choices.insert (p_t (3, "Sony LA-EA3 Adapter"));
choices.insert (p_t (6, "Sony LA-EA4 Adapter"));
choices.insert (p_t (44, "Metabones Canon EF Smart Adapter"));
choices.insert (p_t (78, "Metabones Canon EF Smart Adapter Mark III or Other Adapter"));
+ choices.insert (p_t (184, "Metabones Canon EF Speed Booster Ultra"));
choices.insert (p_t (234, "Metabones Canon EF Smart Adapter Mark IV"));
choices.insert (p_t (239, "Metabones Canon EF Speed Booster"));
choices.insert (p_t (32784, "Sony E 16mm f/2.8"));
@@ -1211,17 +1047,19 @@ public:
choices.insert (p_t (32786, "Sony E 55-210mm f/4.5-6.3 OSS"));
choices.insert (p_t (32787, "Sony E 18-200mm f/3.5-6.3 OSS"));
choices.insert (p_t (32788, "Sony E 30mm f/3.5 Macro"));
- choices.insert (p_t (32789, "Sony E 24mm f/1.8 ZA or Samyang AF 50mm f/1.4 FE"));
- choices.insert (p_t (32789, "Samyang AF 50mm f/1.4 FE"));
- choices.insert (p_t (32790, "Sony E 50mm f/1.8 OSS or Samyang AF 14mm f/2.8 FE"));
- choices.insert (p_t (32790, "Samyang AF 14mm f/2.8 FE"));
+ choices.insert (p_t (32789, "Sony E 24mm f/1.8 ZA or Samyang AF 50mm f/1.4"));
+ choices.insert (p_t (32789, "Samyang AF 50mm f/1.4"));
+ choices.insert (p_t (32790, "Sony E 50mm f/1.8 OSS or Samyang AF 14mm f/2.8"));
+ choices.insert (p_t (32790, "Samyang AF 14mm f/2.8"));
choices.insert (p_t (32791, "Sony E 16-70mm f/4 ZA OSS"));
choices.insert (p_t (32792, "Sony E 10-18mm f/4 OSS"));
choices.insert (p_t (32793, "Sony E PZ 16-50mm f/3.5-5.6 OSS"));
- choices.insert (p_t (32794, "Sony FE 35mm f/2.8 ZA or Samyang AF 24mm f/2.8 FE"));
- choices.insert (p_t (32794, "Samyang AF 24mm f/2.8 FE"));
+ choices.insert (p_t (32794, "Sony FE 35mm f/2.8 ZA or Samyang Lens"));
+ choices.insert (p_t (32794, "Samyang AF 24mm f/2.8"));
+ choices.insert (p_t (32794, "Samyang AF 35mm f/2.8"));
choices.insert (p_t (32795, "Sony FE 24-70mm f/4 ZA OSS"));
- choices.insert (p_t (32796, "Sony FE 85mm f/1.8"));
+ choices.insert (p_t (32796, "Sony FE 85mm f/1.8 or Viltrox PFU RBMH 85mm f/1.8"));
+ choices.insert (p_t (32796, "Viltrox PFU RBMH 85mm f/1.8"));
choices.insert (p_t (32797, "Sony E 18-200mm f/3.5-6.3 OSS LE"));
choices.insert (p_t (32798, "Sony E 20mm f/2.8"));
choices.insert (p_t (32799, "Sony E 35mm f/1.8 OSS"));
@@ -1245,7 +1083,8 @@ public:
choices.insert (p_t (32820, "Sony E PZ 18-110mm f/4 G OSS"));
choices.insert (p_t (32821, "Sony FE 24-70mm f/2.8 GM"));
choices.insert (p_t (32822, "Sony FE 50mm f/1.4 ZA"));
- choices.insert (p_t (32823, "Sony FE 85mm f/1.4 GM"));
+ choices.insert (p_t (32823, "Sony FE 85mm f/1.4 GM or Samyang AF 85mm f/1.4"));
+ choices.insert (p_t (32823, "Samyang AF 85mm f/1.4"));
choices.insert (p_t (32824, "Sony FE 50mm f/1.8"));
choices.insert (p_t (32826, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"));
choices.insert (p_t (32827, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"));
@@ -1255,6 +1094,12 @@ public:
choices.insert (p_t (32831, "Sony FE 16-35mm f/2.8 GM"));
choices.insert (p_t (32848, "Sony FE 400mm f/2.8 GM OSS"));
choices.insert (p_t (32849, "Sony E 18-135mm f/3.5-5.6 OSS"));
+ choices.insert (p_t (32850, "Sony FE 135mm f/1.8 GM"));
+ choices.insert (p_t (32851, "Sony FE 200-600mm f/5.6-6.3 G OSS"));
+ choices.insert (p_t (32852, "Sony FE 600mm f/4 GM OSS"));
+ choices.insert (p_t (32853, "Sony E 16-55mm f/2.8 G"));
+ choices.insert (p_t (32854, "Sony E 70-350mm f/4.5-6.3 G OSS"));
+ choices.insert (p_t (32858, "Sony FE 35mm f/1.8"));
choices.insert (p_t (33072, "Sony FE 70-200mm f/2.8 GM OSS + 1.4X Teleconverter"));
choices.insert (p_t (33073, "Sony FE 70-200mm f/2.8 GM OSS + 2X Teleconverter"));
choices.insert (p_t (33076, "Sony FE 100mm f/2.8 STF GM OSS (macro mode)"));
@@ -1262,6 +1107,10 @@ public:
choices.insert (p_t (33078, "Sony FE 100-400mm f/4.5-5.6 GM OSS + 2X Teleconverter"));
choices.insert (p_t (33079, "Sony FE 400mm f/2.8 GM OSS + 1.4X Teleconverter"));
choices.insert (p_t (33080, "Sony FE 400mm f/2.8 GM OSS + 2X Teleconverter"));
+ choices.insert (p_t (33081, "Sony FE 200-600mm f/5.6-6.3 G OSS + 1.4X Teleconverter"));
+ choices.insert (p_t (33082, "Sony FE 200-600mm f/5.6-6.3 G OSS + 2X Teleconverter"));
+ choices.insert (p_t (33083, "Sony FE 600mm f/4 GM OSS + 1.4X Teleconverter"));
+ choices.insert (p_t (33084, "Sony FE 600mm f/4 GM OSS + 2X Teleconverter"));
choices.insert (p_t (49201, "Zeiss Touit 12mm f/2.8"));
choices.insert (p_t (49202, "Zeiss Touit 32mm f/1.8"));
choices.insert (p_t (49203, "Zeiss Touit 50mm f/2.8 Macro"));
@@ -1276,11 +1125,17 @@ public:
choices.insert (p_t (49235, "Zeiss Loxia 85mm f/2.4"));
choices.insert (p_t (49236, "Zeiss Loxia 25mm f/2.4"));
choices.insert (p_t (49457, "Tamron 28-75mm f/2.8 Di III RXD"));
+ choices.insert (p_t (49458, "Tamron 17-28mm f/2.8 Di III RXD"));
+ choices.insert (p_t (49459, "Tamron 35mm f/2.8 Di III OSD M1:2"));
+ choices.insert (p_t (49460, "Tamron 24mm f/2.8 Di III OSD M1:2"));
+ choices.insert (p_t (49712, "Tokina FiRIN 20mm f/2 FE AF"));
+ choices.insert (p_t (49713, "Tokina FiRIN 100mm f/2.8 FE MACRO"));
choices.insert (p_t (50480, "Sigma 30mm f/1.4 DC DN | C"));
choices.insert (p_t (50481, "Sigma 50mm f/1.4 DG HSM | A"));
choices.insert (p_t (50482, "Sigma 18-300mm f/3.5-6.3 DC MACRO OS HSM | C + MC-11"));
choices.insert (p_t (50483, "Sigma 18-35mm f/1.8 DC HSM | A + MC-11"));
choices.insert (p_t (50484, "Sigma 24-35mm f/2 DG HSM | A + MC-11"));
+ choices.insert (p_t (50485, "Sigma 24mm f/1.4 DG HSM | A + MC-11"));
choices.insert (p_t (50486, "Sigma 150-600mm f/5-6.3 DG OS HSM | C + MC-11"));
choices.insert (p_t (50487, "Sigma 20mm f/1.4 DG HSM | A + MC-11"));
choices.insert (p_t (50488, "Sigma 35mm f/1.4 DG HSM | A"));
@@ -1294,8 +1149,11 @@ public:
choices.insert (p_t (50503, "Sigma 16mm f/1.4 DC DN | C"));
choices.insert (p_t (50507, "Sigma 105mm f/1.4 DG HSM | A"));
choices.insert (p_t (50508, "Sigma 56mm f/1.4 DC DN | C"));
- choices.insert (p_t (50512, "Sigma 70-200mm f/2.8 DG OS HSM | S"));
+ choices.insert (p_t (50512, "Sigma 70-200mm f/2.8 DG OS HSM | S + MC-11"));
choices.insert (p_t (50513, "Sigma 70mm f/2.8 DG MACRO | A"));
+ choices.insert (p_t (50514, "Sigma 45mm f/2.8 DG DN | C"));
+ choices.insert (p_t (50515, "Sigma 35mm f/1.2 DG DN | A"));
+ choices.insert (p_t (50516, "Sigma 14-24mm f/2.8 DG DN | A"));
choices.insert (p_t (50992, "Voigtlander SUPER WIDE-HELIAR 15mm f/4.5 III"));
choices.insert (p_t (50993, "Voigtlander HELIAR-HYPER WIDE 10mm f/5.6"));
choices.insert (p_t (50994, "Voigtlander ULTRA WIDE-HELIAR 12mm f/5.6 III"));
@@ -1304,9 +1162,15 @@ public:
choices.insert (p_t (50997, "Voigtlander NOKTON classic 35mm f/1.4"));
choices.insert (p_t (50998, "Voigtlander MACRO APO-LANTHAR 110mm f/2.5"));
choices.insert (p_t (50999, "Voigtlander COLOR-SKOPAR 21mm f/3.5 Aspherical"));
- choices.insert (p_t (51505, "Samyang AF 14mm f/2.8 FE or Samyang AF 35mm f/2.8 FE"));
- choices.insert (p_t (51505, "Samyang AF 35mm f/2.8 FE"));
+ choices.insert (p_t (51000, "Voigtlander NOKTON 50mm f/1.2 Aspherical"));
+ choices.insert (p_t (51001, "Voigtlander NOKTON 21mm f/1.4 Aspherical"));
+ choices.insert (p_t (51002, "Voigtlander APO-LANTHAR 50mm f/2 Aspherical"));
+ choices.insert (p_t (51504, "Samyang AF 50mm f/1.4"));
+ choices.insert (p_t (51505, "Samyang AF 14mm f/2.8 or Samyang AF 35mm f/2.8"));
+ choices.insert (p_t (51505, "Samyang AF 35mm f/2.8"));
choices.insert (p_t (51507, "Samyang AF 35mm f/1.4"));
+ choices.insert (p_t (51508, "Samyang AF 45mm f/1.8"));
+ choices.insert (p_t (51510, "Samyang AF 18mm f/2.8"));
}
std::string toString (const Tag* t) const override
diff --git a/rtgui/dirbrowser.cc b/rtgui/dirbrowser.cc
index 669528ac1..10ef61566 100644
--- a/rtgui/dirbrowser.cc
+++ b/rtgui/dirbrowser.cc
@@ -293,36 +293,32 @@ void DirBrowser::row_expanded (const Gtk::TreeModel::iterator& iter, const Gtk::
auto dir = Gio::File::create_for_path (iter->get_value (dtColumns.dirname));
auto subDirs = listSubDirs (dir, options.fbShowHidden);
- if (subDirs.empty()) {
- dirtree->collapse_row(path);
- } else {
- Gtk::TreeNodeChildren children = iter->children();
- std::list forErase(children.begin(), children.end());
+ Gtk::TreeNodeChildren children = iter->children();
+ std::list forErase(children.begin(), children.end());
- std::sort (subDirs.begin (), subDirs.end (), [] (const Glib::ustring& firstDir, const Glib::ustring& secondDir)
- {
- switch (options.dirBrowserSortType) {
- default:
- case Gtk::SORT_ASCENDING:
- return firstDir < secondDir;
- case Gtk::SORT_DESCENDING:
- return firstDir > secondDir;
- }
- });
-
- for (auto it = subDirs.begin(), end = subDirs.end(); it != end; ++it) {
- addDir(iter, *it);
+ std::sort (subDirs.begin (), subDirs.end (), [] (const Glib::ustring& firstDir, const Glib::ustring& secondDir)
+ {
+ switch (options.dirBrowserSortType) {
+ default:
+ case Gtk::SORT_ASCENDING:
+ return firstDir < secondDir;
+ case Gtk::SORT_DESCENDING:
+ return firstDir > secondDir;
}
+ });
- for (auto it = forErase.begin(), end = forErase.end(); it != end; ++it) {
- dirTreeModel->erase(*it);
- }
-
- dirTreeModel->set_sort_column(prevSortColumn, prevSortType);
-
- expandSuccess = true;
+ for (auto it = subDirs.begin(), end = subDirs.end(); it != end; ++it) {
+ addDir(iter, *it);
}
+ for (auto it = forErase.begin(), end = forErase.end(); it != end; ++it) {
+ dirTreeModel->erase(*it);
+ }
+
+ dirTreeModel->set_sort_column(prevSortColumn, prevSortType);
+
+ expandSuccess = true;
+
Glib::RefPtr monitor = dir->monitor_directory ();
iter->set_value (dtColumns.monitor, monitor);
monitor->signal_changed().connect (sigc::bind(sigc::mem_fun(*this, &DirBrowser::file_changed), iter, dir->get_parse_name()));
@@ -383,8 +379,10 @@ void DirBrowser::row_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewC
Glib::ustring dname = dirTreeModel->get_iter (path)->get_value (dtColumns.dirname);
- if (Glib::file_test (dname, Glib::FILE_TEST_IS_DIR))
+ if (Glib::file_test (dname, Glib::FILE_TEST_IS_DIR)) {
dirSelectionSignal (dname, Glib::ustring());
+ dirtree->expand_row(path, false);
+ }
}
Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath)
diff --git a/rtgui/epd.cc b/rtgui/epd.cc
index 307790ff7..b13effba3 100644
--- a/rtgui/epd.cc
+++ b/rtgui/epd.cc
@@ -69,17 +69,18 @@ void EdgePreservingDecompositionUI::read(const ProcParams *pp, const ParamsEdite
setEnabled(pp->epd.enabled);
strength->set_sensitive (true);
-
- if(pp->wavelet.enabled) {
- if(pp->wavelet.tmrs == 0) {
+ gamma->set_sensitive (true);
+/*
+ if(pp->wavelet.enabled) {
+ if(pp->wavelet.tmrs == 0 || pp->wavelet.TMmethod == "cont") {
strength->set_sensitive (true);
gamma->set_sensitive (true);
- } else {
+ } else if(pp->wavelet.tmrs != 0 && pp->wavelet.TMmethod == "tm") {
strength->set_sensitive (false);
gamma->set_sensitive (false);
}
}
-
+*/
strength->setValue(pp->epd.strength);
gamma->setValue(pp->epd.gamma);
edgeStopping->setValue(pp->epd.edgeStopping);
@@ -98,17 +99,18 @@ void EdgePreservingDecompositionUI::write(ProcParams *pp, ParamsEdited *pedited)
pp->epd.reweightingIterates = reweightingIterates->getValue();
pp->epd.enabled = getEnabled();
strength->set_sensitive (true);
-
- if(pp->wavelet.enabled) {
- if(pp->wavelet.tmrs == 0) {
+ gamma->set_sensitive (true);
+/*
+ if(pp->wavelet.enabled) {
+ if(pp->wavelet.tmrs == 0 || pp->wavelet.TMmethod == "cont") {
strength->set_sensitive (true);
gamma->set_sensitive (true);
- } else {
+ } else if(pp->wavelet.tmrs != 0 && pp->wavelet.TMmethod == "tm") {
strength->set_sensitive (false);
gamma->set_sensitive (false);
}
}
-
+*/
if(pedited) {
pedited->epd.strength = strength->getEditedState();
pedited->epd.gamma = gamma->getEditedState();
diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc
index a283398ee..7380dd4e8 100644
--- a/rtgui/filecatalog.cc
+++ b/rtgui/filecatalog.cc
@@ -56,6 +56,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
fslistener(nullptr),
iatlistener(nullptr),
hbToolBar1STB(nullptr),
+ progressImage(nullptr),
+ progressLabel(nullptr),
hasValidCurrentEFS(false),
filterPanel(nullptr),
exportPanel(nullptr),
@@ -706,35 +708,38 @@ void FileCatalog::_refreshProgressBar ()
// The second, usually longer pass is done multithreaded down in the single entries and is NOT measured by this
if (!inTabMode && (!previewsToLoad || std::floor(100.f * previewsLoaded / previewsToLoad) != std::floor(100.f * (previewsLoaded - 1) / previewsToLoad))) {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
- Gtk::Notebook *nb = (Gtk::Notebook *)(filepanel->get_parent());
- Gtk::Grid* grid = Gtk::manage(new Gtk::Grid());
- Gtk::Label *label = nullptr;
+ if (!progressImage || !progressLabel) {
+ // create tab label once
+ Gtk::Notebook *nb = (Gtk::Notebook *)(filepanel->get_parent());
+ Gtk::Grid* grid = Gtk::manage(new Gtk::Grid());
+ progressImage = Gtk::manage(new RTImage("folder-closed.png"));
+ progressLabel = Gtk::manage(new Gtk::Label(M("MAIN_FRAME_FILEBROWSER")));
+ grid->attach_next_to(*progressImage, options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
+ grid->attach_next_to(*progressLabel, options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
+ grid->set_tooltip_markup(M("MAIN_FRAME_FILEBROWSER_TOOLTIP"));
+ grid->show_all();
+ if (options.mainNBVertical) {
+ progressLabel->set_angle(90);
+ }
+ if (nb) {
+ nb->set_tab_label(*filepanel, *grid);
+ }
+ }
if (!previewsToLoad) {
- grid->attach_next_to(*Gtk::manage(new RTImage("folder-closed.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
+ progressImage->changeImage("folder-closed.png");
int filteredCount = min(fileBrowser->getNumFiltered(), previewsLoaded);
-
- label = Gtk::manage(new Gtk::Label(M("MAIN_FRAME_FILEBROWSER") +
- (filteredCount != previewsLoaded ? " [" + Glib::ustring::format(filteredCount) + "/" : " (")
- + Glib::ustring::format(previewsLoaded) +
- (filteredCount != previewsLoaded ? "]" : ")")));
+ progressLabel->set_text(M("MAIN_FRAME_FILEBROWSER") +
+ (filteredCount != previewsLoaded ? " [" + Glib::ustring::format(filteredCount) + "/" : " (")
+ + Glib::ustring::format(previewsLoaded) +
+ (filteredCount != previewsLoaded ? "]" : ")"));
} else {
- grid->attach_next_to(*Gtk::manage(new RTImage("magnifier.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
- label = Gtk::manage(new Gtk::Label(M("MAIN_FRAME_FILEBROWSER") + " [" + Glib::ustring::format(std::fixed, std::setprecision(0), std::setw(3), (double)previewsLoaded / previewsToLoad * 100 ) + "%]" ));
+ progressImage->changeImage("magnifier.png");
+ progressLabel->set_text(M("MAIN_FRAME_FILEBROWSER") + " ["
+ + Glib::ustring::format(previewsLoaded) + "/"
+ + Glib::ustring::format(previewsToLoad) + "]" );
filepanel->loadingThumbs("", (double)previewsLoaded / previewsToLoad);
}
-
- if (options.mainNBVertical) {
- label->set_angle(90);
- }
-
- grid->attach_next_to(*label, options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
- grid->set_tooltip_markup(M("MAIN_FRAME_FILEBROWSER_TOOLTIP"));
- grid->show_all();
-
- if (nb) {
- nb->set_tab_label(*filepanel, *grid);
- }
}
}
diff --git a/rtgui/filecatalog.h b/rtgui/filecatalog.h
index 8f7e5618f..10f2bc88f 100644
--- a/rtgui/filecatalog.h
+++ b/rtgui/filecatalog.h
@@ -124,6 +124,9 @@ private:
Gtk::Button* zoomInButton;
Gtk::Button* zoomOutButton;
+ RTImage* progressImage;
+ Gtk::Label* progressLabel;
+
MyMutex dirEFSMutex;
ExifFilterSettings dirEFS;
ExifFilterSettings currentEFS;
diff --git a/rtgui/filterpanel.cc b/rtgui/filterpanel.cc
index 301a7b188..2c4fc52d2 100644
--- a/rtgui/filterpanel.cc
+++ b/rtgui/filterpanel.cc
@@ -14,7 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with RawTherapee. If not, see .
+ * along with RawTherapee. If not, see .
*/
#include "filterpanel.h"
#include "multilangmgr.h"
@@ -107,8 +107,8 @@ FilterPanel::FilterPanel () : listener (nullptr)
scamera->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS);
scamera->set_size_request(-1, 80);
scamera->add(*camera);
- cvb->pack_start (*scamera, Gtk::PACK_SHRINK, 0);
- pack_start (*cvb, Gtk::PACK_SHRINK, 4);
+ cvb->pack_start (*scamera, Gtk::PACK_EXPAND_WIDGET, 0);
+ pack_start (*cvb, Gtk::PACK_EXPAND_WIDGET, 4);
enaLens = Gtk::manage(new Gtk::CheckButton(M("EXIFFILTER_LENS") + ":"));
Gtk::VBox* lvb = Gtk::manage(new Gtk::VBox ());
@@ -119,8 +119,8 @@ FilterPanel::FilterPanel () : listener (nullptr)
slens->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS);
slens->set_size_request(-1, 80);
slens->add(*lens);
- lvb->pack_start (*slens, Gtk::PACK_SHRINK, 0);
- pack_start (*lvb, Gtk::PACK_SHRINK, 4);
+ lvb->pack_start (*slens, Gtk::PACK_EXPAND_WIDGET, 0);
+ pack_start (*lvb, Gtk::PACK_EXPAND_WIDGET, 4);
enaFiletype = Gtk::manage(new Gtk::CheckButton(M("EXIFFILTER_FILETYPE") + ":"));
Gtk::VBox* ftvb = Gtk::manage(new Gtk::VBox ());
@@ -131,8 +131,8 @@ FilterPanel::FilterPanel () : listener (nullptr)
sfiletype->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS);
sfiletype->set_size_request(-1, 80);
sfiletype->add(*filetype);
- ftvb->pack_start (*sfiletype, Gtk::PACK_SHRINK, 0);
- pack_start (*ftvb, Gtk::PACK_SHRINK, 4);
+ ftvb->pack_start (*sfiletype, Gtk::PACK_EXPAND_WIDGET, 0);
+ pack_start (*ftvb, Gtk::PACK_EXPAND_WIDGET, 4);
// add panel ending
Gtk::VBox* vboxpe = Gtk::manage (new Gtk::VBox ());
diff --git a/rtgui/lensgeom.cc b/rtgui/lensgeom.cc
index 76e0635eb..762726107 100644
--- a/rtgui/lensgeom.cc
+++ b/rtgui/lensgeom.cc
@@ -17,6 +17,8 @@
* along with RawTherapee. If not, see .
*/
#include "lensgeom.h"
+
+#include "eventmapper.h"
#include "guiutils.h"
#include "rtimage.h"
@@ -28,6 +30,18 @@ using namespace rtengine::procparams;
LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGEOM_LABEL")), rlistener(nullptr), lastFill(false)
{
+ auto m = ProcEventMapper::getInstance();
+ EvTransMethod = m->newEvent(TRANSFORM, "HISTORY_MSG_TRANS_METHOD");
+
+ Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ());
+ hb1->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4);
+ method = Gtk::manage (new MyComboBoxText ());
+ method->append(M("TP_LENSGEOM_LOG"));
+ method->append(M("TP_LENSGEOM_LIN"));
+ method->set_active(0);
+ hb1->pack_end (*method, Gtk::PACK_EXPAND_WIDGET, 4);
+ pack_start( *hb1, Gtk::PACK_SHRINK, 4);
+
fill = Gtk::manage (new Gtk::CheckButton (M("TP_LENSGEOM_FILL")));
pack_start (*fill);
@@ -39,8 +53,9 @@ LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGE
packBox = Gtk::manage (new ToolParamBlock ());
pack_start (*packBox);
- autoCrop->signal_pressed().connect( sigc::mem_fun(*this, &LensGeometry::autoCropPressed) );
- fillConn = fill->signal_toggled().connect( sigc::mem_fun(*this, &LensGeometry::fillPressed) );
+ method->connect(method->signal_changed().connect(sigc::mem_fun(*this, &LensGeometry::methodChanged)));
+ autoCrop->signal_pressed().connect(sigc::mem_fun(*this, &LensGeometry::autoCropPressed));
+ fillConn = fill->signal_toggled().connect(sigc::mem_fun(*this, &LensGeometry::fillPressed));
fill->set_active (true);
show_all ();
@@ -55,8 +70,14 @@ void LensGeometry::read (const ProcParams* pp, const ParamsEdited* pedited)
{
disableListener ();
+ method->block (true);
+ method->set_active(pp->commonTrans.method == "log" ? 0 : 1);
if (pedited) {
+ if(!pedited->commonTrans.method) {
+ method->set_active_text(M("GENERAL_UNCHANGED"));
+ }
+
fill->set_inconsistent (!pedited->commonTrans.autofill);
}
@@ -67,15 +88,20 @@ void LensGeometry::read (const ProcParams* pp, const ParamsEdited* pedited)
lastFill = pp->commonTrans.autofill;
+ method->block (false);
enableListener ();
}
void LensGeometry::write (ProcParams* pp, ParamsEdited* pedited)
{
-
+ int currentRow = method->get_active_row_number();
+ if( currentRow >= 0 && method->get_active_text() != M("GENERAL_UNCHANGED")) {
+ pp->commonTrans.method = currentRow == 0 ? "log" : "lin";
+ }
pp->commonTrans.autofill = fill->get_active ();
if (pedited) {
+ pedited->commonTrans.method = method->get_active_text() != M("GENERAL_UNCHANGED");
pedited->commonTrans.autofill = !fill->get_inconsistent();
}
}
@@ -115,6 +141,14 @@ void LensGeometry::fillPressed ()
}
}
+void LensGeometry::methodChanged ()
+{
+
+ if (listener && method->get_active_row_number() >= 0) {
+ listener->panelChanged(EvTransMethod, method->get_active_text());
+ }
+}
+
void LensGeometry::setBatchMode (bool batchMode)
{
diff --git a/rtgui/lensgeom.h b/rtgui/lensgeom.h
index 18b31a619..73c28b006 100644
--- a/rtgui/lensgeom.h
+++ b/rtgui/lensgeom.h
@@ -29,6 +29,7 @@ class LensGeometry final :
{
protected:
+ MyComboBoxText* method;
Gtk::Button* autoCrop;
LensGeomListener* rlistener;
Gtk::CheckButton* fill;
@@ -36,6 +37,7 @@ protected:
sigc::connection fillConn;
ToolParamBlock* packBox;
+ rtengine::ProcEvent EvTransMethod;
public:
LensGeometry ();
@@ -50,6 +52,7 @@ public:
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr) override;
void setBatchMode (bool batchMode) override;
+ void methodChanged();
void fillPressed ();
void autoCropPressed ();
void setLensGeomListener (LensGeomListener* l)
diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc
index 82132008a..d41bd472c 100644
--- a/rtgui/paramsedited.cc
+++ b/rtgui/paramsedited.cc
@@ -321,6 +321,7 @@ void ParamsEdited::set(bool v)
coarse.rotate = v;
coarse.hflip = v;
coarse.vflip = v;
+ commonTrans.method = v;
commonTrans.autofill = v;
rotate.degree = v;
distortion.amount = v;
@@ -904,6 +905,7 @@ void ParamsEdited::initFrom(const std::vector&
coarse.rotate = coarse.rotate && p.coarse.rotate == other.coarse.rotate;
coarse.hflip = coarse.hflip && p.coarse.hflip == other.coarse.hflip;
coarse.vflip = coarse.vflip && p.coarse.vflip == other.coarse.vflip;
+ commonTrans.method = commonTrans.method && p.commonTrans.method == other.commonTrans.method;
commonTrans.autofill = commonTrans.autofill && p.commonTrans.autofill == other.commonTrans.autofill;
rotate.degree = rotate.degree && p.rotate.degree == other.rotate.degree;
distortion.amount = distortion.amount && p.distortion.amount == other.distortion.amount;
@@ -2265,6 +2267,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.coarse.vflip = mods.coarse.vflip;
}
+ if (commonTrans.method) {
+ toEdit.commonTrans.method = mods.commonTrans.method;
+ }
+
if (commonTrans.autofill) {
toEdit.commonTrans.autofill = mods.commonTrans.autofill;
}
diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h
index 01a3e4efe..153dd7bb6 100644
--- a/rtgui/paramsedited.h
+++ b/rtgui/paramsedited.h
@@ -365,6 +365,7 @@ struct CoarseTransformParamsEdited {
};
struct CommonTransformParamsEdited {
+ bool method;
bool autofill;
};
diff --git a/rtgui/pdsharpening.cc b/rtgui/pdsharpening.cc
index 18fa7aa2a..8bbf19620 100644
--- a/rtgui/pdsharpening.cc
+++ b/rtgui/pdsharpening.cc
@@ -58,7 +58,7 @@ PdSharpening::PdSharpening() :
pack_start(*hb);
Gtk::VBox* rld = Gtk::manage(new Gtk::VBox());
- dradius = Gtk::manage(new Adjuster(M("TP_SHARPENING_RADIUS"), 0.4, 1.15, 0.01, 0.75));
+ dradius = Gtk::manage(new Adjuster(M("TP_SHARPENING_RADIUS"), 0.4, 2.0, 0.01, 0.75));
dradius->addAutoButton();
dradius->setAutoValue(true);
dradiusOffset = Gtk::manage(new Adjuster(M("TP_SHARPENING_RADIUS_BOOST"), -0.5, 0.5, 0.01, 0.0));
diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc
index 5f75ab413..c611b252d 100644
--- a/rtgui/thumbbrowserbase.cc
+++ b/rtgui/thumbbrowserbase.cc
@@ -87,7 +87,16 @@ void ThumbBrowserBase::scroll (int direction, double deltaX, double deltaY)
}
//GDK_SCROLL_SMOOTH can come in as many events with small deltas, don't quantize these to +/-1.0 so trackpads work well
double coef;
+ double scroll_unit;
+ if (arrangement == TB_Vertical) {
+ scroll_unit = vscroll.get_adjustment()->get_step_increment();
+ } else {
+ scroll_unit = hscroll.get_adjustment()->get_step_increment();
+ }
if(direction == GDK_SCROLL_SMOOTH) {
+#ifdef GDK_WINDOWING_QUARTZ
+ scroll_unit = 1.0;
+#endif
coef = delta;
} else if (direction == GDK_SCROLL_DOWN) {
coef = +1.0;
@@ -99,7 +108,7 @@ void ThumbBrowserBase::scroll (int direction, double deltaX, double deltaY)
if (direction == GDK_SCROLL_UP || direction == GDK_SCROLL_DOWN || direction == GDK_SCROLL_SMOOTH) {
if (arrangement == TB_Vertical) {
double currValue = vscroll.get_value();
- double newValue = rtengine::LIM(currValue + coef * vscroll.get_adjustment()->get_step_increment(),
+ double newValue = rtengine::LIM(currValue + coef * scroll_unit,
vscroll.get_adjustment()->get_lower (),
vscroll.get_adjustment()->get_upper());
if (newValue != currValue) {
@@ -107,7 +116,7 @@ void ThumbBrowserBase::scroll (int direction, double deltaX, double deltaY)
}
} else {
double currValue = hscroll.get_value();
- double newValue = rtengine::LIM(currValue + coef * hscroll.get_adjustment()->get_step_increment(),
+ double newValue = rtengine::LIM(currValue + coef * scroll_unit,
hscroll.get_adjustment()->get_lower(),
hscroll.get_adjustment()->get_upper());
if (newValue != currValue) {
diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh
index 3958326e8..cb8839455 100644
--- a/tools/osx/macosx_bundle.sh
+++ b/tools/osx/macosx_bundle.sh
@@ -92,6 +92,9 @@ GTK_PREFIX: ${GTK_PREFIX}
PWD: ${PWD}
__EOS__
+LOCAL_PREFIX="$(cmake .. -LA -N | grep "LOCAL_PREFIX" | cut -d "=" -f2)"
+EXPATLIB="$(cmake .. -LA -N | grep "pkgcfg_lib_EXPAT_expat" | cut -d "=" -f2)"
+
APP="${PROJECT_NAME}.app"
CONTENTS="${APP}/Contents"
RESOURCES="${CONTENTS}/Resources"
@@ -99,7 +102,7 @@ MACOS="${CONTENTS}/MacOS"
LIB="${CONTENTS}/Frameworks"
ETC="${RESOURCES}/etc"
EXECUTABLE="${MACOS}/rawtherapee"
-GDK_PREFIX="/usr/local/opt/gdk-pixbuf"
+GDK_PREFIX="${LOCAL_PREFIX}/local/opt/gdk-pixbuf"
msg "Removing old files:"
rm -rf "${APP}" "${PROJECT_NAME}_*.dmg" "*zip"
@@ -141,45 +144,46 @@ rm -r "${LIB}"/gdk-pixbuf-2.0
sed -i "" -e "s|${PWD}/RawTherapee.app/Contents/|/Applications/RawTherapee.app/Contents/|" "${ETC}/gtk-3.0/gdk-pixbuf.loaders" "${ETC}/gtk-3.0/gtk.immodules"
mkdir -p ${RESOURCES}/share/glib-2.0
-cp -pRL {"/usr/local","${RESOURCES}"}/share/glib-2.0/schemas
-"/usr/local/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas"
+cp -pRL {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/glib-2.0/schemas
+"${LOCAL_PREFIX}/local/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas"
msg "Copying shared files from ${GTK_PREFIX}:"
-cp -pRL {"/usr/local","${RESOURCES}"}/share/mime
+cp -pRL {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/mime
# GTK3 themes
-ditto {"/usr/local","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css
-ditto {"/usr/local","${RESOURCES}"}/share/themes/Default/gtk-3.0/gtk-keys.css
+ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css
+ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/themes/Default/gtk-3.0/gtk-keys.css
# Adwaita icons
iconfolders=("16x16/actions" "16x16/devices" "16x16/mimetypes" "16x16/places" "16x16/status" "48x48/devices")
for f in "${iconfolders[@]}"; do
mkdir -p ${RESOURCES}/share/icons/Adwaita/${f}
- cp /usr/local/share/icons/Adwaita/${f}/* "${RESOURCES}"/share/icons/Adwaita/${f}
+ cp ${LOCAL_PREFIX}/local/share/icons/Adwaita/${f}/* "${RESOURCES}"/share/icons/Adwaita/${f}
done
-ditto {"/usr/local","${RESOURCES}"}/share/icons/Adwaita/index.theme
-"/usr/local/bin/gtk-update-icon-cache" "${RESOURCES}/share/icons/Adwaita"
+ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/icons/Adwaita/index.theme
+"${LOCAL_PREFIX}/local/bin/gtk-update-icon-cache" "${RESOURCES}/share/icons/Adwaita"
# Copy libjpeg-turbo into the app bundle
-cp /usr/local/lib/libjpeg.*.dylib "${CONTENTS}/Frameworks"
+cp ${LOCAL_PREFIX}/local/lib/libjpeg.*.dylib "${CONTENTS}/Frameworks"
# Copy libexpat into the app bundle (which is keg-only)
-cp /usr/local/Cellar/expat/*/lib/libexpat.1.dylib "${CONTENTS}/Frameworks"
+
+if [[ -d /usr/local/Cellar/expat ]]; then cp /usr/local/Cellar/expat/*/lib/libexpat.1.dylib "${CONTENTS}/Frameworks"; else cp "${EXPATLIB}" "${CONTENTS}/Frameworks"; fi
# Copy libz into the app bundle
cp /usr/lib/libz.1.dylib "${CONTENTS}/Frameworks"
# Copy libtiff into the app bundle
-cp /usr/local/lib/libtiff.5.dylib "${CONTENTS}/Frameworks"
+cp ${LOCAL_PREFIX}/local/lib/libtiff.5.dylib "${CONTENTS}/Frameworks"
# Copy the Lensfun database into the app bundle
mkdir -p "${RESOURCES}/share/lensfun"
-cp /usr/local/share/lensfun/version_2/* "${RESOURCES}/share/lensfun"
+cp ${LOCAL_PREFIX}/local/share/lensfun/version_2/* "${RESOURCES}/share/lensfun"
# Copy liblensfun to Frameworks
-cp /usr/local/lib/liblensfun.2.dylib "${CONTENTS}/Frameworks"
+cp ${LOCAL_PREFIX}/local/lib/liblensfun.2.dylib "${CONTENTS}/Frameworks"
# Copy libomp to Frameworks
-cp /usr/local/lib/libomp.dylib "${CONTENTS}/Frameworks"
+cp ${LOCAL_PREFIX}/local/lib/libomp.dylib "${CONTENTS}/Frameworks"
# Install names
find -E "${CONTENTS}" -type f -regex '.*/(rawtherapee-cli|rawtherapee|.*\.(dylib|so))' | while read -r x; do