diff --git a/AUTHORS.txt b/AUTHORS.txt
index 160869776..227390faa 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -39,6 +39,7 @@ Development contributors, in last name alphabetical order:
Other contributors (profiles, ideas, mockups, testing, forum activity, translations, etc.), in last name alphabetical order:
Marcin Bajor
+ Javier Bartol
Thorsten Bartolomäus
Patrik Brunner
Fernando Carello
diff --git a/rtdata/dcpprofiles/Panasonic DMC-GX7.dcp b/rtdata/dcpprofiles/Panasonic DMC-GX7.dcp
new file mode 100644
index 000000000..25f4e6eab
Binary files /dev/null and b/rtdata/dcpprofiles/Panasonic DMC-GX7.dcp differ
diff --git a/rtdata/dcpprofiles/RICOH GR III.dcp b/rtdata/dcpprofiles/RICOH GR III.dcp
new file mode 100644
index 000000000..f226e62b4
Binary files /dev/null and b/rtdata/dcpprofiles/RICOH GR III.dcp differ
diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala
index 407348417..a2d8012cd 100644
--- a/rtdata/languages/Catala
+++ b/rtdata/languages/Catala
@@ -1293,6 +1293,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: -
!HISTORY_MSG_491;White Balance
!HISTORY_MSG_492;RGB Curves
!HISTORY_MSG_493;L*a*b* Adjustments
+!HISTORY_MSG_494;Capture Sharpening
!HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
!HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
!HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@@ -1310,6 +1311,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: -
!HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope
!HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth
!HISTORY_MSG_DEHAZE_ENABLED;Haze Removal
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;Dehaze - Show depth map
!HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength
!HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold
@@ -1330,6 +1332,13 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: -
!HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
!HISTORY_MSG_METADATA_MODE;Metadata copy mode
!HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
!HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
!HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
@@ -1340,6 +1349,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: -
!HISTORY_MSG_RESIZE_ALLOWUPSCALING;Resize - Allow upscaling
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
@@ -1786,6 +1796,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: -
!TP_CROP_SELECTCROP;Select
!TP_DEHAZE_DEPTH;Depth
!TP_DEHAZE_LABEL;Haze Removal
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_DEHAZE_SHOW_DEPTH_MAP;Show depth map
!TP_DEHAZE_STRENGTH;Strength
!TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto multi-zones
@@ -1856,9 +1867,9 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: -
!TP_EXPOS_WHITEPOINT_LABEL;Raw White Points
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_FILMSIMULATION_LABEL;Film Simulation
!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now?
@@ -1935,6 +1946,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: -
!TP_PCVIGNETTE_ROUNDNESS_TOOLTIP;Roundness:\n0 = rectangle,\n50 = fitted ellipse,\n100 = circle.
!TP_PCVIGNETTE_STRENGTH;Strength
!TP_PCVIGNETTE_STRENGTH_TOOLTIP;Filter strength in stops (reached in corners).
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_PFCURVE_CURVEEDITOR_CH;Hue
!TP_PFCURVE_CURVEEDITOR_CH_TOOLTIP;Controls defringe strength by color.\nHigher = more,\nLower = less.
!TP_PREPROCESS_DEADPIXFILT;Dead pixel filter
@@ -2110,6 +2122,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: -
!TP_SAVEDIALOG_OK_TIP;Shortcut: Ctrl-Enter
!TP_SHARPENING_BLUR;Blur radius
!TP_SHARPENING_CONTRAST;Contrast threshold
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
!TP_SHARPENMICRO_CONTRAST;Contrast threshold
!TP_SOFTLIGHT_LABEL;Soft Light
!TP_SOFTLIGHT_STRENGTH;Strength
diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified)
index b93aed7af..556f609ea 100644
--- a/rtdata/languages/Chinese (Simplified)
+++ b/rtdata/languages/Chinese (Simplified)
@@ -1340,6 +1340,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: -
!HISTORY_MSG_491;White Balance
!HISTORY_MSG_492;RGB Curves
!HISTORY_MSG_493;L*a*b* Adjustments
+!HISTORY_MSG_494;Capture Sharpening
!HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
!HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
!HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@@ -1357,6 +1358,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: -
!HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope
!HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth
!HISTORY_MSG_DEHAZE_ENABLED;Haze Removal
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;Dehaze - Show depth map
!HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength
!HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold
@@ -1377,6 +1379,13 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: -
!HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
!HISTORY_MSG_METADATA_MODE;Metadata copy mode
!HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
!HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
!HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
@@ -1387,6 +1396,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: -
!HISTORY_MSG_RESIZE_ALLOWUPSCALING;Resize - Allow upscaling
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
@@ -1732,6 +1742,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: -
!TP_DEFRINGE_THRESHOLD;Threshold
!TP_DEHAZE_DEPTH;Depth
!TP_DEHAZE_LABEL;Haze Removal
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_DEHAZE_SHOW_DEPTH_MAP;Show depth map
!TP_DEHAZE_STRENGTH;Strength
!TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto multi-zones
@@ -1803,9 +1814,9 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: -
!TP_EXPOS_WHITEPOINT_LABEL;Raw White Points
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_FILMSIMULATION_LABEL;Film Simulation
!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now?
@@ -1896,6 +1907,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: -
!TP_NEUTRAL_TIP;Resets exposure sliders to neutral values.\nApplies to the same controls that Auto Levels applies to, regardless of whether you used Auto Levels or not.
!TP_PCVIGNETTE_FEATHER_TOOLTIP;Feathering:\n0 = corners only,\n50 = halfway to center,\n100 = to center.
!TP_PCVIGNETTE_ROUNDNESS_TOOLTIP;Roundness:\n0 = rectangle,\n50 = fitted ellipse,\n100 = circle.
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_PFCURVE_CURVEEDITOR_CH;Hue
!TP_PFCURVE_CURVEEDITOR_CH_TOOLTIP;Controls defringe strength by color.\nHigher = more,\nLower = less.
!TP_PREPROCESS_DEADPIXFILT;Dead pixel filter
@@ -2078,6 +2090,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: -
!TP_RETINEX_VIEW_UNSHARP;Unsharp mask
!TP_SHARPENING_BLUR;Blur radius
!TP_SHARPENING_CONTRAST;Contrast threshold
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
!TP_SHARPENMICRO_CONTRAST;Contrast threshold
!TP_SHARPENMICRO_LABEL;Microcontrast
!TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5
diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech
index d0b4d89f3..af9ae0c88 100644
--- a/rtdata/languages/Czech
+++ b/rtdata/languages/Czech
@@ -961,8 +961,8 @@ MAIN_TOOLTIP_BACKCOLOR2;Barva pozadí náhledu: bílá\nZkratka: 9
MAIN_TOOLTIP_BACKCOLOR3;Barva pozadí náhledu: středně šedá\nZkratka: 9
MAIN_TOOLTIP_BEFOREAFTERLOCK;Zamknout / Odemknout pohled Před\n\nZamknout: ponechá pohled Před nezměněn.\nUžitečné pro posouzení výsledného efektu po použití více nástrojů.\nNavíc může být porovnání provedeno proti kterémukoli stavu v historii.\n\nOdemknout: pohled Před bude následovat pohled Poté, vždy jen o jeden krok zpět, představí vliv právě použitého nástroje.
MAIN_TOOLTIP_HIDEHP;Zobrazit či schovat levý panel (obsahující historii).\nZkratka: l
-MAIN_TOOLTIP_INDCLIPPEDH;Zvýraznit oříznutá světla.\nZkratka: <
-MAIN_TOOLTIP_INDCLIPPEDS;Zvýraznit oříznuté stíny.\nZkratka: >
+MAIN_TOOLTIP_INDCLIPPEDH;Zvýraznit oříznutá světla.\nZkratka: >
+MAIN_TOOLTIP_INDCLIPPEDS;Zvýraznit oříznuté stíny.\nZkratka: <
MAIN_TOOLTIP_PREVIEWB;Náhled modrého kanálu.\nZkratka: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Náhled masky zaostření.\nZkratka: Shift-f\n\nVíce přesné u snímků s nízkou hloubkou ostrosti, nízkým šumem a na vyšších úrovních zvětšení.\n\nPoužijte přiblížení v rozsahu 10 až 30% pro zlepšení přesnosti detekce u zašuměných snímků.
MAIN_TOOLTIP_PREVIEWG;Náhled zeleného kanálu.\nZkratka: g
@@ -2323,13 +2323,27 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: -
!FILEBROWSER_POPUPREMOVE;Delete permanently
!FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version
!FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash.
+!HISTORY_MSG_494;Capture Sharpening
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative
!HISTORY_MSG_FILMNEGATIVE_VALUES;Film negative values
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!PARTIALPASTE_FILMNEGATIVE;Film Negative
!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
+!TP_PDSHARPENING_LABEL;Capture Sharpening
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch
index 57236e1e6..0ee886945 100644
--- a/rtdata/languages/Deutsch
+++ b/rtdata/languages/Deutsch
@@ -82,6 +82,7 @@
#81 15.04.2019 Erweiterung (TooWaBoo) RT 5.6
#82 25.05.2019 Erweiterung (TooWaBoo) RT 5.6
#83 06.07.2019 Erweiterung (TooWaBoo) RT 5.6
+#84 06.10.2019 Erweiterung (TooWaBoo) RT 5.7
#84 18.07.2019 Erweiterung (TooWaBoo) RT 5.6
ABOUT_TAB_BUILD;Version
@@ -808,6 +809,7 @@ HISTORY_MSG_490;(Dynamikkompression)\nIntensität
HISTORY_MSG_491;(Weißabgleich)
HISTORY_MSG_492;(RGB-Kurven)
HISTORY_MSG_493;(L*a*b*)
+HISTORY_MSG_494;(Eingangsschärfung)
HISTORY_MSG_CLAMPOOG;(Belichtung) - Farben\nauf Farbraum beschränken
HISTORY_MSG_COLORTONING_LABGRID_VALUE;(Farbanpassungen)\nL*a*b*-Farbkorrektur
HISTORY_MSG_COLORTONING_LABREGION_AB;(Farbanpassungen)\nL*a*b*-Farbkorrektur\nBereich
@@ -825,6 +827,7 @@ HISTORY_MSG_COLORTONING_LABREGION_SHOWMASK;(Farbanpassungen)\nL*a*b*-Farbkorrekt
HISTORY_MSG_COLORTONING_LABREGION_SLOPE;(Farbanpassungen)\nL*a*b*-Farbkorrektur\nBereich - Steigung
HISTORY_MSG_DEHAZE_DEPTH;(Bildschleier entfernen)\nTiefe
HISTORY_MSG_DEHAZE_ENABLED;(Bildschleier entfernen)
+HISTORY_MSG_DEHAZE_LUMINANCE;(Bildschleier entfernen)\nNur Luminanz
HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;(Bildschleier entfernen)\nMaske anzeigen
HISTORY_MSG_DEHAZE_STRENGTH;(Bildschleier entfernen)\nIntensität
HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;(Sensor—Matrix)\nFarbinterpolation\nAuto-Kontrastschwelle
@@ -845,6 +848,13 @@ HISTORY_MSG_LOCALCONTRAST_LIGHTNESS;(Lokaler Kontrast)\nHelle Bereiche
HISTORY_MSG_LOCALCONTRAST_RADIUS;(Lokaler Kontrast)\nRadius
HISTORY_MSG_METADATA_MODE;(Metadaten)\nKopiermodus
HISTORY_MSG_MICROCONTRAST_CONTRAST;(Mikrokontrast)\nKontrastschwelle
+HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;(Eingangsschärfung)\nAuto-Schwelle
+HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;(Eingangsschärfung)\nAuto-Radius
+HISTORY_MSG_PDSHARPEN_CONTRAST;(Eingangsschärfung)\nKontrastschwelle
+HISTORY_MSG_PDSHARPEN_GAMMA;(Eingangsschärfung)\nGamma
+HISTORY_MSG_PDSHARPEN_ITERATIONS;(Eingangsschärfung)\nIterationen
+HISTORY_MSG_PDSHARPEN_RADIUS;(Eingangsschärfung)\nRadius
+HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;(Eingangsschärfung)\nRandschärfe erhöhen
HISTORY_MSG_PIXELSHIFT_DEMOSAIC;(Sensor-Matrix)\nFarbinterpolation - PS\nBewegungsmethode
HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;(Sensor-Matrix)\nVorverarbeitung\nRichtung
HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;(Sensor-Matrix)\nVorverarbeitung\nPDAF-Zeilenfilter
@@ -855,6 +865,7 @@ HISTORY_MSG_RAW_BORDER;(Sensor-Matrix)\nFarbinterpolation\nBildrand
HISTORY_MSG_RESIZE_ALLOWUPSCALING;(Skalieren)\nHochskalieren zulassen
HISTORY_MSG_SHARPENING_BLUR;(Schärfung)\nWeichzeichnerradius
HISTORY_MSG_SHARPENING_CONTRAST;(Schärfung)\nKontrastschwelle
+HISTORY_MSG_SHARPENING_GAMMA;(Schärfung) - Gamma
HISTORY_MSG_SH_COLORSPACE;Farbraum
HISTORY_MSG_SOFTLIGHT_ENABLED;(Weiches Licht)
HISTORY_MSG_SOFTLIGHT_STRENGTH;(Weiches Licht)\nIntensität
@@ -1011,8 +1022,8 @@ MAIN_TOOLTIP_BACKCOLOR2;Hintergrundfarbe der Vorschau: Weiß\nTaste: 9
MAIN_TOOLTIP_BACKCOLOR3;Hintergrundfarbe der Vorschau: Mittleres Grau\nTaste: 9
MAIN_TOOLTIP_BEFOREAFTERLOCK;Vorher-Ansicht: Sperren / Entsperren\n\nGesperrt: Friert die Vorher-Ansicht ein, so\ndass sich die Gesamtwirkung mehrerer\nBearbeitungsschritte beurteilen lässt.\n\nEntsperrt: Die Vorher-Ansicht hinkt dem\naktuellen Bild immer einen Bearbeitungs-\nschritt hinterher.
MAIN_TOOLTIP_HIDEHP;Linkes Bedienfeld ein-/ausblenden.\nTaste: l
-MAIN_TOOLTIP_INDCLIPPEDH;Anzeige zu heller Bereiche ein-/ausschalten.\nTaste: <
-MAIN_TOOLTIP_INDCLIPPEDS;Anzeige zu dunkler Bereiche ein-/ausschalten.\nTaste: >
+MAIN_TOOLTIP_INDCLIPPEDH;Anzeige zu heller Bereiche ein-/ausschalten.\nTaste: >
+MAIN_TOOLTIP_INDCLIPPEDS;Anzeige zu dunkler Bereiche ein-/ausschalten.\nTaste: <
MAIN_TOOLTIP_PREVIEWB;Vorschau Blau-Kanal\nTaste: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Vorschau Fokusmaske\nTaste: Umschalt + f\n\nPräziser bei Bildern mit geringer Tiefenschärfe,\nniedrigem Rauschen und bei hoher Vergrößerung.
MAIN_TOOLTIP_PREVIEWG;Vorschau Grün-Kanal\nTaste: g
@@ -1613,6 +1624,7 @@ TP_DEFRINGE_RADIUS;Radius
TP_DEFRINGE_THRESHOLD;Schwelle
TP_DEHAZE_DEPTH;Tiefe
TP_DEHAZE_LABEL;Bildschleier entfernen
+TP_DEHAZE_LUMINANCE;Nur Luminanz
TP_DEHAZE_SHOW_DEPTH_MAP;Maske anzeigen
TP_DEHAZE_STRENGTH;Intensität
TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto-Multizonen
@@ -1723,9 +1735,9 @@ TP_EXPOS_BLACKPOINT_LABEL;Schwarzpunkt
TP_EXPOS_WHITEPOINT_LABEL;Weißpunkt
TP_FILMNEGATIVE_BLUE;Blauverhältnis
TP_FILMNEGATIVE_GREEN;Bezugsexponent (Kontrast)
-TP_FILMNEGATIVE_GUESS_TOOLTIP;Berechnet die Exponenten durch Auswahl zweier neutraler\nReferenzpunkte im Bild. Weiß (Hellgrau) und Schwarz (Dunkelgrau).\nDie Reihenfolge spielt keine Rolle. Die Exponenten werden aktualisiert,\nnachdem der zweite Punkt ausgewählt wurde.
+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;Filmnegativ
-TP_FILMNEGATIVE_PICK;Weißen und schwarzen Bereich auswählen
+TP_FILMNEGATIVE_PICK;Pick neutral spots
TP_FILMNEGATIVE_RED;Rotverhältnis
TP_FILMSIMULATION_LABEL;Filmsimulation
TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee sucht nach Hald-CLUT-Bildern, die für die Filmsimulation benötigt werden, in einem Ordner, der viel Zeit benötigt.\nGehen Sie zu\n< Einstellungen > Bildbearbeitung > Filmsimulation >\nund prüfen Sie welcher Order benutzt wird. Wählen Sie den Ordner aus, der nur die Hald-CLUT-Bilder beinhaltet, oder einen leeren Ordner, wenn Sie die Filsimulation nicht verwenden möchten.\n\nWeitere Informationen über die Filmsimulation finden Sie auf RawPedia.\n\nMöchten Sie die Suche beenden?
@@ -1875,6 +1887,7 @@ TP_PCVIGNETTE_ROUNDNESS;Form
TP_PCVIGNETTE_ROUNDNESS_TOOLTIP;Form:\n0 = Rechteck\n50 = Ellipse\n100 = Kreis
TP_PCVIGNETTE_STRENGTH;Intensität
TP_PCVIGNETTE_STRENGTH_TOOLTIP;Filterstärke in Blendenstufen (bezogen auf die Bildecken).
+TP_PDSHARPENING_LABEL;Eingangsschärfung
TP_PERSPECTIVE_HORIZONTAL;Horizontal
TP_PERSPECTIVE_LABEL;Perspektive
TP_PERSPECTIVE_VERTICAL;Vertikal
@@ -2104,12 +2117,14 @@ TP_SHARPENING_BLUR;Weichzeichnerradius
TP_SHARPENING_CONTRAST;Kontrastschwelle
TP_SHARPENING_EDRADIUS;Radius
TP_SHARPENING_EDTOLERANCE;Kantentoleranz
+TP_SHARPENING_GAMMA;Gamma
TP_SHARPENING_HALOCONTROL;Halokontrolle
TP_SHARPENING_HCAMOUNT;Intensität
TP_SHARPENING_LABEL;Schärfung
TP_SHARPENING_METHOD;Methode
TP_SHARPENING_ONLYEDGES;Nur Kanten schärfen
TP_SHARPENING_RADIUS;Radius
+TP_SHARPENING_RADIUS_BOOST;Randschärfe erhöhen
TP_SHARPENING_RLD;RL-Dekonvolution
TP_SHARPENING_RLD_AMOUNT;Intensität
TP_SHARPENING_RLD_DAMPING;Dämpfung
diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK)
index c6b521c12..6c1398a16 100644
--- a/rtdata/languages/English (UK)
+++ b/rtdata/languages/English (UK)
@@ -88,6 +88,7 @@ TP_DIRPYREQUALIZER_ALGO;Skin Colour Range
TP_DIRPYREQUALIZER_ALGO_TOOLTIP;Fine: closer to the colours of the skin, minimizing the action on other colours\nLarge: avoid more artifacts.
TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colours (hue, chroma, luma) and the rest of the image.
TP_EXPOSURE_CLAMPOOG;Clip out-of-gamut colours
+TP_FILMNEGATIVE_GUESS_TOOLTIP;Automatically set the red and blue ratios by picking two patches which had a neutral hue (no colour) in the original scene. The patches should differ in brightness. Set the white balance afterwards.
TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to colour cast.
TP_GRADIENT_CENTER;Centre
TP_GRADIENT_CENTER_X;Centre X
@@ -820,6 +821,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!HISTORY_MSG_491;White Balance
!HISTORY_MSG_492;RGB Curves
!HISTORY_MSG_493;L*a*b* Adjustments
+!HISTORY_MSG_494;Capture Sharpening
!HISTORY_MSG_COLORTONING_LABREGION_CHANNEL;CT - Channel
!HISTORY_MSG_COLORTONING_LABREGION_CHROMATICITYMASK;CT - region C mask
!HISTORY_MSG_COLORTONING_LABREGION_HUEMASK;CT - H mask
@@ -834,6 +836,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope
!HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth
!HISTORY_MSG_DEHAZE_ENABLED;Haze Removal
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;Dehaze - Show depth map
!HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength
!HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold
@@ -854,6 +857,13 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
!HISTORY_MSG_METADATA_MODE;Metadata copy mode
!HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
!HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
!HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
@@ -863,6 +873,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!HISTORY_MSG_RESIZE_ALLOWUPSCALING;Resize - Allow upscaling
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
!HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
@@ -1012,8 +1023,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!MAIN_TAB_TRANSFORM_TOOLTIP;Shortcut: Alt-t
!MAIN_TOOLTIP_BEFOREAFTERLOCK;Lock / Unlock the Before view\n\nLock: keep the Before view unchanged.\nUseful to evaluate the cumulative effect of multiple tools.\nAdditionally, comparisons can be made to any state in the History.\n\nUnlock: the Before view will follow the After view one step behind, showing the image before the effect of the currently used tool.
!MAIN_TOOLTIP_HIDEHP;Show/Hide the left panel (including the history).\nShortcut: l
-!MAIN_TOOLTIP_INDCLIPPEDH;Clipped highlight indication.\nShortcut: <
-!MAIN_TOOLTIP_INDCLIPPEDS;Clipped shadow indication.\nShortcut: >
+!MAIN_TOOLTIP_INDCLIPPEDH;Clipped highlight indication.\nShortcut: >
+!MAIN_TOOLTIP_INDCLIPPEDS;Clipped shadow indication.\nShortcut: <
!MAIN_TOOLTIP_PREVIEWB;Preview the blue channel.\nShortcut: b
!MAIN_TOOLTIP_PREVIEWFOCUSMASK;Preview the focus mask.\nShortcut: Shift-f\n\nMore accurate on images with shallow depth of field, low noise and at higher zoom levels.\nZoom out to 10-30% to improve detection accuracy on noisy images.
!MAIN_TOOLTIP_PREVIEWG;Preview the green channel.\nShortcut: g
@@ -1568,6 +1579,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!TP_DEFRINGE_THRESHOLD;Threshold
!TP_DEHAZE_DEPTH;Depth
!TP_DEHAZE_LABEL;Haze Removal
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_DEHAZE_SHOW_DEPTH_MAP;Show depth map
!TP_DEHAZE_STRENGTH;Strength
!TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto multi-zones
@@ -1670,9 +1682,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!TP_EXPOS_WHITEPOINT_LABEL;Raw White Points
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
!TP_FILMNEGATIVE_LABEL;Film Negative
-!TP_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_FILMSIMULATION_LABEL;Film Simulation
!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now?
@@ -1808,6 +1819,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!TP_PCVIGNETTE_ROUNDNESS_TOOLTIP;Roundness:\n0 = rectangle,\n50 = fitted ellipse,\n100 = circle.
!TP_PCVIGNETTE_STRENGTH;Strength
!TP_PCVIGNETTE_STRENGTH_TOOLTIP;Filter strength in stops (reached in corners).
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_PERSPECTIVE_HORIZONTAL;Horizontal
!TP_PERSPECTIVE_LABEL;Perspective
!TP_PERSPECTIVE_VERTICAL;Vertical
@@ -2031,12 +2043,14 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!TP_SHARPENING_CONTRAST;Contrast threshold
!TP_SHARPENING_EDRADIUS;Radius
!TP_SHARPENING_EDTOLERANCE;Edge tolerance
+!TP_SHARPENING_GAMMA;Gamma
!TP_SHARPENING_HALOCONTROL;Halo control
!TP_SHARPENING_HCAMOUNT;Amount
!TP_SHARPENING_LABEL;Sharpening
!TP_SHARPENING_METHOD;Method
!TP_SHARPENING_ONLYEDGES;Sharpen only edges
!TP_SHARPENING_RADIUS;Radius
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
!TP_SHARPENING_RLD;RL Deconvolution
!TP_SHARPENING_RLD_AMOUNT;Amount
!TP_SHARPENING_RLD_DAMPING;Damping
diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US)
index 9b8eda038..6aeae1a45 100644
--- a/rtdata/languages/English (US)
+++ b/rtdata/languages/English (US)
@@ -727,6 +727,7 @@
!HISTORY_MSG_491;White Balance
!HISTORY_MSG_492;RGB Curves
!HISTORY_MSG_493;L*a*b* Adjustments
+!HISTORY_MSG_494;Capture Sharpening
!HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
!HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
!HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@@ -744,6 +745,7 @@
!HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope
!HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth
!HISTORY_MSG_DEHAZE_ENABLED;Haze Removal
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;Dehaze - Show depth map
!HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength
!HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold
@@ -764,6 +766,13 @@
!HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
!HISTORY_MSG_METADATA_MODE;Metadata copy mode
!HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
!HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
!HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
@@ -774,6 +783,7 @@
!HISTORY_MSG_RESIZE_ALLOWUPSCALING;Resize - Allow upscaling
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
@@ -929,8 +939,8 @@
!MAIN_TOOLTIP_BACKCOLOR3;Background color of the preview: middle grey\nShortcut: 9
!MAIN_TOOLTIP_BEFOREAFTERLOCK;Lock / Unlock the Before view\n\nLock: keep the Before view unchanged.\nUseful to evaluate the cumulative effect of multiple tools.\nAdditionally, comparisons can be made to any state in the History.\n\nUnlock: the Before view will follow the After view one step behind, showing the image before the effect of the currently used tool.
!MAIN_TOOLTIP_HIDEHP;Show/Hide the left panel (including the history).\nShortcut: l
-!MAIN_TOOLTIP_INDCLIPPEDH;Clipped highlight indication.\nShortcut: <
-!MAIN_TOOLTIP_INDCLIPPEDS;Clipped shadow indication.\nShortcut: >
+!MAIN_TOOLTIP_INDCLIPPEDH;Clipped highlight indication.\nShortcut: >
+!MAIN_TOOLTIP_INDCLIPPEDS;Clipped shadow indication.\nShortcut: <
!MAIN_TOOLTIP_PREVIEWB;Preview the blue channel.\nShortcut: b
!MAIN_TOOLTIP_PREVIEWFOCUSMASK;Preview the focus mask.\nShortcut: Shift-f\n\nMore accurate on images with shallow depth of field, low noise and at higher zoom levels.\nZoom out to 10-30% to improve detection accuracy on noisy images.
!MAIN_TOOLTIP_PREVIEWG;Preview the green channel.\nShortcut: g
@@ -1531,6 +1541,7 @@
!TP_DEFRINGE_THRESHOLD;Threshold
!TP_DEHAZE_DEPTH;Depth
!TP_DEHAZE_LABEL;Haze Removal
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_DEHAZE_SHOW_DEPTH_MAP;Show depth map
!TP_DEHAZE_STRENGTH;Strength
!TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto multi-zones
@@ -1641,9 +1652,9 @@
!TP_EXPOS_WHITEPOINT_LABEL;Raw White Points
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_FILMSIMULATION_LABEL;Film Simulation
!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now?
@@ -1793,6 +1804,7 @@
!TP_PCVIGNETTE_ROUNDNESS_TOOLTIP;Roundness:\n0 = rectangle,\n50 = fitted ellipse,\n100 = circle.
!TP_PCVIGNETTE_STRENGTH;Strength
!TP_PCVIGNETTE_STRENGTH_TOOLTIP;Filter strength in stops (reached in corners).
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_PERSPECTIVE_HORIZONTAL;Horizontal
!TP_PERSPECTIVE_LABEL;Perspective
!TP_PERSPECTIVE_VERTICAL;Vertical
@@ -2021,12 +2033,14 @@
!TP_SHARPENING_CONTRAST;Contrast threshold
!TP_SHARPENING_EDRADIUS;Radius
!TP_SHARPENING_EDTOLERANCE;Edge tolerance
+!TP_SHARPENING_GAMMA;Gamma
!TP_SHARPENING_HALOCONTROL;Halo control
!TP_SHARPENING_HCAMOUNT;Amount
!TP_SHARPENING_LABEL;Sharpening
!TP_SHARPENING_METHOD;Method
!TP_SHARPENING_ONLYEDGES;Sharpen only edges
!TP_SHARPENING_RADIUS;Radius
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
!TP_SHARPENING_RLD;RL Deconvolution
!TP_SHARPENING_RLD_AMOUNT;Amount
!TP_SHARPENING_RLD_DAMPING;Damping
diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol
index 1e3b84371..211f968e2 100644
--- a/rtdata/languages/Espanol
+++ b/rtdata/languages/Espanol
@@ -979,8 +979,8 @@ MAIN_TOOLTIP_BACKCOLOR2;Color de fondo de la previsualización: Blanco\nT
MAIN_TOOLTIP_BACKCOLOR3;Color de fondo de la vista previa: Medio gris \nMétodo rápido: 9
MAIN_TOOLTIP_BEFOREAFTERLOCK;Bloquear / Desbloquear la vista Antes\n\nBloquear: la vista Antes permanece inalterada - \nútil para evaluar el efecto acumulativo de varias herramientas.\nAdemás, se puede hacer una comparación con cualquier estado en el Historial\n\nDesbloquear: la vista Antes seguirá a la vista Después un paso por detrás, mostrando la imagen antes del efecto de la herramienta que se está usando
MAIN_TOOLTIP_HIDEHP;Mostrar/Ocultar panel izquierdo (incluyendo historial).\nTecla de Atajo: i
-MAIN_TOOLTIP_INDCLIPPEDH;Indicación de luces altas recortadas.\nTecla de Atajo: <
-MAIN_TOOLTIP_INDCLIPPEDS;Indicación de sombras recortadas.\nTecla de Atajo: >
+MAIN_TOOLTIP_INDCLIPPEDH;Indicación de luces altas recortadas.\nTecla de Atajo: >
+MAIN_TOOLTIP_INDCLIPPEDS;Indicación de sombras recortadas.\nTecla de Atajo: <
MAIN_TOOLTIP_PREVIEWB;Previsualización Canal azul.\nTecla de Atajo: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Previsualización Máscara de Foco.\nTecla de Atajo: Shift-F\n\nMás preciso en imágenes con poca profundidad de campo, bajo ruido y a mayores niveles de aumento\n\nPara mejorar la precisión en imágenes con ruido evalúe usando menor aumento (10%-30%)\n\nLa vista previa es realizada más lentamente cuando la Máscara de Foco esta activa.
MAIN_TOOLTIP_PREVIEWG;Previsualización Canal verde.\nTecla de Atajo: g
@@ -2321,9 +2321,19 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nTecla de Atajo: -
!FILEBROWSER_POPUPREMOVE;Delete permanently
!FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version
!FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash.
+!HISTORY_MSG_494;Capture Sharpening
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative
!HISTORY_MSG_FILMNEGATIVE_VALUES;Film negative values
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!MAIN_FRAME_PLACES_DEL;Remove
!MAIN_TAB_FAVORITES;Favorites
!MAIN_TAB_FAVORITES_TOOLTIP;Shortcut: Alt-u
@@ -2345,18 +2355,22 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nTecla de Atajo: -
!PROGRESSBAR_RAWCACORR;Raw CA correction...
!QUEUE_LOCATION_TITLE;Output Location
!TP_CROP_PPI;PPI
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
!TP_LENSPROFILE_MODE_HEADER;Lens Profile
!TP_LENSPROFILE_USE_GEOMETRIC;Geometric distortion
!TP_LENSPROFILE_USE_HEADER;Correct
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_RAW_IMAGENUM_SN;SN mode
!TP_RAW_XTRANS;X-Trans
!TP_RAW_XTRANSFAST;Fast X-Trans
!TP_SHARPENING_BLUR;Blur radius
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais
index 082cff1f1..82ef3fcd2 100644
--- a/rtdata/languages/Francais
+++ b/rtdata/languages/Francais
@@ -916,8 +916,8 @@ MAIN_TOOLTIP_BACKCOLOR2;Couleur de fond de l'aperçu: Blanc\nRaccourci: <
MAIN_TOOLTIP_BACKCOLOR3;Couleur de fond de l'aperçu: Gris moyen\nRaccourci : 9
MAIN_TOOLTIP_BEFOREAFTERLOCK;Vérouille / déverouille la vue Avant\n\nVérouille: garde la vue Avant inchangée - \nutile pour évaluer l'effet cumulatif de plusieurs outils.\nDe plus, une comparaison peut être faite à partir de n'importe quelle étape de l'historique\n\nDéverouille: la vue Avant représentera l'étape précédant la vue Après, montrant l'effet qui vient d'être modifié
MAIN_TOOLTIP_HIDEHP;Montrer/cacher le panneau gauche (incluant l'historique)\nRaccourci: l
-MAIN_TOOLTIP_INDCLIPPEDH;Indication hautes lumières hors domaine\nRaccourci: <
-MAIN_TOOLTIP_INDCLIPPEDS;Indication ombres hors domaine\nRaccourci: >
+MAIN_TOOLTIP_INDCLIPPEDH;Indication hautes lumières hors domaine\nRaccourci: >
+MAIN_TOOLTIP_INDCLIPPEDS;Indication ombres hors domaine\nRaccourci: <
MAIN_TOOLTIP_PREVIEWB;Affichage du canal Bleu\nRaccourci: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Affichage du Masque du focus\nRaccourci: Shift-f\n\nPlus précis sur les images avec une faible profondeur de champ, à faible bruit et à des niveaux de zoom élevé\n\nPour améliorer la précision de détection des images bruitées, évaluez les à un facteur de zoom de 10-30%\n\nLa prévisualisation met plus de temps à se calculer lorsque cet outil est actif.
MAIN_TOOLTIP_PREVIEWG;Affichage du canal Vert\nRaccourci: g
@@ -2266,8 +2266,18 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: -
!FILEBROWSER_POPUPREMOVE;Delete permanently
!FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version
!FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash.
+!HISTORY_MSG_494;Capture Sharpening
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative
!HISTORY_MSG_FILMNEGATIVE_VALUES;Film negative values
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!MAIN_FRAME_PLACES_DEL;Remove
!PARTIALPASTE_FILMNEGATIVE;Film Negative
!PROGRESSBAR_DECODING;Decoding...
@@ -2278,16 +2288,20 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: -
!PROGRESSBAR_RAWCACORR;Raw CA correction...
!QUEUE_LOCATION_TITLE;Output Location
!TP_CROP_PPI;PPI
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
!TP_LENSPROFILE_MODE_HEADER;Lens Profile
!TP_LENSPROFILE_USE_GEOMETRIC;Geometric distortion
!TP_LENSPROFILE_USE_HEADER;Correct
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_RAW_XTRANS;X-Trans
!TP_RAW_XTRANSFAST;Fast X-Trans
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano
index f11423d7a..4649aea62 100644
--- a/rtdata/languages/Italiano
+++ b/rtdata/languages/Italiano
@@ -519,8 +519,8 @@ MAIN_TOOLTIP_BACKCOLOR1;Colore di sfondo dell'anteprima: Nero\nScorciatoi
MAIN_TOOLTIP_BACKCOLOR2;Colore di sfondo dell'anteprima: Bianco\nScorciatoia: 9
MAIN_TOOLTIP_BEFOREAFTERLOCK;Blocca/Sblocca la vista Prima\n\nBlocca: Conserva la vista Prima.\nUtile per valutare l'effetto cumulativo di diversi strumenti.\nIn più, possono essere confrontati diversi passi della cronologia.\n\nSblocca: la vista Prima segue di un passo la vista Dopo, mostrando l'immagine prima dell'effetto dello strumento corrente.
MAIN_TOOLTIP_HIDEHP;Mostra/Nascondi il pannello sinistro (inclusa la cronologia)\nScorciatoia: l
-MAIN_TOOLTIP_INDCLIPPEDH;Indicazione delle alteluci tosate.\nScorciatoia: <
-MAIN_TOOLTIP_INDCLIPPEDS;Indicazione delle ombre tosate.\nScorciatoia: >
+MAIN_TOOLTIP_INDCLIPPEDH;Indicazione delle alteluci tosate.\nScorciatoia: >
+MAIN_TOOLTIP_INDCLIPPEDS;Indicazione delle ombre tosate.\nScorciatoia: <
MAIN_TOOLTIP_PREVIEWB;Anteprima del Canale Blu.\nScorciatoia: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Anteprima della Focus Mask.\nScorciatoia: Maiuscolo-F\n\nPiù accurato su immagini con bassa profondità di campo, poco rumore e ad elevati livelli di zoom.\n\nPer aumentare l'accuratezza della rilevazione su immagini con molto rumore, riduci le dimensioni del 10-30%.
MAIN_TOOLTIP_PREVIEWG;Anteprima del Canale Verde.\nScorciatoia: g
@@ -1518,6 +1518,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: -
!HISTORY_MSG_491;White Balance
!HISTORY_MSG_492;RGB Curves
!HISTORY_MSG_493;L*a*b* Adjustments
+!HISTORY_MSG_494;Capture Sharpening
!HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
!HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
!HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@@ -1535,6 +1536,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: -
!HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope
!HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth
!HISTORY_MSG_DEHAZE_ENABLED;Haze Removal
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;Dehaze - Show depth map
!HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength
!HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold
@@ -1555,6 +1557,13 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: -
!HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
!HISTORY_MSG_METADATA_MODE;Metadata copy mode
!HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
!HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
!HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
@@ -1565,6 +1574,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: -
!HISTORY_MSG_RESIZE_ALLOWUPSCALING;Resize - Allow upscaling
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
@@ -1852,6 +1862,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: -
!TP_CROP_SELECTCROP;Select
!TP_DEHAZE_DEPTH;Depth
!TP_DEHAZE_LABEL;Haze Removal
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_DEHAZE_SHOW_DEPTH_MAP;Show depth map
!TP_DEHAZE_STRENGTH;Strength
!TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto multi-zones
@@ -1908,9 +1919,9 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: -
!TP_EXPOS_WHITEPOINT_LABEL;Raw White Points
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_FILMSIMULATION_LABEL;Film Simulation
!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now?
@@ -1954,6 +1965,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: -
!TP_METADATA_STRIP;Strip all metadata
!TP_METADATA_TUNNEL;Copy unchanged
!TP_NEUTRAL;Reset
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_PREPROCESS_DEADPIXFILT;Dead pixel filter
!TP_PREPROCESS_DEADPIXFILT_TOOLTIP;Tries to suppress dead pixels.
!TP_PREPROCESS_HOTPIXFILT;Hot pixel filter
@@ -2119,6 +2131,8 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: -
!TP_RETINEX_VIEW_UNSHARP;Unsharp mask
!TP_SHARPENING_BLUR;Blur radius
!TP_SHARPENING_CONTRAST;Contrast threshold
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
!TP_SHARPENMICRO_CONTRAST;Contrast threshold
!TP_SOFTLIGHT_LABEL;Soft Light
!TP_SOFTLIGHT_STRENGTH;Strength
diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese
index 16dafb297..511f6daf0 100644
--- a/rtdata/languages/Japanese
+++ b/rtdata/languages/Japanese
@@ -960,8 +960,8 @@ MAIN_TOOLTIP_BACKCOLOR2;プレビューの背景色を指定します: 白中間のグレー\nショートカット: 9
MAIN_TOOLTIP_BEFOREAFTERLOCK;固定 / 固定解除 - 補正前 の表示設定\n\n固定: 補正前をそのまま表示し変更されません\n複数のツールの累積効果を評価するのに役立ちます\nさらに、比較は履歴上のどこからでも行うことができます\n\n固定解除: 現在使用のツールの効果が 補正後 に表示され、その1段階前が 補正前 に表示されます
MAIN_TOOLTIP_HIDEHP;左パネル 表示/非表示 (履歴含む)\nショートカット: l
-MAIN_TOOLTIP_INDCLIPPEDH;ハイライト・クリッピング領域の表示\nショートカット: <
-MAIN_TOOLTIP_INDCLIPPEDS;シャドウ・クリッピング領域の表示\nショートカット: >
+MAIN_TOOLTIP_INDCLIPPEDH;ハイライト・クリッピング領域の表示\nショートカット: >
+MAIN_TOOLTIP_INDCLIPPEDS;シャドウ・クリッピング領域の表示\nショートカット: <
MAIN_TOOLTIP_PREVIEWB;ブルー チャンネル表示\nショートカット: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;フォーカス・マスク表示\nショートカット: Shift-f\n\n浅い被写界深度、低ノイズ、高ズームの画像の場合は、より正確に\n\nノイズの多い画像に対しては、検出精度を向上させるため10から30%縮小して評価します\n\nフォーカス・マスクをオンにすると表示に時間が掛かります
MAIN_TOOLTIP_PREVIEWG;グリーン チャンネル表示\nショートカット: g
@@ -1672,9 +1672,9 @@ TP_EXPOS_BLACKPOINT_LABEL;raw ブラック・ポイント
TP_EXPOS_WHITEPOINT_LABEL;raw ホワイト・ポイント
TP_FILMNEGATIVE_BLUE;ブルーの比率
TP_FILMNEGATIVE_GREEN;参考指数(コントラスト)
-TP_FILMNEGATIVE_GUESS_TOOLTIP;画像の中でニュートラルな参考ポイントを2点選んで指数を計算します;白い(明るいグレー)1点と黒い(暗いグレー)1点を選びます。順番は関係ありません。2つ目のポイントが選択されると指数が更新されます。
+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;ネガフィルム
-TP_FILMNEGATIVE_PICK;白と黒のポイントをピックアップする
+TP_FILMNEGATIVE_PICK;Pick neutral spots
TP_FILMNEGATIVE_RED;レッドの比率
TP_FILMSIMULATION_LABEL;フィルムシミュレーション
TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapeeはフィルムシミュレーション機能に使う画像をHald CLUTフォルダーの中から探すよう設計されています(プログラムに組み込むにはフォルダーが大き過ぎるため)。\n変更するには、環境設定 > 画像処理 > フィルムシミュレーションと進み\nどのフォルダーが使われているか確認します。機能を利用する場合は、Hald CLUTだけが入っているフォルダーを指定するか、 この機能を使わない場合はそのフォルダーを空にしておきます。\n\n詳しくはRawPediaを参照して下さい。\n\nフィルム画像のスキャンを止めますか?
@@ -2319,3 +2319,21 @@ ZOOMPANEL_ZOOMFITSCREEN;画像全体を画面に合わせる\nショートカッ
ZOOMPANEL_ZOOMIN;ズームイン\nショートカット: +
ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: -
+!!!!!!!!!!!!!!!!!!!!!!!!!
+! Untranslated keys follow; remove the ! prefix after an entry is translated.
+!!!!!!!!!!!!!!!!!!!!!!!!!
+
+!HISTORY_MSG_494;Capture Sharpening
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
+!TP_DEHAZE_LUMINANCE;Luminance only
+!TP_PDSHARPENING_LABEL;Capture Sharpening
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar
index 5879bf130..8ee6e66e4 100644
--- a/rtdata/languages/Magyar
+++ b/rtdata/languages/Magyar
@@ -1227,6 +1227,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés -
!HISTORY_MSG_491;White Balance
!HISTORY_MSG_492;RGB Curves
!HISTORY_MSG_493;L*a*b* Adjustments
+!HISTORY_MSG_494;Capture Sharpening
!HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
!HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
!HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@@ -1244,6 +1245,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés -
!HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope
!HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth
!HISTORY_MSG_DEHAZE_ENABLED;Haze Removal
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;Dehaze - Show depth map
!HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength
!HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold
@@ -1264,6 +1266,13 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés -
!HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
!HISTORY_MSG_METADATA_MODE;Metadata copy mode
!HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
!HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
!HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
@@ -1274,6 +1283,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés -
!HISTORY_MSG_RESIZE_ALLOWUPSCALING;Resize - Allow upscaling
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
@@ -1741,6 +1751,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés -
!TP_CROP_SELECTCROP;Select
!TP_DEHAZE_DEPTH;Depth
!TP_DEHAZE_LABEL;Haze Removal
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_DEHAZE_SHOW_DEPTH_MAP;Show depth map
!TP_DEHAZE_STRENGTH;Strength
!TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto multi-zones
@@ -1821,9 +1832,9 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés -
!TP_EXPOS_WHITEPOINT_LABEL;Raw White Points
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_FILMSIMULATION_LABEL;Film Simulation
!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now?
@@ -1928,6 +1939,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés -
!TP_PCVIGNETTE_ROUNDNESS_TOOLTIP;Roundness:\n0 = rectangle,\n50 = fitted ellipse,\n100 = circle.
!TP_PCVIGNETTE_STRENGTH;Strength
!TP_PCVIGNETTE_STRENGTH_TOOLTIP;Filter strength in stops (reached in corners).
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_PFCURVE_CURVEEDITOR_CH;Hue
!TP_PFCURVE_CURVEEDITOR_CH_TOOLTIP;Controls defringe strength by color.\nHigher = more,\nLower = less.
!TP_PREPROCESS_DEADPIXFILT;Dead pixel filter
@@ -2103,6 +2115,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés -
!TP_SAVEDIALOG_OK_TIP;Shortcut: Ctrl-Enter
!TP_SHARPENING_BLUR;Blur radius
!TP_SHARPENING_CONTRAST;Contrast threshold
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
!TP_SHARPENMICRO_CONTRAST;Contrast threshold
!TP_SOFTLIGHT_LABEL;Soft Light
!TP_SOFTLIGHT_STRENGTH;Strength
diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands
index d39173a52..ebfdbed9d 100644
--- a/rtdata/languages/Nederlands
+++ b/rtdata/languages/Nederlands
@@ -788,8 +788,8 @@ MAIN_TOOLTIP_BACKCOLOR1;Achtergrond kleur van het voorbeeld: Zwart\nSnelt
MAIN_TOOLTIP_BACKCOLOR2;Achtergrond kleur van het voorbeeld: Wit\nSneltoets: 0
MAIN_TOOLTIP_BEFOREAFTERLOCK;Vergrendel / Ontgrendel de Voorafbeelding.\n\nVergrendel: hou de Voorafbeelding ongewijzigd.\nDit is handig om het cumulatieve effect van meerdere gereedschappen te beoordelen.\nBovendien kan er worden vergeleken met elke stap in de geschiedenislijst.\n\nOntgrendel: de Voorafbeelding volgt een stap achter de Naafbeelding en laat de afbeelding zien zonder het effect van het huidige gereedschap.
MAIN_TOOLTIP_HIDEHP;Toon/verberg linkerpaneel (geschiedenis).\nSneltoets: H
-MAIN_TOOLTIP_INDCLIPPEDH;Overbelichtingsindicatie.\nSneltoets: <
-MAIN_TOOLTIP_INDCLIPPEDS;Onderbelichtingsindicatie.\nSneltoets: >
+MAIN_TOOLTIP_INDCLIPPEDH;Overbelichtingsindicatie.\nSneltoets: >
+MAIN_TOOLTIP_INDCLIPPEDS;Onderbelichtingsindicatie.\nSneltoets: <
MAIN_TOOLTIP_PREVIEWB;Bekijk het Blauwe kanaal.\nSneltoets: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Bekijk het Focus Masker.\nSneltoets: Shift-F\n\nAccurater bij afbeeldingen met geringe scherptediepte, weinig ruis en hogere zoomniveaus.\n\nBekijk de afbeelding op lagere zoomniveaus (10-30%) om de accuratesse te vergroten bij afbeeldingen met veel ruis.\n\nHet voorbeeld wordt langzamer aangemaakt als Focus Masker aanstaat.
MAIN_TOOLTIP_PREVIEWG;Bekijk het Groene kanaal.\nSneltoets: g
@@ -2015,6 +2015,7 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: -
!HISTORY_MSG_491;White Balance
!HISTORY_MSG_492;RGB Curves
!HISTORY_MSG_493;L*a*b* Adjustments
+!HISTORY_MSG_494;Capture Sharpening
!HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
!HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
!HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@@ -2032,6 +2033,7 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: -
!HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope
!HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth
!HISTORY_MSG_DEHAZE_ENABLED;Haze Removal
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;Dehaze - Show depth map
!HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength
!HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold
@@ -2052,6 +2054,13 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: -
!HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
!HISTORY_MSG_METADATA_MODE;Metadata copy mode
!HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
!HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
!HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
@@ -2062,6 +2071,7 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: -
!HISTORY_MSG_RESIZE_ALLOWUPSCALING;Resize - Allow upscaling
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
@@ -2226,6 +2236,7 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: -
!TP_CROP_SELECTCROP;Select
!TP_DEHAZE_DEPTH;Depth
!TP_DEHAZE_LABEL;Haze Removal
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_DEHAZE_SHOW_DEPTH_MAP;Show depth map
!TP_DEHAZE_STRENGTH;Strength
!TP_DIRPYRDENOISE_CHROMINANCE_CURVE_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation.
@@ -2235,9 +2246,9 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: -
!TP_EXPOSURE_HISTMATCHING_TOOLTIP;Automatically adjust sliders and curves (except exposure compensation) to match the look of the embedded JPEG thumbnail.
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_ICM_WORKING_TRC;Tone response curve:
!TP_ICM_WORKING_TRC_CUSTOM;Custom
@@ -2263,6 +2274,7 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: -
!TP_METADATA_MODE;Metadata copy mode
!TP_METADATA_STRIP;Strip all metadata
!TP_METADATA_TUNNEL;Copy unchanged
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_PREPROCESS_LINEDENOISE_DIRECTION;Direction
!TP_PREPROCESS_LINEDENOISE_DIRECTION_BOTH;Both
!TP_PREPROCESS_LINEDENOISE_DIRECTION_HORIZONTAL;Horizontal
@@ -2300,6 +2312,8 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: -
!TP_RETINEX_MAP;Method
!TP_SHARPENING_BLUR;Blur radius
!TP_SHARPENING_CONTRAST;Contrast threshold
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
!TP_SHARPENMICRO_CONTRAST;Contrast threshold
!TP_SOFTLIGHT_LABEL;Soft Light
!TP_SOFTLIGHT_STRENGTH;Strength
diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish
index a631353c3..86461bf6d 100644
--- a/rtdata/languages/Polish
+++ b/rtdata/languages/Polish
@@ -563,8 +563,8 @@ MAIN_TOOLTIP_BACKCOLOR1;Kolor tła podglądu: Czarny\nSkrót: 9
MAIN_TOOLTIP_BACKCOLOR2;Kolor tła podglądu: Biały\nSkrót: 9
MAIN_TOOLTIP_BEFOREAFTERLOCK;Zablokuj / Odblokuj widok Przed\n\nZablokuj: nie zmieniaj widoku Przed - \nPrzydatne w porównywaniu zablokowanego obrazu z obrazem na ktorym wykonano wiele zmian.\n\nOdblokuj: widok Przed będzie śledził widok Po o jeden krok do tyłu, pokazując obraz przed efektem aktualnie użytego narzędzia.
MAIN_TOOLTIP_HIDEHP;Pokaż/ukryj lewy panel (razem z historią).\nSkrót: l
-MAIN_TOOLTIP_INDCLIPPEDH;Pokaż obcięte prześwietlenia.\nSkrót: <
-MAIN_TOOLTIP_INDCLIPPEDS;Pokaż obcięte niedoświetlenia.\nSkrót: >
+MAIN_TOOLTIP_INDCLIPPEDH;Pokaż obcięte prześwietlenia.\nSkrót: >
+MAIN_TOOLTIP_INDCLIPPEDS;Pokaż obcięte niedoświetlenia.\nSkrót: <
MAIN_TOOLTIP_PREVIEWB;Podgląd kanału niebieskiego.\nSkrót: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Podgląd maski ostrości.\nSkrót: Shift-f\n\nDokładniejsze w przypadku zdjęc o płytkiej głębi ostrości, niskim pozimie szumów i o większym przybliżeniu. W przypadku zdjęć o wyższym poziomie szumów maska ostrości będzie dokładniejsza przy mniejszym zoomie (10-30%).
MAIN_TOOLTIP_PREVIEWG;Podgląd kanału zielonego.\nSkrót: g
@@ -1600,6 +1600,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: -
!HISTORY_MSG_491;White Balance
!HISTORY_MSG_492;RGB Curves
!HISTORY_MSG_493;L*a*b* Adjustments
+!HISTORY_MSG_494;Capture Sharpening
!HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
!HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
!HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@@ -1617,6 +1618,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: -
!HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope
!HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth
!HISTORY_MSG_DEHAZE_ENABLED;Haze Removal
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;Dehaze - Show depth map
!HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength
!HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold
@@ -1637,6 +1639,13 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: -
!HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
!HISTORY_MSG_METADATA_MODE;Metadata copy mode
!HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
!HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
!HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
@@ -1647,6 +1656,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: -
!HISTORY_MSG_RESIZE_ALLOWUPSCALING;Resize - Allow upscaling
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
@@ -1892,6 +1902,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: -
!TP_CROP_SELECTCROP;Select
!TP_DEHAZE_DEPTH;Depth
!TP_DEHAZE_LABEL;Haze Removal
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_DEHAZE_SHOW_DEPTH_MAP;Show depth map
!TP_DEHAZE_STRENGTH;Strength
!TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto multi-zones
@@ -1934,9 +1945,9 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: -
!TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptual
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now?
!TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure
@@ -1975,6 +1986,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: -
!TP_METADATA_STRIP;Strip all metadata
!TP_METADATA_TUNNEL;Copy unchanged
!TP_NEUTRAL;Reset
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_PREPROCESS_LINEDENOISE_DIRECTION;Direction
!TP_PREPROCESS_LINEDENOISE_DIRECTION_BOTH;Both
!TP_PREPROCESS_LINEDENOISE_DIRECTION_HORIZONTAL;Horizontal
@@ -2125,6 +2137,8 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: -
!TP_RETINEX_VIEW_UNSHARP;Unsharp mask
!TP_SHARPENING_BLUR;Blur radius
!TP_SHARPENING_CONTRAST;Contrast threshold
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
!TP_SHARPENMICRO_CONTRAST;Contrast threshold
!TP_SOFTLIGHT_LABEL;Soft Light
!TP_SOFTLIGHT_STRENGTH;Strength
diff --git a/rtdata/languages/Portugues b/rtdata/languages/Portugues
index 766b14e0b..dea314f46 100644
--- a/rtdata/languages/Portugues
+++ b/rtdata/languages/Portugues
@@ -916,8 +916,8 @@ MAIN_TOOLTIP_BACKCOLOR2;Cor de fundo da pré-visualização: branco\nAtal
MAIN_TOOLTIP_BACKCOLOR3;Cor de fundo da pré-visualização: cinza médio\nAtalho: 9
MAIN_TOOLTIP_BEFOREAFTERLOCK;Bloquear / desbloquear a visualização antes\n\nBloquear: manter a visualização antes inalterada.\nÚtil para avaliar o efeito cumulativo de várias ferramentas.\nAlém disso, podem ser feitas comparações a qualquer momento no histórico.\n\nDesbloquear: a visualização antes seguirá a visualização depois um passo antes, mostrando a imagem antes do efeito da ferramenta atualmente utilizada.
MAIN_TOOLTIP_HIDEHP;Mostrar o painel esquerdo (incluindo o histórico).\nAtalho: l
-MAIN_TOOLTIP_INDCLIPPEDH;Ver altas luzes cortadas.\nAtalho: <
-MAIN_TOOLTIP_INDCLIPPEDS;Ver sombras cortadas.\nAtalho: >
+MAIN_TOOLTIP_INDCLIPPEDH;Ver altas luzes cortadas.\nAtalho: >
+MAIN_TOOLTIP_INDCLIPPEDS;Ver sombras cortadas.\nAtalho: <
MAIN_TOOLTIP_PREVIEWB;Pré-visualizar o canal azul.\nAtalho: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Pré-visualizar a máscara de foco.\nAtalho: Shift-f\n\nMais preciso em imagens com pouca profundidade de campo, baixo ruído e níveis de zoom mais altos.\n\nUtilize um zoom menor entre 10-30% para melhorar a precisão da deteção de imagens com muito ruído.
MAIN_TOOLTIP_PREVIEWG;Pré-visualizar o canal verde.\nAtalho: g
@@ -2264,8 +2264,18 @@ ZOOMPANEL_ZOOMOUT;Afastar\nAtalho: -
!FILEBROWSER_POPUPREMOVE;Delete permanently
!FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version
!FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash.
+!HISTORY_MSG_494;Capture Sharpening
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative
!HISTORY_MSG_FILMNEGATIVE_VALUES;Film negative values
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!MAIN_FRAME_PLACES_DEL;Remove
!PARTIALPASTE_FILMNEGATIVE;Film Negative
!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
@@ -2277,16 +2287,20 @@ ZOOMPANEL_ZOOMOUT;Afastar\nAtalho: -
!PROGRESSBAR_RAWCACORR;Raw CA correction...
!QUEUE_LOCATION_TITLE;Output Location
!TP_CROP_PPI;PPI
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
!TP_LENSPROFILE_MODE_HEADER;Lens Profile
!TP_LENSPROFILE_USE_GEOMETRIC;Geometric distortion
!TP_LENSPROFILE_USE_HEADER;Correct
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_RAW_XTRANS;X-Trans
!TP_RAW_XTRANSFAST;Fast X-Trans
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil)
index aef5fcde9..c6ff58310 100644
--- a/rtdata/languages/Portugues (Brasil)
+++ b/rtdata/languages/Portugues (Brasil)
@@ -119,8 +119,12 @@ FILEBROWSER_COLORLABEL_TOOLTIP;Etiqueta de cor.\n\nUse o menu suspenso ou atalho
FILEBROWSER_COPYPROFILE;Copiar perfil
FILEBROWSER_CURRENT_NAME;Nome atual:
FILEBROWSER_DARKFRAME;Quadro escuro
+FILEBROWSER_DELETEDIALOG_ALL;Você tem certeza que quer deletas permanentemente todos os %1 arquivos na lixeira?
FILEBROWSER_DELETEDIALOG_HEADER;Confirmação de exclusão de arquivo
+FILEBROWSER_DELETEDIALOG_SELECTED;Você tem certeza que quer deletar permanentemente os %1 arquivos selecionados?
+FILEBROWSER_DELETEDIALOG_SELECTEDINCLPROC;Você tem certeza que quer deletar permanentemente os %1 arquivos selecionados, incluindo a versão processada em fila?
FILEBROWSER_EMPTYTRASH;Esvaziar lixeira
+FILEBROWSER_EMPTYTRASHHINT;Deletar permanentemente todos os arquivos na lixeira.
FILEBROWSER_EXTPROGMENU;Abrir com
FILEBROWSER_FLATFIELD;Flat-Field
FILEBROWSER_MOVETODARKFDIR;Mover para o diretório de quadros escuros
@@ -154,6 +158,8 @@ FILEBROWSER_POPUPRANK2;Classificação 2 **
FILEBROWSER_POPUPRANK3;Classificação 3 ***
FILEBROWSER_POPUPRANK4;Classificação 4 ****
FILEBROWSER_POPUPRANK5;Classificação 5 *****
+FILEBROWSER_POPUPREMOVE;Deletar permanentemente
+FILEBROWSER_POPUPREMOVEINCLPROC;Excluir permanentemente, incluindo a versão processada em fila
FILEBROWSER_POPUPRENAME;Renomear
FILEBROWSER_POPUPSELECTALL;Selecionar tudo
FILEBROWSER_POPUPTRASH;Mover para a lixeira
@@ -180,6 +186,7 @@ FILEBROWSER_SHOWDIRHINT;Limpar todos os filtros.\nAtalho: d
FILEBROWSER_SHOWEDITEDHINT;Mostrar imagens editadas.\nAtalho: 7
FILEBROWSER_SHOWEDITEDNOTHINT;Mostrar imagens não editadas.\nAtalho: 6
FILEBROWSER_SHOWEXIFINFO;Mostrar informações Exif.\n\nAtalhos:\ni - Modo de Guias de Editores Múltiplos,\nAlt-i - Modo de Guia de Editor Único.
+FILEBROWSER_SHOWNOTTRASHHINT;Mostrar apenas imagens que não estão no lixo.
FILEBROWSER_SHOWORIGINALHINT;Mostre somente imagens originais.\n\nQuando existem várias imagens com o mesmo nome de arquivo, mas extensões diferentes, a única considerada original é aquela cuja extensão está mais próxima da parte superior da lista de extensões analisadas em Preferências > Navegador de Arquivos > Extensões Analisadas.
FILEBROWSER_SHOWRANK1HINT;Mostrar imagens classificadas com 1 estrela.\nAtalho: 1
FILEBROWSER_SHOWRANK2HINT;Mostrar imagens classificadas com 2 estrelas.\nAtalho: 2
@@ -870,6 +877,7 @@ MAIN_FRAME_FILEBROWSER;Navegador de Arquivos
MAIN_FRAME_FILEBROWSER_TOOLTIP;Navegador de arquivos.\nAtalho: Ctrl-F2
MAIN_FRAME_PLACES;Locais
MAIN_FRAME_PLACES_ADD;Adicionar
+MAIN_FRAME_PLACES_DEL;Remover
MAIN_FRAME_QUEUE;Fila
MAIN_FRAME_QUEUE_TOOLTIP;Processando fila.\nAtalho: Ctrl-F3
MAIN_FRAME_RECENT;Pastas Recentes
@@ -915,8 +923,8 @@ MAIN_TOOLTIP_BACKCOLOR2;Cor de fundo da pré-visualização: Branco\nAtal
MAIN_TOOLTIP_BACKCOLOR3;Cor de fundo da pré-visualização: Cinza médio\nAtalho: 9
MAIN_TOOLTIP_BEFOREAFTERLOCK;Travar / Destravar a Antes visualização\n\nTravar: mantenha o Antes visualização inalterada.\nÚtil para avaliar o efeito cumulativo de várias ferramentas.\nAlém disso, comparações podem ser feitas a qualquer momento.\n\nDestravar: o Antes visualização seguinte Depois visualização anterior, mostrando a imagem antes do efeito da ferramenta atualmente utilizada.
MAIN_TOOLTIP_HIDEHP;Mostrar/Ocultar o painel esquerdo (incluindo o histórico).\nAtalho: l
-MAIN_TOOLTIP_INDCLIPPEDH;Indicação de realce recortado.\nAtalho: <
-MAIN_TOOLTIP_INDCLIPPEDS;Indicação de sombra recortada.\nAtalho: >
+MAIN_TOOLTIP_INDCLIPPEDH;Indicação de realce recortado.\nAtalho: >
+MAIN_TOOLTIP_INDCLIPPEDS;Indicação de sombra recortada.\nAtalho: <
MAIN_TOOLTIP_PREVIEWB;Pré-visualize o Canal Azul.\nAtalho: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Pré-visualize a Máscara de Foco.\nAtalho: Shift-f\n\nMais preciso em imagens com pouca profundidade de campo, baixo ruído e níveis de zoom mais altos.\n\nPara melhorar a precisão da detecção de imagens ruidosas, avalie com zoom menor, cerca de 10-30%.
MAIN_TOOLTIP_PREVIEWG;Pré-visualize o Canal verde.\nAtalho: g
@@ -1029,6 +1037,7 @@ PREFERENCES_APPEARANCE_COLORPICKERFONT;Fonte do seletor de cor
PREFERENCES_APPEARANCE_CROPMASKCOLOR;Cor da máscara de corte
PREFERENCES_APPEARANCE_MAINFONT;Fonte principal
PREFERENCES_APPEARANCE_NAVGUIDECOLOR;Cor do guia do navegador
+PREFERENCES_APPEARANCE_PSEUDOHIDPI;Modo pseudo-HiDPI
PREFERENCES_APPEARANCE_THEME;Tema
PREFERENCES_APPLNEXTSTARTUP;é necessário reiniciar
PREFERENCES_AUTOMONPROFILE;Usar o perfil de cores do monitor principal do sistema operacional
@@ -1215,6 +1224,9 @@ PROFILEPANEL_TOOLTIPCOPY;Copie o perfil de processamento atual para a área de t
PROFILEPANEL_TOOLTIPLOAD;Carregue um perfil do arquivo.\nCtrl-click para selecionar os parâmetros a serem carregados.
PROFILEPANEL_TOOLTIPPASTE;Cole o perfil da área de transferência.\nCtrl-click para selecionar os parâmetros a serem colados.
PROFILEPANEL_TOOLTIPSAVE;Salvar o perfil atual.\nCtrl-click para selecionar os parâmetros a serem salvos.
+PROGRESSBAR_GREENEQUIL;Equilíbrio de verde...
+PROGRESSBAR_HLREC;Reconstrução de realces...
+PROGRESSBAR_LINEDENOISE;Filtro de ruído de linha...
PROGRESSBAR_LOADING;Carregando imagem...
PROGRESSBAR_LOADINGTHUMBS;Carregando miniaturas...
PROGRESSBAR_LOADJPEG;Carregando arquivo JPEG...
@@ -1241,6 +1253,7 @@ QUEUE_FORMAT_TITLE;Formato de arquivo
QUEUE_LOCATION_FOLDER;Salvar na pasta
QUEUE_LOCATION_TEMPLATE;Use modelo
QUEUE_LOCATION_TEMPLATE_TOOLTIP;Podes usar as seguintes sequências de formatação:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nEssas cadeias de formatação referem-se às diferentes partes do endereço do nome da foto, alguns atributos da foto ou um índice de sequência arbitrário no processamento em lote.\n\nPor exemplo, se a foto que está sendo processada tiver o seguinte endereço do nome:\n/inicio/rodrigo/fotos/2010-10-31/dsc0042.nef\no significado das cadeias de formatação são:\n%d4 = inicio\n%d3 = rodrigo\n%d2 = fotos\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /inicio/rodrigo/fotos/2010-10-31/\n%p2 = /inicio/rodrigo/fotos/\n%p3 = /inicio/rodrigo/\n%p4 = /inicio/\n\n%r será substituído pela classificação da foto. Se a foto não tiver classificação, %r será substituído por '0'. Se a foto estiver na lixeira, %r será substituído por 'x'.\n\n%s1, %s2, etc. será substituído por um índice de sequência que é preenchido entre 1 e 9 dígitos. O índice de sequência iniciará em 1 sempre que o processamento da fila for iniciado e será incrementado em 1 para cada imagem processada.\n\nSe quiseres salvar a imagem de saída no local onde se encontra a original, escreva:\n%p1/%f\n\nSe quiseres salvar a imagem de saída num diretório chamado "convertido" localizado no diretório da imagem aberta, escreva:\n%p1/convertido/%f\n\nSe quiseres salvar a imagem de saída num diretório chamado\n"/inicio/rodrigo/fotos/convertido/2010-10-31", escreva:\n%p2/convertido/%d1/%f
+QUEUE_LOCATION_TITLE;Local da Saída
QUEUE_STARTSTOP_TOOLTIP;Inicia ou para o processamento das imagens na fila.\n\nAtalho: Ctrl+s
SAMPLEFORMAT_0;Formato de dados desconhecido
SAMPLEFORMAT_1;8 bits sem assinatura
@@ -1612,6 +1625,9 @@ TP_EXPOSURE_TCMODE_STANDARD;Padrão
TP_EXPOSURE_TCMODE_WEIGHTEDSTD;Padrão Ponderado
TP_EXPOS_BLACKPOINT_LABEL;Pontos Pretos Raw
TP_EXPOS_WHITEPOINT_LABEL;Pontos Brancos Raw
+TP_FILMNEGATIVE_BLUE;Relação de azul
+TP_FILMNEGATIVE_PICK;Pick neutral spots
+TP_FILMNEGATIVE_RED;Relação de vermelho
TP_FILMSIMULATION_LABEL;Simulação de Filme
TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee está configurado para procurar por imagens Hald CLUT, que são usadas para a ferramenta Simulação de Filme, numa pasta que está demorando para carregar.\nVá para Preferências > Processamento de Imagem > Simulação de Filme\npara ver qual pasta está sendo usada. Deves apontar RawTherapee para uma pasta que contenha apenas imagens Hald CLUT e nada mais, ou para uma pasta vazia, se não quiseres usar a ferramenta Simulação de Filme.\n\nLeia o artigo sobre Simulação de Filme na RawPedia para mais informações.\n\nDesejas cancelar a verificação agora?
TP_FILMSIMULATION_STRENGTH;Intensidade
@@ -1732,9 +1748,13 @@ TP_LABCURVE_RSTPRO_TOOLTIP;Funciona no controle deslizante de cromaticidade e na
TP_LENSGEOM_AUTOCROP;Corte automático
TP_LENSGEOM_FILL;Preenchimento automático
TP_LENSGEOM_LABEL;Lente / Geometria
+TP_LENSPROFILE_CORRECTION_AUTOMATCH;Selecionado automaticamente
TP_LENSPROFILE_CORRECTION_LCPFILE;Ficheiro LCP
+TP_LENSPROFILE_CORRECTION_MANUAL;Selecionado manualmente
TP_LENSPROFILE_LABEL;Correção de lente perfilada
+TP_LENSPROFILE_MODE_HEADER;Perfil da Lente
TP_LENSPROFILE_USE_CA;Aberração cromática
+TP_LENSPROFILE_USE_GEOMETRIC;Distorção geométrica
TP_LENSPROFILE_USE_VIGNETTING;Vinhetagem
TP_LOCALCONTRAST_AMOUNT;Montante
TP_LOCALCONTRAST_DARKNESS;Nível de escuridão
@@ -2249,45 +2269,39 @@ ZOOMPANEL_ZOOMOUT;Menos Zoom\nAtalho: -
!!!!!!!!!!!!!!!!!!!!!!!!!
!FILEBROWSER_BROWSEPATHBUTTONHINT;Click to open specified path, reload folder and apply "find" keywords.
-!FILEBROWSER_DELETEDIALOG_ALL;Are you sure you want to permanently delete all %1 files in trash?
-!FILEBROWSER_DELETEDIALOG_SELECTED;Are you sure you want to permanently delete the selected %1 files?
-!FILEBROWSER_DELETEDIALOG_SELECTEDINCLPROC;Are you sure you want to permanently delete the selected %1 files, including a queue-processed version?
-!FILEBROWSER_EMPTYTRASHHINT;Permanently delete all files in trash.
-!FILEBROWSER_POPUPREMOVE;Delete permanently
-!FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version
-!FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash.
+!HISTORY_MSG_494;Capture Sharpening
!HISTORY_MSG_COLORTONING_LABREGION_OFFSET;CT - region offset
!HISTORY_MSG_COLORTONING_LABREGION_POWER;CT - region power
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative
!HISTORY_MSG_FILMNEGATIVE_VALUES;Film negative values
-!MAIN_FRAME_PLACES_DEL;Remove
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!PARTIALPASTE_FILMNEGATIVE;Film Negative
-!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!PREFERENCES_CACHECLEAR_SAFETY;Only files in the cache are cleared. Processing profiles stored alongside the source images are not touched.
!PROGRESSBAR_DECODING;Decoding...
-!PROGRESSBAR_GREENEQUIL;Green equilibration...
-!PROGRESSBAR_HLREC;Highlight reconstruction...
!PROGRESSBAR_HOTDEADPIXELFILTER;Hot/dead pixel filter...
-!PROGRESSBAR_LINEDENOISE;Line noise filter...
!PROGRESSBAR_RAWCACORR;Raw CA correction...
-!QUEUE_LOCATION_TITLE;Output Location
!TP_COLORTONING_LABREGION_OFFSET;Offset
!TP_COLORTONING_LABREGION_POWER;Power
!TP_CROP_PPI;PPI
-!TP_FILMNEGATIVE_BLUE;Blue ratio
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
-!TP_FILMNEGATIVE_RED;Red ratio
-!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically selected
-!TP_LENSPROFILE_CORRECTION_MANUAL;Manually selected
!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_MODE_HEADER;Lens Profile
-!TP_LENSPROFILE_USE_GEOMETRIC;Geometric distortion
!TP_LENSPROFILE_USE_HEADER;Correct
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_RAWCACORR_AUTOIT_TOOLTIP;This setting is available if "Auto-correction" is checked.\nAuto-correction is conservative, meaning that it often does not correct all chromatic aberration.\nTo correct the remaining chromatic aberration, you can use up to five iterations of automatic chromatic aberration correction.\nEach iteration will reduce the remaining chromatic aberration from the last iteration at the cost of additional processing time.
!TP_RAW_DUALDEMOSAICAUTOCONTRAST_TOOLTIP;If the checkbox is checked (recommended), RawTherapee calculates an optimum value based on flat regions in the image.\nIf there is no flat region in the image or the image is too noisy, the value will be set to 0.\nTo set the value manually, uncheck the checkbox first (reasonable values depend on the image).
!TP_RAW_XTRANS;X-Trans
!TP_RAW_XTRANSFAST;Fast X-Trans
!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce the transmission map to achieve the desired luminance.\nThe x-axis is the transmission.\nThe y-axis is the gain.
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian
index 79c6bebfc..9f8f47da0 100644
--- a/rtdata/languages/Russian
+++ b/rtdata/languages/Russian
@@ -613,8 +613,8 @@ MAIN_TOOLTIP_BACKCOLOR1;Фоновый цвет предпросмотра:
MAIN_TOOLTIP_BACKCOLOR2;Фоновый цвет предпросмотра: Белый\nГорячая клавиша: 9
MAIN_TOOLTIP_BEFOREAFTERLOCK;Заблокировать / Разблокировать предыдущий вид\n\nЗаблокировать: сохраняет предыдущий вид неизменным.\nПолезно для оценки общего эффекта от применения нескольких инструментов.\nК тому же, сравнения могут быть произведены на любом состоянии истории\n\nРазблокировать: предыдущий вид будет следовать сразу за следующим, показывая состояние изображения до применения текущего инструмента.
MAIN_TOOLTIP_HIDEHP;Показать/скрыть левую панель (включая историю).\nГорячая клавиша l
-MAIN_TOOLTIP_INDCLIPPEDH;Индикатор пересветов.\nГорячая клавиша: <
-MAIN_TOOLTIP_INDCLIPPEDS;Индикатор затемнений.\nГорячая клавиша: >
+MAIN_TOOLTIP_INDCLIPPEDH;Индикатор пересветов.\nГорячая клавиша: >
+MAIN_TOOLTIP_INDCLIPPEDS;Индикатор затемнений.\nГорячая клавиша: <
MAIN_TOOLTIP_PREVIEWB;Просмотреть канал синего.\nГорячая клавиша: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Просмотреть Маску резкости.\nГорячая клавиша: Shift-F\n\nБолее точна на изображениях с небольшой глубиной резкости, малым шумом и при большем приближении изображения\n\nДля улучшения определения на шумных изображениях используйте на маленьком зуме 10-30%
MAIN_TOOLTIP_PREVIEWG;Просмотреть канал зеленого.\nГорячая клавиша: g
@@ -1690,6 +1690,7 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: -
!HISTORY_MSG_483;CAM02 - Yb scene
!HISTORY_MSG_484;CAM02 - Auto Yb scene
!HISTORY_MSG_489;DRC - Detail
+!HISTORY_MSG_494;Capture Sharpening
!HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
!HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
!HISTORY_MSG_COLORTONING_LABREGION_CHANNEL;CT - Channel
@@ -1704,6 +1705,7 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: -
!HISTORY_MSG_COLORTONING_LABREGION_SATURATION;CT - Saturation
!HISTORY_MSG_COLORTONING_LABREGION_SHOWMASK;CT - region show mask
!HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold
!HISTORY_MSG_DUALDEMOSAIC_CONTRAST;Dual demosaic - Contrast threshold
!HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative
@@ -1715,6 +1717,13 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: -
!HISTORY_MSG_ICM_WORKING_SLOPE;Working - Slope
!HISTORY_MSG_ICM_WORKING_TRC_METHOD;Working - TRC method
!HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
!HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
!HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
@@ -1725,6 +1734,7 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: -
!HISTORY_MSG_RESIZE_ALLOWUPSCALING;Resize - Allow upscaling
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
!ICCPROFCREATOR_COPYRIGHT;Copyright:
!ICCPROFCREATOR_COPYRIGHT_RESET_TOOLTIP;Reset to the default copyright, granted to "RawTherapee, CC0"
@@ -1947,6 +1957,7 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: -
!TP_COLORTONING_TWOCOLOR_TOOLTIP;Standard chroma:\nLinear response, a* = b*.\n\nSpecial chroma:\nLinear response, a* = b*, but unbound - try under the diagonal.\n\nSpecial a* and b*:\nLinear response unbound with separate curves for a* and b*. Intended for special effects.\n\nSpecial chroma 2 colors:\nMore predictable.
!TP_COLORTONING_TWOSTD;Standard chroma
!TP_CROP_PPI;PPI
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto multi-zones
!TP_DIRPYRDENOISE_CHROMINANCE_CURVE_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation.
!TP_DIRPYRDENOISE_CHROMINANCE_METHODADVANCED_TOOLTIP;Manual\nActs on the full image.\nYou control the noise reduction settings manually.\n\nAutomatic global\nActs on the full image.\n9 zones are used to calculate a global chrominance noise reduction setting.\n\nPreview\nActs on the whole image.\nThe part of the image visible in the preview is used to calculate global chrominance noise reduction settings.
@@ -1979,9 +1990,9 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: -
!TP_EXPOS_WHITEPOINT_LABEL;Raw White Points
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now?
!TP_FLATFIELD_CLIPCONTROL;Clip control
@@ -2008,6 +2019,7 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: -
!TP_LENSPROFILE_MODE_HEADER;Lens Profile
!TP_LENSPROFILE_USE_GEOMETRIC;Geometric distortion
!TP_LENSPROFILE_USE_HEADER;Correct
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_PREPROCESS_LINEDENOISE_DIRECTION;Direction
!TP_PREPROCESS_LINEDENOISE_DIRECTION_BOTH;Both
!TP_PREPROCESS_LINEDENOISE_DIRECTION_HORIZONTAL;Horizontal
@@ -2135,6 +2147,8 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: -
!TP_RETINEX_VIEW_TRAN2;Transmission - Fixed
!TP_RETINEX_VIEW_UNSHARP;Unsharp mask
!TP_SHARPENING_BLUR;Blur radius
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
!TP_WAVELET_1;Level 1
!TP_WAVELET_2;Level 2
!TP_WAVELET_3;Level 3
diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters)
index 2b98cfe2a..63b838201 100644
--- a/rtdata/languages/Serbian (Cyrilic Characters)
+++ b/rtdata/languages/Serbian (Cyrilic Characters)
@@ -1493,6 +1493,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике -
!HISTORY_MSG_491;White Balance
!HISTORY_MSG_492;RGB Curves
!HISTORY_MSG_493;L*a*b* Adjustments
+!HISTORY_MSG_494;Capture Sharpening
!HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
!HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
!HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@@ -1510,6 +1511,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике -
!HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope
!HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth
!HISTORY_MSG_DEHAZE_ENABLED;Haze Removal
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;Dehaze - Show depth map
!HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength
!HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold
@@ -1530,6 +1532,13 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике -
!HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
!HISTORY_MSG_METADATA_MODE;Metadata copy mode
!HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
!HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
!HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
@@ -1540,6 +1549,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике -
!HISTORY_MSG_RESIZE_ALLOWUPSCALING;Resize - Allow upscaling
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
@@ -1843,6 +1853,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике -
!TP_CROP_SELECTCROP;Select
!TP_DEHAZE_DEPTH;Depth
!TP_DEHAZE_LABEL;Haze Removal
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_DEHAZE_SHOW_DEPTH_MAP;Show depth map
!TP_DEHAZE_STRENGTH;Strength
!TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto multi-zones
@@ -1907,9 +1918,9 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике -
!TP_EXPOS_WHITEPOINT_LABEL;Raw White Points
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_FILMSIMULATION_LABEL;Film Simulation
!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now?
@@ -1954,6 +1965,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике -
!TP_METADATA_MODE;Metadata copy mode
!TP_METADATA_STRIP;Strip all metadata
!TP_METADATA_TUNNEL;Copy unchanged
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_PREPROCESS_DEADPIXFILT;Dead pixel filter
!TP_PREPROCESS_DEADPIXFILT_TOOLTIP;Tries to suppress dead pixels.
!TP_PREPROCESS_HOTPIXFILT;Hot pixel filter
@@ -2119,6 +2131,8 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике -
!TP_RETINEX_VIEW_UNSHARP;Unsharp mask
!TP_SHARPENING_BLUR;Blur radius
!TP_SHARPENING_CONTRAST;Contrast threshold
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
!TP_SHARPENMICRO_CONTRAST;Contrast threshold
!TP_SOFTLIGHT_LABEL;Soft Light
!TP_SOFTLIGHT_STRENGTH;Strength
diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish
index 220339a45..b39d95e02 100644
--- a/rtdata/languages/Swedish
+++ b/rtdata/languages/Swedish
@@ -698,8 +698,8 @@ MAIN_TOOLTIP_BACKCOLOR1;Bakgrundsfärg: Svart\nKortkommando: 9
MAIN_TOOLTIP_BACKCOLOR2;Bakgrundsfärg: Vit\nKortkommando: 9
MAIN_TOOLTIP_BEFOREAFTERLOCK;Lås / Lås upp före-vyn\n\nLås: behåll före-vyn oförändrad.\nAnvändbart för att utvärdera den sammanlagda effekten av flera stegs redigering. Dessutom kan jämförelser göras gentemot varje annat steg i historiken.\n\nLås upp: Före-vyn kommer hela tiden visa ett tidigare steg jämfört med efter-vyn, och visar därmed effekten av det verktyg som användes senast.
MAIN_TOOLTIP_HIDEHP;Visa/göm den vänstra panelen. Kortkommando: l
-MAIN_TOOLTIP_INDCLIPPEDH;Markera högdagerindikation.\nKortkommando: <
-MAIN_TOOLTIP_INDCLIPPEDS;Markera skuggindikation.\nKortkommando: >
+MAIN_TOOLTIP_INDCLIPPEDH;Markera högdagerindikation.\nKortkommando: >
+MAIN_TOOLTIP_INDCLIPPEDS;Markera skuggindikation.\nKortkommando: <
MAIN_TOOLTIP_PREVIEWB;Förhandsgranska den blå kanalen.\nGenväg: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Förhandsgranska fokusmasken.\nKortkommando: Shift-f\n\nNoggrannare på bilder med kort skärpedjup, lågt brus och där en hög zoom-grad är vald.\n\nFör att förbättra detekteringen för brusiga bilder, utvärdera vid en zoom-grad om 10-30%\n\nFörhandsvisningen görs långsammare med fokusmasken påslagen.
MAIN_TOOLTIP_PREVIEWG;Förhandsgranska den gröna kanalen.\nGenväg: g
@@ -1842,6 +1842,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: -
!HISTORY_MSG_491;White Balance
!HISTORY_MSG_492;RGB Curves
!HISTORY_MSG_493;L*a*b* Adjustments
+!HISTORY_MSG_494;Capture Sharpening
!HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
!HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
!HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@@ -1859,6 +1860,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: -
!HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope
!HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth
!HISTORY_MSG_DEHAZE_ENABLED;Haze Removal
+!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
!HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;Dehaze - Show depth map
!HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength
!HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold
@@ -1879,6 +1881,13 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: -
!HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
!HISTORY_MSG_METADATA_MODE;Metadata copy mode
!HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+!HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
!HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
!HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
!HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
@@ -1889,6 +1898,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: -
!HISTORY_MSG_RESIZE_ALLOWUPSCALING;Resize - Allow upscaling
!HISTORY_MSG_SHARPENING_BLUR;Sharpening - Blur radius
!HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
+!HISTORY_MSG_SHARPENING_GAMMA;Sharpening - Gamma
!HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
!HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
!HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
@@ -2100,6 +2110,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: -
!TP_CROP_SELECTCROP;Select
!TP_DEHAZE_DEPTH;Depth
!TP_DEHAZE_LABEL;Haze Removal
+!TP_DEHAZE_LUMINANCE;Luminance only
!TP_DEHAZE_SHOW_DEPTH_MAP;Show depth map
!TP_DEHAZE_STRENGTH;Strength
!TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Auto multi-zones
@@ -2122,9 +2133,9 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: -
!TP_EXPOSURE_HISTMATCHING_TOOLTIP;Automatically adjust sliders and curves (except exposure compensation) to match the look of the embedded JPEG thumbnail.
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+!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_FILMNEGATIVE_PICK;Pick white and black spots
+!TP_FILMNEGATIVE_PICK;Pick neutral spots
!TP_FILMNEGATIVE_RED;Red ratio
!TP_FLATFIELD_CLIPCONTROL;Clip control
!TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast.
@@ -2157,6 +2168,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: -
!TP_METADATA_MODE;Metadata copy mode
!TP_METADATA_STRIP;Strip all metadata
!TP_METADATA_TUNNEL;Copy unchanged
+!TP_PDSHARPENING_LABEL;Capture Sharpening
!TP_PREPROCESS_LINEDENOISE_DIRECTION;Direction
!TP_PREPROCESS_LINEDENOISE_DIRECTION_BOTH;Both
!TP_PREPROCESS_LINEDENOISE_DIRECTION_HORIZONTAL;Horizontal
@@ -2246,6 +2258,8 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: -
!TP_RETINEX_VIEW_METHOD_TOOLTIP;Standard - Normal display.\nMask - Displays the mask.\nUnsharp mask - Displays the image with a high radius unsharp mask.\nTransmission - Auto/Fixed - Displays the file transmission-map, before any action on contrast and brightness.\n\nAttention: the mask does not correspond to reality, but is amplified to make it more visible.
!TP_SHARPENING_BLUR;Blur radius
!TP_SHARPENING_CONTRAST;Contrast threshold
+!TP_SHARPENING_GAMMA;Gamma
+!TP_SHARPENING_RADIUS_BOOST;Corner radius boost
!TP_SHARPENMICRO_CONTRAST;Contrast threshold
!TP_SOFTLIGHT_LABEL;Soft Light
!TP_SOFTLIGHT_STRENGTH;Strength
diff --git a/rtdata/languages/default b/rtdata/languages/default
index c8c223a9a..43660472f 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -765,13 +765,13 @@ HISTORY_MSG_LOCALCONTRAST_LIGHTNESS;Local Contrast - Lightness
HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
HISTORY_MSG_METADATA_MODE;Metadata copy mode
HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
-HISTORY_MSG_PDSHARPEN_CONTRAST;CAS - Contrast threshold
-HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CAS - Auto threshold
-HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CAS - Auto radius
-HISTORY_MSG_PDSHARPEN_GAMMA;CAS - Gamma
-HISTORY_MSG_PDSHARPEN_ITERATIONS;CAS - Iterations
-HISTORY_MSG_PDSHARPEN_RADIUS;CAS - Radius
-HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CAS - Corner radius boost
+HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
+HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius
+HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold
+HISTORY_MSG_PDSHARPEN_GAMMA;CS - Gamma
+HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations
+HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius
+HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost
HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
@@ -938,8 +938,8 @@ MAIN_TOOLTIP_BACKCOLOR2;Background color of the preview: white\nShortcut:
MAIN_TOOLTIP_BACKCOLOR3;Background color of the preview: middle grey\nShortcut: 9
MAIN_TOOLTIP_BEFOREAFTERLOCK;Lock / Unlock the Before view\n\nLock: keep the Before view unchanged.\nUseful to evaluate the cumulative effect of multiple tools.\nAdditionally, comparisons can be made to any state in the History.\n\nUnlock: the Before view will follow the After view one step behind, showing the image before the effect of the currently used tool.
MAIN_TOOLTIP_HIDEHP;Show/Hide the left panel (including the history).\nShortcut: l
-MAIN_TOOLTIP_INDCLIPPEDH;Clipped highlight indication.\nShortcut: <
-MAIN_TOOLTIP_INDCLIPPEDS;Clipped shadow indication.\nShortcut: >
+MAIN_TOOLTIP_INDCLIPPEDH;Clipped highlight indication.\nShortcut: >
+MAIN_TOOLTIP_INDCLIPPEDS;Clipped shadow indication.\nShortcut: <
MAIN_TOOLTIP_PREVIEWB;Preview the blue channel.\nShortcut: b
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Preview the focus mask.\nShortcut: Shift-f\n\nMore accurate on images with shallow depth of field, low noise and at higher zoom levels.\nZoom out to 10-30% to improve detection accuracy on noisy images.
MAIN_TOOLTIP_PREVIEWG;Preview the green channel.\nShortcut: g
@@ -1651,9 +1651,9 @@ TP_EXPOS_BLACKPOINT_LABEL;Raw Black Points
TP_EXPOS_WHITEPOINT_LABEL;Raw White Points
TP_FILMNEGATIVE_BLUE;Blue ratio
TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
-TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
+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_FILMNEGATIVE_PICK;Pick white and black spots
+TP_FILMNEGATIVE_PICK;Pick neutral spots
TP_FILMNEGATIVE_RED;Red ratio
TP_FILMSIMULATION_LABEL;Film Simulation
TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now?
diff --git a/rtdata/rawtherapee.desktop.in b/rtdata/rawtherapee.desktop.in
index b059e7d6a..f6bc3afeb 100644
--- a/rtdata/rawtherapee.desktop.in
+++ b/rtdata/rawtherapee.desktop.in
@@ -17,4 +17,5 @@ Terminal=false
MimeType=image/jpeg;image/png;image/tiff;image/x-adobe-dng;image/x-canon-cr2;image/x-canon-crf;image/x-canon-crw;image/x-fuji-raf;image/x-hasselblad-3fr;image/x-hasselblad-fff;image/x-jpg;image/x-kodak-dcr;image/x-kodak-k25;image/x-kodak-kdc;image/x-leaf-mos;image/x-leica-rwl;image/x-mamiya-mef;image/x-minolta-mrw;image/x-nikon-nef;image/x-nikon-nrw;image/x-olympus-orf;image/x-panasonic-raw;image/x-panasonic-rw2;image/x-pentax-pef;image/x-pentax-raw;image/x-phaseone-iiq;image/x-raw;image/x-rwz;image/x-samsung-srw;image/x-sigma-x3f;image/x-sony-arq;image/x-sony-arw;image/x-sony-sr2;image/x-sony-srf;image/x-tif;
Categories=Graphics;Photography;2DGraphics;RasterGraphics;GTK;
Keywords=raw;photo;photography;develop;pp3;graphics;
+StartupNotify=true
StartupWMClass=rawtherapee
diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css
index 3f5072f48..a5f52a769 100644
--- a/rtdata/themes/RawTherapee-GTK3-20_.css
+++ b/rtdata/themes/RawTherapee-GTK3-20_.css
@@ -640,11 +640,11 @@ spinbutton entry {
}
spinbutton button {
margin: 0;
- padding: 0;
- border-radius: 0;
+ padding: 0;
+ border-radius: 0;
}
spinbutton button.up {
- border-radius: 0 0.16666666666666666666em 0.16666666666666666666em 0;
+ border-radius: 0 0.16666666666666666666em 0.16666666666666666666em 0;
}
entry:disabled, spinbutton:disabled {
@@ -841,7 +841,7 @@ flowboxchild:selected {
color: #CCCCCC;
padding: 0;
margin: 0 0.25em 0 0.25em;
- font-size: 1.1em;
+ font-size: 1.1em;
}
#MyExpanderTitle:hover {
background-color: #202020;
@@ -955,7 +955,7 @@ fontchooser scrolledwindow,
}
#PlacesPaned {
- margin: 0;
+ margin: 0;
padding: 0 0.4166666666666666em 0 0;
}
#PlacesPaned > box:nth-child(1) scrolledwindow + grid {
@@ -1050,7 +1050,7 @@ dialog frame > label:not(.dummy) {
#LabelRightNotebook {
padding: 0.4166666666666666em;
margin: 0.1666666666666666em;
- font-size: 1.25em;
+ font-size: 1.25em;
}
#ToolPanelNotebook {
diff --git a/rtdata/themes/RawTherapee-GTK3-_19.css b/rtdata/themes/RawTherapee-GTK3-_19.css
index 58742e8ca..f4bec23b1 100644
--- a/rtdata/themes/RawTherapee-GTK3-_19.css
+++ b/rtdata/themes/RawTherapee-GTK3-_19.css
@@ -46,7 +46,7 @@ GtkBox {
border-style: none;
border-radius: 0;
margin: 0;
- padding: 0;
+ padding: 0;
}
GtkGrid {
diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt
index add2e51c0..e39ccde8e 100644
--- a/rtengine/CMakeLists.txt
+++ b/rtengine/CMakeLists.txt
@@ -11,7 +11,7 @@ include_directories(${EXTRA_INCDIR}
${LCMS_INCLUDE_DIRS}
${LENSFUN_INCLUDE_DIRS}
${RSVG_INCLUDE_DIRS}
- )
+)
link_directories("${PROJECT_SOURCE_DIR}/rtexif"
${EXPAT_LIBRARY_DIRS}
@@ -25,26 +25,23 @@ link_directories("${PROJECT_SOURCE_DIR}/rtexif"
${LCMS_LIBRARY_DIRS}
${LENSFUN_LIBRARY_DIRS}
${RSVG_LIBRARY_DIRS}
- )
+)
set(CAMCONSTSFILE "camconst.json")
set(RTENGINESOURCEFILES
+ ahd_demosaic_RT.cc
+ amaze_demosaic_RT.cc
badpixels.cc
boxblur.cc
CA_correct_RT.cc
- capturesharpening.cc
- EdgePreservingDecomposition.cc
- FTblockDN.cc
- PF_correct_RT.cc
- ahd_demosaic_RT.cc
- amaze_demosaic_RT.cc
- cJSON.c
calc_distort.cc
camconst.cc
+ capturesharpening.cc
cfa_linedn_RT.cc
ciecam02.cc
cieimage.cc
+ cJSON.c
clutstore.cc
color.cc
colortemp.cc
@@ -61,14 +58,19 @@ set(RTENGINESOURCEFILES
dual_demosaic_RT.cc
dynamicprofile.cc
eahd_demosaic.cc
+ EdgePreservingDecomposition.cc
fast_demo.cc
ffmanager.cc
filmnegativeproc.cc
filmnegativethumb.cc
flatcurves.cc
+ FTblockDN.cc
+ gamutwarning.cc
gauss.cc
green_equil_RT.cc
+ guidedfilter.cc
hilite_recon.cc
+ histmatching.cc
hphd_demosaic_RT.cc
iccjpeg.cc
iccstore.cc
@@ -83,29 +85,27 @@ set(RTENGINESOURCEFILES
improcfun.cc
impulse_denoise.cc
init.cc
+ ipdehaze.cc
iplab2rgb.cc
+ iplabregions.cc
+ iplocalcontrast.cc
ipresize.cc
ipretinex.cc
+ ipshadowshighlights.cc
ipsharpen.cc
+ ipsoftlight.cc
iptransform.cc
ipvibrance.cc
ipwavelet.cc
jdatasrc.cc
jpeg_ijg/jpeg_memsrc.cc
- klt/convolve.cc
- klt/error.cc
- klt/klt.cc
- klt/klt_util.cc
- klt/pnmio.cc
- klt/pyramid.cc
- klt/selectGoodFeatures.cc
- klt/storeFeatures.cc
- klt/trackFeatures.cc
- klt/writeFeatures.cc
labimage.cc
lcp.cc
+ lj92.c
loadinitial.cc
myfile.cc
+ pdaflinesfilter.cc
+ PF_correct_RT.cc
pipettebuffer.cc
pixelshift.cc
previewimage.cc
@@ -117,27 +117,17 @@ set(RTENGINESOURCEFILES
rcd_demosaic.cc
refreshmap.cc
rt_algo.cc
+ rtlensfun.cc
rtthumbnail.cc
shmap.cc
simpleprocess.cc
slicer.cc
stdimagesource.cc
- utils.cc
- rtlensfun.cc
tmo_fattal02.cc
- iplocalcontrast.cc
- histmatching.cc
- pdaflinesfilter.cc
- gamutwarning.cc
- ipshadowshighlights.cc
- xtrans_demosaic.cc
+ utils.cc
vng4_demosaic_RT.cc
- ipsoftlight.cc
- guidedfilter.cc
- ipdehaze.cc
- iplabregions.cc
- lj92.c
- )
+ xtrans_demosaic.cc
+)
if(LENSFUN_HAS_LOAD_DIRECTORY)
set_source_files_properties(rtlensfun.cc PROPERTIES COMPILE_DEFINITIONS RT_LENSFUN_HAS_LOAD_DIRECTORY)
@@ -151,21 +141,22 @@ if(NOT WITH_SYSTEM_KLT)
set(RTENGINESOURCEFILES ${RTENGINESOURCEFILES}
klt/convolve.cc
klt/error.cc
- klt/klt.cc
klt/klt_util.cc
+ klt/klt.cc
klt/pnmio.cc
klt/pyramid.cc
klt/selectGoodFeatures.cc
klt/storeFeatures.cc
klt/trackFeatures.cc
klt/writeFeatures.cc
- )
+ )
set(KLT_LIBRARIES)
endif()
include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}")
-add_library(rtengine ${RTENGINESOURCEFILES})
+add_library(rtengine STATIC ${RTENGINESOURCEFILES})
+
add_dependencies(rtengine UpdateInfo)
# It may be nice to store library version too
@@ -191,6 +182,6 @@ target_link_libraries(rtengine rtexif
${ZLIB_LIBRARIES}
${LENSFUN_LIBRARIES}
${RSVG_LIBRARIES}
- )
+)
install(FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
diff --git a/rtengine/camconst.json b/rtengine/camconst.json
index 7f481e104..3393dec9f 100644
--- a/rtengine/camconst.json
+++ b/rtengine/camconst.json
@@ -1481,6 +1481,12 @@ Camera constants:
}
},
+ { // Quality B
+ "make_model": "NIKON COOLPIX P1000",
+ "dcraw_matrix": [ 14294, -6116, -1333, -1628, 10219, 1637, -14, 1158, 5022 ], // ColorMatrix2 from Adobe DNG Converter 11.4
+ "ranges": { "black": 200, "white": 4093 }
+ },
+
{ // Quality B, no LENR samples
"make_model": "Nikon D5",
"dcraw_matrix": [ 9200,-3522,-992,-5755,13803,2117,-753,1486,6338 ], // adobe dng_v9.5 d65
diff --git a/rtengine/capturesharpening.cc b/rtengine/capturesharpening.cc
index 6720d9abc..a080b4f36 100644
--- a/rtengine/capturesharpening.cc
+++ b/rtengine/capturesharpening.cc
@@ -668,7 +668,7 @@ BENCHFUN
buildClipMaskBayer(rawData, W, H, clipMask, whites);
const unsigned int fc[2] = {FC(0,0), FC(1,0)};
if (sharpeningParams.autoRadius) {
- radius = calcRadiusBayer(rawData, W, H, 1000.f, clipVal, fc);
+ radius = std::min(calcRadiusBayer(rawData, W, H, 1000.f, clipVal, fc), 1.15f);
}
} else if (ri->getSensorType() == ST_FUJI_XTRANS) {
float whites[6][6];
@@ -696,14 +696,14 @@ BENCHFUN
}
}
if (sharpeningParams.autoRadius) {
- radius = calcRadiusXtrans(rawData, W, H, 1000.f, clipVal, i, j);
+ radius = std::min(calcRadiusXtrans(rawData, W, H, 1000.f, clipVal, i, j), 1.15f);
}
} else if (ri->get_colors() == 1) {
buildClipMaskMono(rawData, W, H, clipMask, (ri->get_white(0) - c_black[0]) * scale_mul[0] * clipLimit);
if (sharpeningParams.autoRadius) {
const unsigned int fc[2] = {0, 0};
- radius = calcRadiusBayer(rawData, W, H, 1000.f, clipVal, fc);
+ radius = std::min(calcRadiusBayer(rawData, W, H, 1000.f, clipVal, fc), 1.15f);
}
}
@@ -810,6 +810,7 @@ BENCHFUN
if (plistener) {
plistener->setProgress(1.0);
}
+ rgbSourceModified = false;
}
} /* namespace */
diff --git a/rtengine/ciecam02.cc b/rtengine/ciecam02.cc
index dfef273d6..dc71fee85 100644
--- a/rtengine/ciecam02.cc
+++ b/rtengine/ciecam02.cc
@@ -145,8 +145,8 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf
}
outCurve *= 32767.f;
- //printf("out500=%f out15000=%f\n", outCurve[500], outCurve[15000]);
- //outCurve.dump("brig");
+ //printf("out500=%f out15000=%f\n", outCurve[500], outCurve[15000]);
+ //outCurve.dump("brig");
}
/**
diff --git a/rtengine/color.h b/rtengine/color.h
index 97835ba10..2acf675d4 100644
--- a/rtengine/color.h
+++ b/rtengine/color.h
@@ -1070,12 +1070,11 @@ public:
*/
static inline double gamma2 (double x) // g3 1+g4
{
- // return x <= 0.003041 ? x * 12.92310 : 1.055 * exp(log(x) / 2.39990) - 0.055;//calculate with calcgamma
+ // return x <= 0.003041 ? x * 12.92310 : 1.055 * exp(log(x) / 2.39990) - 0.055;//calculate with calcgamma
//return x <= 0.0031308 ? x * 12.92310 : 1.055 * exp(log(x) / sRGBGammaCurve) - 0.055;//standard discontinuous
- //very small differences between the 2
+ //very small differences between the 2
return x <= 0.003040 ? x * 12.92310 : 1.055 * exp(log(x) / sRGBGammaCurve) - 0.055;//continuous
- // return x <= 0.003041 ? x * 12.92310 : 1.055011 * exp(log(x) / sRGBGammaCurve) - 0.055011;//continuous
-
+ // return x <= 0.003041 ? x * 12.92310 : 1.055011 * exp(log(x) / sRGBGammaCurve) - 0.055011;//continuous
}
@@ -1087,12 +1086,11 @@ public:
*/
static inline double igamma2 (double x) //g2
{
- // return x <= 0.039289 ? x / 12.92310 : exp(log((x + 0.055) / 1.055) * 2.39990);//calculate with calcgamma
- // return x <= 0.04045 ? x / 12.92310 : exp(log((x + 0.055) / 1.055) * sRGBGammaCurve);//standard discontinuous
- //very small differences between the 4
+ // return x <= 0.039289 ? x / 12.92310 : exp(log((x + 0.055) / 1.055) * 2.39990);//calculate with calcgamma
+ // return x <= 0.04045 ? x / 12.92310 : exp(log((x + 0.055) / 1.055) * sRGBGammaCurve);//standard discontinuous
+ //very small differences between the 4
return x <= 0.039286 ? x / 12.92310 : exp(log((x + 0.055) / 1.055) * sRGBGammaCurve);//continuous
- // return x <= 0.039293 ? x / 12.92310 : exp(log((x + 0.055011) / 1.055011) * sRGBGammaCurve);//continuous
-
+ // return x <= 0.039293 ? x / 12.92310 : exp(log((x + 0.055011) / 1.055011) * sRGBGammaCurve);//continuous
}
diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc
index ef209118b..eb206a15f 100644
--- a/rtengine/dcraw.cc
+++ b/rtengine/dcraw.cc
@@ -2418,7 +2418,7 @@ void CLASS hasselblad_correct()
void CLASS hasselblad_load_raw()
{
struct jhead jh;
- int *back[5], diff[12];
+ int diff[12];
if (!ljpeg_start (&jh, 0)) {
return;
@@ -2426,18 +2426,10 @@ void CLASS hasselblad_load_raw()
order = 0x4949;
ph1_bithuff_t ph1_bithuff(this, ifp, order);
hb_bits(-1);
- back[4] = (int *) calloc(raw_width, 3 * sizeof **back);
- merror(back[4], "hasselblad_load_raw()");
- for (int c = 0; c < 3; ++c) {
- back[c] = back[4] + c * raw_width;
- }
- const int sh = tiff_samples > 1;
- cblack[6] >>= sh;
const int shot = LIM(shot_select, 1, tiff_samples) - 1;
+ const int predictor_init = static_cast(0x8000 + load_flags);
for (int row = 0; row < raw_height; ++row) {
- for (int c = 0; c < 4; ++c) {
- back[(c + 3) & 3] = back[c];
- }
+ int stashed_predictors[2] = {predictor_init, predictor_init};
for (int col = 0; col < raw_width; col += 2) {
for (int s = 0; s < tiff_samples * 2; s += 2) {
const int len[2]= {
@@ -2455,18 +2447,10 @@ void CLASS hasselblad_load_raw()
}
}
for (int s = col; s < col + 2; ++s) {
- int pred;
- if (col) {
- pred = back[2][s - 2];
- if (row > 1 && jh.psv == 11) {
- pred += back[0][s] / 2 - back[0][s - 2] / 2;
- }
- } else {
- pred = 0x8000 + load_flags;
- }
+ int pred = stashed_predictors[s & 1];
for (int c = 0; c < tiff_samples; ++c) {
pred += diff[(s & 1) * tiff_samples + c];
- const unsigned upix = pred >> sh & 0xffff;
+ const unsigned upix = pred & 0xffff;
if (raw_image && c == shot) {
RAW(row, s) = upix;
}
@@ -2479,12 +2463,13 @@ void CLASS hasselblad_load_raw()
*ip = c < 4 ? upix : (*ip + upix) >> 1;
}
}
+ if (c == (tiff_samples-1)) {
+ stashed_predictors[s & 1] = pred;
+ }
}
- back[2][s] = pred;
}
}
}
- free(back[4]);
ljpeg_end(&jh);
if (image) {
mix_green = 1;
diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h
index f88108422..684927e47 100644
--- a/rtengine/improcfun.h
+++ b/rtengine/improcfun.h
@@ -67,14 +67,14 @@ class ImProcFunctions
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);
- bool needsCA();
- bool needsDistortion();
- bool needsRotation();
- bool needsPerspective();
- bool needsGradient();
- bool needsVignetting();
- bool needsLCP();
- bool needsLensfun();
+ bool needsCA() const;
+ bool needsDistortion() const;
+ bool needsRotation() const;
+ bool needsPerspective() const;
+ bool needsGradient() const;
+ bool needsVignetting() const;
+ bool needsLCP() const;
+ bool needsLensfun() const;
// static cmsUInt8Number* Mempro = NULL;
@@ -99,8 +99,8 @@ public:
}
void setScale(double iscale);
- bool needsTransform();
- bool needsPCVignetting();
+ bool needsTransform() const;
+ bool needsPCVignetting() const;
void firstAnalysis(const Imagefloat* const working, const procparams::ProcParams ¶ms, LUTu & vhist16);
void updateColorProfiles(const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck);
@@ -247,11 +247,11 @@ public:
// CieImage *ciec;
void workingtrc(const Imagefloat* src, Imagefloat* dst, int cw, int ch, int mul, const Glib::ustring &profile, double gampos, double slpos, cmsHTRANSFORM &transform, bool normalizeIn = true, bool normalizeOut = true, bool keepTransForm = false) const;
- bool transCoord(int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LensCorrection *pLCPMap = nullptr);
- bool transCoord(int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LensCorrection *pLCPMap = nullptr);
+ bool transCoord(int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LensCorrection *pLCPMap = nullptr) const;
+ bool transCoord(int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LensCorrection *pLCPMap = nullptr) const;
static void getAutoExp(const LUTu & histogram, int histcompr, double clip, double& expcomp, int& bright, int& contr, int& black, int& hlcompr, int& hlcomprthresh);
static double getAutoDistor(const Glib::ustring& fname, int thumb_size);
- double getTransformAutoFill(int oW, int oH, const LensCorrection *pLCPMap = nullptr);
+ double getTransformAutoFill(int oW, int oH, const LensCorrection *pLCPMap = nullptr) const;
void rgb2lab(const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace);
void lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace);
};
diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc
index 99fd39f7e..69b57d0ba 100644
--- a/rtengine/iptransform.cc
+++ b/rtengine/iptransform.cc
@@ -208,7 +208,7 @@ namespace rtengine
#define CLIPTOC(a,b,c,d) ((a)>=(b)?((a)<=(c)?(a):(d=true,(c))):(d=true,(b)))
bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef,
- const LensCorrection *pLCPMap)
+ const LensCorrection *pLCPMap) const
{
bool clipped = false;
@@ -310,7 +310,7 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector &src,
}
// Transform all corners and critical sidelines of an image
-bool ImProcFunctions::transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef, const LensCorrection *pLCPMap)
+bool ImProcFunctions::transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef, const LensCorrection *pLCPMap) const
{
const int DivisionsPerBorder = 32;
@@ -1113,7 +1113,7 @@ void ImProcFunctions::transformLCPCAOnly(Imagefloat *original, Imagefloat *trans
}
-double ImProcFunctions::getTransformAutoFill (int oW, int oH, const LensCorrection *pLCPMap)
+double ImProcFunctions::getTransformAutoFill (int oW, int oH, const LensCorrection *pLCPMap) const
{
if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == nullptr)) {
return 1;
@@ -1137,52 +1137,52 @@ double ImProcFunctions::getTransformAutoFill (int oW, int oH, const LensCorrecti
return scaleL;
}
-bool ImProcFunctions::needsCA ()
+bool ImProcFunctions::needsCA () const
{
return fabs (params->cacorrection.red) > 1e-15 || fabs (params->cacorrection.blue) > 1e-15;
}
-bool ImProcFunctions::needsDistortion ()
+bool ImProcFunctions::needsDistortion () const
{
return fabs (params->distortion.amount) > 1e-15;
}
-bool ImProcFunctions::needsRotation ()
+bool ImProcFunctions::needsRotation () const
{
return fabs (params->rotate.degree) > 1e-15;
}
-bool ImProcFunctions::needsPerspective ()
+bool ImProcFunctions::needsPerspective () const
{
return params->perspective.horizontal || params->perspective.vertical;
}
-bool ImProcFunctions::needsGradient ()
+bool ImProcFunctions::needsGradient () const
{
return params->gradient.enabled && fabs (params->gradient.strength) > 1e-15;
}
-bool ImProcFunctions::needsPCVignetting ()
+bool ImProcFunctions::needsPCVignetting () const
{
return params->pcvignette.enabled && fabs (params->pcvignette.strength) > 1e-15;
}
-bool ImProcFunctions::needsVignetting ()
+bool ImProcFunctions::needsVignetting () const
{
return params->vignetting.amount;
}
-bool ImProcFunctions::needsLCP ()
+bool ImProcFunctions::needsLCP () const
{
return params->lensProf.useLcp();
}
-bool ImProcFunctions::needsLensfun()
+bool ImProcFunctions::needsLensfun() const
{
return params->lensProf.useLensfun();
}
-bool ImProcFunctions::needsTransform ()
+bool ImProcFunctions::needsTransform () const
{
return needsCA () || needsDistortion () || needsRotation () || needsPerspective () || needsGradient () || needsPCVignetting () || needsVignetting () || needsLCP() || needsLensfun();
}
diff --git a/rtengine/rt_algo.cc b/rtengine/rt_algo.cc
index dd7783c1d..aadbac7f7 100644
--- a/rtengine/rt_algo.cc
+++ b/rtengine/rt_algo.cc
@@ -352,7 +352,7 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H,
contrastThreshold = calcContrastThreshold(luminance, minY, minX, tilesize);
break;
} else {
- // in second pass we allow a variance of 4
+ // in second pass we allow a variance of 8
// we additionally scan the tiles +-skip pixels around the best tile from pass 2
// Means we scan (2 * skip + 1)^2 tiles in this step to get a better hit rate
// fortunately the scan is quite fast, so we use only one core and don't parallelize
diff --git a/rtengine/sleef.c b/rtengine/sleef.c
index cc92be108..a01aef5b9 100644
--- a/rtengine/sleef.c
+++ b/rtengine/sleef.c
@@ -26,29 +26,29 @@
#define pow_F(a,b) (xexpf(b*xlogf(a)))
__inline int64_t doubleToRawLongBits(double d) {
- union {
- double f;
- int64_t i;
- } tmp;
- tmp.f = d;
- return tmp.i;
+ union {
+ double f;
+ int64_t i;
+ } tmp;
+ tmp.f = d;
+ return tmp.i;
}
__inline double longBitsToDouble(int64_t i) {
- union {
- double f;
- int64_t i;
- } tmp;
- tmp.i = i;
- return tmp.f;
+ union {
+ double f;
+ int64_t i;
+ } tmp;
+ tmp.i = i;
+ return tmp.f;
}
__inline double xfabs(double x) {
- return longBitsToDouble(0x7fffffffffffffffLL & doubleToRawLongBits(x));
+ return longBitsToDouble(0x7fffffffffffffffLL & doubleToRawLongBits(x));
}
__inline double mulsign(double x, double y) {
- return longBitsToDouble(doubleToRawLongBits(x) ^ (doubleToRawLongBits(y) & (1LL << 63)));
+ return longBitsToDouble(doubleToRawLongBits(x) ^ (doubleToRawLongBits(y) & (1LL << 63)));
}
__inline double sign(double d) { return mulsign(1, d); }
@@ -61,827 +61,827 @@ __inline int xisminf(double x) { return x == -rtengine::RT_INFINITY; }
__inline int xispinf(double x) { return x == rtengine::RT_INFINITY; }
__inline double ldexpk(double x, int q) {
- double u;
- int m;
- m = q >> 31;
- m = (((m + q) >> 9) - m) << 7;
- q = q - (m << 2);
- u = longBitsToDouble(((int64_t)(m + 0x3ff)) << 52);
- double u2 = u*u;
- u2 = u2 * u2;
- x = x * u2;
- u = longBitsToDouble(((int64_t)(q + 0x3ff)) << 52);
- return x * u;
+ double u;
+ int m;
+ m = q >> 31;
+ m = (((m + q) >> 9) - m) << 7;
+ q = q - (m << 2);
+ u = longBitsToDouble(((int64_t)(m + 0x3ff)) << 52);
+ double u2 = u*u;
+ u2 = u2 * u2;
+ x = x * u2;
+ u = longBitsToDouble(((int64_t)(q + 0x3ff)) << 52);
+ return x * u;
}
__inline double xldexp(double x, int q) { return ldexpk(x, q); }
__inline int ilogbp1(double d) {
- int m = d < 4.9090934652977266E-91;
- d = m ? 2.037035976334486E90 * d : d;
- int q = (doubleToRawLongBits(d) >> 52) & 0x7ff;
- q = m ? q - (300 + 0x03fe) : q - 0x03fe;
- return q;
+ int m = d < 4.9090934652977266E-91;
+ d = m ? 2.037035976334486E90 * d : d;
+ int q = (doubleToRawLongBits(d) >> 52) & 0x7ff;
+ q = m ? q - (300 + 0x03fe) : q - 0x03fe;
+ return q;
}
__inline int xilogb(double d) {
- int e = ilogbp1(xfabs(d)) - 1;
- e = d == 0 ? (-2147483647 - 1) : e;
- e = d == rtengine::RT_INFINITY || d == -rtengine::RT_INFINITY ? 2147483647 : e;
- return e;
+ int e = ilogbp1(xfabs(d)) - 1;
+ e = d == 0 ? (-2147483647 - 1) : e;
+ e = d == rtengine::RT_INFINITY || d == -rtengine::RT_INFINITY ? 2147483647 : e;
+ return e;
}
__inline double upper(double d) {
- return longBitsToDouble(doubleToRawLongBits(d) & 0xfffffffff8000000LL);
+ return longBitsToDouble(doubleToRawLongBits(d) & 0xfffffffff8000000LL);
}
typedef struct {
- double x, y;
+ double x, y;
} double2;
typedef struct {
- float x, y;
+ float x, y;
} float2;
__inline double2 dd(double h, double l) {
- double2 ret;
- ret.x = h; ret.y = l;
- return ret;
+ double2 ret;
+ ret.x = h; ret.y = l;
+ return ret;
}
__inline double2 normalize_d(double2 t) {
- double2 s;
+ double2 s;
- s.x = t.x + t.y;
- s.y = t.x - s.x + t.y;
+ s.x = t.x + t.y;
+ s.y = t.x - s.x + t.y;
- return s;
+ return s;
}
__inline double2 scale_d(double2 d, double s) {
- double2 r;
+ double2 r;
- r.x = d.x * s;
- r.y = d.y * s;
+ r.x = d.x * s;
+ r.y = d.y * s;
- return r;
+ return r;
}
__inline double2 add2_ss(double x, double y) {
- double2 r;
+ double2 r;
- r.x = x + y;
- double v = r.x - x;
- r.y = (x - (r.x - v)) + (y - v);
+ r.x = x + y;
+ double v = r.x - x;
+ r.y = (x - (r.x - v)) + (y - v);
- return r;
+ return r;
}
__inline double2 add_ds(double2 x, double y) {
- // |x| >= |y|
+ // |x| >= |y|
- double2 r;
+ double2 r;
- assert(xisnan(x.x) || xisnan(y) || xfabs(x.x) >= xfabs(y));
+ assert(xisnan(x.x) || xisnan(y) || xfabs(x.x) >= xfabs(y));
- r.x = x.x + y;
- r.y = x.x - r.x + y + x.y;
+ r.x = x.x + y;
+ r.y = x.x - r.x + y + x.y;
- return r;
+ return r;
}
__inline double2 add2_ds(double2 x, double y) {
- // |x| >= |y|
+ // |x| >= |y|
- double2 r;
+ double2 r;
- r.x = x.x + y;
- double v = r.x - x.x;
- r.y = (x.x - (r.x - v)) + (y - v);
- r.y += x.y;
+ r.x = x.x + y;
+ double v = r.x - x.x;
+ r.y = (x.x - (r.x - v)) + (y - v);
+ r.y += x.y;
- return r;
+ return r;
}
__inline double2 add_sd(double x, double2 y) {
- // |x| >= |y|
+ // |x| >= |y|
- double2 r;
+ double2 r;
- assert(xisnan(x) || xisnan(y.x) || xfabs(x) >= xfabs(y.x));
+ assert(xisnan(x) || xisnan(y.x) || xfabs(x) >= xfabs(y.x));
- r.x = x + y.x;
- r.y = x - r.x + y.x + y.y;
+ r.x = x + y.x;
+ r.y = x - r.x + y.x + y.y;
- return r;
+ return r;
}
__inline double2 add_dd(double2 x, double2 y) {
- // |x| >= |y|
+ // |x| >= |y|
- double2 r;
+ double2 r;
- assert(xisnan(x.x) || xisnan(y.x) || xfabs(x.x) >= xfabs(y.x));
+ assert(xisnan(x.x) || xisnan(y.x) || xfabs(x.x) >= xfabs(y.x));
- r.x = x.x + y.x;
- r.y = x.x - r.x + y.x + x.y + y.y;
+ r.x = x.x + y.x;
+ r.y = x.x - r.x + y.x + x.y + y.y;
- return r;
+ return r;
}
__inline double2 add2_dd(double2 x, double2 y) {
- double2 r;
+ double2 r;
- r.x = x.x + y.x;
- double v = r.x - x.x;
- r.y = (x.x - (r.x - v)) + (y.x - v);
- r.y += x.y + y.y;
+ r.x = x.x + y.x;
+ double v = r.x - x.x;
+ r.y = (x.x - (r.x - v)) + (y.x - v);
+ r.y += x.y + y.y;
- return r;
+ return r;
}
__inline double2 div_dd(double2 n, double2 d) {
- double t = 1.0 / d.x;
- double dh = upper(d.x), dl = d.x - dh;
- double th = upper(t ), tl = t - th;
- double nhh = upper(n.x), nhl = n.x - nhh;
+ double t = 1.0 / d.x;
+ double dh = upper(d.x), dl = d.x - dh;
+ double th = upper(t ), tl = t - th;
+ double nhh = upper(n.x), nhl = n.x - nhh;
- double2 q;
+ double2 q;
- q.x = n.x * t;
+ q.x = n.x * t;
- double u = -q.x + nhh * th + nhh * tl + nhl * th + nhl * tl +
- q.x * (1 - dh * th - dh * tl - dl * th - dl * tl);
+ double u = -q.x + nhh * th + nhh * tl + nhl * th + nhl * tl +
+ q.x * (1 - dh * th - dh * tl - dl * th - dl * tl);
- q.y = t * (n.y - q.x * d.y) + u;
+ q.y = t * (n.y - q.x * d.y) + u;
- return q;
+ return q;
}
__inline double2 mul_ss(double x, double y) {
- double xh = upper(x), xl = x - xh;
- double yh = upper(y), yl = y - yh;
- double2 r;
+ double xh = upper(x), xl = x - xh;
+ double yh = upper(y), yl = y - yh;
+ double2 r;
- r.x = x * y;
- r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl;
+ r.x = x * y;
+ r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl;
- return r;
+ return r;
}
__inline double2 mul_ds(double2 x, double y) {
- double xh = upper(x.x), xl = x.x - xh;
- double yh = upper(y ), yl = y - yh;
- double2 r;
+ double xh = upper(x.x), xl = x.x - xh;
+ double yh = upper(y ), yl = y - yh;
+ double2 r;
- r.x = x.x * y;
- r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl + x.y * y;
+ r.x = x.x * y;
+ r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl + x.y * y;
- return r;
+ return r;
}
__inline double2 mul_dd(double2 x, double2 y) {
- double xh = upper(x.x), xl = x.x - xh;
- double yh = upper(y.x), yl = y.x - yh;
- double2 r;
+ double xh = upper(x.x), xl = x.x - xh;
+ double yh = upper(y.x), yl = y.x - yh;
+ double2 r;
- r.x = x.x * y.x;
- r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl + x.x * y.y + x.y * y.x;
+ r.x = x.x * y.x;
+ r.y = xh * yh - r.x + xl * yh + xh * yl + xl * yl + x.x * y.y + x.y * y.x;
- return r;
+ return r;
}
__inline double2 squ_d(double2 x) {
- double xh = upper(x.x), xl = x.x - xh;
- double2 r;
+ double xh = upper(x.x), xl = x.x - xh;
+ double2 r;
- r.x = x.x * x.x;
- r.y = xh * xh - r.x + (xh + xh) * xl + xl * xl + x.x * (x.y + x.y);
+ r.x = x.x * x.x;
+ r.y = xh * xh - r.x + (xh + xh) * xl + xl * xl + x.x * (x.y + x.y);
- return r;
+ return r;
}
__inline double2 rec_s(double d) {
- double t = 1.0 / d;
- double dh = upper(d), dl = d - dh;
- double th = upper(t), tl = t - th;
- double2 q;
+ double t = 1.0 / d;
+ double dh = upper(d), dl = d - dh;
+ double th = upper(t), tl = t - th;
+ double2 q;
- q.x = t;
- q.y = t * (1 - dh * th - dh * tl - dl * th - dl * tl);
+ q.x = t;
+ q.y = t * (1 - dh * th - dh * tl - dl * th - dl * tl);
- return q;
+ return q;
}
__inline double2 sqrt_d(double2 d) {
- double t = sqrt(d.x + d.y);
- return scale_d(mul_dd(add2_dd(d, mul_ss(t, t)), rec_s(t)), 0.5);
+ double t = sqrt(d.x + d.y);
+ return scale_d(mul_dd(add2_dd(d, mul_ss(t, t)), rec_s(t)), 0.5);
}
__inline double atan2k(double y, double x) {
- double s, t, u;
- int q = 0;
+ double s, t, u;
+ int q = 0;
- if (x < 0) { x = -x; q = -2; }
- if (y > x) { t = x; x = y; y = -t; q += 1; }
+ if (x < 0) { x = -x; q = -2; }
+ if (y > x) { t = x; x = y; y = -t; q += 1; }
- s = y / x;
- t = s * s;
+ s = y / x;
+ t = s * s;
- u = -1.88796008463073496563746e-05;
- u = u * t + (0.000209850076645816976906797);
- u = u * t + (-0.00110611831486672482563471);
- u = u * t + (0.00370026744188713119232403);
- u = u * t + (-0.00889896195887655491740809);
- u = u * t + (0.016599329773529201970117);
- u = u * t + (-0.0254517624932312641616861);
- u = u * t + (0.0337852580001353069993897);
- u = u * t + (-0.0407629191276836500001934);
- u = u * t + (0.0466667150077840625632675);
- u = u * t + (-0.0523674852303482457616113);
- u = u * t + (0.0587666392926673580854313);
- u = u * t + (-0.0666573579361080525984562);
- u = u * t + (0.0769219538311769618355029);
- u = u * t + (-0.090908995008245008229153);
- u = u * t + (0.111111105648261418443745);
- u = u * t + (-0.14285714266771329383765);
- u = u * t + (0.199999999996591265594148);
- u = u * t + (-0.333333333333311110369124);
+ u = -1.88796008463073496563746e-05;
+ u = u * t + (0.000209850076645816976906797);
+ u = u * t + (-0.00110611831486672482563471);
+ u = u * t + (0.00370026744188713119232403);
+ u = u * t + (-0.00889896195887655491740809);
+ u = u * t + (0.016599329773529201970117);
+ u = u * t + (-0.0254517624932312641616861);
+ u = u * t + (0.0337852580001353069993897);
+ u = u * t + (-0.0407629191276836500001934);
+ u = u * t + (0.0466667150077840625632675);
+ u = u * t + (-0.0523674852303482457616113);
+ u = u * t + (0.0587666392926673580854313);
+ u = u * t + (-0.0666573579361080525984562);
+ u = u * t + (0.0769219538311769618355029);
+ u = u * t + (-0.090908995008245008229153);
+ u = u * t + (0.111111105648261418443745);
+ u = u * t + (-0.14285714266771329383765);
+ u = u * t + (0.199999999996591265594148);
+ u = u * t + (-0.333333333333311110369124);
- t = u * t * s + s;
- t = q * (rtengine::RT_PI_2) + t;
+ t = u * t * s + s;
+ t = q * (rtengine::RT_PI_2) + t;
- return t;
+ return t;
}
__inline double xatan2(double y, double x) {
- double r = atan2k(xfabs(y), x);
+ double r = atan2k(xfabs(y), x);
- r = mulsign(r, x);
- if (xisinf(x) || x == 0) r = rtengine::RT_PI_2 - (xisinf(x) ? (sign(x) * (rtengine::RT_PI_2)) : 0);
- if (xisinf(y) ) r = rtengine::RT_PI_2 - (xisinf(x) ? (sign(x) * (rtengine::RT_PI*1/4)) : 0);
- if ( y == 0) r = (sign(x) == -1 ? rtengine::RT_PI : 0);
+ r = mulsign(r, x);
+ if (xisinf(x) || x == 0) r = rtengine::RT_PI_2 - (xisinf(x) ? (sign(x) * (rtengine::RT_PI_2)) : 0);
+ if (xisinf(y) ) r = rtengine::RT_PI_2 - (xisinf(x) ? (sign(x) * (rtengine::RT_PI*1/4)) : 0);
+ if ( y == 0) r = (sign(x) == -1 ? rtengine::RT_PI : 0);
- return xisnan(x) || xisnan(y) ? rtengine::RT_NAN : mulsign(r, y);
+ return xisnan(x) || xisnan(y) ? rtengine::RT_NAN : mulsign(r, y);
}
__inline double xasin(double d) {
- return mulsign(atan2k(xfabs(d), sqrt((1+d)*(1-d))), d);
+ return mulsign(atan2k(xfabs(d), sqrt((1+d)*(1-d))), d);
}
__inline double xacos(double d) {
- return mulsign(atan2k(sqrt((1+d)*(1-d)), xfabs(d)), d) + (d < 0 ? rtengine::RT_PI : 0);
+ return mulsign(atan2k(sqrt((1+d)*(1-d)), xfabs(d)), d) + (d < 0 ? rtengine::RT_PI : 0);
}
__inline double xatan(double s) {
- double t, u;
- int q = 0;
+ double t, u;
+ int q = 0;
- if (s < 0) { s = -s; q = 2; }
- if (s > 1) { s = 1.0 / s; q |= 1; }
+ if (s < 0) { s = -s; q = 2; }
+ if (s > 1) { s = 1.0 / s; q |= 1; }
- t = s * s;
+ t = s * s;
- u = -1.88796008463073496563746e-05;
- u = u * t + (0.000209850076645816976906797);
- u = u * t + (-0.00110611831486672482563471);
- u = u * t + (0.00370026744188713119232403);
- u = u * t + (-0.00889896195887655491740809);
- u = u * t + (0.016599329773529201970117);
- u = u * t + (-0.0254517624932312641616861);
- u = u * t + (0.0337852580001353069993897);
- u = u * t + (-0.0407629191276836500001934);
- u = u * t + (0.0466667150077840625632675);
- u = u * t + (-0.0523674852303482457616113);
- u = u * t + (0.0587666392926673580854313);
- u = u * t + (-0.0666573579361080525984562);
- u = u * t + (0.0769219538311769618355029);
- u = u * t + (-0.090908995008245008229153);
- u = u * t + (0.111111105648261418443745);
- u = u * t + (-0.14285714266771329383765);
- u = u * t + (0.199999999996591265594148);
- u = u * t + (-0.333333333333311110369124);
+ u = -1.88796008463073496563746e-05;
+ u = u * t + (0.000209850076645816976906797);
+ u = u * t + (-0.00110611831486672482563471);
+ u = u * t + (0.00370026744188713119232403);
+ u = u * t + (-0.00889896195887655491740809);
+ u = u * t + (0.016599329773529201970117);
+ u = u * t + (-0.0254517624932312641616861);
+ u = u * t + (0.0337852580001353069993897);
+ u = u * t + (-0.0407629191276836500001934);
+ u = u * t + (0.0466667150077840625632675);
+ u = u * t + (-0.0523674852303482457616113);
+ u = u * t + (0.0587666392926673580854313);
+ u = u * t + (-0.0666573579361080525984562);
+ u = u * t + (0.0769219538311769618355029);
+ u = u * t + (-0.090908995008245008229153);
+ u = u * t + (0.111111105648261418443745);
+ u = u * t + (-0.14285714266771329383765);
+ u = u * t + (0.199999999996591265594148);
+ u = u * t + (-0.333333333333311110369124);
- t = s + s * (t * u);
+ t = s + s * (t * u);
- if ((q & 1) != 0) t = 1.570796326794896557998982 - t;
- if ((q & 2) != 0) t = -t;
+ if ((q & 1) != 0) t = 1.570796326794896557998982 - t;
+ if ((q & 2) != 0) t = -t;
- return t;
+ return t;
}
__inline double xsin(double d) {
- int q;
- double u, s;
+ int q;
+ double u, s;
- q = (int)xrint(d * rtengine::RT_1_PI);
+ q = (int)xrint(d * rtengine::RT_1_PI);
- d = mla(q, -PI4_A*4, d);
- d = mla(q, -PI4_B*4, d);
- d = mla(q, -PI4_C*4, d);
+ d = mla(q, -PI4_A*4, d);
+ d = mla(q, -PI4_B*4, d);
+ d = mla(q, -PI4_C*4, d);
- s = d * d;
+ s = d * d;
- if ((q & 1) != 0) d = -d;
+ if ((q & 1) != 0) d = -d;
- u = -7.97255955009037868891952e-18;
- u = mla(u, s, 2.81009972710863200091251e-15);
- u = mla(u, s, -7.64712219118158833288484e-13);
- u = mla(u, s, 1.60590430605664501629054e-10);
- u = mla(u, s, -2.50521083763502045810755e-08);
- u = mla(u, s, 2.75573192239198747630416e-06);
- u = mla(u, s, -0.000198412698412696162806809);
- u = mla(u, s, 0.00833333333333332974823815);
- u = mla(u, s, -0.166666666666666657414808);
+ u = -7.97255955009037868891952e-18;
+ u = mla(u, s, 2.81009972710863200091251e-15);
+ u = mla(u, s, -7.64712219118158833288484e-13);
+ u = mla(u, s, 1.60590430605664501629054e-10);
+ u = mla(u, s, -2.50521083763502045810755e-08);
+ u = mla(u, s, 2.75573192239198747630416e-06);
+ u = mla(u, s, -0.000198412698412696162806809);
+ u = mla(u, s, 0.00833333333333332974823815);
+ u = mla(u, s, -0.166666666666666657414808);
- u = mla(s, u * d, d);
+ u = mla(s, u * d, d);
- return u;
+ return u;
}
__inline double xcos(double d) {
- int q;
- double u, s;
+ int q;
+ double u, s;
- q = 1 + 2*(int)xrint(d * rtengine::RT_1_PI - 0.5);
+ q = 1 + 2*(int)xrint(d * rtengine::RT_1_PI - 0.5);
- d = mla(q, -PI4_A*2, d);
- d = mla(q, -PI4_B*2, d);
- d = mla(q, -PI4_C*2, d);
+ d = mla(q, -PI4_A*2, d);
+ d = mla(q, -PI4_B*2, d);
+ d = mla(q, -PI4_C*2, d);
- s = d * d;
+ s = d * d;
- if ((q & 2) == 0) d = -d;
+ if ((q & 2) == 0) d = -d;
- u = -7.97255955009037868891952e-18;
- u = mla(u, s, 2.81009972710863200091251e-15);
- u = mla(u, s, -7.64712219118158833288484e-13);
- u = mla(u, s, 1.60590430605664501629054e-10);
- u = mla(u, s, -2.50521083763502045810755e-08);
- u = mla(u, s, 2.75573192239198747630416e-06);
- u = mla(u, s, -0.000198412698412696162806809);
- u = mla(u, s, 0.00833333333333332974823815);
- u = mla(u, s, -0.166666666666666657414808);
+ u = -7.97255955009037868891952e-18;
+ u = mla(u, s, 2.81009972710863200091251e-15);
+ u = mla(u, s, -7.64712219118158833288484e-13);
+ u = mla(u, s, 1.60590430605664501629054e-10);
+ u = mla(u, s, -2.50521083763502045810755e-08);
+ u = mla(u, s, 2.75573192239198747630416e-06);
+ u = mla(u, s, -0.000198412698412696162806809);
+ u = mla(u, s, 0.00833333333333332974823815);
+ u = mla(u, s, -0.166666666666666657414808);
- u = mla(s, u * d, d);
+ u = mla(s, u * d, d);
- return u;
+ return u;
}
__inline double2 xsincos(double d) {
- int q;
- double u, s, t;
- double2 r;
+ int q;
+ double u, s, t;
+ double2 r;
- q = (int)xrint(d * (2 * rtengine::RT_1_PI));
+ q = (int)xrint(d * (2 * rtengine::RT_1_PI));
- s = d;
+ s = d;
- s = mla(-q, PI4_A*2, s);
- s = mla(-q, PI4_B*2, s);
- s = mla(-q, PI4_C*2, s);
+ s = mla(-q, PI4_A*2, s);
+ s = mla(-q, PI4_B*2, s);
+ s = mla(-q, PI4_C*2, s);
- t = s;
+ t = s;
- s = s * s;
+ s = s * s;
- u = 1.58938307283228937328511e-10;
- u = mla(u, s, -2.50506943502539773349318e-08);
- u = mla(u, s, 2.75573131776846360512547e-06);
- u = mla(u, s, -0.000198412698278911770864914);
- u = mla(u, s, 0.0083333333333191845961746);
- u = mla(u, s, -0.166666666666666130709393);
- u = u * s * t;
+ u = 1.58938307283228937328511e-10;
+ u = mla(u, s, -2.50506943502539773349318e-08);
+ u = mla(u, s, 2.75573131776846360512547e-06);
+ u = mla(u, s, -0.000198412698278911770864914);
+ u = mla(u, s, 0.0083333333333191845961746);
+ u = mla(u, s, -0.166666666666666130709393);
+ u = u * s * t;
- r.x = t + u;
+ r.x = t + u;
- u = -1.13615350239097429531523e-11;
- u = mla(u, s, 2.08757471207040055479366e-09);
- u = mla(u, s, -2.75573144028847567498567e-07);
- u = mla(u, s, 2.48015872890001867311915e-05);
- u = mla(u, s, -0.00138888888888714019282329);
- u = mla(u, s, 0.0416666666666665519592062);
- u = mla(u, s, -0.5);
+ u = -1.13615350239097429531523e-11;
+ u = mla(u, s, 2.08757471207040055479366e-09);
+ u = mla(u, s, -2.75573144028847567498567e-07);
+ u = mla(u, s, 2.48015872890001867311915e-05);
+ u = mla(u, s, -0.00138888888888714019282329);
+ u = mla(u, s, 0.0416666666666665519592062);
+ u = mla(u, s, -0.5);
- r.y = u * s + 1;
+ r.y = u * s + 1;
- if ((q & 1) != 0) { s = r.y; r.y = r.x; r.x = s; }
- if ((q & 2) != 0) { r.x = -r.x; }
- if (((q+1) & 2) != 0) { r.y = -r.y; }
+ if ((q & 1) != 0) { s = r.y; r.y = r.x; r.x = s; }
+ if ((q & 2) != 0) { r.x = -r.x; }
+ if (((q+1) & 2) != 0) { r.y = -r.y; }
- if (xisinf(d)) { r.x = r.y = rtengine::RT_NAN; }
+ if (xisinf(d)) { r.x = r.y = rtengine::RT_NAN; }
- return r;
+ return r;
}
__inline double xtan(double d) {
- int q;
- double u, s, x;
+ int q;
+ double u, s, x;
- q = (int)xrint(d * (2 * rtengine::RT_1_PI));
+ q = (int)xrint(d * (2 * rtengine::RT_1_PI));
- x = mla(q, -PI4_A*2, d);
- x = mla(q, -PI4_B*2, x);
- x = mla(q, -PI4_C*2, x);
+ x = mla(q, -PI4_A*2, d);
+ x = mla(q, -PI4_B*2, x);
+ x = mla(q, -PI4_C*2, x);
- s = x * x;
+ s = x * x;
- if ((q & 1) != 0) x = -x;
+ if ((q & 1) != 0) x = -x;
- u = 1.01419718511083373224408e-05;
- u = mla(u, s, -2.59519791585924697698614e-05);
- u = mla(u, s, 5.23388081915899855325186e-05);
- u = mla(u, s, -3.05033014433946488225616e-05);
- u = mla(u, s, 7.14707504084242744267497e-05);
- u = mla(u, s, 8.09674518280159187045078e-05);
- u = mla(u, s, 0.000244884931879331847054404);
- u = mla(u, s, 0.000588505168743587154904506);
- u = mla(u, s, 0.00145612788922812427978848);
- u = mla(u, s, 0.00359208743836906619142924);
- u = mla(u, s, 0.00886323944362401618113356);
- u = mla(u, s, 0.0218694882853846389592078);
- u = mla(u, s, 0.0539682539781298417636002);
- u = mla(u, s, 0.133333333333125941821962);
- u = mla(u, s, 0.333333333333334980164153);
+ u = 1.01419718511083373224408e-05;
+ u = mla(u, s, -2.59519791585924697698614e-05);
+ u = mla(u, s, 5.23388081915899855325186e-05);
+ u = mla(u, s, -3.05033014433946488225616e-05);
+ u = mla(u, s, 7.14707504084242744267497e-05);
+ u = mla(u, s, 8.09674518280159187045078e-05);
+ u = mla(u, s, 0.000244884931879331847054404);
+ u = mla(u, s, 0.000588505168743587154904506);
+ u = mla(u, s, 0.00145612788922812427978848);
+ u = mla(u, s, 0.00359208743836906619142924);
+ u = mla(u, s, 0.00886323944362401618113356);
+ u = mla(u, s, 0.0218694882853846389592078);
+ u = mla(u, s, 0.0539682539781298417636002);
+ u = mla(u, s, 0.133333333333125941821962);
+ u = mla(u, s, 0.333333333333334980164153);
- u = mla(s, u * x, x);
+ u = mla(s, u * x, x);
- if ((q & 1) != 0) u = 1.0 / u;
+ if ((q & 1) != 0) u = 1.0 / u;
- if (xisinf(d)) u = rtengine::RT_NAN;
+ if (xisinf(d)) u = rtengine::RT_NAN;
- return u;
+ return u;
}
__inline double xlog(double d) {
- double x, x2, t, m;
- int e;
+ double x, x2, t, m;
+ int e;
- e = ilogbp1(d * 0.7071);
- m = ldexpk(d, -e);
+ e = ilogbp1(d * 0.7071);
+ m = ldexpk(d, -e);
- x = (m-1) / (m+1);
- x2 = x * x;
+ x = (m-1) / (m+1);
+ x2 = x * x;
- t = 0.148197055177935105296783;
- t = mla(t, x2, 0.153108178020442575739679);
- t = mla(t, x2, 0.181837339521549679055568);
- t = mla(t, x2, 0.22222194152736701733275);
- t = mla(t, x2, 0.285714288030134544449368);
- t = mla(t, x2, 0.399999999989941956712869);
- t = mla(t, x2, 0.666666666666685503450651);
- t = mla(t, x2, 2);
+ t = 0.148197055177935105296783;
+ t = mla(t, x2, 0.153108178020442575739679);
+ t = mla(t, x2, 0.181837339521549679055568);
+ t = mla(t, x2, 0.22222194152736701733275);
+ t = mla(t, x2, 0.285714288030134544449368);
+ t = mla(t, x2, 0.399999999989941956712869);
+ t = mla(t, x2, 0.666666666666685503450651);
+ t = mla(t, x2, 2);
- x = x * t + 0.693147180559945286226764 * e;
+ x = x * t + 0.693147180559945286226764 * e;
- if (xisinf(d)) x = rtengine::RT_INFINITY;
- if (d < 0) x = rtengine::RT_NAN;
- if (d == 0) x = -rtengine::RT_INFINITY;
+ if (xisinf(d)) x = rtengine::RT_INFINITY;
+ if (d < 0) x = rtengine::RT_NAN;
+ if (d == 0) x = -rtengine::RT_INFINITY;
- return x;
+ return x;
}
__inline double xexp(double d) {
- int q = (int)xrint(d * R_LN2);
- double s, u;
+ int q = (int)xrint(d * R_LN2);
+ double s, u;
- s = mla(q, -L2U, d);
- s = mla(q, -L2L, s);
+ s = mla(q, -L2U, d);
+ s = mla(q, -L2L, s);
- u = 2.08860621107283687536341e-09;
- u = mla(u, s, 2.51112930892876518610661e-08);
- u = mla(u, s, 2.75573911234900471893338e-07);
- u = mla(u, s, 2.75572362911928827629423e-06);
- u = mla(u, s, 2.4801587159235472998791e-05);
- u = mla(u, s, 0.000198412698960509205564975);
- u = mla(u, s, 0.00138888888889774492207962);
- u = mla(u, s, 0.00833333333331652721664984);
- u = mla(u, s, 0.0416666666666665047591422);
- u = mla(u, s, 0.166666666666666851703837);
- u = mla(u, s, 0.5);
+ u = 2.08860621107283687536341e-09;
+ u = mla(u, s, 2.51112930892876518610661e-08);
+ u = mla(u, s, 2.75573911234900471893338e-07);
+ u = mla(u, s, 2.75572362911928827629423e-06);
+ u = mla(u, s, 2.4801587159235472998791e-05);
+ u = mla(u, s, 0.000198412698960509205564975);
+ u = mla(u, s, 0.00138888888889774492207962);
+ u = mla(u, s, 0.00833333333331652721664984);
+ u = mla(u, s, 0.0416666666666665047591422);
+ u = mla(u, s, 0.166666666666666851703837);
+ u = mla(u, s, 0.5);
- u = s * s * u + s + 1;
- u = ldexpk(u, q);
+ u = s * s * u + s + 1;
+ u = ldexpk(u, q);
- if (xisminf(d)) u = 0;
+ if (xisminf(d)) u = 0;
- return u;
+ return u;
}
__inline double2 logk(double d) {
- double2 x, x2;
- double m, t;
- int e;
+ double2 x, x2;
+ double m, t;
+ int e;
- e = ilogbp1(d * 0.7071);
- m = ldexpk(d, -e);
+ e = ilogbp1(d * 0.7071);
+ m = ldexpk(d, -e);
- x = div_dd(add2_ss(-1, m), add2_ss(1, m));
- x2 = squ_d(x);
+ x = div_dd(add2_ss(-1, m), add2_ss(1, m));
+ x2 = squ_d(x);
- t = 0.134601987501262130076155;
- t = mla(t, x2.x, 0.132248509032032670243288);
- t = mla(t, x2.x, 0.153883458318096079652524);
- t = mla(t, x2.x, 0.181817427573705403298686);
- t = mla(t, x2.x, 0.222222231326187414840781);
- t = mla(t, x2.x, 0.285714285651261412873718);
- t = mla(t, x2.x, 0.400000000000222439910458);
- t = mla(t, x2.x, 0.666666666666666371239645);
+ t = 0.134601987501262130076155;
+ t = mla(t, x2.x, 0.132248509032032670243288);
+ t = mla(t, x2.x, 0.153883458318096079652524);
+ t = mla(t, x2.x, 0.181817427573705403298686);
+ t = mla(t, x2.x, 0.222222231326187414840781);
+ t = mla(t, x2.x, 0.285714285651261412873718);
+ t = mla(t, x2.x, 0.400000000000222439910458);
+ t = mla(t, x2.x, 0.666666666666666371239645);
- return add2_dd(mul_ds(dd(0.693147180559945286226764, 2.319046813846299558417771e-17), e),
- add2_dd(scale_d(x, 2), mul_ds(mul_dd(x2, x), t)));
+ return add2_dd(mul_ds(dd(0.693147180559945286226764, 2.319046813846299558417771e-17), e),
+ add2_dd(scale_d(x, 2), mul_ds(mul_dd(x2, x), t)));
}
__inline double expk(double2 d) {
- int q = (int)rint((d.x + d.y) * R_LN2);
- double2 s, t;
- double u;
+ int q = (int)rint((d.x + d.y) * R_LN2);
+ double2 s, t;
+ double u;
- s = add2_ds(d, q * -L2U);
- s = add2_ds(s, q * -L2L);
+ s = add2_ds(d, q * -L2U);
+ s = add2_ds(s, q * -L2L);
- s = normalize_d(s);
+ s = normalize_d(s);
- u = 2.51069683420950419527139e-08;
- u = mla(u, s.x, 2.76286166770270649116855e-07);
- u = mla(u, s.x, 2.75572496725023574143864e-06);
- u = mla(u, s.x, 2.48014973989819794114153e-05);
- u = mla(u, s.x, 0.000198412698809069797676111);
- u = mla(u, s.x, 0.0013888888939977128960529);
- u = mla(u, s.x, 0.00833333333332371417601081);
- u = mla(u, s.x, 0.0416666666665409524128449);
- u = mla(u, s.x, 0.166666666666666740681535);
- u = mla(u, s.x, 0.500000000000000999200722);
+ u = 2.51069683420950419527139e-08;
+ u = mla(u, s.x, 2.76286166770270649116855e-07);
+ u = mla(u, s.x, 2.75572496725023574143864e-06);
+ u = mla(u, s.x, 2.48014973989819794114153e-05);
+ u = mla(u, s.x, 0.000198412698809069797676111);
+ u = mla(u, s.x, 0.0013888888939977128960529);
+ u = mla(u, s.x, 0.00833333333332371417601081);
+ u = mla(u, s.x, 0.0416666666665409524128449);
+ u = mla(u, s.x, 0.166666666666666740681535);
+ u = mla(u, s.x, 0.500000000000000999200722);
- t = add_dd(s, mul_ds(squ_d(s), u));
+ t = add_dd(s, mul_ds(squ_d(s), u));
- t = add_sd(1, t);
- return ldexpk(t.x + t.y, q);
+ t = add_sd(1, t);
+ return ldexpk(t.x + t.y, q);
}
__inline double xpow(double x, double y) {
- int yisint = (int)y == y;
- int yisodd = (1 & (int)y) != 0 && yisint;
+ int yisint = (int)y == y;
+ int yisodd = (1 & (int)y) != 0 && yisint;
- double result = expk(mul_ds(logk(xfabs(x)), y));
+ double result = expk(mul_ds(logk(xfabs(x)), y));
- result = xisnan(result) ? rtengine::RT_INFINITY : result;
- result *= (x >= 0 ? 1 : (!yisint ? rtengine::RT_NAN : (yisodd ? -1 : 1)));
+ result = xisnan(result) ? rtengine::RT_INFINITY : result;
+ result *= (x >= 0 ? 1 : (!yisint ? rtengine::RT_NAN : (yisodd ? -1 : 1)));
- double efx = mulsign(xfabs(x) - 1, y);
- if (xisinf(y)) result = efx < 0 ? 0.0 : (efx == 0 ? 1.0 : rtengine::RT_INFINITY);
- if (xisinf(x) || x == 0) result = (yisodd ? sign(x) : 1) * ((x == 0 ? -y : y) < 0 ? 0 : rtengine::RT_INFINITY);
- if (xisnan(x) || xisnan(y)) result = rtengine::RT_NAN;
- if (y == 0 || x == 1) result = 1;
+ double efx = mulsign(xfabs(x) - 1, y);
+ if (xisinf(y)) result = efx < 0 ? 0.0 : (efx == 0 ? 1.0 : rtengine::RT_INFINITY);
+ if (xisinf(x) || x == 0) result = (yisodd ? sign(x) : 1) * ((x == 0 ? -y : y) < 0 ? 0 : rtengine::RT_INFINITY);
+ if (xisnan(x) || xisnan(y)) result = rtengine::RT_NAN;
+ if (y == 0 || x == 1) result = 1;
- return result;
+ return result;
}
__inline double2 expk2(double2 d) {
- int q = (int)rint((d.x + d.y) * R_LN2);
- double2 s, t;
- double u;
+ int q = (int)rint((d.x + d.y) * R_LN2);
+ double2 s, t;
+ double u;
- s = add2_ds(d, q * -L2U);
- s = add2_ds(s, q * -L2L);
+ s = add2_ds(d, q * -L2U);
+ s = add2_ds(s, q * -L2L);
- s = normalize_d(s);
+ s = normalize_d(s);
- u = 2.51069683420950419527139e-08;
- u = mla(u, s.x, 2.76286166770270649116855e-07);
- u = mla(u, s.x, 2.75572496725023574143864e-06);
- u = mla(u, s.x, 2.48014973989819794114153e-05);
- u = mla(u, s.x, 0.000198412698809069797676111);
- u = mla(u, s.x, 0.0013888888939977128960529);
- u = mla(u, s.x, 0.00833333333332371417601081);
- u = mla(u, s.x, 0.0416666666665409524128449);
- u = mla(u, s.x, 0.166666666666666740681535);
- u = mla(u, s.x, 0.500000000000000999200722);
+ u = 2.51069683420950419527139e-08;
+ u = mla(u, s.x, 2.76286166770270649116855e-07);
+ u = mla(u, s.x, 2.75572496725023574143864e-06);
+ u = mla(u, s.x, 2.48014973989819794114153e-05);
+ u = mla(u, s.x, 0.000198412698809069797676111);
+ u = mla(u, s.x, 0.0013888888939977128960529);
+ u = mla(u, s.x, 0.00833333333332371417601081);
+ u = mla(u, s.x, 0.0416666666665409524128449);
+ u = mla(u, s.x, 0.166666666666666740681535);
+ u = mla(u, s.x, 0.500000000000000999200722);
- t = add_dd(s, mul_ds(squ_d(s), u));
+ t = add_dd(s, mul_ds(squ_d(s), u));
- t = add_sd(1, t);
- return dd(ldexpk(t.x, q), ldexpk(t.y, q));
+ t = add_sd(1, t);
+ return dd(ldexpk(t.x, q), ldexpk(t.y, q));
}
__inline double xsinh(double x) {
- double y = xfabs(x);
- double2 d = expk2(dd(y, 0));
- d = add2_dd(d, div_dd(dd(-1, 0), d));
- y = (d.x + d.y) * 0.5;
+ double y = xfabs(x);
+ double2 d = expk2(dd(y, 0));
+ d = add2_dd(d, div_dd(dd(-1, 0), d));
+ y = (d.x + d.y) * 0.5;
- y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y;
- y = mulsign(y, x);
- y = xisnan(x) ? rtengine::RT_NAN : y;
+ y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y;
+ y = mulsign(y, x);
+ y = xisnan(x) ? rtengine::RT_NAN : y;
- return y;
+ return y;
}
__inline double xcosh(double x) {
- double2 d = expk2(dd(x, 0));
- d = add2_dd(d, div_dd(dd(1, 0), d));
- double y = (d.x + d.y) * 0.5;
+ double2 d = expk2(dd(x, 0));
+ d = add2_dd(d, div_dd(dd(1, 0), d));
+ double y = (d.x + d.y) * 0.5;
- y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y;
- y = xisnan(x) ? rtengine::RT_NAN : y;
+ y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y;
+ y = xisnan(x) ? rtengine::RT_NAN : y;
- return y;
+ return y;
}
__inline double xtanh(double x) {
- double y = xfabs(x);
- double2 d = expk2(dd(y, 0));
- double2 e = div_dd(dd(1, 0), d);
- d = div_dd(add2_dd(d, scale_d(e, -1)), add2_dd(d, e));
- y = d.x + d.y;
+ double y = xfabs(x);
+ double2 d = expk2(dd(y, 0));
+ double2 e = div_dd(dd(1, 0), d);
+ d = div_dd(add2_dd(d, scale_d(e, -1)), add2_dd(d, e));
+ y = d.x + d.y;
- y = xisinf(x) || xisnan(y) ? 1.0 : y;
- y = mulsign(y, x);
- y = xisnan(x) ? rtengine::RT_NAN : y;
+ y = xisinf(x) || xisnan(y) ? 1.0 : y;
+ y = mulsign(y, x);
+ y = xisnan(x) ? rtengine::RT_NAN : y;
- return y;
+ return y;
}
__inline double2 logk2(double2 d) {
- double2 x, x2, m;
- double t;
- int e;
+ double2 x, x2, m;
+ double t;
+ int e;
- d = normalize_d(d);
- e = ilogbp1(d.x * 0.7071);
- m = scale_d(d, ldexpk(1, -e));
+ d = normalize_d(d);
+ e = ilogbp1(d.x * 0.7071);
+ m = scale_d(d, ldexpk(1, -e));
- x = div_dd(add2_ds(m, -1), add2_ds(m, 1));
- x2 = squ_d(x);
+ x = div_dd(add2_ds(m, -1), add2_ds(m, 1));
+ x2 = squ_d(x);
- t = 0.134601987501262130076155;
- t = mla(t, x2.x, 0.132248509032032670243288);
- t = mla(t, x2.x, 0.153883458318096079652524);
- t = mla(t, x2.x, 0.181817427573705403298686);
- t = mla(t, x2.x, 0.222222231326187414840781);
- t = mla(t, x2.x, 0.285714285651261412873718);
- t = mla(t, x2.x, 0.400000000000222439910458);
- t = mla(t, x2.x, 0.666666666666666371239645);
+ t = 0.134601987501262130076155;
+ t = mla(t, x2.x, 0.132248509032032670243288);
+ t = mla(t, x2.x, 0.153883458318096079652524);
+ t = mla(t, x2.x, 0.181817427573705403298686);
+ t = mla(t, x2.x, 0.222222231326187414840781);
+ t = mla(t, x2.x, 0.285714285651261412873718);
+ t = mla(t, x2.x, 0.400000000000222439910458);
+ t = mla(t, x2.x, 0.666666666666666371239645);
- return add2_dd(mul_ds(dd(0.693147180559945286226764, 2.319046813846299558417771e-17), e),
- add2_dd(scale_d(x, 2), mul_ds(mul_dd(x2, x), t)));
+ return add2_dd(mul_ds(dd(0.693147180559945286226764, 2.319046813846299558417771e-17), e),
+ add2_dd(scale_d(x, 2), mul_ds(mul_dd(x2, x), t)));
}
__inline double xasinh(double x) {
- double y = xfabs(x);
- double2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(y, y), 1)), y));
- y = d.x + d.y;
+ double y = xfabs(x);
+ double2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(y, y), 1)), y));
+ y = d.x + d.y;
- y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y;
- y = mulsign(y, x);
- y = xisnan(x) ? rtengine::RT_NAN : y;
+ y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y;
+ y = mulsign(y, x);
+ y = xisnan(x) ? rtengine::RT_NAN : y;
- return y;
+ return y;
}
__inline double xacosh(double x) {
- double2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(x, x), -1)), x));
- double y = d.x + d.y;
+ double2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(x, x), -1)), x));
+ double y = d.x + d.y;
- y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y;
- y = x == 1.0 ? 0.0 : y;
- y = x < 1.0 ? rtengine::RT_NAN : y;
- y = xisnan(x) ? rtengine::RT_NAN : y;
+ y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y;
+ y = x == 1.0 ? 0.0 : y;
+ y = x < 1.0 ? rtengine::RT_NAN : y;
+ y = xisnan(x) ? rtengine::RT_NAN : y;
- return y;
+ return y;
}
__inline double xatanh(double x) {
- double y = xfabs(x);
- double2 d = logk2(div_dd(add2_ss(1, y), add2_ss(1, -y)));
- y = y > 1.0 ? rtengine::RT_NAN : (y == 1.0 ? rtengine::RT_INFINITY : (d.x + d.y) * 0.5);
+ double y = xfabs(x);
+ double2 d = logk2(div_dd(add2_ss(1, y), add2_ss(1, -y)));
+ y = y > 1.0 ? rtengine::RT_NAN : (y == 1.0 ? rtengine::RT_INFINITY : (d.x + d.y) * 0.5);
- y = xisinf(x) || xisnan(y) ? rtengine::RT_NAN : y;
- y = mulsign(y, x);
- y = xisnan(x) ? rtengine::RT_NAN : y;
+ y = xisinf(x) || xisnan(y) ? rtengine::RT_NAN : y;
+ y = mulsign(y, x);
+ y = xisnan(x) ? rtengine::RT_NAN : y;
- return y;
+ return y;
}
//
__inline double xfma(double x, double y, double z) {
- union {
- double f;
- long long int i;
- } tmp;
+ union {
+ double f;
+ long long int i;
+ } tmp;
- tmp.f = x;
- tmp.i = (tmp.i + 0x4000000) & 0xfffffffff8000000LL;
- double xh = tmp.f, xl = x - xh;
+ tmp.f = x;
+ tmp.i = (tmp.i + 0x4000000) & 0xfffffffff8000000LL;
+ double xh = tmp.f, xl = x - xh;
- tmp.f = y;
- tmp.i = (tmp.i + 0x4000000) & 0xfffffffff8000000LL;
- double yh = tmp.f, yl = y - yh;
+ tmp.f = y;
+ tmp.i = (tmp.i + 0x4000000) & 0xfffffffff8000000LL;
+ double yh = tmp.f, yl = y - yh;
- double h = x * y;
- double l = xh * yh - h + xl * yh + xh * yl + xl * yl;
+ double h = x * y;
+ double l = xh * yh - h + xl * yh + xh * yl + xl * yl;
- double h2, l2, v;
+ double h2, l2, v;
- h2 = h + z;
- v = h2 - h;
- l2 = (h - (h2 - v)) + (z - v) + l;
+ h2 = h + z;
+ v = h2 - h;
+ l2 = (h - (h2 - v)) + (z - v) + l;
- return h2 + l2;
+ return h2 + l2;
}
__inline double xsqrt(double d) { // max error : 0.5 ulp
- double q = 1;
+ double q = 1;
- if (d < 8.636168555094445E-78) {
- d *= 1.157920892373162E77;
- q = 2.9387358770557188E-39;
- }
+ if (d < 8.636168555094445E-78) {
+ d *= 1.157920892373162E77;
+ q = 2.9387358770557188E-39;
+ }
- // http://en.wikipedia.org/wiki/Fast_inverse_square_root
- double x = longBitsToDouble(0x5fe6ec85e7de30da - (doubleToRawLongBits(d + 1e-320) >> 1));
+ // http://en.wikipedia.org/wiki/Fast_inverse_square_root
+ double x = longBitsToDouble(0x5fe6ec85e7de30da - (doubleToRawLongBits(d + 1e-320) >> 1));
- x = x * (1.5 - 0.5 * d * x * x);
- x = x * (1.5 - 0.5 * d * x * x);
- x = x * (1.5 - 0.5 * d * x * x);
+ x = x * (1.5 - 0.5 * d * x * x);
+ x = x * (1.5 - 0.5 * d * x * x);
+ x = x * (1.5 - 0.5 * d * x * x);
- // You can change xfma to fma if fma is correctly implemented
- x = xfma(d * x, d * x, -d) * (x * -0.5) + d * x;
+ // You can change xfma to fma if fma is correctly implemented
+ x = xfma(d * x, d * x, -d) * (x * -0.5) + d * x;
- return d == rtengine::RT_INFINITY ? rtengine::RT_INFINITY : x * q;
+ return d == rtengine::RT_INFINITY ? rtengine::RT_INFINITY : x * q;
}
__inline double xcbrt(double d) { // max error : 2 ulps
- double x, y, q = 1.0;
- int e, r;
+ double x, y, q = 1.0;
+ int e, r;
- e = ilogbp1(d);
- d = ldexpk(d, -e);
- r = (e + 6144) % 3;
- q = (r == 1) ? 1.2599210498948731647672106 : q;
- q = (r == 2) ? 1.5874010519681994747517056 : q;
- q = ldexpk(q, (e + 6144) / 3 - 2048);
+ e = ilogbp1(d);
+ d = ldexpk(d, -e);
+ r = (e + 6144) % 3;
+ q = (r == 1) ? 1.2599210498948731647672106 : q;
+ q = (r == 2) ? 1.5874010519681994747517056 : q;
+ q = ldexpk(q, (e + 6144) / 3 - 2048);
- q = mulsign(q, d);
- d = xfabs(d);
+ q = mulsign(q, d);
+ d = xfabs(d);
- x = -0.640245898480692909870982;
- x = x * d + 2.96155103020039511818595;
- x = x * d + -5.73353060922947843636166;
- x = x * d + 6.03990368989458747961407;
- x = x * d + -3.85841935510444988821632;
- x = x * d + 2.2307275302496609725722;
+ x = -0.640245898480692909870982;
+ x = x * d + 2.96155103020039511818595;
+ x = x * d + -5.73353060922947843636166;
+ x = x * d + 6.03990368989458747961407;
+ x = x * d + -3.85841935510444988821632;
+ x = x * d + 2.2307275302496609725722;
- y = x * x; y = y * y; x -= (d * y - x) * (1.0 / 3.0);
- y = d * x * x;
- y = (y - (2.0 / 3.0) * y * (y * x - 1)) * q;
+ y = x * x; y = y * y; x -= (d * y - x) * (1.0 / 3.0);
+ y = d * x * x;
+ y = (y - (2.0 / 3.0) * y * (y * x - 1)) * q;
- return y;
+ return y;
}
__inline double xexp2(double a) {
- double u = expk(mul_ds(dd(0.69314718055994528623, 2.3190468138462995584e-17), a));
- if (xispinf(a)) u = rtengine::RT_INFINITY;
- if (xisminf(a)) u = 0;
- return u;
+ double u = expk(mul_ds(dd(0.69314718055994528623, 2.3190468138462995584e-17), a));
+ if (xispinf(a)) u = rtengine::RT_INFINITY;
+ if (xisminf(a)) u = 0;
+ return u;
}
__inline double xexp10(double a) {
- double u = expk(mul_ds(dd(2.3025850929940459011, -2.1707562233822493508e-16), a));
- if (xispinf(a)) u = rtengine::RT_INFINITY;
- if (xisminf(a)) u = 0;
- return u;
+ double u = expk(mul_ds(dd(2.3025850929940459011, -2.1707562233822493508e-16), a));
+ if (xispinf(a)) u = rtengine::RT_INFINITY;
+ if (xisminf(a)) u = 0;
+ return u;
}
__inline double xexpm1(double a) {
- double2 d = add2_ds(expk2(dd(a, 0)), -1.0);
- double x = d.x + d.y;
- if (xispinf(a)) x = rtengine::RT_INFINITY;
- if (xisminf(a)) x = -1;
- return x;
+ double2 d = add2_ds(expk2(dd(a, 0)), -1.0);
+ double x = d.x + d.y;
+ if (xispinf(a)) x = rtengine::RT_INFINITY;
+ if (xisminf(a)) x = -1;
+ return x;
}
__inline double xlog10(double a) {
- double2 d = mul_dd(logk(a), dd(0.43429448190325176116, 6.6494347733425473126e-17));
- double x = d.x + d.y;
+ 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 (a < 0) x = rtengine::RT_NAN;
- if (a == 0) x = -rtengine::RT_INFINITY;
+ if (xisinf(a)) x = rtengine::RT_INFINITY;
+ if (a < 0) x = rtengine::RT_NAN;
+ if (a == 0) x = -rtengine::RT_INFINITY;
- return x;
+ return x;
}
__inline double xlog1p(double a) {
- double2 d = logk2(add2_ss(a, 1));
- double x = d.x + d.y;
+ double2 d = logk2(add2_ss(a, 1));
+ double x = d.x + d.y;
- if (xisinf(a)) x = rtengine::RT_INFINITY;
- if (a < -1) x = rtengine::RT_NAN;
- if (a == -1) x = -rtengine::RT_INFINITY;
+ if (xisinf(a)) x = rtengine::RT_INFINITY;
+ if (a < -1) x = rtengine::RT_NAN;
+ if (a == -1) x = -rtengine::RT_INFINITY;
- return x;
+ return x;
}
///////////////////////////////////////////
@@ -897,29 +897,29 @@ __inline double xlog1p(double a) {
#define R_LN2f 1.442695040888963407359924681001892137426645954152985934135449406931f
__inline int32_t floatToRawIntBits(float d) {
- union {
- float f;
- int32_t i;
- } tmp;
- tmp.f = d;
- return tmp.i;
+ union {
+ float f;
+ int32_t i;
+ } tmp;
+ tmp.f = d;
+ return tmp.i;
}
__inline float intBitsToFloat(int32_t i) {
- union {
- float f;
- int32_t i;
- } tmp;
- tmp.i = i;
- return tmp.f;
+ union {
+ float f;
+ int32_t i;
+ } tmp;
+ tmp.i = i;
+ return tmp.f;
}
__inline float xfabsf(float x) {
- return intBitsToFloat(0x7fffffffL & floatToRawIntBits(x));
+ return intBitsToFloat(0x7fffffffL & floatToRawIntBits(x));
}
__inline float mulsignf(float x, float y) {
- return intBitsToFloat(floatToRawIntBits(x) ^ (floatToRawIntBits(y) & (1 << 31)));
+ return intBitsToFloat(floatToRawIntBits(x) ^ (floatToRawIntBits(y) & (1 << 31)));
}
__inline float signf(float d) { return copysign(1, d); }
@@ -931,337 +931,337 @@ __inline int xisminff(float x) { return x == -rtengine::RT_INFINITY_F; }
__inline int xispinff(float x) { return x == rtengine::RT_INFINITY_F; }
__inline int ilogbp1f(float d) {
- int m = d < 5.421010862427522E-20f;
- d = m ? 1.8446744073709552E19f * d : d;
- int q = (floatToRawIntBits(d) >> 23) & 0xff;
- q = m ? q - (64 + 0x7e) : q - 0x7e;
- return q;
+ int m = d < 5.421010862427522E-20f;
+ d = m ? 1.8446744073709552E19f * d : d;
+ int q = (floatToRawIntBits(d) >> 23) & 0xff;
+ q = m ? q - (64 + 0x7e) : q - 0x7e;
+ return q;
}
__inline float ldexpkf(float x, int q) {
- float u;
- int m;
- m = q >> 31;
- m = (((m + q) >> 6) - m) << 4;
- q = q - (m << 2);
- u = intBitsToFloat(((int32_t)(m + 0x7f)) << 23);
- u = u * u;
- x = x * u * u;
- u = intBitsToFloat(((int32_t)(q + 0x7f)) << 23);
- return x * u;
+ float u;
+ int m;
+ m = q >> 31;
+ m = (((m + q) >> 6) - m) << 4;
+ q = q - (m << 2);
+ u = intBitsToFloat(((int32_t)(m + 0x7f)) << 23);
+ u = u * u;
+ x = x * u * u;
+ u = intBitsToFloat(((int32_t)(q + 0x7f)) << 23);
+ return x * u;
}
__inline float xcbrtf(float d) { // max error : 2 ulps
- float x, y, q = 1.0f;
- int e, r;
+ float x, y, q = 1.0f;
+ int e, r;
- e = ilogbp1f(d);
- d = ldexpkf(d, -e);
- r = (e + 6144) % 3;
- q = (r == 1) ? 1.2599210498948731647672106f : q;
- q = (r == 2) ? 1.5874010519681994747517056f : q;
- q = ldexpkf(q, (e + 6144) / 3 - 2048);
+ e = ilogbp1f(d);
+ d = ldexpkf(d, -e);
+ r = (e + 6144) % 3;
+ q = (r == 1) ? 1.2599210498948731647672106f : q;
+ q = (r == 2) ? 1.5874010519681994747517056f : q;
+ q = ldexpkf(q, (e + 6144) / 3 - 2048);
- q = mulsignf(q, d);
- d = xfabsf(d);
+ q = mulsignf(q, d);
+ d = xfabsf(d);
- x = -0.601564466953277587890625f;
- x = mlaf(x, d, 2.8208892345428466796875f);
- x = mlaf(x, d, -5.532182216644287109375f);
- x = mlaf(x, d, 5.898262500762939453125f);
- x = mlaf(x, d, -3.8095417022705078125f);
- x = mlaf(x, d, 2.2241256237030029296875f);
+ x = -0.601564466953277587890625f;
+ x = mlaf(x, d, 2.8208892345428466796875f);
+ x = mlaf(x, d, -5.532182216644287109375f);
+ x = mlaf(x, d, 5.898262500762939453125f);
+ x = mlaf(x, d, -3.8095417022705078125f);
+ x = mlaf(x, d, 2.2241256237030029296875f);
- y = d * x * x;
- y = (y - (2.0f / 3.0f) * y * (y * x - 1.0f)) * q;
+ y = d * x * x;
+ y = (y - (2.0f / 3.0f) * y * (y * x - 1.0f)) * q;
- return y;
+ return y;
}
__inline float xsinf(float d) {
- int q;
- float u, s;
+ int q;
+ float u, s;
- q = rint(d * rtengine::RT_1_PI_F);
+ q = rint(d * rtengine::RT_1_PI_F);
- d = mlaf(q, -PI4_Af*4, d);
- d = mlaf(q, -PI4_Bf*4, d);
- d = mlaf(q, -PI4_Cf*4, d);
- d = mlaf(q, -PI4_Df*4, d);
+ d = mlaf(q, -PI4_Af*4, d);
+ d = mlaf(q, -PI4_Bf*4, d);
+ d = mlaf(q, -PI4_Cf*4, d);
+ d = mlaf(q, -PI4_Df*4, d);
- s = d * d;
+ s = d * d;
- if ((q & 1) != 0) d = -d;
+ if ((q & 1) != 0) d = -d;
- u = 2.6083159809786593541503e-06f;
- u = mlaf(u, s, -0.0001981069071916863322258f);
- u = mlaf(u, s, 0.00833307858556509017944336f);
- u = mlaf(u, s, -0.166666597127914428710938f);
+ u = 2.6083159809786593541503e-06f;
+ u = mlaf(u, s, -0.0001981069071916863322258f);
+ u = mlaf(u, s, 0.00833307858556509017944336f);
+ u = mlaf(u, s, -0.166666597127914428710938f);
- u = mlaf(s, u * d, d);
+ u = mlaf(s, u * d, d);
- return u;
+ return u;
}
__inline float xcosf(float d) {
#ifdef __SSE2__
- // faster than scalar version
- return xcosf(_mm_set_ss(d))[0];
+ // faster than scalar version
+ return xcosf(_mm_set_ss(d))[0];
#else
- int q;
- float u, s;
+ int q;
+ float u, s;
- q = 1 + 2*rint(d * rtengine::RT_1_PI_F - 0.5f);
+ q = 1 + 2*rint(d * rtengine::RT_1_PI_F - 0.5f);
- d = mlaf(q, -PI4_Af*2, d);
- d = mlaf(q, -PI4_Bf*2, d);
- d = mlaf(q, -PI4_Cf*2, d);
- d = mlaf(q, -PI4_Df*2, d);
+ d = mlaf(q, -PI4_Af*2, d);
+ d = mlaf(q, -PI4_Bf*2, d);
+ d = mlaf(q, -PI4_Cf*2, d);
+ d = mlaf(q, -PI4_Df*2, d);
- s = d * d;
+ s = d * d;
- if ((q & 2) == 0) d = -d;
+ if ((q & 2) == 0) d = -d;
- u = 2.6083159809786593541503e-06f;
- u = mlaf(u, s, -0.0001981069071916863322258f);
- u = mlaf(u, s, 0.00833307858556509017944336f);
- u = mlaf(u, s, -0.166666597127914428710938f);
+ u = 2.6083159809786593541503e-06f;
+ u = mlaf(u, s, -0.0001981069071916863322258f);
+ u = mlaf(u, s, 0.00833307858556509017944336f);
+ u = mlaf(u, s, -0.166666597127914428710938f);
- u = mlaf(s, u * d, d);
+ u = mlaf(s, u * d, d);
- return u;
+ return u;
#endif
}
__inline float2 xsincosf(float d) {
#ifdef __SSE2__
- // faster than scalar version
+ // faster than scalar version
vfloat2 res = xsincosf(_mm_set_ss(d));
return {res.x[0], res.y[0]};
#else
- int q;
- float u, s, t;
- float2 r;
+ int q;
+ float u, s, t;
+ float2 r;
- q = rint(d * rtengine::RT_2_PI_F);
+ q = rint(d * rtengine::RT_2_PI_F);
- s = d;
+ s = d;
- s = mlaf(q, -PI4_Af*2, s);
- s = mlaf(q, -PI4_Bf*2, s);
- s = mlaf(q, -PI4_Cf*2, s);
- s = mlaf(q, -PI4_Df*2, s);
+ s = mlaf(q, -PI4_Af*2, s);
+ s = mlaf(q, -PI4_Bf*2, s);
+ s = mlaf(q, -PI4_Cf*2, s);
+ s = mlaf(q, -PI4_Df*2, s);
- t = s;
+ t = s;
- s = s * s;
+ s = s * s;
- u = -0.000195169282960705459117889f;
- u = mlaf(u, s, 0.00833215750753879547119141f);
- u = mlaf(u, s, -0.166666537523269653320312f);
- u = u * s * t;
+ u = -0.000195169282960705459117889f;
+ u = mlaf(u, s, 0.00833215750753879547119141f);
+ u = mlaf(u, s, -0.166666537523269653320312f);
+ u = u * s * t;
- r.x = t + u;
+ r.x = t + u;
- u = -2.71811842367242206819355e-07f;
- u = mlaf(u, s, 2.47990446951007470488548e-05f);
- u = mlaf(u, s, -0.00138888787478208541870117f);
- u = mlaf(u, s, 0.0416666641831398010253906f);
- u = mlaf(u, s, -0.5f);
+ u = -2.71811842367242206819355e-07f;
+ u = mlaf(u, s, 2.47990446951007470488548e-05f);
+ u = mlaf(u, s, -0.00138888787478208541870117f);
+ u = mlaf(u, s, 0.0416666641831398010253906f);
+ u = mlaf(u, s, -0.5f);
- r.y = u * s + 1;
+ r.y = u * s + 1;
- if ((q & 1) != 0) { s = r.y; r.y = r.x; r.x = s; }
- if ((q & 2) != 0) { r.x = -r.x; }
- if (((q+1) & 2) != 0) { r.y = -r.y; }
+ if ((q & 1) != 0) { s = r.y; r.y = r.x; r.x = s; }
+ if ((q & 2) != 0) { r.x = -r.x; }
+ if (((q+1) & 2) != 0) { r.y = -r.y; }
- if (xisinff(d)) { r.x = r.y = rtengine::RT_NAN_F; }
+ if (xisinff(d)) { r.x = r.y = rtengine::RT_NAN_F; }
- return r;
+ return r;
#endif
}
__inline float xtanf(float d) {
- int q;
- float u, s, x;
+ int q;
+ float u, s, x;
- q = rint(d * (float)(2 * rtengine::RT_1_PI));
+ q = rint(d * (float)(2 * rtengine::RT_1_PI));
- x = d;
+ x = d;
- x = mlaf(q, -PI4_Af*2, x);
- x = mlaf(q, -PI4_Bf*2, x);
- x = mlaf(q, -PI4_Cf*2, x);
- x = mlaf(q, -PI4_Df*2, x);
+ x = mlaf(q, -PI4_Af*2, x);
+ x = mlaf(q, -PI4_Bf*2, x);
+ x = mlaf(q, -PI4_Cf*2, x);
+ x = mlaf(q, -PI4_Df*2, x);
- s = x * x;
+ s = x * x;
- if ((q & 1) != 0) x = -x;
+ if ((q & 1) != 0) x = -x;
- u = 0.00927245803177356719970703f;
- u = mlaf(u, s, 0.00331984995864331722259521f);
- u = mlaf(u, s, 0.0242998078465461730957031f);
- u = mlaf(u, s, 0.0534495301544666290283203f);
- u = mlaf(u, s, 0.133383005857467651367188f);
- u = mlaf(u, s, 0.333331853151321411132812f);
+ u = 0.00927245803177356719970703f;
+ u = mlaf(u, s, 0.00331984995864331722259521f);
+ u = mlaf(u, s, 0.0242998078465461730957031f);
+ u = mlaf(u, s, 0.0534495301544666290283203f);
+ u = mlaf(u, s, 0.133383005857467651367188f);
+ u = mlaf(u, s, 0.333331853151321411132812f);
- u = mlaf(s, u * x, x);
+ u = mlaf(s, u * x, x);
- if ((q & 1) != 0) u = 1.0f / u;
+ if ((q & 1) != 0) u = 1.0f / u;
- if (xisinff(d)) u = rtengine::RT_NAN_F;
+ if (xisinff(d)) u = rtengine::RT_NAN_F;
- return u;
+ return u;
}
__inline float xatanf(float s) {
- float t, u;
- int q = 0;
+ float t, u;
+ int q = 0;
- if (s < 0) { s = -s; q = 2; }
- if (s > 1) { s = 1.0f / s; q |= 1; }
+ if (s < 0) { s = -s; q = 2; }
+ if (s > 1) { s = 1.0f / s; q |= 1; }
- t = s * s;
+ t = s * s;
- u = 0.00282363896258175373077393f;
- u = mlaf(u, t, -0.0159569028764963150024414f);
- u = mlaf(u, t, 0.0425049886107444763183594f);
- u = mlaf(u, t, -0.0748900920152664184570312f);
- u = mlaf(u, t, 0.106347933411598205566406f);
- u = mlaf(u, t, -0.142027363181114196777344f);
- u = mlaf(u, t, 0.199926957488059997558594f);
- u = mlaf(u, t, -0.333331018686294555664062f);
+ u = 0.00282363896258175373077393f;
+ u = mlaf(u, t, -0.0159569028764963150024414f);
+ u = mlaf(u, t, 0.0425049886107444763183594f);
+ u = mlaf(u, t, -0.0748900920152664184570312f);
+ u = mlaf(u, t, 0.106347933411598205566406f);
+ u = mlaf(u, t, -0.142027363181114196777344f);
+ u = mlaf(u, t, 0.199926957488059997558594f);
+ u = mlaf(u, t, -0.333331018686294555664062f);
- t = s + s * (t * u);
+ t = s + s * (t * u);
- if ((q & 1) != 0) t = 1.570796326794896557998982f - t;
- if ((q & 2) != 0) t = -t;
+ if ((q & 1) != 0) t = 1.570796326794896557998982f - t;
+ if ((q & 2) != 0) t = -t;
- return t;
+ return t;
}
__inline float atan2kf(float y, float x) {
- float s, t, u;
- float q = 0.f;
+ float s, t, u;
+ float q = 0.f;
- if (x < 0) { x = -x; q = -2.f; }
- if (y > x) { t = x; x = y; y = -t; q += 1.f; }
+ if (x < 0) { x = -x; q = -2.f; }
+ if (y > x) { t = x; x = y; y = -t; q += 1.f; }
- s = y / x;
- t = s * s;
+ s = y / x;
+ t = s * s;
- u = 0.00282363896258175373077393f;
- u = mlaf(u, t, -0.0159569028764963150024414f);
- u = mlaf(u, t, 0.0425049886107444763183594f);
- u = mlaf(u, t, -0.0748900920152664184570312f);
- u = mlaf(u, t, 0.106347933411598205566406f);
- u = mlaf(u, t, -0.142027363181114196777344f);
- u = mlaf(u, t, 0.199926957488059997558594f);
- u = mlaf(u, t, -0.333331018686294555664062f);
+ u = 0.00282363896258175373077393f;
+ u = mlaf(u, t, -0.0159569028764963150024414f);
+ u = mlaf(u, t, 0.0425049886107444763183594f);
+ u = mlaf(u, t, -0.0748900920152664184570312f);
+ u = mlaf(u, t, 0.106347933411598205566406f);
+ u = mlaf(u, t, -0.142027363181114196777344f);
+ u = mlaf(u, t, 0.199926957488059997558594f);
+ u = mlaf(u, t, -0.333331018686294555664062f);
- t = u * t;
- t = mlaf(t,s,s);
- return mlaf(q,(float)(rtengine::RT_PI_F_2),t);
+ t = u * t;
+ t = mlaf(t,s,s);
+ return mlaf(q,(float)(rtengine::RT_PI_F_2),t);
}
__inline float xatan2f(float y, float x) {
- float r = atan2kf(xfabsf(y), x);
+ float r = atan2kf(xfabsf(y), x);
- r = mulsignf(r, x);
- if (xisinff(x) || x == 0) r = rtengine::RT_PI_F/2 - (xisinff(x) ? (signf(x) * (float)(rtengine::RT_PI_F*.5f)) : 0);
- if (xisinff(y) ) r = rtengine::RT_PI_F/2 - (xisinff(x) ? (signf(x) * (float)(rtengine::RT_PI_F*.25f)) : 0);
- if ( y == 0) r = (signf(x) == -1 ? rtengine::RT_PI_F : 0);
+ r = mulsignf(r, x);
+ if (xisinff(x) || x == 0) r = rtengine::RT_PI_F/2 - (xisinff(x) ? (signf(x) * (float)(rtengine::RT_PI_F*.5f)) : 0);
+ if (xisinff(y) ) r = rtengine::RT_PI_F/2 - (xisinff(x) ? (signf(x) * (float)(rtengine::RT_PI_F*.25f)) : 0);
+ if ( y == 0) r = (signf(x) == -1 ? rtengine::RT_PI_F : 0);
- return xisnanf(x) || xisnanf(y) ? rtengine::RT_NAN_F : mulsignf(r, y);
+ return xisnanf(x) || xisnanf(y) ? rtengine::RT_NAN_F : mulsignf(r, y);
}
__inline float xasinf(float d) {
- return mulsignf(atan2kf(fabsf(d), sqrtf((1.0f+d)*(1.0f-d))), d);
+ return mulsignf(atan2kf(fabsf(d), sqrtf((1.0f+d)*(1.0f-d))), d);
}
__inline float xacosf(float d) {
- return mulsignf(atan2kf(sqrtf((1.0f+d)*(1.0f-d)), fabsf(d)), d) + (d < 0 ? (float)rtengine::RT_PI : 0.0f);
+ return mulsignf(atan2kf(sqrtf((1.0f+d)*(1.0f-d)), fabsf(d)), d) + (d < 0 ? (float)rtengine::RT_PI : 0.0f);
}
__inline float xlogf(float d) {
- float x, x2, t, m;
- int e;
+ float x, x2, t, m;
+ int e;
- e = ilogbp1f(d * 0.7071f);
- m = ldexpkf(d, -e);
+ e = ilogbp1f(d * 0.7071f);
+ m = ldexpkf(d, -e);
- x = (m-1.0f) / (m+1.0f);
- x2 = x * x;
+ 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);
+ 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;
+ x = x * t + 0.693147180559945286226764f * e;
- if (xisinff(d)) x = rtengine::RT_INFINITY_F;
- if (d < 0) x = rtengine::RT_NAN_F;
- if (d == 0) x = -rtengine::RT_INFINITY_F;
+ if (xisinff(d)) x = rtengine::RT_INFINITY_F;
+ if (d < 0) x = rtengine::RT_NAN_F;
+ if (d == 0) x = -rtengine::RT_INFINITY_F;
- return x;
+ return x;
}
__inline float xexpf(float d) {
- if(d<=-104.0f) return 0.0f;
+ if(d<=-104.0f) return 0.0f;
- int q = rint(d * R_LN2f);
- float s, u;
+ int q = rint(d * R_LN2f);
+ float s, u;
- s = mlaf(q, -L2Uf, d);
- s = mlaf(q, -L2Lf, s);
+ s = mlaf(q, -L2Uf, d);
+ s = mlaf(q, -L2Lf, s);
- u = 0.00136324646882712841033936f;
- u = mlaf(u, s, 0.00836596917361021041870117f);
- u = mlaf(u, s, 0.0416710823774337768554688f);
- u = mlaf(u, s, 0.166665524244308471679688f);
- u = mlaf(u, s, 0.499999850988388061523438f);
+ u = 0.00136324646882712841033936f;
+ u = mlaf(u, s, 0.00836596917361021041870117f);
+ u = mlaf(u, s, 0.0416710823774337768554688f);
+ u = mlaf(u, s, 0.166665524244308471679688f);
+ u = mlaf(u, s, 0.499999850988388061523438f);
- u = mlaf( s, mlaf(s,u,1.f),1.f);
- return ldexpkf(u, q);
+ u = mlaf( s, mlaf(s,u,1.f),1.f);
+ return ldexpkf(u, q);
}
__inline float xmul2f(float d) {
- union {
- float floatval;
- int intval;
- } uflint;
- uflint.floatval = d;
- if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing
- uflint.intval += 1 << 23; // add 1 to the exponent
- }
- return uflint.floatval;
+ union {
+ float floatval;
+ int intval;
+ } uflint;
+ uflint.floatval = d;
+ if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing
+ uflint.intval += 1 << 23; // add 1 to the exponent
+ }
+ return uflint.floatval;
}
__inline float xdiv2f(float d) {
- union {
- float floatval;
- int intval;
- } uflint;
- uflint.floatval = d;
- if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing
- uflint.intval -= 1 << 23; // sub 1 from the exponent
- }
- return uflint.floatval;
+ union {
+ float floatval;
+ int intval;
+ } uflint;
+ uflint.floatval = d;
+ if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing
+ uflint.intval -= 1 << 23; // sub 1 from the exponent
+ }
+ return uflint.floatval;
}
__inline float xdivf( float d, int n){
- union {
- float floatval;
- int intval;
- } uflint;
- uflint.floatval = d;
- if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing
- uflint.intval -= n << 23; // add n to the exponent
- }
- return uflint.floatval;
+ union {
+ float floatval;
+ int intval;
+ } uflint;
+ uflint.floatval = d;
+ if (uflint.intval & 0x7FFFFFFF) { // if f==0 do nothing
+ uflint.intval -= n << 23; // add n to the exponent
+ }
+ return uflint.floatval;
}
__inline float xlin2log(float x, float base)
diff --git a/rtengine/sleefsseavx.c b/rtengine/sleefsseavx.c
index cce88df5d..1982c7c4c 100644
--- a/rtengine/sleefsseavx.c
+++ b/rtengine/sleefsseavx.c
@@ -48,199 +48,199 @@
#define NANf ((float)rtengine::RT_NAN)
static INLINE vdouble vadd3(vdouble v0, vdouble v1, vdouble v2) {
- return vadd(vadd(v0, v1), v2);
+ return vadd(vadd(v0, v1), v2);
}
static INLINE vdouble vadd4(vdouble v0, vdouble v1, vdouble v2, vdouble v3) {
- return vadd3(vadd(v0, v1), v2, v3);
+ return vadd3(vadd(v0, v1), v2, v3);
}
static INLINE vdouble vadd5(vdouble v0, vdouble v1, vdouble v2, vdouble v3, vdouble v4) {
- return vadd4(vadd(v0, v1), v2, v3, v4);
+ return vadd4(vadd(v0, v1), v2, v3, v4);
}
static INLINE vdouble vadd6(vdouble v0, vdouble v1, vdouble v2, vdouble v3, vdouble v4, vdouble v5) {
- return vadd5(vadd(v0, v1), v2, v3, v4, v5);
+ return vadd5(vadd(v0, v1), v2, v3, v4, v5);
}
static INLINE vdouble vadd7(vdouble v0, vdouble v1, vdouble v2, vdouble v3, vdouble v4, vdouble v5, vdouble v6) {
- return vadd6(vadd(v0, v1), v2, v3, v4, v5, v6);
+ return vadd6(vadd(v0, v1), v2, v3, v4, v5, v6);
}
static INLINE vdouble vsub3(vdouble v0, vdouble v1, vdouble v2) {
- return vsub(vsub(v0, v1), v2);
+ return vsub(vsub(v0, v1), v2);
}
static INLINE vdouble vsub4(vdouble v0, vdouble v1, vdouble v2, vdouble v3) {
- return vsub3(vsub(v0, v1), v2, v3);
+ return vsub3(vsub(v0, v1), v2, v3);
}
static INLINE vdouble vsub5(vdouble v0, vdouble v1, vdouble v2, vdouble v3, vdouble v4) {
- return vsub4(vsub(v0, v1), v2, v3, v4);
+ return vsub4(vsub(v0, v1), v2, v3, v4);
}
//
static INLINE vdouble2 normalize_d(vdouble2 t) {
- vdouble2 s;
+ vdouble2 s;
- s.x = vadd(t.x, t.y);
- s.y = vadd(vsub(t.x, s.x), t.y);
+ s.x = vadd(t.x, t.y);
+ s.y = vadd(vsub(t.x, s.x), t.y);
- return s;
+ return s;
}
static INLINE vdouble2 scale_d(vdouble2 d, vdouble s) {
- vdouble2 r = {vmul(d.x, s), vmul(d.y, s)};
- return r;
+ vdouble2 r = {vmul(d.x, s), vmul(d.y, s)};
+ return r;
}
static INLINE vdouble2 add_ss(vdouble x, vdouble y) {
- vdouble2 r;
+ vdouble2 r;
- r.x = vadd(x, y);
- r.y = vadd(vsub(x, r.x), y);
+ r.x = vadd(x, y);
+ r.y = vadd(vsub(x, r.x), y);
- return r;
+ return r;
}
static INLINE vdouble2 add2_ss(vdouble x, vdouble y) {
- vdouble2 r;
+ vdouble2 r;
- r.x = vadd(x, y);
- vdouble v = vsub(r.x, x);
- r.y = vadd(vsub(x, vsub(r.x, v)), vsub(y, v));
+ r.x = vadd(x, y);
+ vdouble v = vsub(r.x, x);
+ r.y = vadd(vsub(x, vsub(r.x, v)), vsub(y, v));
- return r;
+ return r;
}
static INLINE vdouble2 add_ds(vdouble2 x, vdouble y) {
- vdouble2 r;
+ vdouble2 r;
- r.x = vadd(x.x, y);
- r.y = vadd3(vsub(x.x, r.x), y, x.y);
+ r.x = vadd(x.x, y);
+ r.y = vadd3(vsub(x.x, r.x), y, x.y);
- return r;
+ return r;
}
static INLINE vdouble2 add2_ds(vdouble2 x, vdouble y) {
- vdouble2 r;
+ vdouble2 r;
- r.x = vadd(x.x, y);
- vdouble v = vsub(r.x, x.x);
- r.y = vadd(vsub(x.x, vsub(r.x, v)), vsub(y, v));
- r.y = vadd(r.y, x.y);
+ r.x = vadd(x.x, y);
+ vdouble v = vsub(r.x, x.x);
+ r.y = vadd(vsub(x.x, vsub(r.x, v)), vsub(y, v));
+ r.y = vadd(r.y, x.y);
- return r;
+ return r;
}
static INLINE vdouble2 add_sd(vdouble x, vdouble2 y) {
- vdouble2 r;
+ vdouble2 r;
- r.x = vadd(x, y.x);
- r.y = vadd3(vsub(x, r.x), y.x, y.y);
+ r.x = vadd(x, y.x);
+ r.y = vadd3(vsub(x, r.x), y.x, y.y);
- return r;
+ return r;
}
static INLINE vdouble2 add_dd(vdouble2 x, vdouble2 y) {
- // |x| >= |y|
+ // |x| >= |y|
- vdouble2 r;
+ vdouble2 r;
- r.x = vadd(x.x, y.x);
- r.y = vadd4(vsub(x.x, r.x), y.x, x.y, y.y);
+ r.x = vadd(x.x, y.x);
+ r.y = vadd4(vsub(x.x, r.x), y.x, x.y, y.y);
- return r;
+ return r;
}
static INLINE vdouble2 add2_dd(vdouble2 x, vdouble2 y) {
- vdouble2 r;
+ vdouble2 r;
- r.x = vadd(x.x, y.x);
- vdouble v = vsub(r.x, x.x);
- r.y = vadd(vsub(x.x, vsub(r.x, v)), vsub(y.x, v));
- r.y = vadd(r.y, vadd(x.y, y.y));
+ r.x = vadd(x.x, y.x);
+ vdouble v = vsub(r.x, x.x);
+ r.y = vadd(vsub(x.x, vsub(r.x, v)), vsub(y.x, v));
+ r.y = vadd(r.y, vadd(x.y, y.y));
- return r;
+ return r;
}
static INLINE vdouble2 div_dd(vdouble2 n, vdouble2 d) {
- vdouble t = vrec(d.x);
- vdouble dh = vupper(d.x), dl = vsub(d.x, dh);
- vdouble th = vupper(t ), tl = vsub(t , th);
- vdouble nhh = vupper(n.x), nhl = vsub(n.x, nhh);
+ vdouble t = vrec(d.x);
+ vdouble dh = vupper(d.x), dl = vsub(d.x, dh);
+ vdouble th = vupper(t ), tl = vsub(t , th);
+ vdouble nhh = vupper(n.x), nhl = vsub(n.x, nhh);
- vdouble2 q;
+ vdouble2 q;
- q.x = vmul(n.x, t);
+ q.x = vmul(n.x, t);
- vdouble u = vadd5(vsub(vmul(nhh, th), q.x), vmul(nhh, tl), vmul(nhl, th), vmul(nhl, tl),
- vmul(q.x, vsub5(vcast_vd_d(1), vmul(dh, th), vmul(dh, tl), vmul(dl, th), vmul(dl, tl))));
+ vdouble u = vadd5(vsub(vmul(nhh, th), q.x), vmul(nhh, tl), vmul(nhl, th), vmul(nhl, tl),
+ vmul(q.x, vsub5(vcast_vd_d(1), vmul(dh, th), vmul(dh, tl), vmul(dl, th), vmul(dl, tl))));
- q.y = vadd(vmul(t, vsub(n.y, vmul(q.x, d.y))), u);
+ q.y = vadd(vmul(t, vsub(n.y, vmul(q.x, d.y))), u);
- return q;
+ return q;
}
static INLINE vdouble2 mul_ss(vdouble x, vdouble y) {
- vdouble xh = vupper(x), xl = vsub(x, xh);
- vdouble yh = vupper(y), yl = vsub(y, yh);
- vdouble2 r;
+ vdouble xh = vupper(x), xl = vsub(x, xh);
+ vdouble yh = vupper(y), yl = vsub(y, yh);
+ vdouble2 r;
- r.x = vmul(x, y);
- r.y = vadd5(vmul(xh, yh), vneg(r.x), vmul(xl, yh), vmul(xh, yl), vmul(xl, yl));
+ r.x = vmul(x, y);
+ r.y = vadd5(vmul(xh, yh), vneg(r.x), vmul(xl, yh), vmul(xh, yl), vmul(xl, yl));
- return r;
+ return r;
}
static INLINE vdouble2 mul_ds(vdouble2 x, vdouble y) {
- vdouble xh = vupper(x.x), xl = vsub(x.x, xh);
- vdouble yh = vupper(y ), yl = vsub(y , yh);
- vdouble2 r;
+ vdouble xh = vupper(x.x), xl = vsub(x.x, xh);
+ vdouble yh = vupper(y ), yl = vsub(y , yh);
+ vdouble2 r;
- r.x = vmul(x.x, y);
- r.y = vadd6(vmul(xh, yh), vneg(r.x), vmul(xl, yh), vmul(xh, yl), vmul(xl, yl), vmul(x.y, y));
+ r.x = vmul(x.x, y);
+ r.y = vadd6(vmul(xh, yh), vneg(r.x), vmul(xl, yh), vmul(xh, yl), vmul(xl, yl), vmul(x.y, y));
- return r;
+ return r;
}
static INLINE vdouble2 mul_dd(vdouble2 x, vdouble2 y) {
- vdouble xh = vupper(x.x), xl = vsub(x.x, xh);
- vdouble yh = vupper(y.x), yl = vsub(y.x, yh);
- vdouble2 r;
+ vdouble xh = vupper(x.x), xl = vsub(x.x, xh);
+ vdouble yh = vupper(y.x), yl = vsub(y.x, yh);
+ vdouble2 r;
- r.x = vmul(x.x, y.x);
- r.y = vadd7(vmul(xh, yh), vneg(r.x), vmul(xl, yh), vmul(xh, yl), vmul(xl, yl), vmul(x.x, y.y), vmul(x.y, y.x));
+ r.x = vmul(x.x, y.x);
+ r.y = vadd7(vmul(xh, yh), vneg(r.x), vmul(xl, yh), vmul(xh, yl), vmul(xl, yl), vmul(x.x, y.y), vmul(x.y, y.x));
- return r;
+ return r;
}
static INLINE vdouble2 squ_d(vdouble2 x) {
- vdouble xh = vupper(x.x), xl = vsub(x.x, xh);
- vdouble2 r;
+ vdouble xh = vupper(x.x), xl = vsub(x.x, xh);
+ vdouble2 r;
- r.x = vmul(x.x, x.x);
- r.y = vadd5(vmul(xh, xh), vneg(r.x), vmul(vadd(xh, xh), xl), vmul(xl, xl), vmul(x.x, vadd(x.y, x.y)));
+ r.x = vmul(x.x, x.x);
+ r.y = vadd5(vmul(xh, xh), vneg(r.x), vmul(vadd(xh, xh), xl), vmul(xl, xl), vmul(x.x, vadd(x.y, x.y)));
- return r;
+ return r;
}
static INLINE vdouble2 rec_s(vdouble d) {
- vdouble t = vrec(d);
- vdouble dh = vupper(d), dl = vsub(d, dh);
- vdouble th = vupper(t), tl = vsub(t, th);
- vdouble2 q;
+ vdouble t = vrec(d);
+ vdouble dh = vupper(d), dl = vsub(d, dh);
+ vdouble th = vupper(t), tl = vsub(t, th);
+ vdouble2 q;
- q.x = t;
- q.y = vmul(t, vsub5(vcast_vd_d(1), vmul(dh, th), vmul(dh, tl), vmul(dl, th), vmul(dl, tl)));
+ q.x = t;
+ q.y = vmul(t, vsub5(vcast_vd_d(1), vmul(dh, th), vmul(dh, tl), vmul(dl, th), vmul(dl, tl)));
- return q;
+ return q;
}
static INLINE vdouble2 sqrt_d(vdouble2 d) {
- vdouble t = vsqrt(vadd(d.x, d.y));
- return scale_d(mul_dd(add2_dd(d, mul_ss(t, t)), rec_s(t)), vcast_vd_d(0.5));
+ vdouble t = vsqrt(vadd(d.x, d.y));
+ return scale_d(mul_dd(add2_dd(d, mul_ss(t, t)), rec_s(t)), vcast_vd_d(0.5));
}
//
@@ -248,688 +248,688 @@ static INLINE vdouble2 sqrt_d(vdouble2 d) {
static INLINE vdouble xldexp(vdouble x, vint q) { return vldexp(x, q); }
static INLINE vint xilogb(vdouble d) {
- vdouble e = vcast_vd_vi(vsubi(vilogbp1(vabs(d)), vcast_vi_i(1)));
- e = vsel(vmask_eq(d, vcast_vd_d(0)), vcast_vd_d(-2147483648.0), e);
- e = vsel(vmask_eq(vabs(d), vcast_vd_d(rtengine::RT_INFINITY)), vcast_vd_d(2147483647), e);
- return vrint_vi_vd(e);
+ vdouble e = vcast_vd_vi(vsubi(vilogbp1(vabs(d)), vcast_vi_i(1)));
+ e = vsel(vmask_eq(d, vcast_vd_d(0)), vcast_vd_d(-2147483648.0), e);
+ e = vsel(vmask_eq(vabs(d), vcast_vd_d(rtengine::RT_INFINITY)), vcast_vd_d(2147483647), e);
+ return vrint_vi_vd(e);
}
static INLINE vdouble xsin(vdouble d) {
- vint q;
- vdouble u, s;
+ vint q;
+ vdouble u, s;
- q = vrint_vi_vd(vmul(d, vcast_vd_d(rtengine::RT_1_PI)));
+ q = vrint_vi_vd(vmul(d, vcast_vd_d(rtengine::RT_1_PI)));
- u = vcast_vd_vi(q);
- d = vadd(d, vmul(u, vcast_vd_d(-PI4_A*4)));
- d = vadd(d, vmul(u, vcast_vd_d(-PI4_B*4)));
- d = vadd(d, vmul(u, vcast_vd_d(-PI4_C*4)));
+ u = vcast_vd_vi(q);
+ d = vadd(d, vmul(u, vcast_vd_d(-PI4_A*4)));
+ d = vadd(d, vmul(u, vcast_vd_d(-PI4_B*4)));
+ d = vadd(d, vmul(u, vcast_vd_d(-PI4_C*4)));
- s = vmul(d, d);
+ s = vmul(d, d);
- d = vsel(vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(1)), vneg(d), d);
+ d = vsel(vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(1)), vneg(d), d);
- u = vcast_vd_d(-7.97255955009037868891952e-18);
- u = vmla(u, s, vcast_vd_d(2.81009972710863200091251e-15));
- u = vmla(u, s, vcast_vd_d(-7.64712219118158833288484e-13));
- u = vmla(u, s, vcast_vd_d(1.60590430605664501629054e-10));
- u = vmla(u, s, vcast_vd_d(-2.50521083763502045810755e-08));
- u = vmla(u, s, vcast_vd_d(2.75573192239198747630416e-06));
- u = vmla(u, s, vcast_vd_d(-0.000198412698412696162806809));
- u = vmla(u, s, vcast_vd_d(0.00833333333333332974823815));
- u = vmla(u, s, vcast_vd_d(-0.166666666666666657414808));
+ u = vcast_vd_d(-7.97255955009037868891952e-18);
+ u = vmla(u, s, vcast_vd_d(2.81009972710863200091251e-15));
+ u = vmla(u, s, vcast_vd_d(-7.64712219118158833288484e-13));
+ u = vmla(u, s, vcast_vd_d(1.60590430605664501629054e-10));
+ u = vmla(u, s, vcast_vd_d(-2.50521083763502045810755e-08));
+ u = vmla(u, s, vcast_vd_d(2.75573192239198747630416e-06));
+ u = vmla(u, s, vcast_vd_d(-0.000198412698412696162806809));
+ u = vmla(u, s, vcast_vd_d(0.00833333333333332974823815));
+ u = vmla(u, s, vcast_vd_d(-0.166666666666666657414808));
- u = vmla(s, vmul(u, d), d);
+ u = vmla(s, vmul(u, d), d);
- return u;
+ return u;
}
static INLINE vdouble xcos(vdouble d) {
- vint q;
- vdouble u, s;
+ vint q;
+ vdouble u, s;
- q = vrint_vi_vd(vsub(vmul(d, vcast_vd_d(rtengine::RT_1_PI)), vcast_vd_d(0.5)));
- q = vaddi(vaddi(q, q), vcast_vi_i(1));
+ q = vrint_vi_vd(vsub(vmul(d, vcast_vd_d(rtengine::RT_1_PI)), vcast_vd_d(0.5)));
+ q = vaddi(vaddi(q, q), vcast_vi_i(1));
- u = vcast_vd_vi(q);
- d = vadd(d, vmul(u, vcast_vd_d(-PI4_A*2)));
- d = vadd(d, vmul(u, vcast_vd_d(-PI4_B*2)));
- d = vadd(d, vmul(u, vcast_vd_d(-PI4_C*2)));
+ u = vcast_vd_vi(q);
+ d = vadd(d, vmul(u, vcast_vd_d(-PI4_A*2)));
+ d = vadd(d, vmul(u, vcast_vd_d(-PI4_B*2)));
+ d = vadd(d, vmul(u, vcast_vd_d(-PI4_C*2)));
- s = vmul(d, d);
+ s = vmul(d, d);
- d = vsel(vmaski_eq(vandi(q, vcast_vi_i(2)), vcast_vi_i(0)), vneg(d), d);
+ d = vsel(vmaski_eq(vandi(q, vcast_vi_i(2)), vcast_vi_i(0)), vneg(d), d);
- u = vcast_vd_d(-7.97255955009037868891952e-18);
- u = vmla(u, s, vcast_vd_d(2.81009972710863200091251e-15));
- u = vmla(u, s, vcast_vd_d(-7.64712219118158833288484e-13));
- u = vmla(u, s, vcast_vd_d(1.60590430605664501629054e-10));
- u = vmla(u, s, vcast_vd_d(-2.50521083763502045810755e-08));
- u = vmla(u, s, vcast_vd_d(2.75573192239198747630416e-06));
- u = vmla(u, s, vcast_vd_d(-0.000198412698412696162806809));
- u = vmla(u, s, vcast_vd_d(0.00833333333333332974823815));
- u = vmla(u, s, vcast_vd_d(-0.166666666666666657414808));
+ u = vcast_vd_d(-7.97255955009037868891952e-18);
+ u = vmla(u, s, vcast_vd_d(2.81009972710863200091251e-15));
+ u = vmla(u, s, vcast_vd_d(-7.64712219118158833288484e-13));
+ u = vmla(u, s, vcast_vd_d(1.60590430605664501629054e-10));
+ u = vmla(u, s, vcast_vd_d(-2.50521083763502045810755e-08));
+ u = vmla(u, s, vcast_vd_d(2.75573192239198747630416e-06));
+ u = vmla(u, s, vcast_vd_d(-0.000198412698412696162806809));
+ u = vmla(u, s, vcast_vd_d(0.00833333333333332974823815));
+ u = vmla(u, s, vcast_vd_d(-0.166666666666666657414808));
- u = vmla(s, vmul(u, d), d);
+ u = vmla(s, vmul(u, d), d);
- return u;
+ return u;
}
static INLINE vdouble2 xsincos(vdouble d) {
- vint q;
- vmask m;
- vdouble u, s, t, rx, ry;
- vdouble2 r;
+ vint q;
+ vmask m;
+ vdouble u, s, t, rx, ry;
+ vdouble2 r;
- q = vrint_vi_vd(vmul(d, vcast_vd_d(rtengine::RT_2_PI)));
+ q = vrint_vi_vd(vmul(d, vcast_vd_d(rtengine::RT_2_PI)));
- s = d;
+ s = d;
- u = vcast_vd_vi(q);
- s = vmla(u, vcast_vd_d(-PI4_A*2), s);
- s = vmla(u, vcast_vd_d(-PI4_B*2), s);
- s = vmla(u, vcast_vd_d(-PI4_C*2), s);
+ u = vcast_vd_vi(q);
+ s = vmla(u, vcast_vd_d(-PI4_A*2), s);
+ s = vmla(u, vcast_vd_d(-PI4_B*2), s);
+ s = vmla(u, vcast_vd_d(-PI4_C*2), s);
- t = s;
+ t = s;
- s = vmul(s, s);
+ s = vmul(s, s);
- u = vcast_vd_d(1.58938307283228937328511e-10);
- u = vmla(u, s, vcast_vd_d(-2.50506943502539773349318e-08));
- u = vmla(u, s, vcast_vd_d(2.75573131776846360512547e-06));
- u = vmla(u, s, vcast_vd_d(-0.000198412698278911770864914));
- u = vmla(u, s, vcast_vd_d(0.0083333333333191845961746));
- u = vmla(u, s, vcast_vd_d(-0.166666666666666130709393));
- u = vmul(vmul(u, s), t);
+ u = vcast_vd_d(1.58938307283228937328511e-10);
+ u = vmla(u, s, vcast_vd_d(-2.50506943502539773349318e-08));
+ u = vmla(u, s, vcast_vd_d(2.75573131776846360512547e-06));
+ u = vmla(u, s, vcast_vd_d(-0.000198412698278911770864914));
+ u = vmla(u, s, vcast_vd_d(0.0083333333333191845961746));
+ u = vmla(u, s, vcast_vd_d(-0.166666666666666130709393));
+ u = vmul(vmul(u, s), t);
- rx = vadd(t, u);
+ rx = vadd(t, u);
- u = vcast_vd_d(-1.13615350239097429531523e-11);
- u = vmla(u, s, vcast_vd_d(2.08757471207040055479366e-09));
- u = vmla(u, s, vcast_vd_d(-2.75573144028847567498567e-07));
- u = vmla(u, s, vcast_vd_d(2.48015872890001867311915e-05));
- u = vmla(u, s, vcast_vd_d(-0.00138888888888714019282329));
- u = vmla(u, s, vcast_vd_d(0.0416666666666665519592062));
- u = vmla(u, s, vcast_vd_d(-0.5));
+ u = vcast_vd_d(-1.13615350239097429531523e-11);
+ u = vmla(u, s, vcast_vd_d(2.08757471207040055479366e-09));
+ u = vmla(u, s, vcast_vd_d(-2.75573144028847567498567e-07));
+ u = vmla(u, s, vcast_vd_d(2.48015872890001867311915e-05));
+ u = vmla(u, s, vcast_vd_d(-0.00138888888888714019282329));
+ u = vmla(u, s, vcast_vd_d(0.0416666666666665519592062));
+ u = vmla(u, s, vcast_vd_d(-0.5));
- ry = vadd(vcast_vd_d(1), vmul(s, u));
+ ry = vadd(vcast_vd_d(1), vmul(s, u));
- m = vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(0));
- r.x = vsel(m, rx, ry);
- r.y = vsel(m, ry, rx);
+ m = vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(0));
+ r.x = vsel(m, rx, ry);
+ r.y = vsel(m, ry, rx);
- m = vmaski_eq(vandi(q, vcast_vi_i(2)), vcast_vi_i(2));
- r.x = vreinterpret_vd_vm(vxorm(vandm(m, vreinterpret_vm_vd(vcast_vd_d(-0.0))), vreinterpret_vm_vd(r.x)));
+ m = vmaski_eq(vandi(q, vcast_vi_i(2)), vcast_vi_i(2));
+ r.x = vreinterpret_vd_vm(vxorm(vandm(m, vreinterpret_vm_vd(vcast_vd_d(-0.0))), vreinterpret_vm_vd(r.x)));
- m = vmaski_eq(vandi(vaddi(q, vcast_vi_i(1)), vcast_vi_i(2)), vcast_vi_i(2));
- r.y = vreinterpret_vd_vm(vxorm(vandm(m, vreinterpret_vm_vd(vcast_vd_d(-0.0))), vreinterpret_vm_vd(r.y)));
+ m = vmaski_eq(vandi(vaddi(q, vcast_vi_i(1)), vcast_vi_i(2)), vcast_vi_i(2));
+ r.y = vreinterpret_vd_vm(vxorm(vandm(m, vreinterpret_vm_vd(vcast_vd_d(-0.0))), vreinterpret_vm_vd(r.y)));
- m = vmask_isinf(d);
- r.x = vsel(m, vcast_vd_d(rtengine::RT_NAN), r.x);
- r.y = vsel(m, vcast_vd_d(rtengine::RT_NAN), r.y);
+ m = vmask_isinf(d);
+ r.x = vsel(m, vcast_vd_d(rtengine::RT_NAN), r.x);
+ r.y = vsel(m, vcast_vd_d(rtengine::RT_NAN), r.y);
- return r;
+ return r;
}
static INLINE vdouble xtan(vdouble d) {
- vint q;
- vdouble u, s, x;
- vmask m;
+ vint q;
+ vdouble u, s, x;
+ vmask m;
- q = vrint_vi_vd(vmul(d, vcast_vd_d(rtengine::RT_2_PI)));
+ q = vrint_vi_vd(vmul(d, vcast_vd_d(rtengine::RT_2_PI)));
- u = vcast_vd_vi(q);
- x = vadd(d, vmul(u, vcast_vd_d(-PI4_A*2)));
- x = vadd(x, vmul(u, vcast_vd_d(-PI4_B*2)));
- x = vadd(x, vmul(u, vcast_vd_d(-PI4_C*2)));
+ u = vcast_vd_vi(q);
+ x = vadd(d, vmul(u, vcast_vd_d(-PI4_A*2)));
+ x = vadd(x, vmul(u, vcast_vd_d(-PI4_B*2)));
+ x = vadd(x, vmul(u, vcast_vd_d(-PI4_C*2)));
- s = vmul(x, x);
+ s = vmul(x, x);
- m = vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(1));
- x = vsel(m, vneg(x), x);
+ m = vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(1));
+ x = vsel(m, vneg(x), x);
- u = vcast_vd_d(1.01419718511083373224408e-05);
- u = vmla(u, s, vcast_vd_d(-2.59519791585924697698614e-05));
- u = vmla(u, s, vcast_vd_d(5.23388081915899855325186e-05));
- u = vmla(u, s, vcast_vd_d(-3.05033014433946488225616e-05));
- u = vmla(u, s, vcast_vd_d(7.14707504084242744267497e-05));
- u = vmla(u, s, vcast_vd_d(8.09674518280159187045078e-05));
- u = vmla(u, s, vcast_vd_d(0.000244884931879331847054404));
- u = vmla(u, s, vcast_vd_d(0.000588505168743587154904506));
- u = vmla(u, s, vcast_vd_d(0.00145612788922812427978848));
- u = vmla(u, s, vcast_vd_d(0.00359208743836906619142924));
- u = vmla(u, s, vcast_vd_d(0.00886323944362401618113356));
- u = vmla(u, s, vcast_vd_d(0.0218694882853846389592078));
- u = vmla(u, s, vcast_vd_d(0.0539682539781298417636002));
- u = vmla(u, s, vcast_vd_d(0.133333333333125941821962));
- u = vmla(u, s, vcast_vd_d(0.333333333333334980164153));
+ u = vcast_vd_d(1.01419718511083373224408e-05);
+ u = vmla(u, s, vcast_vd_d(-2.59519791585924697698614e-05));
+ u = vmla(u, s, vcast_vd_d(5.23388081915899855325186e-05));
+ u = vmla(u, s, vcast_vd_d(-3.05033014433946488225616e-05));
+ u = vmla(u, s, vcast_vd_d(7.14707504084242744267497e-05));
+ u = vmla(u, s, vcast_vd_d(8.09674518280159187045078e-05));
+ u = vmla(u, s, vcast_vd_d(0.000244884931879331847054404));
+ u = vmla(u, s, vcast_vd_d(0.000588505168743587154904506));
+ u = vmla(u, s, vcast_vd_d(0.00145612788922812427978848));
+ u = vmla(u, s, vcast_vd_d(0.00359208743836906619142924));
+ u = vmla(u, s, vcast_vd_d(0.00886323944362401618113356));
+ u = vmla(u, s, vcast_vd_d(0.0218694882853846389592078));
+ u = vmla(u, s, vcast_vd_d(0.0539682539781298417636002));
+ u = vmla(u, s, vcast_vd_d(0.133333333333125941821962));
+ u = vmla(u, s, vcast_vd_d(0.333333333333334980164153));
- u = vmla(s, vmul(u, x), x);
+ u = vmla(s, vmul(u, x), x);
- u = vsel(m, vrec(u), u);
+ u = vsel(m, vrec(u), u);
- u = vsel(vmask_isinf(d), vcast_vd_d(rtengine::RT_NAN), u);
+ u = vsel(vmask_isinf(d), vcast_vd_d(rtengine::RT_NAN), u);
- return u;
+ return u;
}
static INLINE vdouble atan2k(vdouble y, vdouble x) {
- vdouble s, t, u;
- vint q;
- vmask p;
+ vdouble s, t, u;
+ vint q;
+ vmask p;
- q = vseli_lt(x, vcast_vd_d(0), vcast_vi_i(-2), vcast_vi_i(0));
- x = vabs(x);
+ q = vseli_lt(x, vcast_vd_d(0), vcast_vi_i(-2), vcast_vi_i(0));
+ x = vabs(x);
- q = vseli_lt(x, y, vaddi(q, vcast_vi_i(1)), q);
- p = vmask_lt(x, y);
- s = vsel (p, vneg(x), y);
- t = vmax (x, y);
+ q = vseli_lt(x, y, vaddi(q, vcast_vi_i(1)), q);
+ p = vmask_lt(x, y);
+ s = vsel (p, vneg(x), y);
+ t = vmax (x, y);
- s = vdiv(s, t);
- t = vmul(s, s);
+ s = vdiv(s, t);
+ t = vmul(s, s);
- u = vcast_vd_d(-1.88796008463073496563746e-05);
- u = vmla(u, t, vcast_vd_d(0.000209850076645816976906797));
- u = vmla(u, t, vcast_vd_d(-0.00110611831486672482563471));
- u = vmla(u, t, vcast_vd_d(0.00370026744188713119232403));
- u = vmla(u, t, vcast_vd_d(-0.00889896195887655491740809));
- u = vmla(u, t, vcast_vd_d(0.016599329773529201970117));
- u = vmla(u, t, vcast_vd_d(-0.0254517624932312641616861));
- u = vmla(u, t, vcast_vd_d(0.0337852580001353069993897));
- u = vmla(u, t, vcast_vd_d(-0.0407629191276836500001934));
- u = vmla(u, t, vcast_vd_d(0.0466667150077840625632675));
- u = vmla(u, t, vcast_vd_d(-0.0523674852303482457616113));
- u = vmla(u, t, vcast_vd_d(0.0587666392926673580854313));
- u = vmla(u, t, vcast_vd_d(-0.0666573579361080525984562));
- u = vmla(u, t, vcast_vd_d(0.0769219538311769618355029));
- u = vmla(u, t, vcast_vd_d(-0.090908995008245008229153));
- u = vmla(u, t, vcast_vd_d(0.111111105648261418443745));
- u = vmla(u, t, vcast_vd_d(-0.14285714266771329383765));
- u = vmla(u, t, vcast_vd_d(0.199999999996591265594148));
- u = vmla(u, t, vcast_vd_d(-0.333333333333311110369124));
+ u = vcast_vd_d(-1.88796008463073496563746e-05);
+ u = vmla(u, t, vcast_vd_d(0.000209850076645816976906797));
+ u = vmla(u, t, vcast_vd_d(-0.00110611831486672482563471));
+ u = vmla(u, t, vcast_vd_d(0.00370026744188713119232403));
+ u = vmla(u, t, vcast_vd_d(-0.00889896195887655491740809));
+ u = vmla(u, t, vcast_vd_d(0.016599329773529201970117));
+ u = vmla(u, t, vcast_vd_d(-0.0254517624932312641616861));
+ u = vmla(u, t, vcast_vd_d(0.0337852580001353069993897));
+ u = vmla(u, t, vcast_vd_d(-0.0407629191276836500001934));
+ u = vmla(u, t, vcast_vd_d(0.0466667150077840625632675));
+ u = vmla(u, t, vcast_vd_d(-0.0523674852303482457616113));
+ u = vmla(u, t, vcast_vd_d(0.0587666392926673580854313));
+ u = vmla(u, t, vcast_vd_d(-0.0666573579361080525984562));
+ u = vmla(u, t, vcast_vd_d(0.0769219538311769618355029));
+ u = vmla(u, t, vcast_vd_d(-0.090908995008245008229153));
+ u = vmla(u, t, vcast_vd_d(0.111111105648261418443745));
+ u = vmla(u, t, vcast_vd_d(-0.14285714266771329383765));
+ u = vmla(u, t, vcast_vd_d(0.199999999996591265594148));
+ u = vmla(u, t, vcast_vd_d(-0.333333333333311110369124));
- t = vadd(s, vmul(s, vmul(t, u)));
- t = vadd(t, vmul(vcast_vd_vi(q), vcast_vd_d(rtengine::RT_PI/2)));
+ t = vadd(s, vmul(s, vmul(t, u)));
+ t = vadd(t, vmul(vcast_vd_vi(q), vcast_vd_d(rtengine::RT_PI/2)));
- return t;
+ return t;
}
static INLINE vdouble xatan2(vdouble y, vdouble x) {
- vdouble r = atan2k(vabs(y), x);
+ vdouble r = atan2k(vabs(y), x);
- r = vmulsign(r, x);
- r = vsel(vorm(vmask_isinf(x), vmask_eq(x, vcast_vd_d(0))), vsub(vcast_vd_d(rtengine::RT_PI/2), visinf2(x, vmulsign(vcast_vd_d(rtengine::RT_PI/2), x))), r);
- r = vsel(vmask_isinf(y), vsub(vcast_vd_d(rtengine::RT_PI/2), visinf2(x, vmulsign(vcast_vd_d(rtengine::RT_PI/4), x))), r);
- r = vsel(vmask_eq(y, vcast_vd_d(0)), vsel(vmask_eq(vsign(x), vcast_vd_d(-1.0)), vcast_vd_d(rtengine::RT_PI), vcast_vd_d(0)), r);
+ r = vmulsign(r, x);
+ r = vsel(vorm(vmask_isinf(x), vmask_eq(x, vcast_vd_d(0))), vsub(vcast_vd_d(rtengine::RT_PI/2), visinf2(x, vmulsign(vcast_vd_d(rtengine::RT_PI/2), x))), r);
+ r = vsel(vmask_isinf(y), vsub(vcast_vd_d(rtengine::RT_PI/2), visinf2(x, vmulsign(vcast_vd_d(rtengine::RT_PI/4), x))), r);
+ r = vsel(vmask_eq(y, vcast_vd_d(0)), vsel(vmask_eq(vsign(x), vcast_vd_d(-1.0)), vcast_vd_d(rtengine::RT_PI), vcast_vd_d(0)), r);
- return vsel(vorm(vmask_isnan(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_NAN), vmulsign(r, y));
+ return vsel(vorm(vmask_isnan(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_NAN), vmulsign(r, y));
}
static INLINE vdouble xasin(vdouble d) {
- vdouble x, y;
- x = vadd(vcast_vd_d(1), d);
- y = vsub(vcast_vd_d(1), d);
- x = vmul(x, y);
- x = vsqrt(x);
- x = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), atan2k(vabs(d), x));
- return vmulsign(x, d);
+ vdouble x, y;
+ x = vadd(vcast_vd_d(1), d);
+ y = vsub(vcast_vd_d(1), d);
+ x = vmul(x, y);
+ x = vsqrt(x);
+ x = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), atan2k(vabs(d), x));
+ return vmulsign(x, d);
}
static INLINE vdouble xacos(vdouble d) {
- vdouble x, y;
- x = vadd(vcast_vd_d(1), d);
- y = vsub(vcast_vd_d(1), d);
- x = vmul(x, y);
- x = vsqrt(x);
- x = vmulsign(atan2k(x, vabs(d)), d);
- y = (vdouble)vandm(vmask_lt(d, vcast_vd_d(0)), (vmask)vcast_vd_d(rtengine::RT_PI));
- x = vadd(x, y);
- return x;
+ vdouble x, y;
+ x = vadd(vcast_vd_d(1), d);
+ y = vsub(vcast_vd_d(1), d);
+ x = vmul(x, y);
+ x = vsqrt(x);
+ x = vmulsign(atan2k(x, vabs(d)), d);
+ y = (vdouble)vandm(vmask_lt(d, vcast_vd_d(0)), (vmask)vcast_vd_d(rtengine::RT_PI));
+ x = vadd(x, y);
+ return x;
}
static INLINE vdouble xatan(vdouble s) {
- vdouble t, u;
- vint q;
+ vdouble t, u;
+ vint q;
- q = vseli_lt(s, vcast_vd_d(0), vcast_vi_i(2), vcast_vi_i(0));
- s = vabs(s);
+ q = vseli_lt(s, vcast_vd_d(0), vcast_vi_i(2), vcast_vi_i(0));
+ s = vabs(s);
- q = vseli_lt(vcast_vd_d(1), s, vaddi(q, vcast_vi_i(1)), q);
- s = vsel(vmask_lt(vcast_vd_d(1), s), vdiv(vcast_vd_d(1), s), s);
+ q = vseli_lt(vcast_vd_d(1), s, vaddi(q, vcast_vi_i(1)), q);
+ s = vsel(vmask_lt(vcast_vd_d(1), s), vdiv(vcast_vd_d(1), s), s);
- t = vmul(s, s);
+ t = vmul(s, s);
- u = vcast_vd_d(-1.88796008463073496563746e-05);
- u = vmla(u, t, vcast_vd_d(0.000209850076645816976906797));
- u = vmla(u, t, vcast_vd_d(-0.00110611831486672482563471));
- u = vmla(u, t, vcast_vd_d(0.00370026744188713119232403));
- u = vmla(u, t, vcast_vd_d(-0.00889896195887655491740809));
- u = vmla(u, t, vcast_vd_d(0.016599329773529201970117));
- u = vmla(u, t, vcast_vd_d(-0.0254517624932312641616861));
- u = vmla(u, t, vcast_vd_d(0.0337852580001353069993897));
- u = vmla(u, t, vcast_vd_d(-0.0407629191276836500001934));
- u = vmla(u, t, vcast_vd_d(0.0466667150077840625632675));
- u = vmla(u, t, vcast_vd_d(-0.0523674852303482457616113));
- u = vmla(u, t, vcast_vd_d(0.0587666392926673580854313));
- u = vmla(u, t, vcast_vd_d(-0.0666573579361080525984562));
- u = vmla(u, t, vcast_vd_d(0.0769219538311769618355029));
- u = vmla(u, t, vcast_vd_d(-0.090908995008245008229153));
- u = vmla(u, t, vcast_vd_d(0.111111105648261418443745));
- u = vmla(u, t, vcast_vd_d(-0.14285714266771329383765));
- u = vmla(u, t, vcast_vd_d(0.199999999996591265594148));
- u = vmla(u, t, vcast_vd_d(-0.333333333333311110369124));
+ u = vcast_vd_d(-1.88796008463073496563746e-05);
+ u = vmla(u, t, vcast_vd_d(0.000209850076645816976906797));
+ u = vmla(u, t, vcast_vd_d(-0.00110611831486672482563471));
+ u = vmla(u, t, vcast_vd_d(0.00370026744188713119232403));
+ u = vmla(u, t, vcast_vd_d(-0.00889896195887655491740809));
+ u = vmla(u, t, vcast_vd_d(0.016599329773529201970117));
+ u = vmla(u, t, vcast_vd_d(-0.0254517624932312641616861));
+ u = vmla(u, t, vcast_vd_d(0.0337852580001353069993897));
+ u = vmla(u, t, vcast_vd_d(-0.0407629191276836500001934));
+ u = vmla(u, t, vcast_vd_d(0.0466667150077840625632675));
+ u = vmla(u, t, vcast_vd_d(-0.0523674852303482457616113));
+ u = vmla(u, t, vcast_vd_d(0.0587666392926673580854313));
+ u = vmla(u, t, vcast_vd_d(-0.0666573579361080525984562));
+ u = vmla(u, t, vcast_vd_d(0.0769219538311769618355029));
+ u = vmla(u, t, vcast_vd_d(-0.090908995008245008229153));
+ u = vmla(u, t, vcast_vd_d(0.111111105648261418443745));
+ u = vmla(u, t, vcast_vd_d(-0.14285714266771329383765));
+ u = vmla(u, t, vcast_vd_d(0.199999999996591265594148));
+ u = vmla(u, t, vcast_vd_d(-0.333333333333311110369124));
- t = vadd(s, vmul(s, vmul(t, u)));
+ t = vadd(s, vmul(s, vmul(t, u)));
- t = vsel(vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(1)), vsub(vcast_vd_d(rtengine::RT_PI/2), t), t);
- t = vsel(vmaski_eq(vandi(q, vcast_vi_i(2)), vcast_vi_i(2)), vneg(t), t);
+ t = vsel(vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(1)), vsub(vcast_vd_d(rtengine::RT_PI/2), t), t);
+ t = vsel(vmaski_eq(vandi(q, vcast_vi_i(2)), vcast_vi_i(2)), vneg(t), t);
- return t;
+ return t;
}
static INLINE vdouble xlog(vdouble d) {
- vdouble x, x2;
- vdouble t, m;
- vint e;
+ vdouble x, x2;
+ vdouble t, m;
+ vint e;
- e = vilogbp1(vmul(d, vcast_vd_d(0.7071)));
- m = vldexp(d, vsubi(vcast_vi_i(0), e));
+ e = vilogbp1(vmul(d, vcast_vd_d(0.7071)));
+ m = vldexp(d, vsubi(vcast_vi_i(0), e));
- x = vdiv(vadd(vcast_vd_d(-1), m), vadd(vcast_vd_d(1), m));
- x2 = vmul(x, x);
+ x = vdiv(vadd(vcast_vd_d(-1), m), vadd(vcast_vd_d(1), m));
+ x2 = vmul(x, x);
- t = vcast_vd_d(0.148197055177935105296783);
- t = vmla(t, x2, vcast_vd_d(0.153108178020442575739679));
- t = vmla(t, x2, vcast_vd_d(0.181837339521549679055568));
- t = vmla(t, x2, vcast_vd_d(0.22222194152736701733275));
- t = vmla(t, x2, vcast_vd_d(0.285714288030134544449368));
- t = vmla(t, x2, vcast_vd_d(0.399999999989941956712869));
- t = vmla(t, x2, vcast_vd_d(0.666666666666685503450651));
- t = vmla(t, x2, vcast_vd_d(2));
+ t = vcast_vd_d(0.148197055177935105296783);
+ t = vmla(t, x2, vcast_vd_d(0.153108178020442575739679));
+ t = vmla(t, x2, vcast_vd_d(0.181837339521549679055568));
+ t = vmla(t, x2, vcast_vd_d(0.22222194152736701733275));
+ t = vmla(t, x2, vcast_vd_d(0.285714288030134544449368));
+ t = vmla(t, x2, vcast_vd_d(0.399999999989941956712869));
+ t = vmla(t, x2, vcast_vd_d(0.666666666666685503450651));
+ t = vmla(t, x2, vcast_vd_d(2));
- x = vadd(vmul(x, t), vmul(vcast_vd_d(0.693147180559945286226764), vcast_vd_vi(e)));
+ x = vadd(vmul(x, t), vmul(vcast_vd_d(0.693147180559945286226764), vcast_vd_vi(e)));
- x = vsel(vmask_ispinf(d), vcast_vd_d(rtengine::RT_INFINITY), x);
- x = vsel(vmask_gt(vcast_vd_d(0), d), vcast_vd_d(rtengine::RT_NAN), x);
- x = vsel(vmask_eq(d, vcast_vd_d(0)), vcast_vd_d(-rtengine::RT_INFINITY), x);
+ x = vsel(vmask_ispinf(d), vcast_vd_d(rtengine::RT_INFINITY), x);
+ x = vsel(vmask_gt(vcast_vd_d(0), d), vcast_vd_d(rtengine::RT_NAN), x);
+ x = vsel(vmask_eq(d, vcast_vd_d(0)), vcast_vd_d(-rtengine::RT_INFINITY), x);
- return x;
+ return x;
}
static INLINE vdouble xexp(vdouble d) {
- vint q = vrint_vi_vd(vmul(d, vcast_vd_d(R_LN2)));
- vdouble s, u;
+ vint q = vrint_vi_vd(vmul(d, vcast_vd_d(R_LN2)));
+ vdouble s, u;
- s = vadd(d, vmul(vcast_vd_vi(q), vcast_vd_d(-L2U)));
- s = vadd(s, vmul(vcast_vd_vi(q), vcast_vd_d(-L2L)));
+ s = vadd(d, vmul(vcast_vd_vi(q), vcast_vd_d(-L2U)));
+ s = vadd(s, vmul(vcast_vd_vi(q), vcast_vd_d(-L2L)));
- u = vcast_vd_d(2.08860621107283687536341e-09);
- u = vmla(u, s, vcast_vd_d(2.51112930892876518610661e-08));
- u = vmla(u, s, vcast_vd_d(2.75573911234900471893338e-07));
- u = vmla(u, s, vcast_vd_d(2.75572362911928827629423e-06));
- u = vmla(u, s, vcast_vd_d(2.4801587159235472998791e-05));
- u = vmla(u, s, vcast_vd_d(0.000198412698960509205564975));
- u = vmla(u, s, vcast_vd_d(0.00138888888889774492207962));
- u = vmla(u, s, vcast_vd_d(0.00833333333331652721664984));
- u = vmla(u, s, vcast_vd_d(0.0416666666666665047591422));
- u = vmla(u, s, vcast_vd_d(0.166666666666666851703837));
- u = vmla(u, s, vcast_vd_d(0.5));
+ u = vcast_vd_d(2.08860621107283687536341e-09);
+ u = vmla(u, s, vcast_vd_d(2.51112930892876518610661e-08));
+ u = vmla(u, s, vcast_vd_d(2.75573911234900471893338e-07));
+ u = vmla(u, s, vcast_vd_d(2.75572362911928827629423e-06));
+ u = vmla(u, s, vcast_vd_d(2.4801587159235472998791e-05));
+ u = vmla(u, s, vcast_vd_d(0.000198412698960509205564975));
+ u = vmla(u, s, vcast_vd_d(0.00138888888889774492207962));
+ u = vmla(u, s, vcast_vd_d(0.00833333333331652721664984));
+ u = vmla(u, s, vcast_vd_d(0.0416666666666665047591422));
+ u = vmla(u, s, vcast_vd_d(0.166666666666666851703837));
+ u = vmla(u, s, vcast_vd_d(0.5));
- u = vadd(vcast_vd_d(1), vadd(s, vmul(vmul(s, s), u)));
+ u = vadd(vcast_vd_d(1), vadd(s, vmul(vmul(s, s), u)));
- u = vldexp(u, q);
+ u = vldexp(u, q);
- u = vsel(vmask_isminf(d), vcast_vd_d(0), u);
+ u = vsel(vmask_isminf(d), vcast_vd_d(0), u);
- return u;
+ return u;
}
static INLINE vdouble2 logk(vdouble d) {
- vdouble2 x, x2;
- vdouble t, m;
- vint e;
+ vdouble2 x, x2;
+ vdouble t, m;
+ vint e;
- e = vilogbp1(vmul(d, vcast_vd_d(0.7071)));
- m = vldexp(d, vsubi(vcast_vi_i(0), e));
+ e = vilogbp1(vmul(d, vcast_vd_d(0.7071)));
+ m = vldexp(d, vsubi(vcast_vi_i(0), e));
- x = div_dd(add2_ss(vcast_vd_d(-1), m), add2_ss(vcast_vd_d(1), m));
- x2 = squ_d(x);
- x2 = normalize_d(x2);
+ x = div_dd(add2_ss(vcast_vd_d(-1), m), add2_ss(vcast_vd_d(1), m));
+ x2 = squ_d(x);
+ x2 = normalize_d(x2);
- t = vcast_vd_d(0.134601987501262130076155);
- t = vmla(t, x2.x, vcast_vd_d(0.132248509032032670243288));
- t = vmla(t, x2.x, vcast_vd_d(0.153883458318096079652524));
- t = vmla(t, x2.x, vcast_vd_d(0.181817427573705403298686));
- t = vmla(t, x2.x, vcast_vd_d(0.222222231326187414840781));
- t = vmla(t, x2.x, vcast_vd_d(0.285714285651261412873718));
- t = vmla(t, x2.x, vcast_vd_d(0.400000000000222439910458));
- t = vmla(t, x2.x, vcast_vd_d(0.666666666666666371239645));
+ t = vcast_vd_d(0.134601987501262130076155);
+ t = vmla(t, x2.x, vcast_vd_d(0.132248509032032670243288));
+ t = vmla(t, x2.x, vcast_vd_d(0.153883458318096079652524));
+ t = vmla(t, x2.x, vcast_vd_d(0.181817427573705403298686));
+ t = vmla(t, x2.x, vcast_vd_d(0.222222231326187414840781));
+ t = vmla(t, x2.x, vcast_vd_d(0.285714285651261412873718));
+ t = vmla(t, x2.x, vcast_vd_d(0.400000000000222439910458));
+ t = vmla(t, x2.x, vcast_vd_d(0.666666666666666371239645));
- return add2_dd(mul_ds(dd(vcast_vd_d(0.693147180559945286226764), vcast_vd_d(2.319046813846299558417771e-17)),
- vcast_vd_vi(e)),
- add2_dd(scale_d(x, vcast_vd_d(2)), mul_ds(mul_dd(x2, x), t)));
+ return add2_dd(mul_ds(dd(vcast_vd_d(0.693147180559945286226764), vcast_vd_d(2.319046813846299558417771e-17)),
+ vcast_vd_vi(e)),
+ add2_dd(scale_d(x, vcast_vd_d(2)), mul_ds(mul_dd(x2, x), t)));
}
static INLINE vdouble expk(vdouble2 d) {
- vdouble u = vmul(vadd(d.x, d.y), vcast_vd_d(R_LN2));
- vint q = vrint_vi_vd(u);
- vdouble2 s, t;
+ vdouble u = vmul(vadd(d.x, d.y), vcast_vd_d(R_LN2));
+ vint q = vrint_vi_vd(u);
+ vdouble2 s, t;
- s = add2_ds(d, vmul(vcast_vd_vi(q), vcast_vd_d(-L2U)));
- s = add2_ds(s, vmul(vcast_vd_vi(q), vcast_vd_d(-L2L)));
+ s = add2_ds(d, vmul(vcast_vd_vi(q), vcast_vd_d(-L2U)));
+ s = add2_ds(s, vmul(vcast_vd_vi(q), vcast_vd_d(-L2L)));
- q = vrint_vi_vd(vmin(vmax(vcast_vd_d(-2047.49), u), vcast_vd_d(2047.49)));
+ q = vrint_vi_vd(vmin(vmax(vcast_vd_d(-2047.49), u), vcast_vd_d(2047.49)));
- s = normalize_d(s);
+ s = normalize_d(s);
- u = vcast_vd_d(2.51069683420950419527139e-08);
- u = vmla(u, s.x, vcast_vd_d(2.76286166770270649116855e-07));
- u = vmla(u, s.x, vcast_vd_d(2.75572496725023574143864e-06));
- u = vmla(u, s.x, vcast_vd_d(2.48014973989819794114153e-05));
- u = vmla(u, s.x, vcast_vd_d(0.000198412698809069797676111));
- u = vmla(u, s.x, vcast_vd_d(0.0013888888939977128960529));
- u = vmla(u, s.x, vcast_vd_d(0.00833333333332371417601081));
- u = vmla(u, s.x, vcast_vd_d(0.0416666666665409524128449));
- u = vmla(u, s.x, vcast_vd_d(0.166666666666666740681535));
- u = vmla(u, s.x, vcast_vd_d(0.500000000000000999200722));
+ u = vcast_vd_d(2.51069683420950419527139e-08);
+ u = vmla(u, s.x, vcast_vd_d(2.76286166770270649116855e-07));
+ u = vmla(u, s.x, vcast_vd_d(2.75572496725023574143864e-06));
+ u = vmla(u, s.x, vcast_vd_d(2.48014973989819794114153e-05));
+ u = vmla(u, s.x, vcast_vd_d(0.000198412698809069797676111));
+ u = vmla(u, s.x, vcast_vd_d(0.0013888888939977128960529));
+ u = vmla(u, s.x, vcast_vd_d(0.00833333333332371417601081));
+ u = vmla(u, s.x, vcast_vd_d(0.0416666666665409524128449));
+ u = vmla(u, s.x, vcast_vd_d(0.166666666666666740681535));
+ u = vmla(u, s.x, vcast_vd_d(0.500000000000000999200722));
- t = add_dd(s, mul_ds(squ_d(s), u));
+ t = add_dd(s, mul_ds(squ_d(s), u));
- t = add_sd(vcast_vd_d(1), t);
- u = vadd(t.x, t.y);
- u = vldexp(u, q);
+ t = add_sd(vcast_vd_d(1), t);
+ u = vadd(t.x, t.y);
+ u = vldexp(u, q);
- return u;
+ return u;
}
static INLINE vdouble xpow(vdouble x, vdouble y) {
#if 1
- vmask yisint = vmask_eq(vcast_vd_vi(vrint_vi_vd(y)), y);
- vmask yisodd = vandm(vmaski_eq(vandi(vrint_vi_vd(y), vcast_vi_i(1)), vcast_vi_i(1)), yisint);
+ vmask yisint = vmask_eq(vcast_vd_vi(vrint_vi_vd(y)), y);
+ vmask yisodd = vandm(vmaski_eq(vandi(vrint_vi_vd(y), vcast_vi_i(1)), vcast_vi_i(1)), yisint);
- vdouble result = expk(mul_ds(logk(vabs(x)), y));
+ vdouble result = expk(mul_ds(logk(vabs(x)), y));
- //result = vsel(vmask_isnan(result), vcast_vd_d(rtengine::RT_INFINITY), result);
+ //result = vsel(vmask_isnan(result), vcast_vd_d(rtengine::RT_INFINITY), result);
- result = vmul(result,
- vsel(vmask_gt(x, vcast_vd_d(0)),
- vcast_vd_d(1),
- vsel(yisint,
- vsel(yisodd,
- vcast_vd_d(-1),
- vcast_vd_d(1)),
- vcast_vd_d(rtengine::RT_NAN))));
+ result = vmul(result,
+ vsel(vmask_gt(x, vcast_vd_d(0)),
+ vcast_vd_d(1),
+ vsel(yisint,
+ vsel(yisodd,
+ vcast_vd_d(-1),
+ vcast_vd_d(1)),
+ vcast_vd_d(rtengine::RT_NAN))));
- vdouble efx = vreinterpret_vd_vm(vxorm(vreinterpret_vm_vd(vsub(vabs(x), vcast_vd_d(1))), vsignbit(y)));
+ vdouble efx = vreinterpret_vd_vm(vxorm(vreinterpret_vm_vd(vsub(vabs(x), vcast_vd_d(1))), vsignbit(y)));
- result = vsel(vmask_isinf(y),
- vsel(vmask_lt(efx, vcast_vd_d(0)),
- vcast_vd_d(0),
- vsel(vmask_eq(efx, vcast_vd_d(0)),
- vcast_vd_d(1.0),
- vcast_vd_d(rtengine::RT_INFINITY))),
- result);
+ result = vsel(vmask_isinf(y),
+ vsel(vmask_lt(efx, vcast_vd_d(0)),
+ vcast_vd_d(0),
+ vsel(vmask_eq(efx, vcast_vd_d(0)),
+ vcast_vd_d(1.0),
+ vcast_vd_d(rtengine::RT_INFINITY))),
+ result);
- result = vsel(vorm(vmask_isinf(x), vmask_eq(x, vcast_vd_d(0))),
- vmul(vsel(yisodd, vsign(x), vcast_vd_d(1)),
- vsel(vmask_lt(vsel(vmask_eq(x, vcast_vd_d(0)), vneg(y), y), vcast_vd_d(0)),
- vcast_vd_d(0),
- vcast_vd_d(rtengine::RT_INFINITY))),
- result);
+ result = vsel(vorm(vmask_isinf(x), vmask_eq(x, vcast_vd_d(0))),
+ vmul(vsel(yisodd, vsign(x), vcast_vd_d(1)),
+ vsel(vmask_lt(vsel(vmask_eq(x, vcast_vd_d(0)), vneg(y), y), vcast_vd_d(0)),
+ vcast_vd_d(0),
+ vcast_vd_d(rtengine::RT_INFINITY))),
+ result);
- result = vsel(vorm(vmask_isnan(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_NAN), result);
+ result = vsel(vorm(vmask_isnan(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_NAN), result);
- result = vsel(vorm(vmask_eq(y, vcast_vd_d(0)), vmask_eq(x, vcast_vd_d(1))), vcast_vd_d(1), result);
+ result = vsel(vorm(vmask_eq(y, vcast_vd_d(0)), vmask_eq(x, vcast_vd_d(1))), vcast_vd_d(1), result);
- return result;
+ return result;
#else
- return expk(mul_ds(logk(x), y));
+ return expk(mul_ds(logk(x), y));
#endif
}
static INLINE vdouble2 expk2(vdouble2 d) {
- vdouble u = vmul(vadd(d.x, d.y), vcast_vd_d(R_LN2));
- vint q = vrint_vi_vd(u);
- vdouble2 s, t;
+ vdouble u = vmul(vadd(d.x, d.y), vcast_vd_d(R_LN2));
+ vint q = vrint_vi_vd(u);
+ vdouble2 s, t;
- s = add2_ds(d, vmul(vcast_vd_vi(q), vcast_vd_d(-L2U)));
- s = add2_ds(s, vmul(vcast_vd_vi(q), vcast_vd_d(-L2L)));
+ s = add2_ds(d, vmul(vcast_vd_vi(q), vcast_vd_d(-L2U)));
+ s = add2_ds(s, vmul(vcast_vd_vi(q), vcast_vd_d(-L2L)));
- q = vrint_vi_vd(vmin(vmax(vcast_vd_d(-2047.49), u), vcast_vd_d(2047.49)));
+ q = vrint_vi_vd(vmin(vmax(vcast_vd_d(-2047.49), u), vcast_vd_d(2047.49)));
- s = normalize_d(s);
+ s = normalize_d(s);
- u = vcast_vd_d(2.51069683420950419527139e-08);
- u = vmla(u, s.x, vcast_vd_d(2.76286166770270649116855e-07));
- u = vmla(u, s.x, vcast_vd_d(2.75572496725023574143864e-06));
- u = vmla(u, s.x, vcast_vd_d(2.48014973989819794114153e-05));
- u = vmla(u, s.x, vcast_vd_d(0.000198412698809069797676111));
- u = vmla(u, s.x, vcast_vd_d(0.0013888888939977128960529));
- u = vmla(u, s.x, vcast_vd_d(0.00833333333332371417601081));
- u = vmla(u, s.x, vcast_vd_d(0.0416666666665409524128449));
- u = vmla(u, s.x, vcast_vd_d(0.166666666666666740681535));
- u = vmla(u, s.x, vcast_vd_d(0.500000000000000999200722));
+ u = vcast_vd_d(2.51069683420950419527139e-08);
+ u = vmla(u, s.x, vcast_vd_d(2.76286166770270649116855e-07));
+ u = vmla(u, s.x, vcast_vd_d(2.75572496725023574143864e-06));
+ u = vmla(u, s.x, vcast_vd_d(2.48014973989819794114153e-05));
+ u = vmla(u, s.x, vcast_vd_d(0.000198412698809069797676111));
+ u = vmla(u, s.x, vcast_vd_d(0.0013888888939977128960529));
+ u = vmla(u, s.x, vcast_vd_d(0.00833333333332371417601081));
+ u = vmla(u, s.x, vcast_vd_d(0.0416666666665409524128449));
+ u = vmla(u, s.x, vcast_vd_d(0.166666666666666740681535));
+ u = vmla(u, s.x, vcast_vd_d(0.500000000000000999200722));
- t = add_dd(s, mul_ds(squ_d(s), u));
+ t = add_dd(s, mul_ds(squ_d(s), u));
- t = add_sd(vcast_vd_d(1), t);
+ t = add_sd(vcast_vd_d(1), t);
- return dd(vldexp(t.x, q), vldexp(t.y, q));
+ return dd(vldexp(t.x, q), vldexp(t.y, q));
}
static INLINE vdouble xsinh(vdouble x) {
- vdouble y = vabs(x);
- vdouble2 d = expk2(dd(y, vcast_vd_d(0)));
- d = add2_dd(d, div_dd(dd(vcast_vd_d(-1), vcast_vd_d(0)), d));
- y = vmul(vadd(d.x, d.y), vcast_vd_d(0.5));
+ vdouble y = vabs(x);
+ vdouble2 d = expk2(dd(y, vcast_vd_d(0)));
+ d = add2_dd(d, div_dd(dd(vcast_vd_d(-1), vcast_vd_d(0)), d));
+ y = vmul(vadd(d.x, d.y), vcast_vd_d(0.5));
- y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_INFINITY), y);
- y = vmulsign(y, x);
- y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y);
+ y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_INFINITY), y);
+ y = vmulsign(y, x);
+ y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y);
- return y;
+ return y;
}
static INLINE vdouble xcosh(vdouble x) {
- vdouble2 d = expk2(dd(x, vcast_vd_d(0)));
- d = add2_dd(d, div_dd(dd(vcast_vd_d(1), vcast_vd_d(0)), d));
- vdouble y = vmul(vadd(d.x, d.y), vcast_vd_d(0.5));
+ vdouble2 d = expk2(dd(x, vcast_vd_d(0)));
+ d = add2_dd(d, div_dd(dd(vcast_vd_d(1), vcast_vd_d(0)), d));
+ vdouble y = vmul(vadd(d.x, d.y), vcast_vd_d(0.5));
- y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_INFINITY), y);
- y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y);
+ y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_INFINITY), y);
+ y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y);
- return y;
+ return y;
}
static INLINE vdouble xtanh(vdouble x) {
- vdouble y = vabs(x);
- vdouble2 d = expk2(dd(y, vcast_vd_d(0)));
- vdouble2 e = div_dd(dd(vcast_vd_d(1), vcast_vd_d(0)), d);
- d = div_dd(add2_dd(d, scale_d(e, vcast_vd_d(-1))), add2_dd(d, e));
- y = d.x + d.y;
+ vdouble y = vabs(x);
+ vdouble2 d = expk2(dd(y, vcast_vd_d(0)));
+ vdouble2 e = div_dd(dd(vcast_vd_d(1), vcast_vd_d(0)), d);
+ d = div_dd(add2_dd(d, scale_d(e, vcast_vd_d(-1))), add2_dd(d, e));
+ y = d.x + d.y;
- y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(1.0), y);
- y = vmulsign(y, x);
- y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y);
+ y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(1.0), y);
+ y = vmulsign(y, x);
+ y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y);
- return y;
+ return y;
}
static INLINE vdouble2 logk2(vdouble2 d) {
- vdouble2 x, x2, m;
- vdouble t;
- vint e;
+ vdouble2 x, x2, m;
+ vdouble t;
+ vint e;
- d = normalize_d(d);
- e = vilogbp1(vmul(d.x, vcast_vd_d(0.7071)));
- m = scale_d(d, vldexp(vcast_vd_d(1), vsubi(vcast_vi_i(0), e)));
+ d = normalize_d(d);
+ e = vilogbp1(vmul(d.x, vcast_vd_d(0.7071)));
+ m = scale_d(d, vldexp(vcast_vd_d(1), vsubi(vcast_vi_i(0), e)));
- x = div_dd(add2_ds(m, vcast_vd_d(-1)), add2_ds(m, vcast_vd_d(1)));
- x2 = squ_d(x);
- x2 = normalize_d(x2);
+ x = div_dd(add2_ds(m, vcast_vd_d(-1)), add2_ds(m, vcast_vd_d(1)));
+ x2 = squ_d(x);
+ x2 = normalize_d(x2);
- t = vcast_vd_d(0.134601987501262130076155);
- t = vmla(t, x2.x, vcast_vd_d(0.132248509032032670243288));
- t = vmla(t, x2.x, vcast_vd_d(0.153883458318096079652524));
- t = vmla(t, x2.x, vcast_vd_d(0.181817427573705403298686));
- t = vmla(t, x2.x, vcast_vd_d(0.222222231326187414840781));
- t = vmla(t, x2.x, vcast_vd_d(0.285714285651261412873718));
- t = vmla(t, x2.x, vcast_vd_d(0.400000000000222439910458));
- t = vmla(t, x2.x, vcast_vd_d(0.666666666666666371239645));
+ t = vcast_vd_d(0.134601987501262130076155);
+ t = vmla(t, x2.x, vcast_vd_d(0.132248509032032670243288));
+ t = vmla(t, x2.x, vcast_vd_d(0.153883458318096079652524));
+ t = vmla(t, x2.x, vcast_vd_d(0.181817427573705403298686));
+ t = vmla(t, x2.x, vcast_vd_d(0.222222231326187414840781));
+ t = vmla(t, x2.x, vcast_vd_d(0.285714285651261412873718));
+ t = vmla(t, x2.x, vcast_vd_d(0.400000000000222439910458));
+ t = vmla(t, x2.x, vcast_vd_d(0.666666666666666371239645));
- return add2_dd(mul_ds(dd(vcast_vd_d(0.693147180559945286226764), vcast_vd_d(2.319046813846299558417771e-17)),
- vcast_vd_vi(e)),
- add2_dd(scale_d(x, vcast_vd_d(2)), mul_ds(mul_dd(x2, x), t)));
+ return add2_dd(mul_ds(dd(vcast_vd_d(0.693147180559945286226764), vcast_vd_d(2.319046813846299558417771e-17)),
+ vcast_vd_vi(e)),
+ add2_dd(scale_d(x, vcast_vd_d(2)), mul_ds(mul_dd(x2, x), t)));
}
static INLINE vdouble xasinh(vdouble x) {
- vdouble y = vabs(x);
- vdouble2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(y, y), vcast_vd_d(1))), y));
- y = vadd(d.x, d.y);
+ vdouble y = vabs(x);
+ vdouble2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(y, y), vcast_vd_d(1))), y));
+ y = vadd(d.x, d.y);
- y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_INFINITY), y);
- y = vmulsign(y, x);
- y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y);
+ y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_INFINITY), y);
+ y = vmulsign(y, x);
+ y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y);
- return y;
+ return y;
}
static INLINE vdouble xacosh(vdouble x) {
- vdouble2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(x, x), vcast_vd_d(-1))), x));
- vdouble y = vadd(d.x, d.y);
+ vdouble2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(x, x), vcast_vd_d(-1))), x));
+ vdouble y = vadd(d.x, d.y);
- y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_INFINITY), y);
- y = vsel(vmask_eq(x, vcast_vd_d(1.0)), vcast_vd_d(0.0), y);
- y = vsel(vmask_lt(x, vcast_vd_d(1.0)), vcast_vd_d(rtengine::RT_NAN), y);
- y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y);
+ y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_INFINITY), y);
+ y = vsel(vmask_eq(x, vcast_vd_d(1.0)), vcast_vd_d(0.0), y);
+ y = vsel(vmask_lt(x, vcast_vd_d(1.0)), vcast_vd_d(rtengine::RT_NAN), y);
+ y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y);
- return y;
+ return y;
}
static INLINE vdouble xatanh(vdouble x) {
- vdouble y = vabs(x);
- vdouble2 d = logk2(div_dd(add2_ss(vcast_vd_d(1), y), add2_ss(vcast_vd_d(1), -y)));
- y = vsel(vmask_gt(y, vcast_vd_d(1.0)), vcast_vd_d(rtengine::RT_NAN), vsel(vmask_eq(y, vcast_vd_d(1.0)), vcast_vd_d(rtengine::RT_INFINITY), vmul(vadd(d.x, d.y), vcast_vd_d(0.5))));
+ vdouble y = vabs(x);
+ vdouble2 d = logk2(div_dd(add2_ss(vcast_vd_d(1), y), add2_ss(vcast_vd_d(1), -y)));
+ y = vsel(vmask_gt(y, vcast_vd_d(1.0)), vcast_vd_d(rtengine::RT_NAN), vsel(vmask_eq(y, vcast_vd_d(1.0)), vcast_vd_d(rtengine::RT_INFINITY), vmul(vadd(d.x, d.y), vcast_vd_d(0.5))));
- y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_NAN), y);
- y = vmulsign(y, x);
- y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y);
+ y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_NAN), y);
+ y = vmulsign(y, x);
+ y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y);
- return y;
+ return y;
}
static INLINE vdouble xcbrt(vdouble d) {
- vdouble x, y, q = vcast_vd_d(1.0);
- vint e, qu, re;
- vdouble t;
+ vdouble x, y, q = vcast_vd_d(1.0);
+ vint e, qu, re;
+ vdouble t;
- e = vilogbp1(vabs(d));
- d = vldexp(d, vsubi(vcast_vi_i(0), e));
+ e = vilogbp1(vabs(d));
+ d = vldexp(d, vsubi(vcast_vi_i(0), e));
- t = vadd(vcast_vd_vi(e), vcast_vd_d(6144));
- qu = vtruncate_vi_vd(vdiv(t, vcast_vd_d(3)));
- re = vtruncate_vi_vd(vsub(t, vmul(vcast_vd_vi(qu), vcast_vd_d(3))));
+ t = vadd(vcast_vd_vi(e), vcast_vd_d(6144));
+ qu = vtruncate_vi_vd(vdiv(t, vcast_vd_d(3)));
+ re = vtruncate_vi_vd(vsub(t, vmul(vcast_vd_vi(qu), vcast_vd_d(3))));
- q = vsel(vmaski_eq(re, vcast_vi_i(1)), vcast_vd_d(1.2599210498948731647672106), q);
- q = vsel(vmaski_eq(re, vcast_vi_i(2)), vcast_vd_d(1.5874010519681994747517056), q);
- q = vldexp(q, vsubi(qu, vcast_vi_i(2048)));
+ q = vsel(vmaski_eq(re, vcast_vi_i(1)), vcast_vd_d(1.2599210498948731647672106), q);
+ q = vsel(vmaski_eq(re, vcast_vi_i(2)), vcast_vd_d(1.5874010519681994747517056), q);
+ q = vldexp(q, vsubi(qu, vcast_vi_i(2048)));
- q = vmulsign(q, d);
+ q = vmulsign(q, d);
- d = vabs(d);
+ d = vabs(d);
- x = vcast_vd_d(-0.640245898480692909870982);
- x = vmla(x, d, vcast_vd_d(2.96155103020039511818595));
- x = vmla(x, d, vcast_vd_d(-5.73353060922947843636166));
- x = vmla(x, d, vcast_vd_d(6.03990368989458747961407));
- x = vmla(x, d, vcast_vd_d(-3.85841935510444988821632));
- x = vmla(x, d, vcast_vd_d(2.2307275302496609725722));
+ x = vcast_vd_d(-0.640245898480692909870982);
+ x = vmla(x, d, vcast_vd_d(2.96155103020039511818595));
+ x = vmla(x, d, vcast_vd_d(-5.73353060922947843636166));
+ x = vmla(x, d, vcast_vd_d(6.03990368989458747961407));
+ x = vmla(x, d, vcast_vd_d(-3.85841935510444988821632));
+ x = vmla(x, d, vcast_vd_d(2.2307275302496609725722));
- y = vmul(x, x); y = vmul(y, y); x = vsub(x, vmul(vmla(d, y, vneg(x)), vcast_vd_d(1.0 / 3.0)));
- y = vmul(vmul(d, x), x);
- y = vmul(vsub(y, vmul(vmul(vcast_vd_d(2.0 / 3.0), y), vmla(y, x, vcast_vd_d(-1.0)))), q);
+ y = vmul(x, x); y = vmul(y, y); x = vsub(x, vmul(vmla(d, y, vneg(x)), vcast_vd_d(1.0 / 3.0)));
+ y = vmul(vmul(d, x), x);
+ y = vmul(vsub(y, vmul(vmul(vcast_vd_d(2.0 / 3.0), y), vmla(y, x, vcast_vd_d(-1.0)))), q);
- return y;
+ return y;
}
static INLINE vdouble xexp2(vdouble a) {
- vdouble u = expk(mul_ds(dd(vcast_vd_d(0.69314718055994528623), vcast_vd_d(2.3190468138462995584e-17)), a));
- u = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), u);
- u = vsel(vmask_isminf(a), vcast_vd_d(0), u);
- return u;
+ vdouble u = expk(mul_ds(dd(vcast_vd_d(0.69314718055994528623), vcast_vd_d(2.3190468138462995584e-17)), a));
+ u = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), u);
+ u = vsel(vmask_isminf(a), vcast_vd_d(0), u);
+ return u;
}
static INLINE vdouble xexp10(vdouble a) {
- vdouble u = expk(mul_ds(dd(vcast_vd_d(2.3025850929940459011), vcast_vd_d(-2.1707562233822493508e-16)), a));
- u = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), u);
- u = vsel(vmask_isminf(a), vcast_vd_d(0), u);
- return u;
+ vdouble u = expk(mul_ds(dd(vcast_vd_d(2.3025850929940459011), vcast_vd_d(-2.1707562233822493508e-16)), a));
+ u = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), u);
+ u = vsel(vmask_isminf(a), vcast_vd_d(0), u);
+ return u;
}
static INLINE vdouble xexpm1(vdouble a) {
- vdouble2 d = add2_ds(expk2(dd(a, vcast_vd_d(0))), vcast_vd_d(-1.0));
- vdouble x = d.x + d.y;
- x = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), x);
- x = vsel(vmask_isminf(a), vcast_vd_d(-1), x);
- return x;
+ vdouble2 d = add2_ds(expk2(dd(a, vcast_vd_d(0))), vcast_vd_d(-1.0));
+ vdouble x = d.x + d.y;
+ x = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), x);
+ x = vsel(vmask_isminf(a), vcast_vd_d(-1), x);
+ return x;
}
static INLINE vdouble xlog10(vdouble a) {
- vdouble2 d = mul_dd(logk(a), dd(vcast_vd_d(0.43429448190325176116), vcast_vd_d(6.6494347733425473126e-17)));
- vdouble x = d.x + d.y;
+ vdouble2 d = mul_dd(logk(a), dd(vcast_vd_d(0.43429448190325176116), vcast_vd_d(6.6494347733425473126e-17)));
+ vdouble x = d.x + d.y;
- x = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), x);
- x = vsel(vmask_gt(vcast_vd_d(0), a), vcast_vd_d(rtengine::RT_NAN), x);
- x = vsel(vmask_eq(a, vcast_vd_d(0)), vcast_vd_d(-rtengine::RT_INFINITY), x);
+ x = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), x);
+ x = vsel(vmask_gt(vcast_vd_d(0), a), vcast_vd_d(rtengine::RT_NAN), x);
+ x = vsel(vmask_eq(a, vcast_vd_d(0)), vcast_vd_d(-rtengine::RT_INFINITY), x);
- return x;
+ return x;
}
static INLINE vdouble xlog1p(vdouble a) {
- vdouble2 d = logk2(add2_ss(a, vcast_vd_d(1)));
- vdouble x = d.x + d.y;
+ vdouble2 d = logk2(add2_ss(a, vcast_vd_d(1)));
+ vdouble x = d.x + d.y;
- x = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), x);
- x = vsel(vmask_gt(vcast_vd_d(-1), a), vcast_vd_d(rtengine::RT_NAN), x);
- x = vsel(vmask_eq(a, vcast_vd_d(-1)), vcast_vd_d(-rtengine::RT_INFINITY), x);
+ x = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), x);
+ x = vsel(vmask_gt(vcast_vd_d(-1), a), vcast_vd_d(rtengine::RT_NAN), x);
+ x = vsel(vmask_eq(a, vcast_vd_d(-1)), vcast_vd_d(-rtengine::RT_INFINITY), x);
- return x;
+ return x;
}
//
typedef struct {
- vfloat x, y;
+ vfloat x, y;
} vfloat2;
static INLINE vfloat vabsf(vfloat f) { return (vfloat)vandnotm((vmask)vcast_vf_f(-0.0f), (vmask)f); }
static INLINE vfloat vnegf(vfloat f) { return (vfloat)vxorm((vmask)f, (vmask)vcast_vf_f(-0.0f)); }
#ifdef __SSE4_1__
- // only one instruction when using SSE4.1
- static INLINE vfloat vself(vmask mask, vfloat x, vfloat y) {
- return _mm_blendv_ps(y,x,(vfloat)mask);
- }
+// only one instruction when using SSE4.1
+static INLINE vfloat vself(vmask mask, vfloat x, vfloat y) {
+ return _mm_blendv_ps(y,x,(vfloat)mask);
+}
- static INLINE vint vselc(vmask mask, vint x, vint y) {
- return _mm_blendv_epi8(y,x,mask);
- }
+static INLINE vint vselc(vmask mask, vint x, vint y) {
+ return _mm_blendv_epi8(y,x,mask);
+}
#else
- // three instructions when using SSE2
- static INLINE vfloat vself(vmask mask, vfloat x, vfloat y) {
- return (vfloat)vorm(vandm(mask, (vmask)x), vandnotm(mask, (vmask)y));
- }
+// three instructions when using SSE2
+static INLINE vfloat vself(vmask mask, vfloat x, vfloat y) {
+ return (vfloat)vorm(vandm(mask, (vmask)x), vandnotm(mask, (vmask)y));
+}
- static INLINE vint vselc(vmask mask, vint x, vint y) {
- return vorm(vandm(mask, (vmask)x), vandnotm(mask, (vmask)y));
- }
+static INLINE vint vselc(vmask mask, vint x, vint y) {
+ return vorm(vandm(mask, (vmask)x), vandnotm(mask, (vmask)y));
+}
#endif
static INLINE vfloat vselfzero(vmask mask, vfloat x) {
- // returns value of x if corresponding mask bits are 1, else returns 0
- // faster than vself(mask, x, ZEROV)
+ // returns value of x if corresponding mask bits are 1, else returns 0
+ // faster than vself(mask, x, ZEROV)
return _mm_and_ps((vfloat)mask, x);
}
static INLINE vfloat vselfnotzero(vmask mask, vfloat x) {
@@ -939,8 +939,8 @@ static INLINE vfloat vselfnotzero(vmask mask, vfloat x) {
}
static INLINE vint vselizero(vmask mask, vint x) {
- // returns value of x if corresponding mask bits are 1, else returns 0
- // faster than vselc(mask, x, ZEROV)
+ // returns value of x if corresponding mask bits are 1, else returns 0
+ // faster than vselc(mask, x, ZEROV)
return _mm_and_si128(mask, x);
}
static INLINE vint vselinotzero(vmask mask, vint x) {
@@ -950,20 +950,20 @@ static INLINE vint vselinotzero(vmask mask, vint x) {
}
static INLINE vint2 vseli2_lt(vfloat f0, vfloat f1, vint2 x, vint2 y) {
- vint2 m2 = vcast_vi2_vm(vmaskf_lt(f0, f1));
- return vori2(vandi2(m2, x), vandnoti2(m2, y));
+ vint2 m2 = vcast_vi2_vm(vmaskf_lt(f0, f1));
+ return vori2(vandi2(m2, x), vandnoti2(m2, y));
}
static INLINE vmask vsignbitf(vfloat f) {
- return vandm((vmask)f, (vmask)vcast_vf_f(-0.0f));
+ return vandm((vmask)f, (vmask)vcast_vf_f(-0.0f));
}
static INLINE vfloat vmulsignf(vfloat x, vfloat y) {
- return (vfloat)vxorm((vmask)x, vsignbitf(y));
+ return (vfloat)vxorm((vmask)x, vsignbitf(y));
}
static INLINE vfloat vsignf(vfloat f) {
- return (vfloat)vorm((vmask)vcast_vf_f(1.0f), vandm((vmask)vcast_vf_f(-0.0f), (vmask)f));
+ return (vfloat)vorm((vmask)vcast_vf_f(1.0f), vandm((vmask)vcast_vf_f(-0.0f), (vmask)f));
}
static INLINE vmask vmaskf_isinf(vfloat d) { return vmaskf_eq(vabsf(d), vcast_vf_f(INFINITYf)); }
@@ -976,396 +976,396 @@ static INLINE vfloat visinf2f(vfloat d, vfloat m) { return (vfloat)vandm(vmaskf_
static INLINE vfloat visinff(vfloat d) { return visinf2f(d, vcast_vf_f(1.0f)); }
static INLINE vint2 vilogbp1f(vfloat d) {
- vmask m = vmaskf_lt(d, vcast_vf_f(5.421010862427522E-20f));
- d = vself(m, vmulf(vcast_vf_f(1.8446744073709552E19f), d), d);
- vint2 q = vandi2(vsrli2(vcast_vi2_vm(vreinterpret_vm_vf(d)), 23), vcast_vi2_i(0xff));
- q = vsubi2(q, vseli2(m, vcast_vi2_i(64 + 0x7e), vcast_vi2_i(0x7e)));
- return q;
+ vmask m = vmaskf_lt(d, vcast_vf_f(5.421010862427522E-20f));
+ d = vself(m, vmulf(vcast_vf_f(1.8446744073709552E19f), d), d);
+ vint2 q = vandi2(vsrli2(vcast_vi2_vm(vreinterpret_vm_vf(d)), 23), vcast_vi2_i(0xff));
+ q = vsubi2(q, vseli2(m, vcast_vi2_i(64 + 0x7e), vcast_vi2_i(0x7e)));
+ return q;
}
static INLINE vfloat vldexpf(vfloat x, vint2 q) {
- vfloat u;
- vint2 m = vsrai2(q, 31);
- m = vslli2(vsubi2(vsrai2(vaddi2(m, q), 6), m), 4);
- q = vsubi2(q, vslli2(m, 2));
- u = vreinterpret_vf_vm(vcast_vm_vi2(vslli2(vaddi2(m, vcast_vi2_i(0x7f)), 23)));
- x = vmulf(vmulf(vmulf(vmulf(x, u), u), u), u);
- u = vreinterpret_vf_vm(vcast_vm_vi2(vslli2(vaddi2(q, vcast_vi2_i(0x7f)), 23)));
- return vmulf(x, u);
+ vfloat u;
+ vint2 m = vsrai2(q, 31);
+ m = vslli2(vsubi2(vsrai2(vaddi2(m, q), 6), m), 4);
+ q = vsubi2(q, vslli2(m, 2));
+ u = vreinterpret_vf_vm(vcast_vm_vi2(vslli2(vaddi2(m, vcast_vi2_i(0x7f)), 23)));
+ x = vmulf(vmulf(vmulf(vmulf(x, u), u), u), u);
+ u = vreinterpret_vf_vm(vcast_vm_vi2(vslli2(vaddi2(q, vcast_vi2_i(0x7f)), 23)));
+ return vmulf(x, u);
}
static INLINE vfloat xsinf(vfloat d) {
- vint2 q;
- vfloat u, s;
+ vint2 q;
+ vfloat u, s;
- q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)rtengine::RT_1_PI)));
+ q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)rtengine::RT_1_PI)));
- u = vcast_vf_vi2(q);
- d = vmlaf(u, vcast_vf_f(-PI4_Af*4), d);
- d = vmlaf(u, vcast_vf_f(-PI4_Bf*4), d);
- d = vmlaf(u, vcast_vf_f(-PI4_Cf*4), d);
- d = vmlaf(u, vcast_vf_f(-PI4_Df*4), d);
+ u = vcast_vf_vi2(q);
+ d = vmlaf(u, vcast_vf_f(-PI4_Af*4), d);
+ d = vmlaf(u, vcast_vf_f(-PI4_Bf*4), d);
+ d = vmlaf(u, vcast_vf_f(-PI4_Cf*4), d);
+ d = vmlaf(u, vcast_vf_f(-PI4_Df*4), d);
- s = vmulf(d, d);
+ s = vmulf(d, d);
- d = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(1)), vnegf(d), d);
+ d = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(1)), vnegf(d), d);
- u = vcast_vf_f(2.6083159809786593541503e-06f);
- u = vmlaf(u, s, vcast_vf_f(-0.0001981069071916863322258f));
- u = vmlaf(u, s, vcast_vf_f(0.00833307858556509017944336f));
- u = vmlaf(u, s, vcast_vf_f(-0.166666597127914428710938f));
+ u = vcast_vf_f(2.6083159809786593541503e-06f);
+ u = vmlaf(u, s, vcast_vf_f(-0.0001981069071916863322258f));
+ u = vmlaf(u, s, vcast_vf_f(0.00833307858556509017944336f));
+ u = vmlaf(u, s, vcast_vf_f(-0.166666597127914428710938f));
- u = vmlaf(s, vmulf(u, d), d);
+ u = vmlaf(s, vmulf(u, d), d);
- return u;
+ return u;
}
static INLINE vfloat xcosf(vfloat d) {
- vint2 q;
- vfloat u, s;
+ vint2 q;
+ vfloat u, s;
- q = vrint_vi2_vf(vsubf(vmulf(d, vcast_vf_f((float)rtengine::RT_1_PI)), vcast_vf_f(0.5f)));
- q = vaddi2(vaddi2(q, q), vcast_vi2_i(1));
+ q = vrint_vi2_vf(vsubf(vmulf(d, vcast_vf_f((float)rtengine::RT_1_PI)), vcast_vf_f(0.5f)));
+ q = vaddi2(vaddi2(q, q), vcast_vi2_i(1));
- u = vcast_vf_vi2(q);
- d = vmlaf(u, vcast_vf_f(-PI4_Af*2), d);
- d = vmlaf(u, vcast_vf_f(-PI4_Bf*2), d);
- d = vmlaf(u, vcast_vf_f(-PI4_Cf*2), d);
- d = vmlaf(u, vcast_vf_f(-PI4_Df*2), d);
+ u = vcast_vf_vi2(q);
+ d = vmlaf(u, vcast_vf_f(-PI4_Af*2), d);
+ d = vmlaf(u, vcast_vf_f(-PI4_Bf*2), d);
+ d = vmlaf(u, vcast_vf_f(-PI4_Cf*2), d);
+ d = vmlaf(u, vcast_vf_f(-PI4_Df*2), d);
- s = vmulf(d, d);
+ s = vmulf(d, d);
- d = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(2)), vcast_vi2_i(2)), d, vnegf(d));
+ d = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(2)), vcast_vi2_i(2)), d, vnegf(d));
- u = vcast_vf_f(2.6083159809786593541503e-06f);
- u = vmlaf(u, s, vcast_vf_f(-0.0001981069071916863322258f));
- u = vmlaf(u, s, vcast_vf_f(0.00833307858556509017944336f));
- u = vmlaf(u, s, vcast_vf_f(-0.166666597127914428710938f));
+ u = vcast_vf_f(2.6083159809786593541503e-06f);
+ u = vmlaf(u, s, vcast_vf_f(-0.0001981069071916863322258f));
+ u = vmlaf(u, s, vcast_vf_f(0.00833307858556509017944336f));
+ u = vmlaf(u, s, vcast_vf_f(-0.166666597127914428710938f));
- u = vmlaf(s, vmulf(u, d), d);
+ u = vmlaf(s, vmulf(u, d), d);
- return u;
+ return u;
}
static INLINE vfloat2 xsincosf(vfloat d) {
- vint2 q;
- vmask m;
- vfloat u, s, t, rx, ry;
- vfloat2 r;
+ vint2 q;
+ vmask m;
+ vfloat u, s, t, rx, ry;
+ vfloat2 r;
- q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)rtengine::RT_2_PI)));
+ q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)rtengine::RT_2_PI)));
- s = d;
+ s = d;
- u = vcast_vf_vi2(q);
- s = vmlaf(u, vcast_vf_f(-PI4_Af*2), s);
- s = vmlaf(u, vcast_vf_f(-PI4_Bf*2), s);
- s = vmlaf(u, vcast_vf_f(-PI4_Cf*2), s);
- s = vmlaf(u, vcast_vf_f(-PI4_Df*2), s);
+ u = vcast_vf_vi2(q);
+ s = vmlaf(u, vcast_vf_f(-PI4_Af*2), s);
+ s = vmlaf(u, vcast_vf_f(-PI4_Bf*2), s);
+ s = vmlaf(u, vcast_vf_f(-PI4_Cf*2), s);
+ s = vmlaf(u, vcast_vf_f(-PI4_Df*2), s);
- t = s;
+ t = s;
- s = vmulf(s, s);
+ s = vmulf(s, s);
- u = vcast_vf_f(-0.000195169282960705459117889f);
- u = vmlaf(u, s, vcast_vf_f(0.00833215750753879547119141f));
- u = vmlaf(u, s, vcast_vf_f(-0.166666537523269653320312f));
- u = vmulf(vmulf(u, s), t);
+ u = vcast_vf_f(-0.000195169282960705459117889f);
+ u = vmlaf(u, s, vcast_vf_f(0.00833215750753879547119141f));
+ u = vmlaf(u, s, vcast_vf_f(-0.166666537523269653320312f));
+ u = vmulf(vmulf(u, s), t);
- rx = vaddf(t, u);
+ rx = vaddf(t, u);
- u = vcast_vf_f(-2.71811842367242206819355e-07f);
- u = vmlaf(u, s, vcast_vf_f(2.47990446951007470488548e-05f));
- u = vmlaf(u, s, vcast_vf_f(-0.00138888787478208541870117f));
- u = vmlaf(u, s, vcast_vf_f(0.0416666641831398010253906f));
- u = vmlaf(u, s, vcast_vf_f(-0.5));
+ u = vcast_vf_f(-2.71811842367242206819355e-07f);
+ u = vmlaf(u, s, vcast_vf_f(2.47990446951007470488548e-05f));
+ u = vmlaf(u, s, vcast_vf_f(-0.00138888787478208541870117f));
+ u = vmlaf(u, s, vcast_vf_f(0.0416666641831398010253906f));
+ u = vmlaf(u, s, vcast_vf_f(-0.5));
- ry = vaddf(vcast_vf_f(1), vmulf(s, u));
+ ry = vaddf(vcast_vf_f(1), vmulf(s, u));
- m = vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(0));
- r.x = vself(m, rx, ry);
- r.y = vself(m, ry, rx);
+ m = vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(0));
+ r.x = vself(m, rx, ry);
+ r.y = vself(m, ry, rx);
- m = vmaski2_eq(vandi2(q, vcast_vi2_i(2)), vcast_vi2_i(2));
- r.x = vreinterpret_vf_vm(vxorm(vandm(m, vreinterpret_vm_vf(vcast_vf_f(-0.0))), vreinterpret_vm_vf(r.x)));
+ m = vmaski2_eq(vandi2(q, vcast_vi2_i(2)), vcast_vi2_i(2));
+ r.x = vreinterpret_vf_vm(vxorm(vandm(m, vreinterpret_vm_vf(vcast_vf_f(-0.0))), vreinterpret_vm_vf(r.x)));
- m = vmaski2_eq(vandi2(vaddi2(q, vcast_vi2_i(1)), vcast_vi2_i(2)), vcast_vi2_i(2));
- r.y = vreinterpret_vf_vm(vxorm(vandm(m, vreinterpret_vm_vf(vcast_vf_f(-0.0))), vreinterpret_vm_vf(r.y)));
+ m = vmaski2_eq(vandi2(vaddi2(q, vcast_vi2_i(1)), vcast_vi2_i(2)), vcast_vi2_i(2));
+ r.y = vreinterpret_vf_vm(vxorm(vandm(m, vreinterpret_vm_vf(vcast_vf_f(-0.0))), vreinterpret_vm_vf(r.y)));
- m = vmaskf_isinf(d);
- r.x = vself(m, vcast_vf_f(rtengine::RT_NAN), r.x);
- r.y = vself(m, vcast_vf_f(rtengine::RT_NAN), r.y);
+ m = vmaskf_isinf(d);
+ r.x = vself(m, vcast_vf_f(rtengine::RT_NAN), r.x);
+ r.y = vself(m, vcast_vf_f(rtengine::RT_NAN), r.y);
- return r;
+ return r;
}
static INLINE vfloat xtanf(vfloat d) {
- vint2 q;
- vmask m;
- vfloat u, s, x;
+ vint2 q;
+ vmask m;
+ vfloat u, s, x;
- q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)(2 * rtengine::RT_1_PI))));
+ q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)(2 * rtengine::RT_1_PI))));
- x = d;
+ x = d;
- u = vcast_vf_vi2(q);
- x = vmlaf(u, vcast_vf_f(-PI4_Af*2), x);
- x = vmlaf(u, vcast_vf_f(-PI4_Bf*2), x);
- x = vmlaf(u, vcast_vf_f(-PI4_Cf*2), x);
- x = vmlaf(u, vcast_vf_f(-PI4_Df*2), x);
+ u = vcast_vf_vi2(q);
+ x = vmlaf(u, vcast_vf_f(-PI4_Af*2), x);
+ x = vmlaf(u, vcast_vf_f(-PI4_Bf*2), x);
+ x = vmlaf(u, vcast_vf_f(-PI4_Cf*2), x);
+ x = vmlaf(u, vcast_vf_f(-PI4_Df*2), x);
- s = vmulf(x, x);
+ s = vmulf(x, x);
- m = vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(1));
- x = vself(m, vnegf(x), x);
+ m = vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(1));
+ x = vself(m, vnegf(x), x);
- u = vcast_vf_f(0.00927245803177356719970703f);
- u = vmlaf(u, s, vcast_vf_f(0.00331984995864331722259521f));
- u = vmlaf(u, s, vcast_vf_f(0.0242998078465461730957031f));
- u = vmlaf(u, s, vcast_vf_f(0.0534495301544666290283203f));
- u = vmlaf(u, s, vcast_vf_f(0.133383005857467651367188f));
- u = vmlaf(u, s, vcast_vf_f(0.333331853151321411132812f));
+ u = vcast_vf_f(0.00927245803177356719970703f);
+ u = vmlaf(u, s, vcast_vf_f(0.00331984995864331722259521f));
+ u = vmlaf(u, s, vcast_vf_f(0.0242998078465461730957031f));
+ u = vmlaf(u, s, vcast_vf_f(0.0534495301544666290283203f));
+ u = vmlaf(u, s, vcast_vf_f(0.133383005857467651367188f));
+ u = vmlaf(u, s, vcast_vf_f(0.333331853151321411132812f));
- u = vmlaf(s, vmulf(u, x), x);
+ u = vmlaf(s, vmulf(u, x), x);
- u = vself(m, vrecf(u), u);
+ u = vself(m, vrecf(u), u);
- u = vself(vmaskf_isinf(d), vcast_vf_f(NANf), u);
+ u = vself(vmaskf_isinf(d), vcast_vf_f(NANf), u);
- return u;
+ return u;
}
static INLINE vfloat xatanf(vfloat s) {
- vfloat t, u;
- vint2 q;
+ vfloat t, u;
+ vint2 q;
- q = vseli2_lt(s, vcast_vf_f(0.0f), vcast_vi2_i(2), vcast_vi2_i(0));
- s = vabsf(s);
+ q = vseli2_lt(s, vcast_vf_f(0.0f), vcast_vi2_i(2), vcast_vi2_i(0));
+ s = vabsf(s);
- q = vseli2_lt(vcast_vf_f(1.0f), s, vaddi2(q, vcast_vi2_i(1)), q);
- s = vself(vmaskf_lt(vcast_vf_f(1.0f), s), vdivf(vcast_vf_f(1.0f), s), s);
+ q = vseli2_lt(vcast_vf_f(1.0f), s, vaddi2(q, vcast_vi2_i(1)), q);
+ s = vself(vmaskf_lt(vcast_vf_f(1.0f), s), vdivf(vcast_vf_f(1.0f), s), s);
- t = vmulf(s, s);
+ t = vmulf(s, s);
- u = vcast_vf_f(0.00282363896258175373077393f);
- u = vmlaf(u, t, vcast_vf_f(-0.0159569028764963150024414f));
- u = vmlaf(u, t, vcast_vf_f(0.0425049886107444763183594f));
- u = vmlaf(u, t, vcast_vf_f(-0.0748900920152664184570312f));
- u = vmlaf(u, t, vcast_vf_f(0.106347933411598205566406f));
- u = vmlaf(u, t, vcast_vf_f(-0.142027363181114196777344f));
- u = vmlaf(u, t, vcast_vf_f(0.199926957488059997558594f));
- u = vmlaf(u, t, vcast_vf_f(-0.333331018686294555664062f));
+ u = vcast_vf_f(0.00282363896258175373077393f);
+ u = vmlaf(u, t, vcast_vf_f(-0.0159569028764963150024414f));
+ u = vmlaf(u, t, vcast_vf_f(0.0425049886107444763183594f));
+ u = vmlaf(u, t, vcast_vf_f(-0.0748900920152664184570312f));
+ u = vmlaf(u, t, vcast_vf_f(0.106347933411598205566406f));
+ u = vmlaf(u, t, vcast_vf_f(-0.142027363181114196777344f));
+ u = vmlaf(u, t, vcast_vf_f(0.199926957488059997558594f));
+ u = vmlaf(u, t, vcast_vf_f(-0.333331018686294555664062f));
- t = vaddf(s, vmulf(s, vmulf(t, u)));
+ t = vaddf(s, vmulf(s, vmulf(t, u)));
- t = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(1)), vsubf(vcast_vf_f((float)(rtengine::RT_PI/2)), t), t);
- t = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(2)), vcast_vi2_i(2)), vnegf(t), t);
+ t = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(1)), vsubf(vcast_vf_f((float)(rtengine::RT_PI/2)), t), t);
+ t = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(2)), vcast_vi2_i(2)), vnegf(t), t);
- return t;
+ return t;
}
static INLINE vfloat atan2kf(vfloat y, vfloat x) {
- vfloat s, t, u;
- vint2 q;
- vmask p;
+ vfloat s, t, u;
+ vint2 q;
+ vmask p;
- q = vseli2_lt(x, vcast_vf_f(0.0f), vcast_vi2_i(-2), vcast_vi2_i(0));
- x = vabsf(x);
+ q = vseli2_lt(x, vcast_vf_f(0.0f), vcast_vi2_i(-2), vcast_vi2_i(0));
+ x = vabsf(x);
- q = vseli2_lt(x, y, vaddi2(q, vcast_vi2_i(1)), q);
- p = vmaskf_lt(x, y);
- s = vself(p, vnegf(x), y);
- t = vmaxf(x, y);
+ q = vseli2_lt(x, y, vaddi2(q, vcast_vi2_i(1)), q);
+ p = vmaskf_lt(x, y);
+ s = vself(p, vnegf(x), y);
+ t = vmaxf(x, y);
- s = vdivf(s, t);
- t = vmulf(s, s);
+ s = vdivf(s, t);
+ t = vmulf(s, s);
- u = vcast_vf_f(0.00282363896258175373077393f);
- u = vmlaf(u, t, vcast_vf_f(-0.0159569028764963150024414f));
- u = vmlaf(u, t, vcast_vf_f(0.0425049886107444763183594f));
- u = vmlaf(u, t, vcast_vf_f(-0.0748900920152664184570312f));
- u = vmlaf(u, t, vcast_vf_f(0.106347933411598205566406f));
- u = vmlaf(u, t, vcast_vf_f(-0.142027363181114196777344f));
- u = vmlaf(u, t, vcast_vf_f(0.199926957488059997558594f));
- u = vmlaf(u, t, vcast_vf_f(-0.333331018686294555664062f));
+ u = vcast_vf_f(0.00282363896258175373077393f);
+ u = vmlaf(u, t, vcast_vf_f(-0.0159569028764963150024414f));
+ u = vmlaf(u, t, vcast_vf_f(0.0425049886107444763183594f));
+ u = vmlaf(u, t, vcast_vf_f(-0.0748900920152664184570312f));
+ u = vmlaf(u, t, vcast_vf_f(0.106347933411598205566406f));
+ u = vmlaf(u, t, vcast_vf_f(-0.142027363181114196777344f));
+ u = vmlaf(u, t, vcast_vf_f(0.199926957488059997558594f));
+ u = vmlaf(u, t, vcast_vf_f(-0.333331018686294555664062f));
- t = vaddf(s, vmulf(s, vmulf(t, u)));
- t = vaddf(t, vmulf(vcast_vf_vi2(q), vcast_vf_f((float)(rtengine::RT_PI/2))));
+ t = vaddf(s, vmulf(s, vmulf(t, u)));
+ t = vaddf(t, vmulf(vcast_vf_vi2(q), vcast_vf_f((float)(rtengine::RT_PI/2))));
- return t;
+ return t;
}
static INLINE vfloat xatan2f(vfloat y, vfloat x) {
- vfloat r = atan2kf(vabsf(y), x);
+ vfloat r = atan2kf(vabsf(y), x);
- r = vmulsignf(r, x);
- r = vself(vorm(vmaskf_isinf(x), vmaskf_eq(x, vcast_vf_f(0.0f))), vsubf(vcast_vf_f((float)(rtengine::RT_PI/2)), visinf2f(x, vmulsignf(vcast_vf_f((float)(rtengine::RT_PI/2)), x))), r);
- r = vself(vmaskf_isinf(y), vsubf(vcast_vf_f((float)(rtengine::RT_PI/2)), visinf2f(x, vmulsignf(vcast_vf_f((float)(rtengine::RT_PI/4)), x))), r);
- r = vself(vmaskf_eq(y, vcast_vf_f(0.0f)), vselfzero(vmaskf_eq(vsignf(x), vcast_vf_f(-1.0f)), vcast_vf_f((float)rtengine::RT_PI)), r);
+ r = vmulsignf(r, x);
+ r = vself(vorm(vmaskf_isinf(x), vmaskf_eq(x, vcast_vf_f(0.0f))), vsubf(vcast_vf_f((float)(rtengine::RT_PI/2)), visinf2f(x, vmulsignf(vcast_vf_f((float)(rtengine::RT_PI/2)), x))), r);
+ r = vself(vmaskf_isinf(y), vsubf(vcast_vf_f((float)(rtengine::RT_PI/2)), visinf2f(x, vmulsignf(vcast_vf_f((float)(rtengine::RT_PI/4)), x))), r);
+ r = vself(vmaskf_eq(y, vcast_vf_f(0.0f)), vselfzero(vmaskf_eq(vsignf(x), vcast_vf_f(-1.0f)), vcast_vf_f((float)rtengine::RT_PI)), r);
- return vself(vmaskf_isnan(x, y), vcast_vf_f(NANf), vmulsignf(r, y));
+ return vself(vmaskf_isnan(x, y), vcast_vf_f(NANf), vmulsignf(r, y));
}
static INLINE vfloat xasinf(vfloat d) {
- vfloat x, y;
- x = vaddf(vcast_vf_f(1.0f), d);
- y = vsubf(vcast_vf_f(1.0f), d);
- x = vmulf(x, y);
- x = vsqrtf(x);
- x = vself(vmaskf_isnan(x), vcast_vf_f(NANf), atan2kf(vabsf(d), x));
- return vmulsignf(x, d);
+ vfloat x, y;
+ x = vaddf(vcast_vf_f(1.0f), d);
+ y = vsubf(vcast_vf_f(1.0f), d);
+ x = vmulf(x, y);
+ x = vsqrtf(x);
+ x = vself(vmaskf_isnan(x), vcast_vf_f(NANf), atan2kf(vabsf(d), x));
+ return vmulsignf(x, d);
}
static INLINE vfloat xacosf(vfloat d) {
- vfloat x, y;
- x = vaddf(vcast_vf_f(1.0f), d);
- y = vsubf(vcast_vf_f(1.0f), d);
- x = vmulf(x, y);
- x = vsqrtf(x);
- x = vmulsignf(atan2kf(x, vabsf(d)), d);
- y = (vfloat)vandm(vmaskf_lt(d, vcast_vf_f(0.0f)), (vmask)vcast_vf_f((float)rtengine::RT_PI));
- x = vaddf(x, y);
- return x;
+ vfloat x, y;
+ x = vaddf(vcast_vf_f(1.0f), d);
+ y = vsubf(vcast_vf_f(1.0f), d);
+ x = vmulf(x, y);
+ x = vsqrtf(x);
+ x = vmulsignf(atan2kf(x, vabsf(d)), d);
+ y = (vfloat)vandm(vmaskf_lt(d, vcast_vf_f(0.0f)), (vmask)vcast_vf_f((float)rtengine::RT_PI));
+ x = vaddf(x, y);
+ return x;
}
static INLINE vfloat xlogf(vfloat d) {
- vfloat x, x2, t, m;
- vint2 e;
+ 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));
+ 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);
+ 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));
+ 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 = 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 = vself(vmaskf_gt(vcast_vf_f(0), d), vcast_vf_f(NANf), x);
- x = vself(vmaskf_eq(d, vcast_vf_f(0)), vcast_vf_f(-INFINITYf), x);
+ x = vself(vmaskf_ispinf(d), vcast_vf_f(INFINITYf), x);
+ x = vself(vmaskf_gt(vcast_vf_f(0), d), vcast_vf_f(NANf), x);
+ x = vself(vmaskf_eq(d, vcast_vf_f(0)), vcast_vf_f(-INFINITYf), x);
- return x;
+ return x;
}
static INLINE vfloat xlogf0(vfloat d) {
- vfloat x, x2, t, m;
- vint2 e;
+ 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));
+ 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);
+ 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));
+ 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 = vaddf(vmulf(x, t), vmulf(vcast_vf_f(0.693147180559945286226764f), vcast_vf_vi2(e)));
- x = vself(vmaskf_ispinf(d), vcast_vf_f(0), x);
- x = vself(vmaskf_gt(vcast_vf_f(0), d), vcast_vf_f(0), x);
- x = vself(vmaskf_eq(d, vcast_vf_f(0)), vcast_vf_f(0), x);
+ x = vself(vmaskf_ispinf(d), vcast_vf_f(0), x);
+ x = vself(vmaskf_gt(vcast_vf_f(0), d), vcast_vf_f(0), x);
+ x = vself(vmaskf_eq(d, vcast_vf_f(0)), vcast_vf_f(0), x);
- return x;
+ return x;
}
static INLINE vfloat xlogfNoCheck(vfloat d) { // this version does not check input values. Use it only when you know the input values are > 0 e.g. when filling a lookup table
- vfloat x, x2, t, m;
- vint2 e;
+ 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));
+ 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);
+ 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));
+ 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));
- return vaddf(vmulf(x, t), vmulf(vcast_vf_f(0.693147180559945286226764f), vcast_vf_vi2(e)));
+ return vaddf(vmulf(x, t), vmulf(vcast_vf_f(0.693147180559945286226764f), vcast_vf_vi2(e)));
}
static INLINE vfloat xexpf(vfloat d) {
- vint2 q = vrint_vi2_vf(vmulf(d, vcast_vf_f(R_LN2f)));
- vfloat s, u;
+ vint2 q = vrint_vi2_vf(vmulf(d, vcast_vf_f(R_LN2f)));
+ vfloat s, u;
- s = vmlaf(vcast_vf_vi2(q), vcast_vf_f(-L2Uf),d);
- s = vmlaf(vcast_vf_vi2(q), vcast_vf_f(-L2Lf),s);
+ s = vmlaf(vcast_vf_vi2(q), vcast_vf_f(-L2Uf),d);
+ s = vmlaf(vcast_vf_vi2(q), vcast_vf_f(-L2Lf),s);
- u = vcast_vf_f(0.00136324646882712841033936f);
- u = vmlaf(u, s, vcast_vf_f(0.00836596917361021041870117f));
- u = vmlaf(u, s, vcast_vf_f(0.0416710823774337768554688f));
- u = vmlaf(u, s, vcast_vf_f(0.166665524244308471679688f));
- u = vmlaf(u, s, vcast_vf_f(0.499999850988388061523438f));
+ u = vcast_vf_f(0.00136324646882712841033936f);
+ u = vmlaf(u, s, vcast_vf_f(0.00836596917361021041870117f));
+ u = vmlaf(u, s, vcast_vf_f(0.0416710823774337768554688f));
+ u = vmlaf(u, s, vcast_vf_f(0.166665524244308471679688f));
+ u = vmlaf(u, s, vcast_vf_f(0.499999850988388061523438f));
- u = vaddf(vcast_vf_f(1.0f), vmlaf(vmulf(s, s), u, s));
+ u = vaddf(vcast_vf_f(1.0f), vmlaf(vmulf(s, s), u, s));
- u = vldexpf(u, q);
+ u = vldexpf(u, q);
- // -104.0
- return vselfnotzero(vmaskf_gt(vcast_vf_f(-104.f), d), u);
+ // -104.0
+ return vselfnotzero(vmaskf_gt(vcast_vf_f(-104.f), d), u);
}
static INLINE vfloat xexpfNoCheck(vfloat d) { // this version does not check input values. Use it only when you know the input values are > -104.f e.g. when filling a lookup table
- vint2 q = vrint_vi2_vf(vmulf(d, vcast_vf_f(R_LN2f)));
- vfloat s, u;
+ vint2 q = vrint_vi2_vf(vmulf(d, vcast_vf_f(R_LN2f)));
+ vfloat s, u;
- s = vmlaf(vcast_vf_vi2(q), vcast_vf_f(-L2Uf),d);
- s = vmlaf(vcast_vf_vi2(q), vcast_vf_f(-L2Lf),s);
+ s = vmlaf(vcast_vf_vi2(q), vcast_vf_f(-L2Uf),d);
+ s = vmlaf(vcast_vf_vi2(q), vcast_vf_f(-L2Lf),s);
- u = vcast_vf_f(0.00136324646882712841033936f);
- u = vmlaf(u, s, vcast_vf_f(0.00836596917361021041870117f));
- u = vmlaf(u, s, vcast_vf_f(0.0416710823774337768554688f));
- u = vmlaf(u, s, vcast_vf_f(0.166665524244308471679688f));
- u = vmlaf(u, s, vcast_vf_f(0.499999850988388061523438f));
+ u = vcast_vf_f(0.00136324646882712841033936f);
+ u = vmlaf(u, s, vcast_vf_f(0.00836596917361021041870117f));
+ u = vmlaf(u, s, vcast_vf_f(0.0416710823774337768554688f));
+ u = vmlaf(u, s, vcast_vf_f(0.166665524244308471679688f));
+ u = vmlaf(u, s, vcast_vf_f(0.499999850988388061523438f));
- u = vaddf(vcast_vf_f(1.0f), vmlaf(vmulf(s, s), u, s));
+ u = vaddf(vcast_vf_f(1.0f), vmlaf(vmulf(s, s), u, s));
- return vldexpf(u, q);
+ return vldexpf(u, q);
}
static INLINE vfloat xcbrtf(vfloat d) {
- vfloat x, y, q = vcast_vf_f(1.0), t;
- vint2 e, qu, re;
+ vfloat x, y, q = vcast_vf_f(1.0), t;
+ vint2 e, qu, re;
- e = vilogbp1f(vabsf(d));
- d = vldexpf(d, vsubi2(vcast_vi2_i(0), e));
+ e = vilogbp1f(vabsf(d));
+ d = vldexpf(d, vsubi2(vcast_vi2_i(0), e));
- t = vaddf(vcast_vf_vi2(e), vcast_vf_f(6144));
- qu = vtruncate_vi2_vf(vdivf(t, vcast_vf_f(3)));
- re = vtruncate_vi2_vf(vsubf(t, vmulf(vcast_vf_vi2(qu), vcast_vf_f(3))));
+ t = vaddf(vcast_vf_vi2(e), vcast_vf_f(6144));
+ qu = vtruncate_vi2_vf(vdivf(t, vcast_vf_f(3)));
+ re = vtruncate_vi2_vf(vsubf(t, vmulf(vcast_vf_vi2(qu), vcast_vf_f(3))));
- q = vself(vmaski2_eq(re, vcast_vi2_i(1)), vcast_vf_f(1.2599210498948731647672106f), q);
- q = vself(vmaski2_eq(re, vcast_vi2_i(2)), vcast_vf_f(1.5874010519681994747517056f), q);
- q = vldexpf(q, vsubi2(qu, vcast_vi2_i(2048)));
+ q = vself(vmaski2_eq(re, vcast_vi2_i(1)), vcast_vf_f(1.2599210498948731647672106f), q);
+ q = vself(vmaski2_eq(re, vcast_vi2_i(2)), vcast_vf_f(1.5874010519681994747517056f), q);
+ q = vldexpf(q, vsubi2(qu, vcast_vi2_i(2048)));
- q = vmulsignf(q, d);
- d = vabsf(d);
+ q = vmulsignf(q, d);
+ d = vabsf(d);
- x = vcast_vf_f(-0.601564466953277587890625f);
- x = vmlaf(x, d, vcast_vf_f(2.8208892345428466796875f));
- x = vmlaf(x, d, vcast_vf_f(-5.532182216644287109375f));
- x = vmlaf(x, d, vcast_vf_f(5.898262500762939453125f));
- x = vmlaf(x, d, vcast_vf_f(-3.8095417022705078125f));
- x = vmlaf(x, d, vcast_vf_f(2.2241256237030029296875f));
+ x = vcast_vf_f(-0.601564466953277587890625f);
+ x = vmlaf(x, d, vcast_vf_f(2.8208892345428466796875f));
+ x = vmlaf(x, d, vcast_vf_f(-5.532182216644287109375f));
+ x = vmlaf(x, d, vcast_vf_f(5.898262500762939453125f));
+ x = vmlaf(x, d, vcast_vf_f(-3.8095417022705078125f));
+ x = vmlaf(x, d, vcast_vf_f(2.2241256237030029296875f));
- y = vmulf(vmulf(d, x), x);
- y = vmulf(vsubf(y, vmulf(vmulf(vcast_vf_f(2.0f / 3.0f), y), vmlaf(y, x, vcast_vf_f(-1.0f)))), q);
+ y = vmulf(vmulf(d, x), x);
+ y = vmulf(vsubf(y, vmulf(vmulf(vcast_vf_f(2.0f / 3.0f), y), vmlaf(y, x, vcast_vf_f(-1.0f)))), q);
- return y;
+ return y;
}
static INLINE vfloat vclampf(vfloat value, vfloat low, vfloat high) {
@@ -1374,7 +1374,7 @@ static INLINE vfloat vclampf(vfloat value, vfloat low, vfloat high) {
}
static INLINE vfloat SQRV(vfloat a){
- return a * a;
+ return a * a;
}
static inline void vswap( vmask condition, vfloat &a, vfloat &b) {
@@ -1404,7 +1404,7 @@ static inline float vhmax(vfloat a) {
static INLINE vfloat vmul2f(vfloat a){
// fastest way to multiply by 2
- return a + a;
+ return a + a;
}
static INLINE vfloat vintpf(vfloat a, vfloat b, vfloat c) {
diff --git a/rtexif/CMakeLists.txt b/rtexif/CMakeLists.txt
index 9747b03fb..5a3831455 100644
--- a/rtexif/CMakeLists.txt
+++ b/rtexif/CMakeLists.txt
@@ -1,4 +1,16 @@
-add_library(rtexif rtexif.cc stdattribs.cc nikonattribs.cc canonattribs.cc pentaxattribs.cc fujiattribs.cc sonyminoltaattribs.cc olympusattribs.cc kodakattribs.cc panasonicattribs.cc)
+add_library(rtexif STATIC
+ canonattribs.cc
+ fujiattribs.cc
+ kodakattribs.cc
+ nikonattribs.cc
+ olympusattribs.cc
+ panasonicattribs.cc
+ pentaxattribs.cc
+ rtexif.cc
+ sonyminoltaattribs.cc
+ stdattribs.cc
+)
+
add_dependencies(rtexif UpdateInfo)
if(WIN32)
diff --git a/rtgui/coloredbar.cc b/rtgui/coloredbar.cc
index ca9a381cf..adafcbdde 100644
--- a/rtgui/coloredbar.cc
+++ b/rtgui/coloredbar.cc
@@ -142,7 +142,7 @@ void ColoredBar::updateBackBuffer(Gtk::DrawingArea &drawingArea)
case (RTO_Left2Right):
for (int py = 0; py < h; ++py) {
for (int px = 0; px < w; ++px) {
- unsigned char *pixel = surfaceData + (py * w + px) * 4;
+ unsigned char *pixel = surfaceData + (py * w + px) * 4;
double x_ = double( px);
//double y_ = double((h-1)-py); unused
double x01 = x_ / double(w - 1);
@@ -158,7 +158,7 @@ void ColoredBar::updateBackBuffer(Gtk::DrawingArea &drawingArea)
case (RTO_Right2Left):
for (int py = 0; py < h; ++py) {
for (int px = 0; px < w; ++px) {
- unsigned char *pixel = surfaceData + (py * w + px) * 4;
+ unsigned char *pixel = surfaceData + (py * w + px) * 4;
//double x_ = double((w-1)-px); unused
//double y_ = double((h-1)-py); unused
double x01 = double(px) / double(w - 1);
@@ -174,7 +174,7 @@ void ColoredBar::updateBackBuffer(Gtk::DrawingArea &drawingArea)
case (RTO_Bottom2Top):
for (int py = 0; py < h; ++py) {
for (int px = 0; px < w; ++px) {
- unsigned char *pixel = surfaceData + (py * w + px) * 4;
+ unsigned char *pixel = surfaceData + (py * w + px) * 4;
//double x_ = double((w-1)-px); unused
//double y_ = double((h-1)-py); unused
double x01 = double(px) / double(w - 1);
@@ -191,7 +191,7 @@ void ColoredBar::updateBackBuffer(Gtk::DrawingArea &drawingArea)
default:
for (int py = 0; py < h; ++py) {
for (int px = 0; px < w; ++px) {
- unsigned char *pixel = surfaceData + (py * w + px) * 4;
+ unsigned char *pixel = surfaceData + (py * w + px) * 4;
double x_ = double( px);
double y_ = double( py);
double x01 = x_ / double(w - 1);
diff --git a/rtgui/extprog.cc b/rtgui/extprog.cc
index 95c1c937d..00ea07713 100644
--- a/rtgui/extprog.cc
+++ b/rtgui/extprog.cc
@@ -334,7 +334,7 @@ bool ExtProgStore::openInCustomEditor (const Glib::ustring& fileName)
#else
- const auto cmdLine = Glib::ustring("\"") + options.customEditorProg + "\" " + Glib::shell_quote(fileName);
+ const auto cmdLine = options.customEditorProg + Glib::ustring(" ") + Glib::shell_quote(fileName);
return spawnCommandAsync (cmdLine);
#endif
diff --git a/rtgui/main.cc b/rtgui/main.cc
index 098963e0e..631d3db0a 100644
--- a/rtgui/main.cc
+++ b/rtgui/main.cc
@@ -529,13 +529,13 @@ int main (int argc, char **argv)
int ret = 0;
if (options.pseudoHiDPISupport) {
- // Reading/updating GDK_SCALE early if it exists
- const gchar *gscale = g_getenv("GDK_SCALE");
- if (gscale && gscale[0] == '2') {
- initialGdkScale = 2;
- }
- // HOMBRE: On Windows, if resolution is set to 200%, Gtk internal variables are SCALE=2 and DPI=96
- g_setenv("GDK_SCALE", "1", true);
+ // Reading/updating GDK_SCALE early if it exists
+ const gchar *gscale = g_getenv("GDK_SCALE");
+ if (gscale && gscale[0] == '2') {
+ initialGdkScale = 2;
+ }
+ // HOMBRE: On Windows, if resolution is set to 200%, Gtk internal variables are SCALE=2 and DPI=96
+ g_setenv("GDK_SCALE", "1", true);
}
gdk_threads_set_lock_functions (G_CALLBACK (myGdkLockEnter), (G_CALLBACK (myGdkLockLeave)));
diff --git a/rtgui/options.cc b/rtgui/options.cc
index 20e20620a..737607bcf 100644
--- a/rtgui/options.cc
+++ b/rtgui/options.cc
@@ -1258,7 +1258,7 @@ void Options::readFromFile(Glib::ustring fname)
}
if (keyFile.has_key("GUI", "PseudoHiDPISupport")) {
- pseudoHiDPISupport = keyFile.get_boolean("GUI", "PseudoHiDPISupport");
+ pseudoHiDPISupport = keyFile.get_boolean("GUI", "PseudoHiDPISupport");
}
if (keyFile.has_key("GUI", "LastPreviewScale")) {
diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc
index b4b85dfd0..fc418e5b7 100644
--- a/rtgui/profilepanel.cc
+++ b/rtgui/profilepanel.cc
@@ -275,9 +275,27 @@ void ProfilePanel::save_clicked (GdkEventButton* event)
return;
}
- Gtk::FileChooserDialog dialog (getToplevelWindow (this), M("PROFILEPANEL_SAVEDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_SAVE);
- bindCurrentFolder (dialog, options.loadSaveProfilePath);
- dialog.set_current_name (lastFilename);
+ // If it's a partial profile, it's more intuitive to first allow the user
+ // to choose which parameters to save before showing the Save As dialog
+ // #5491
+ const auto isPartial = event->state & Gdk::CONTROL_MASK;
+ if (isPartial) {
+ if (!partialProfileDlg) {
+ partialProfileDlg = new PartialPasteDlg(Glib::ustring(), parent);
+ }
+
+ partialProfileDlg->set_title(M("PROFILEPANEL_SAVEPPASTE"));
+ const auto response = partialProfileDlg->run();
+ partialProfileDlg->hide();
+
+ if (response != Gtk::RESPONSE_OK) {
+ return;
+ }
+ }
+
+ Gtk::FileChooserDialog dialog(getToplevelWindow(this), M("PROFILEPANEL_SAVEDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_SAVE);
+ bindCurrentFolder(dialog, options.loadSaveProfilePath);
+ dialog.set_current_name(lastFilename);
//Add the user's default (or global if multiuser=false) profile path to the Shortcut list
try {
@@ -294,36 +312,32 @@ void ProfilePanel::save_clicked (GdkEventButton* event)
dialog.add_button(M("GENERAL_SAVE"), Gtk::RESPONSE_OK);
//Add filters, so that only certain file types can be selected:
-
- Glib::RefPtr filter_pp = Gtk::FileFilter::create();
+ auto filter_pp = Gtk::FileFilter::create();
filter_pp->set_name(M("FILECHOOSER_FILTER_PP"));
filter_pp->add_pattern("*" + paramFileExtension);
dialog.add_filter(filter_pp);
- Glib::RefPtr filter_any = Gtk::FileFilter::create();
+ auto filter_any = Gtk::FileFilter::create();
filter_any->set_name(M("FILECHOOSER_FILTER_ANY"));
filter_any->add_pattern("*");
dialog.add_filter(filter_any);
-// dialog.set_do_overwrite_confirmation (true);
-
- bool done = false;
+ bool done = true;
do {
if (dialog.run() == Gtk::RESPONSE_OK) {
std::string fname = dialog.get_filename();
- Glib::ustring ext = getExtension (fname);
- if (("." + ext) != paramFileExtension) {
+ if (("." + getExtension(fname)) != paramFileExtension) {
fname += paramFileExtension;
}
- if (!confirmOverwrite (dialog, fname)) {
+ if (!confirmOverwrite(dialog, fname)) {
continue;
}
- lastFilename = Glib::path_get_basename (fname);
+ lastFilename = Glib::path_get_basename(fname);
const PartialProfile* toSave;
@@ -332,60 +346,36 @@ void ProfilePanel::save_clicked (GdkEventButton* event)
} else if (isLastSavedSelected()) {
toSave = lastsaved;
} else {
- const ProfileStoreEntry* entry = profiles->getSelectedEntry();
- toSave = entry ? ProfileStore::getInstance()->getProfile (profiles->getSelectedEntry()) : nullptr;
+ const auto entry = profiles->getSelectedEntry();
+ toSave = entry ? ProfileStore::getInstance()->getProfile(entry) : nullptr;
}
if (toSave) {
- if (event->state & Gdk::CONTROL_MASK) {
- // opening the partial paste dialog window
- if(!partialProfileDlg) {
- partialProfileDlg = new PartialPasteDlg (Glib::ustring (), parent);
- }
- partialProfileDlg->set_title(M("PROFILEPANEL_SAVEPPASTE"));
- int i = partialProfileDlg->run();
- partialProfileDlg->hide();
-
- if (i != Gtk::RESPONSE_OK) {
- return;
- }
-
- // saving the partial profile
+ int retCode;
+ if (isPartial) {
+ // Build partial profile
PartialProfile ppTemp(true);
- partialProfileDlg->applyPaste (ppTemp.pparams, ppTemp.pedited, toSave->pparams, toSave->pedited);
- int retCode = ppTemp.pparams->save (fname, "", true, ppTemp.pedited);
+ partialProfileDlg->applyPaste(ppTemp.pparams, ppTemp.pedited, toSave->pparams, toSave->pedited);
+ // Save partial profile
+ retCode = ppTemp.pparams->save(fname, "", true, ppTemp.pedited);
+ // Cleanup
ppTemp.deleteInstance();
-
- if (retCode) {
- writeFailed(dialog, fname);
- } else {
- done = true;
- bool ccPrevState = changeconn.block(true);
- ProfileStore::getInstance()->parseProfiles();
- changeconn.block (ccPrevState);
- }
} else {
- // saving a full profile
- int retCode = toSave->pparams->save (fname);
-
- if (retCode) {
- writeFailed(dialog, fname);
- } else {
- done = true;
- bool ccPrevState = changeconn.block(true);
- ProfileStore::getInstance()->parseProfiles();
- changeconn.block (ccPrevState);
- }
+ // Save full profile
+ retCode = toSave->pparams->save(fname);
+ }
+
+ if (!retCode) {
+ const auto ccPrevState = changeconn.block(true);
+ ProfileStore::getInstance()->parseProfiles();
+ changeconn.block(ccPrevState);
+ } else {
+ done = false;
+ writeFailed(dialog, fname);
}
- } else {
- done = true;
}
- } else {
- done = true;
}
} while (!done);
-
- return;
}
/*
@@ -465,7 +455,6 @@ void ProfilePanel::load_clicked (GdkEventButton* event)
dialog.add_button(M("GENERAL_OPEN"), Gtk::RESPONSE_OK);
//Add filters, so that only certain file types can be selected:
-
Glib::RefPtr filter_pp = Gtk::FileFilter::create();
filter_pp->set_name(M("FILECHOOSER_FILTER_PP"));
filter_pp->add_pattern("*" + paramFileExtension);
diff --git a/rtgui/rtscalable.cc b/rtgui/rtscalable.cc
index 15211a7ee..b37f2276f 100644
--- a/rtgui/rtscalable.cc
+++ b/rtgui/rtscalable.cc
@@ -37,9 +37,9 @@ Gtk::TextDirection RTScalable::direction = Gtk::TextDirection::TEXT_DIR_NONE;
void RTScalable::setDPInScale (const double newDPI, const int newScale)
{
if (!options.pseudoHiDPISupport) {
- scale = 1;
- dpi = baseDPI;
- return;
+ scale = 1;
+ dpi = baseDPI;
+ return;
}
if (scale != newScale || (scale == 1 && dpi != newDPI)) {
diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc
index 3983f93b1..fc9be32f7 100644
--- a/rtgui/rtwindow.cc
+++ b/rtgui/rtwindow.cc
@@ -168,7 +168,7 @@ RTWindow::RTWindow ()
#endif
//GTK318
if (options.pseudoHiDPISupport) {
- fontScale = options.fontSize / (float)RTScalable::baseFontSize;
+ fontScale = options.fontSize / (float)RTScalable::baseFontSize;
}
if (options.rtSettings.verbose) {
printf("\"Non-Default\" font size(%d) * scale(%d) / fontScale(%.3f)\n", options.fontSize, (int)initialGdkScale, fontScale);
@@ -196,7 +196,7 @@ RTWindow::RTWindow ()
pt = fontSize / Pango::SCALE;
}
if (options.pseudoHiDPISupport) {
- fontScale = (float)pt / (float)RTScalable::baseFontSize;
+ fontScale = (float)pt / (float)RTScalable::baseFontSize;
}
if ((int)initialGdkScale > 1 || pt != RTScalable::baseFontSize) {
css = Glib::ustring::compose ("* { font-size: %1pt}", pt * (int)initialGdkScale);
diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc
index 4fec4a18a..deea489fe 100644
--- a/rtgui/toolpanelcoord.cc
+++ b/rtgui/toolpanelcoord.cc
@@ -178,7 +178,6 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit
transformPanelSW = Gtk::manage (new MyScrolledWindow ());
rawPanelSW = Gtk::manage (new MyScrolledWindow ());
advancedPanelSW = Gtk::manage (new MyScrolledWindow ());
- updateVScrollbars (options.hideTPVScrollbar);
// load panel endings
for (int i = 0; i < 7; i++) {
@@ -195,6 +194,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit
favoritePanel->pack_start(*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
favoritePanel->pack_start(*vbPanelEnd[0], Gtk::PACK_SHRINK, 4);
}
+ updateVScrollbars(options.hideTPVScrollbar);
exposurePanelSW->add (*exposurePanel);
exposurePanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
diff --git a/tools/RTProfileBuilderSample.cs b/tools/RTProfileBuilderSample.cs
index a097e6883..80474b63b 100644
--- a/tools/RTProfileBuilderSample.cs
+++ b/tools/RTProfileBuilderSample.cs
@@ -1,293 +1,293 @@
-#region Usings
-using System;
-using System.Text;
-using System.IO;
-using System.Globalization;
-using System.Diagnostics;
-using System.Configuration;
-using System.Collections;
-using System.Collections.Specialized;
-#endregion
-
-// *** Raw Therapee sample Custom Profile builder (version 2013-08-12) ***
-//
-//
-// WARNING: The command line parameters has changed since this file has been created by Oduis. The new mechanism involves a
-// temporary communication file (.ini style) to provide system parameters and metadata read by RawTherapee. This script has
-// to be updated by some C# developer in order to work.
-//
-//
-// WARNING: PP3 format may change in the future versions! If this happens there will probably be no automatic migration path,
-// you'll have to adjust on your own. This is a sample, and therefore not supported by the RT team (just by oduis)
-//
-//
-// How to use:
-// 1. Modify the GetCorrectedSettings function below according to your needs.
-// 2. Download and install Microsoft .Net Runtime (latest version is 4.0 as of writing), if it's not already on your machine.
-// You can get it for free via Windows Update or from microsoft.com. No need for Visual Studio etc.
-// 3. Open a command line and compile this CS-File using the C# 32bit compiler. It is usually installed somewhere here:
-// C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe
-// Call csc.exe (C#-Compiler) with your .CS file as parameter like this (one big line):
-//
-// C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc
-// /r:C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll
-// /r:C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Configuration.dll
-// RTProfileBuilderSample.cs
-//
-// (On most machines it already works with "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc RTProfileBuilderSample.cs")
-// CSC will compile it and emit an EXE.
-// 4. Open your RT options files and find the entry [Profiles]/CustomProfileBuilder
-// 5. Enter the path to your newly built exe here. On Windows, don't forget double slashes (e.g. "C:\\MyDir\\Mybuilder.exe")
-// And you're done! The EXE is only called on opening the image editor and there is no PP3 already
-//
-// If you want to use EXIFTOOL to gather more details information to build queries:
-// 1. Download exiftool.exe from http://www.sno.phy.queensu.ca/~phil/exiftool/
-// 2. Rename it to exiftool.exe (NOT exiftool(-k).. or something!)
-// 3. Copy the RTProfilerBuilder.exe.config next to your own EXE. If you renamed it, rename config to "(Yourname).exe.config"
-// 4. Open the config with notepad (it's an XML file). Set ExifToolPath to your downloaded and renamed exe
-//
-// If you want to know what parameters are available, call "exiftool.exe -tab -short"
-//
-// This description is for Windows. The C# code does not use anything fancy, will probably work with MONO on Linux/OSX, too
-
-namespace RTProfilerBuilder {
- /// Main class. Mostly change GetCorrectedSettings.
- class RTProfileBuilder {
-
- /// Adds the Nikkor zoom distortion correction profile.
- /// First array is list of focal lengths, second array is the RT setting that should correct the
- /// distortion for the corresponding focal length. Values between these values are automatically interpolated.
- /// The focal length values must already be ordered. The number of sample points is not limited.
- static DistortionCorrectProf distNikkor24120f4 = new DistortionCorrectProf(
- new double[] { 24, 28, 35, 50, 70, 85, 120 },
- new double[] { -0.1, -0.063, -0.012, 0.018, 0.034, 0.04, 0.048 }
- );
-
-
- /// This is your personalisation function
- /// Full EXIF from EXIFTOOL (if configured).
- /// Entry, like "Sharpening/Radius"
- /// Current value (from default file)
- /// FNumberExposure in seconds
- /// Focal length in MMISO value
- /// Lens from EXIFCamera from EXIF
- /// The value to be written. Simply take the current value if you have nothing to touch.
- static string GetCorrectedSetting(NameValueCollection exif, string sectionEntry, string value,
- double fNumber, double exposureSecs, double focalLength, long iso, string lens, string camera) {
-
- string s;
-
- // We don't do anything to the value if it's not our camera
- if (camera.EndsWith("NIKON D700", StringComparison.InvariantCultureIgnoreCase) && lens.Contains("24.0-120.0 mm f/4.0")) {
- switch (sectionEntry) {
- // Here is the place to adjust your settings
- // Pretty simple: "SectionName/EntryName" in options file
-
- case "Vignetting Correction/Amount":
- value = (fNumber < 8 && focalLength < 30) ? "30" : "0";
- break;
-
- case "RAW/CA":
- value = ToBool(fNumber < 11); // Means "Enabled if fnumber<11, otherwise disabled"
- break;
-
- case "Impulse Denoising/Enabled":
- value = ToBool(iso >= 3200);
- break;
-
- case "HLRecovery/Enabled":
- value = ToBool(iso >= 1600); // Dynamic range decreases, so we'll probably need it
- break;
-
- case "Color Boost/Amount":
- if (iso >= 6400) value = "0"; // Colors will get poppy anyway...
- break;
-
- case "Distortion/Amount":
- // we already checked in the IF upstairs that this is "our" lens
- value = distNikkor24120f4.GetDistortionAmount(focalLength);
- break;
-
- // Add other parameters here. Mention this is case sensitive!
-
- default: break; // we don't touch values we don't care about
- }
- } // end if camera=xxx
-
-
- // This is for camera independent settings
- switch (sectionEntry) {
- // These are parsed from EXIFTOOL and XMP in DNG (see http://en.wikipedia.org/wiki/Extensible_Metadata_Platform)
- case "IPTC/City":
- s = exif.Get("City");
- if (!String.IsNullOrEmpty(s)) value = s;
- break;
-
- case "IPTC/Country":
- s = exif.Get("Country");
- if (!String.IsNullOrEmpty(s)) value = s;
- break;
-
- case "IPTC/Caption":
- case "IPTC/Title":
- s = exif.Get("Headline");
- if (!String.IsNullOrEmpty(s)) value = s;
- break;
-
- // Add other parameters here. Mention this is case sensitive!
-
- default: break; // we don't touch values we don't care about
- }
- return value;
- }
-
- #region * Main and Helpers
- static string ToBool(bool condition) { return condition ? "true" : "false"; }
- static string ToFloat(float f) { return f.ToString(CultureInfo.InvariantCulture); }
-
- /// Reads default file and parses it. No need to touch it for your personal settings.
- /// Command line args
- /// 0 on all OK.
- static int Main(string[] args) {
- int exitCode = 0;
-
- try {
- #region Parse input parameters
- int argNo = 0;
-
- // Name of raw/JPG to process
- string sourceFile = args[argNo++];
-
- // What the user selected as his base profile
- string defaultProfileFilePath = args[argNo++];
-
- // Cache directory, for any logging file
- string cachePath = args[argNo++];
-
-
- // True if the image is only being flagged as inTrash, rank or colorLabel but still need valid PP3 - actually not used by this script
- bool forFlaggingPurpose = bool.Parse(args[argNo++], CultureInfo.InvariantCulture);
-
- // Note that old C++ has no automatic number globalization
- double fNumber = double.Parse(args[argNo++], CultureInfo.InvariantCulture);
- double exposureSecs = double.Parse(args[argNo++], CultureInfo.InvariantCulture);
- double focalLength = double.Parse(args[argNo++], CultureInfo.InvariantCulture);
- long iso = long.Parse(args[argNo++], CultureInfo.InvariantCulture);
-
- string lens = args[argNo++];
- string cameraMake = args[argNo++];
- string cameraModel = args[argNo++];
- string camera = cameraMake + " " + cameraModel;
- #endregion
-
- // Read default file as basis
- string[] lines = File.ReadAllLines(defaultProfileFilePath);
-
- NameValueCollection nvEXIF = ParseFullExifData(sourceFile);
-
- // File should be Windows ANSI
- using (TextWriter tw = new StreamWriter(sourceFile + ".pp3", false, new UTF8Encoding(false))) {
- string section = "";
-
- foreach (string line in lines) {
- string l = line.Trim();
- if (!String.IsNullOrEmpty(line)) {
-
- if (l.StartsWith("["))
- section = l.Trim(new char[] { '[', ']' });
- else if (char.IsLetterOrDigit(l[0]) && l.Contains("=")) {
- int valPos = l.IndexOf("=") + 1;
-
- string newValue = GetCorrectedSetting(nvEXIF, section + "/" + l.Substring(0, valPos - 1), l.Substring(valPos).Trim(),
- fNumber, exposureSecs, focalLength, iso, lens, camera);
-
- // Merge in new value
- l = l.Substring(0, valPos) + (newValue ?? "");
- }
- }
-
- tw.WriteLine(l);
- }
- }
-
- } catch (Exception ex) {
- Console.WriteLine("Error: " + ex.ToString()); // can be seen in the RT console window
-
- exitCode = 1;
- }
-
- return exitCode;
- }
-
-
- static NameValueCollection ParseFullExifData(string filePath) {
- NameValueCollection nv = new NameValueCollection();
-
- string exifToolPath = ConfigurationManager.AppSettings["ExifToolPath"];
- if (!String.IsNullOrEmpty(exifToolPath)) {
- ProcessStartInfo psi = new ProcessStartInfo(exifToolPath, "\"" + filePath + "\" -tab -short");
- psi.CreateNoWindow = false;
- psi.UseShellExecute = false;
- psi.StandardOutputEncoding = System.Text.Encoding.UTF8;
- psi.RedirectStandardOutput = true;
-
- Process p = Process.Start(psi);
-
- using (StreamReader sr = p.StandardOutput) {
- while (!sr.EndOfStream) {
- string line = sr.ReadLine();
- if (line.Contains("\t")) {
- string[] split = line.Split('\t');
- nv.Add(split[0], split[1]);
- }
- }
- }
-
- p.WaitForExit();
- }
-
- return nv;
- }
-
- #endregion
- }
-
- #region DistortionCorrectProf
- /// Holds a distortion correction profile for one lens. Uses sample points (focal length vs. dist. correction) as input.
- class DistortionCorrectProf {
- double[] adFocLen, adCorrect;
-
- /// Parses array to internal structure
- /// Focal lengths
- /// Correction factors
- public DistortionCorrectProf(double[] focLen, double[] correct) {
- if (focLen == null || correct == null || focLen.Length != correct.Length || focLen.Length < 2)
- throw new Exception("DistortionCorrectProf inputs must be valid and of the same lengths, at least 2 points");
-
- adFocLen = focLen; adCorrect = correct;
-
- for (int i = 0; i < adFocLen.Length - 1; i++)
- if (adFocLen[i] >= adFocLen[i + 1]) throw new Exception("The distortion correction focal length points must be ordered!");
- }
-
- /// Calculates regression value of RT distortion amount for the given focal length.
- /// Input focal length.
- /// Distortion in RT format.
- public string GetDistortionAmount(double focalLength) {
- // if it's out of area (which should just happen with e.g. rounding errors), return flat defaults.
- if (focalLength <= adFocLen[0]) return adCorrect[0].ToString("G", CultureInfo.InvariantCulture);
- if (focalLength >= adFocLen[adFocLen.Length - 1]) return adCorrect[adFocLen.Length - 1].ToString("G", CultureInfo.InvariantCulture);
-
- for (int i = 0; i < adFocLen.Length - 1; i++) {
- if (focalLength >= adFocLen[i] && focalLength < adFocLen[i + 1]) {
- // from the sample curves taken so far, it it safe to take a simple linear interpolation here
- double corr = adCorrect[i] + (adCorrect[i + 1] - adCorrect[i]) * (focalLength - adFocLen[i]) / (adFocLen[i + 1] - adFocLen[i]);
- return corr.ToString("G3", CultureInfo.InvariantCulture);
- }
- }
-
- return ""; // should never happen
- }
- }
- #endregion
-}
+#region Usings
+using System;
+using System.Text;
+using System.IO;
+using System.Globalization;
+using System.Diagnostics;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Specialized;
+#endregion
+
+// *** Raw Therapee sample Custom Profile builder (version 2013-08-12) ***
+//
+//
+// WARNING: The command line parameters has changed since this file has been created by Oduis. The new mechanism involves a
+// temporary communication file (.ini style) to provide system parameters and metadata read by RawTherapee. This script has
+// to be updated by some C# developer in order to work.
+//
+//
+// WARNING: PP3 format may change in the future versions! If this happens there will probably be no automatic migration path,
+// you'll have to adjust on your own. This is a sample, and therefore not supported by the RT team (just by oduis)
+//
+//
+// How to use:
+// 1. Modify the GetCorrectedSettings function below according to your needs.
+// 2. Download and install Microsoft .Net Runtime (latest version is 4.0 as of writing), if it's not already on your machine.
+// You can get it for free via Windows Update or from microsoft.com. No need for Visual Studio etc.
+// 3. Open a command line and compile this CS-File using the C# 32bit compiler. It is usually installed somewhere here:
+// C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe
+// Call csc.exe (C#-Compiler) with your .CS file as parameter like this (one big line):
+//
+// C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc
+// /r:C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll
+// /r:C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Configuration.dll
+// RTProfileBuilderSample.cs
+//
+// (On most machines it already works with "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc RTProfileBuilderSample.cs")
+// CSC will compile it and emit an EXE.
+// 4. Open your RT options files and find the entry [Profiles]/CustomProfileBuilder
+// 5. Enter the path to your newly built exe here. On Windows, don't forget double slashes (e.g. "C:\\MyDir\\Mybuilder.exe")
+// And you're done! The EXE is only called on opening the image editor and there is no PP3 already
+//
+// If you want to use EXIFTOOL to gather more details information to build queries:
+// 1. Download exiftool.exe from http://www.sno.phy.queensu.ca/~phil/exiftool/
+// 2. Rename it to exiftool.exe (NOT exiftool(-k).. or something!)
+// 3. Copy the RTProfilerBuilder.exe.config next to your own EXE. If you renamed it, rename config to "(Yourname).exe.config"
+// 4. Open the config with notepad (it's an XML file). Set ExifToolPath to your downloaded and renamed exe
+//
+// If you want to know what parameters are available, call "exiftool.exe -tab -short"
+//
+// This description is for Windows. The C# code does not use anything fancy, will probably work with MONO on Linux/OSX, too
+
+namespace RTProfilerBuilder {
+ /// Main class. Mostly change GetCorrectedSettings.
+ class RTProfileBuilder {
+
+ /// Adds the Nikkor zoom distortion correction profile.
+ /// First array is list of focal lengths, second array is the RT setting that should correct the
+ /// distortion for the corresponding focal length. Values between these values are automatically interpolated.
+ /// The focal length values must already be ordered. The number of sample points is not limited.
+ static DistortionCorrectProf distNikkor24120f4 = new DistortionCorrectProf(
+ new double[] { 24, 28, 35, 50, 70, 85, 120 },
+ new double[] { -0.1, -0.063, -0.012, 0.018, 0.034, 0.04, 0.048 }
+ );
+
+
+ /// This is your personalisation function
+ /// Full EXIF from EXIFTOOL (if configured).
+ /// Entry, like "Sharpening/Radius"
+ /// Current value (from default file)
+ /// FNumberExposure in seconds
+ /// Focal length in MMISO value
+ /// Lens from EXIFCamera from EXIF
+ /// The value to be written. Simply take the current value if you have nothing to touch.
+ static string GetCorrectedSetting(NameValueCollection exif, string sectionEntry, string value,
+ double fNumber, double exposureSecs, double focalLength, long iso, string lens, string camera) {
+
+ string s;
+
+ // We don't do anything to the value if it's not our camera
+ if (camera.EndsWith("NIKON D700", StringComparison.InvariantCultureIgnoreCase) && lens.Contains("24.0-120.0 mm f/4.0")) {
+ switch (sectionEntry) {
+ // Here is the place to adjust your settings
+ // Pretty simple: "SectionName/EntryName" in options file
+
+ case "Vignetting Correction/Amount":
+ value = (fNumber < 8 && focalLength < 30) ? "30" : "0";
+ break;
+
+ case "RAW/CA":
+ value = ToBool(fNumber < 11); // Means "Enabled if fnumber<11, otherwise disabled"
+ break;
+
+ case "Impulse Denoising/Enabled":
+ value = ToBool(iso >= 3200);
+ break;
+
+ case "HLRecovery/Enabled":
+ value = ToBool(iso >= 1600); // Dynamic range decreases, so we'll probably need it
+ break;
+
+ case "Color Boost/Amount":
+ if (iso >= 6400) value = "0"; // Colors will get poppy anyway...
+ break;
+
+ case "Distortion/Amount":
+ // we already checked in the IF upstairs that this is "our" lens
+ value = distNikkor24120f4.GetDistortionAmount(focalLength);
+ break;
+
+ // Add other parameters here. Mention this is case sensitive!
+
+ default: break; // we don't touch values we don't care about
+ }
+ } // end if camera=xxx
+
+
+ // This is for camera independent settings
+ switch (sectionEntry) {
+ // These are parsed from EXIFTOOL and XMP in DNG (see http://en.wikipedia.org/wiki/Extensible_Metadata_Platform)
+ case "IPTC/City":
+ s = exif.Get("City");
+ if (!String.IsNullOrEmpty(s)) value = s;
+ break;
+
+ case "IPTC/Country":
+ s = exif.Get("Country");
+ if (!String.IsNullOrEmpty(s)) value = s;
+ break;
+
+ case "IPTC/Caption":
+ case "IPTC/Title":
+ s = exif.Get("Headline");
+ if (!String.IsNullOrEmpty(s)) value = s;
+ break;
+
+ // Add other parameters here. Mention this is case sensitive!
+
+ default: break; // we don't touch values we don't care about
+ }
+ return value;
+ }
+
+#region * Main and Helpers
+ static string ToBool(bool condition) { return condition ? "true" : "false"; }
+ static string ToFloat(float f) { return f.ToString(CultureInfo.InvariantCulture); }
+
+ /// Reads default file and parses it. No need to touch it for your personal settings.
+ /// Command line args
+ /// 0 on all OK.
+ static int Main(string[] args) {
+ int exitCode = 0;
+
+ try {
+#region Parse input parameters
+ int argNo = 0;
+
+ // Name of raw/JPG to process
+ string sourceFile = args[argNo++];
+
+ // What the user selected as his base profile
+ string defaultProfileFilePath = args[argNo++];
+
+ // Cache directory, for any logging file
+ string cachePath = args[argNo++];
+
+
+ // True if the image is only being flagged as inTrash, rank or colorLabel but still need valid PP3 - actually not used by this script
+ bool forFlaggingPurpose = bool.Parse(args[argNo++], CultureInfo.InvariantCulture);
+
+ // Note that old C++ has no automatic number globalization
+ double fNumber = double.Parse(args[argNo++], CultureInfo.InvariantCulture);
+ double exposureSecs = double.Parse(args[argNo++], CultureInfo.InvariantCulture);
+ double focalLength = double.Parse(args[argNo++], CultureInfo.InvariantCulture);
+ long iso = long.Parse(args[argNo++], CultureInfo.InvariantCulture);
+
+ string lens = args[argNo++];
+ string cameraMake = args[argNo++];
+ string cameraModel = args[argNo++];
+ string camera = cameraMake + " " + cameraModel;
+#endregion
+
+ // Read default file as basis
+ string[] lines = File.ReadAllLines(defaultProfileFilePath);
+
+ NameValueCollection nvEXIF = ParseFullExifData(sourceFile);
+
+ // File should be Windows ANSI
+ using (TextWriter tw = new StreamWriter(sourceFile + ".pp3", false, new UTF8Encoding(false))) {
+ string section = "";
+
+ foreach (string line in lines) {
+ string l = line.Trim();
+ if (!String.IsNullOrEmpty(line)) {
+
+ if (l.StartsWith("["))
+ section = l.Trim(new char[] { '[', ']' });
+ else if (char.IsLetterOrDigit(l[0]) && l.Contains("=")) {
+ int valPos = l.IndexOf("=") + 1;
+
+ string newValue = GetCorrectedSetting(nvEXIF, section + "/" + l.Substring(0, valPos - 1), l.Substring(valPos).Trim(),
+ fNumber, exposureSecs, focalLength, iso, lens, camera);
+
+ // Merge in new value
+ l = l.Substring(0, valPos) + (newValue ?? "");
+ }
+ }
+
+ tw.WriteLine(l);
+ }
+ }
+
+ } catch (Exception ex) {
+ Console.WriteLine("Error: " + ex.ToString()); // can be seen in the RT console window
+
+ exitCode = 1;
+ }
+
+ return exitCode;
+ }
+
+
+ static NameValueCollection ParseFullExifData(string filePath) {
+ NameValueCollection nv = new NameValueCollection();
+
+ string exifToolPath = ConfigurationManager.AppSettings["ExifToolPath"];
+ if (!String.IsNullOrEmpty(exifToolPath)) {
+ ProcessStartInfo psi = new ProcessStartInfo(exifToolPath, "\"" + filePath + "\" -tab -short");
+ psi.CreateNoWindow = false;
+ psi.UseShellExecute = false;
+ psi.StandardOutputEncoding = System.Text.Encoding.UTF8;
+ psi.RedirectStandardOutput = true;
+
+ Process p = Process.Start(psi);
+
+ using (StreamReader sr = p.StandardOutput) {
+ while (!sr.EndOfStream) {
+ string line = sr.ReadLine();
+ if (line.Contains("\t")) {
+ string[] split = line.Split('\t');
+ nv.Add(split[0], split[1]);
+ }
+ }
+ }
+
+ p.WaitForExit();
+ }
+
+ return nv;
+ }
+
+#endregion
+ }
+
+#region DistortionCorrectProf
+ /// Holds a distortion correction profile for one lens. Uses sample points (focal length vs. dist. correction) as input.
+ class DistortionCorrectProf {
+ double[] adFocLen, adCorrect;
+
+ /// Parses array to internal structure
+ /// Focal lengths
+ /// Correction factors
+ public DistortionCorrectProf(double[] focLen, double[] correct) {
+ if (focLen == null || correct == null || focLen.Length != correct.Length || focLen.Length < 2)
+ throw new Exception("DistortionCorrectProf inputs must be valid and of the same lengths, at least 2 points");
+
+ adFocLen = focLen; adCorrect = correct;
+
+ for (int i = 0; i < adFocLen.Length - 1; i++)
+ if (adFocLen[i] >= adFocLen[i + 1]) throw new Exception("The distortion correction focal length points must be ordered!");
+ }
+
+ /// Calculates regression value of RT distortion amount for the given focal length.
+ /// Input focal length.
+ /// Distortion in RT format.
+ public string GetDistortionAmount(double focalLength) {
+ // if it's out of area (which should just happen with e.g. rounding errors), return flat defaults.
+ if (focalLength <= adFocLen[0]) return adCorrect[0].ToString("G", CultureInfo.InvariantCulture);
+ if (focalLength >= adFocLen[adFocLen.Length - 1]) return adCorrect[adFocLen.Length - 1].ToString("G", CultureInfo.InvariantCulture);
+
+ for (int i = 0; i < adFocLen.Length - 1; i++) {
+ if (focalLength >= adFocLen[i] && focalLength < adFocLen[i + 1]) {
+ // from the sample curves taken so far, it it safe to take a simple linear interpolation here
+ double corr = adCorrect[i] + (adCorrect[i + 1] - adCorrect[i]) * (focalLength - adFocLen[i]) / (adFocLen[i + 1] - adFocLen[i]);
+ return corr.ToString("G3", CultureInfo.InvariantCulture);
+ }
+ }
+
+ return ""; // should never happen
+ }
+ }
+#endregion
+}
diff --git a/tools/RTProfileBuilderSample.exe.config b/tools/RTProfileBuilderSample.exe.config
index 2dbb6b973..c054fce6c 100644
--- a/tools/RTProfileBuilderSample.exe.config
+++ b/tools/RTProfileBuilderSample.exe.config
@@ -1,8 +1,8 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/tools/camconst_creator.ods b/tools/camconst_creator.ods
index 954abe6ac..8930587ba 100644
Binary files a/tools/camconst_creator.ods and b/tools/camconst_creator.ods differ
diff --git a/tools/osx/Info.plist-bin.in b/tools/osx/Info.plist-bin.in
index 20ce5a741..33abd4f7a 100644
--- a/tools/osx/Info.plist-bin.in
+++ b/tools/osx/Info.plist-bin.in
@@ -1,10 +1,10 @@
-
- CFBundleName
- RawTherapee-bin
- CFBundleIdentifier
- com.rawtherapee.rawtherapee
-
+
+ CFBundleName
+ RawTherapee-bin
+ CFBundleIdentifier
+ com.rawtherapee.rawtherapee
+
diff --git a/tools/osx/Info.plist.in b/tools/osx/Info.plist.in
index e78db0cc4..eec1ab490 100644
--- a/tools/osx/Info.plist.in
+++ b/tools/osx/Info.plist.in
@@ -1,167 +1,167 @@
-
- CFBundleDevelopmentRegion
- English
- CFBundleDisplayName
- RawTherapee
- CFBundleDocumentTypes
-
-
- CFBundleTypeExtensions
-
- pp3
- PP3
-
- CFBundleTypeIconFile
- profile.icns
- CFBundleTypeName
- RawTherapee Profile Data
- CFBundleTypeRole
- Editor
- LSIsAppleDefaultForType
-
- LSItemContentTypes
-
- com.rawtherapee.pp3
-
-
-
- CFBundleTypeExtensions
-
- 3FR
- 3fr
- ARW
- arw
- CR2
- cr2
- CRF
- crf
- CRW
- crw
- DCR
- dcr
- DNG
- dng
- FFF
- fff
- IIQ
- iiq
- KDC
- kdc
- MEF
- mef
- MOS
- mos
- MRW
- mrw
- NEF
- nef
- NRW
- nrw
- ORF
- orf
- PEF
- pef
- RAF
- raf
- RAW
- raw
- RW2
- rw2
- RWZ
- rwz
- SR2
- sr2
- SRF
- srf
- SRW
- srw
-
- CFBundleTypeMIMETypes
-
- image/raw
-
- CFBundleTypeName
- Camera Raw
- CFBundleTypeRole
- Viewer
-
-
- CFBundleTypeExtensions
-
- JPEG
- jpeg
- JPG
- jpg
- PNG
- png
- TIF
- tif
- TIFF
- tiff
-
- CFBundleTypeName
- Image
- CFBundleTypeRole
- Viewer
-
-
- CFBundleExecutable
- rawtherapee
- CFBundleGetInfoString
- @version@, Copyright © 2004-2010 Gábor Horváth, 2010-2017 RawTherapee Development Team
- CFBundleIconFile
- rawtherapee.icns
- CFBundleIdentifier
- com.rawtherapee.rawtherapee
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- RawTherapee
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- @shortVersion@
- CFBundleSignature
- ????
- CFBundleVersion
- @shortVersion@
- LSExecutableArchitectures
-
- @arch@
-
- NSHighResolutionCapable
-
- NSHumanReadableCopyright
- Copyright © 2004-2010 Gábor Horváth, 2010-2017 RawTherapee Development Team
- UTExportedTypeDeclarations
-
-
- UTTypeConformsTo
-
- public.data
-
- UTTypeDescription
- RawTherapee Profile Data
- UTTypeIconFile
- Icons.icns
- UTTypeIdentifier
- com.rawtherapee.pp3
- UTTypeReferenceURL
- http://www.rawtherapee.com/
- UTTypeTagSpecification
-
- com.apple.ostype
- PP3
- public.filename-extension
-
- pp3
- PP3
-
-
-
-
-
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleDisplayName
+ RawTherapee
+ CFBundleDocumentTypes
+
+
+ CFBundleTypeExtensions
+
+ pp3
+ PP3
+
+ CFBundleTypeIconFile
+ profile.icns
+ CFBundleTypeName
+ RawTherapee Profile Data
+ CFBundleTypeRole
+ Editor
+ LSIsAppleDefaultForType
+
+ LSItemContentTypes
+
+ com.rawtherapee.pp3
+
+
+
+ CFBundleTypeExtensions
+
+ 3FR
+ 3fr
+ ARW
+ arw
+ CR2
+ cr2
+ CRF
+ crf
+ CRW
+ crw
+ DCR
+ dcr
+ DNG
+ dng
+ FFF
+ fff
+ IIQ
+ iiq
+ KDC
+ kdc
+ MEF
+ mef
+ MOS
+ mos
+ MRW
+ mrw
+ NEF
+ nef
+ NRW
+ nrw
+ ORF
+ orf
+ PEF
+ pef
+ RAF
+ raf
+ RAW
+ raw
+ RW2
+ rw2
+ RWZ
+ rwz
+ SR2
+ sr2
+ SRF
+ srf
+ SRW
+ srw
+
+ CFBundleTypeMIMETypes
+
+ image/raw
+
+ CFBundleTypeName
+ Camera Raw
+ CFBundleTypeRole
+ Viewer
+
+
+ CFBundleTypeExtensions
+
+ JPEG
+ jpeg
+ JPG
+ jpg
+ PNG
+ png
+ TIF
+ tif
+ TIFF
+ tiff
+
+ CFBundleTypeName
+ Image
+ CFBundleTypeRole
+ Viewer
+
+
+ CFBundleExecutable
+ rawtherapee
+ CFBundleGetInfoString
+ @version@, Copyright © 2004-2010 Gábor Horváth, 2010-2017 RawTherapee Development Team
+ CFBundleIconFile
+ rawtherapee.icns
+ CFBundleIdentifier
+ com.rawtherapee.rawtherapee
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ RawTherapee
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ @shortVersion@
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ @shortVersion@
+ LSExecutableArchitectures
+
+ @arch@
+
+ NSHighResolutionCapable
+
+ NSHumanReadableCopyright
+ Copyright © 2004-2010 Gábor Horváth, 2010-2017 RawTherapee Development Team
+ UTExportedTypeDeclarations
+
+
+ UTTypeConformsTo
+
+ public.data
+
+ UTTypeDescription
+ RawTherapee Profile Data
+ UTTypeIconFile
+ Icons.icns
+ UTTypeIdentifier
+ com.rawtherapee.pp3
+ UTTypeReferenceURL
+ http://www.rawtherapee.com/
+ UTTypeTagSpecification
+
+ com.apple.ostype
+ PP3
+ public.filename-extension
+
+ pp3
+ PP3
+
+
+
+
+
diff --git a/tools/osx/rt.entitlements b/tools/osx/rt.entitlements
index 2236af138..082661401 100644
--- a/tools/osx/rt.entitlements
+++ b/tools/osx/rt.entitlements
@@ -1,20 +1,20 @@
-
- application-identifier
- com.rawtherapee.rawtherapee
- com.apple.security.temporary-exception.files.absolute-path.read-write
-
- "/"
-
- com.apple.security.cs.allow-dyld-environment-variables
-
- com.apple.security.files.user-selected.read-write
-
- com.apple.security.app-sandbox
-
- com.apple.security.files.downloads.read-write
-
-
+
+ application-identifier
+ com.rawtherapee.rawtherapee
+ com.apple.security.temporary-exception.files.absolute-path.read-write
+
+ "/"
+
+ com.apple.security.cs.allow-dyld-environment-variables
+
+ com.apple.security.files.user-selected.read-write
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.files.downloads.read-write
+
+