diff --git a/AUTHORS.txt b/AUTHORS.txt index 8c87a42c3..37ac98993 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -12,6 +12,7 @@ Developement contributors, in last name alphabetical order: Oliver Duis Maciek Dworak Michael Ezra + Flössie Jean-Christophe Frisch Ilias Giarimis Steve Herrell diff --git a/AboutThisBuild.cmake b/AboutThisBuild.cmake index 68dea478d..2163ed0cb 100644 --- a/AboutThisBuild.cmake +++ b/AboutThisBuild.cmake @@ -5,13 +5,13 @@ find_file(REL_INFO_FILE ReleaseInfo.cmake PATHS "${PROJECT_SOURCE_DIR}" NO_DEFAU if (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) # we look for the git command in this paths by order of preference if (WIN32) - find_file(GIT_CMD git.exe HINTS ENV Path PATH_SUFFIXES ../) + find_program(GIT_CMD git.exe HINTS ENV Path PATH_SUFFIXES ../) elseif (APPLE) - find_file(GIT_CMD git PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin") - find_file(GIT_CMD git) + find_program(GIT_CMD git PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin") + find_program(GIT_CMD git) set (SHELL "/bin/bash") else (WIN32) # Linux - find_file(GIT_CMD git) + find_program(GIT_CMD git) set (SHELL "/bin/bash") endif (WIN32) diff --git a/README.md b/README.md index 9dfd4c324..e90807b73 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ RawTherapee is a powerful, cross-platform raw photo processing program, released ## Target audience -Rawtherapee is a [libre software](https://en.wikipedia.org/wiki/Free_software) designed for developing raw files from a broad range of digital cameras, as well as [HDR DNG](https://helpx.adobe.com/photoshop/digital-negative.html) files and non-raw image formats ([JPEG](https://en.wikipedia.org/wiki/JPEG), [TIFF](https://en.wikipedia.org/wiki/Tagged_Image_File_Format) and [PNG](https://en.wikipedia.org/wiki/Portable_Network_Graphics)). The target audience ranges from enthusiast newcomers who whish to broaden their understanding of how digital imaging works to semi-professional photographers. Knowledge in color science is not compulsory, but it is recommended that you are eager to learn and ready to read our documentation ([RawPedia](http://rawpedia.rawtherapee.com/)) as well as look up basic concepts which lie outside the scope of RawPedia, such as [color balance](https://en.wikipedia.org/wiki/Color_balance), elsewhere. +RawTherapee is a [libre software](https://en.wikipedia.org/wiki/Free_software) designed for developing raw files from a broad range of digital cameras, as well as [HDR DNG](https://helpx.adobe.com/photoshop/digital-negative.html) files and non-raw image formats ([JPEG](https://en.wikipedia.org/wiki/JPEG), [TIFF](https://en.wikipedia.org/wiki/Tagged_Image_File_Format) and [PNG](https://en.wikipedia.org/wiki/Portable_Network_Graphics)). The target audience ranges from enthusiast newcomers who wish to broaden their understanding of how digital imaging works to semi-professional photographers. Knowledge in color science is not compulsory, but it is recommended that you are eager to learn and ready to read our documentation ([RawPedia](http://rawpedia.rawtherapee.com/)) as well as look up basic concepts which lie outside the scope of RawPedia, such as [color balance](https://en.wikipedia.org/wiki/Color_balance), elsewhere. Of course, professionals may use RawTherapee too while enjoying complete freedom, but will probably lack some peripheral features such as [Digital Asset Management](https://en.wikipedia.org/wiki/Digital_asset_management), printing, uploading, etc. RawTherapee is not aimed at being an inclusive all-in-one program, and the [open-source community](https://en.wikipedia.org/wiki/Open-source_movement) is sufficiently developed by now to offer all those peripheral features in other specialized software. diff --git a/rtdata/dcpprofiles/Sony ILCE-6000.dcp b/rtdata/dcpprofiles/Sony ILCE-6000.dcp index 6d7e7c1e6..5ef8c4d31 100644 Binary files a/rtdata/dcpprofiles/Sony ILCE-6000.dcp and b/rtdata/dcpprofiles/Sony ILCE-6000.dcp differ diff --git a/rtdata/iccprofiles/output/Rec2020.icm b/rtdata/iccprofiles/output/Rec2020.icm new file mode 100644 index 000000000..0decaf6dc Binary files /dev/null and b/rtdata/iccprofiles/output/Rec2020.icm differ diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index 7ed78149f..afcb829a2 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -1271,14 +1271,14 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1300,8 +1300,10 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1780,8 +1782,12 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1801,6 +1807,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1820,10 +1827,11 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1831,6 +1839,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index 5c6f5a39f..48b139f0f 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -1188,14 +1188,14 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1217,8 +1217,10 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 !MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronize the File Browser or Filmstrip with the Editor to reveal the thumbnail of the currently opened image, and clear any active filters.\nShortcut: x\n\nAs above, but without clearing active filters:\nShortcut: y\n(Note that the thumbnail of the opened image will not be shown if filtered out). @@ -1750,8 +1752,12 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1771,6 +1777,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1790,10 +1797,11 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1801,6 +1809,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Chinese (Traditional) b/rtdata/languages/Chinese (Traditional) index c79d07525..055d1f2b2 100644 --- a/rtdata/languages/Chinese (Traditional) +++ b/rtdata/languages/Chinese (Traditional) @@ -923,14 +923,14 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -952,8 +952,10 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1712,8 +1714,12 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1733,6 +1739,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1752,10 +1759,11 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1763,6 +1771,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index e1c7bc704..4a2e3a9bd 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -2009,8 +2009,10 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_PRSHARPENING;Post-resize sharpening @@ -2030,11 +2032,16 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - !TP_RETINEX_CONTEDIT_MAP;Mask equalizer !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GRAD;Transmission gradient !TP_RETINEX_GRADS;Strength gradient !TP_RETINEX_GRADS_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Strength is reduced when iterations increase, and conversely. !TP_RETINEX_GRAD_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Variance and Threshold are reduced when iterations increase, and conversely. !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL_MASK;Mask !TP_RETINEX_MAP;Mask method @@ -2045,6 +2052,8 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - !TP_RETINEX_MAP_NONE;None !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. +!TP_RETINEX_SKAL;Scale +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_VIEW;Process !TP_RETINEX_VIEW_MASK;Mask !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. diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index 46e8049d6..c22a60c37 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -919,14 +919,14 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -948,8 +948,10 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1711,8 +1713,12 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1732,6 +1738,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1751,10 +1758,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1762,6 +1770,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 48a293051..1f2a579ac 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -27,6 +27,7 @@ #26 2015-12-22 Korrekturen (TooWaBoo) RT4.2.536 #27 2016-02-12 Retinexübersetzung (TooWaBoo) RT4.2.730 #28 2016-03-19 Erweiterung/Korrekturen (TooWaBoo) RT4.2.880 +#29 2016-05-24 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1005 ABOUT_TAB_BUILD;Version ABOUT_TAB_CREDITS;Danksagungen @@ -45,7 +46,7 @@ CURVEEDITOR_CURVE;Kurve CURVEEDITOR_CURVES;Kurven CURVEEDITOR_CUSTOM;Angepasst CURVEEDITOR_DARKS;Tiefen -CURVEEDITOR_EDITPOINT_HINT;Bearbeitung der Kurvenpunkte über Zahlenwerte.\n\nRechtsklick auf einen Kurvenpunkt um ihn auszuwählen. Rechtsklick in einen leeren Bereich um ihn abzuwählen. +CURVEEDITOR_EDITPOINT_HINT;Bearbeitung der Kurvenpunkte über Zahlenwerte.\n\nRechtsklick auf einen Kurvenpunkt um ihn auszuwählen.\nRechtsklick in einen leeren Bereich um ihn abzuwählen. CURVEEDITOR_HIGHLIGHTS;Spitzlichter CURVEEDITOR_LIGHTS;Lichter CURVEEDITOR_LINEAR;Linear @@ -226,7 +227,7 @@ FILECHOOSER_FILTER_TIFF;TIFF-Dateien GENERAL_ABOUT;Über GENERAL_AFTER;Nachher GENERAL_APPLY;Anwenden -GENERAL_ASIMAGE;Als Bild +GENERAL_ASIMAGE;Wie Bild GENERAL_AUTO;Automatisch GENERAL_BEFORE;Vorher GENERAL_CANCEL;Abbrechen @@ -367,7 +368,7 @@ HISTORY_MSG_105;(Farbsaum entfernen) HISTORY_MSG_106;(Farbsaum entfernen)\nRadius HISTORY_MSG_107;(Farbsaum entfernen)\nSchwellenwert HISTORY_MSG_108;(Belichtung)\nLichterkompression\nSchwellenwert -HISTORY_MSG_109;(Skalieren) - Breite & Höhe +HISTORY_MSG_109;(Skalieren) - Begrenzungsrahmen HISTORY_MSG_110;(Skalieren) - Anwenden auf: HISTORY_MSG_111;(L*a*b*) - Farbverschiebung\nvermeiden HISTORY_MSG_112;--unused-- @@ -667,28 +668,28 @@ HISTORY_MSG_406;(Wavelet)\nKantenschärfung\nBenachbarte Pixel HISTORY_MSG_407;(Retinex) - Methode HISTORY_MSG_408;(Retinex) - Radius HISTORY_MSG_409;(Retinex) - Einstellungen\nKontrast -HISTORY_MSG_410;(Retinex) - Einstellungen\nHelligkeit +HISTORY_MSG_410;(Retinex) - Einstellungen\nVerstärkung und Ausgleich\nAusgleich HISTORY_MSG_411;(Retinex) - Intensität -HISTORY_MSG_412;(Retinex)\nGaußscher Gradient +HISTORY_MSG_412;(Retinex) - Einstellungen\nDynamikkompression\nGaußscher Gradient HISTORY_MSG_413;(Retinex) - Kontrast -HISTORY_MSG_414;(Retinex) - Einstellungen\nLuminanz(L) - L*a*b* -HISTORY_MSG_415;(Retinex) - Einstellungen\nTransmissionskurve +HISTORY_MSG_414;(Retinex) - Einstellungen\nKorrekturen\nLuminanz(L) - L*a*b* +HISTORY_MSG_415;(Retinex) - Einstellungen\nTransmission\nTransmissionskurve HISTORY_MSG_416;(Retinex) -HISTORY_MSG_417;(Retinex) - Einstellungen\nTransmission Median-\nfilter +HISTORY_MSG_417;(Retinex) - Einstellungen\nTransmission\nMedianfilter HISTORY_MSG_418;(Retinex) - Einstellungen\nTransmission\nSchwellenwert HISTORY_MSG_419;(Retinex) - Farbraum HISTORY_MSG_420;(Retinex) - Einstellungen\nHSL-Kurve -HISTORY_MSG_421;(Retinex) - Einstellungen\nGammakorrektur +HISTORY_MSG_421;(Retinex) - Einstellungen\nKorrekturen\nGammakorrektur HISTORY_MSG_422;(Retinex) - Einstellungen\nGamma HISTORY_MSG_423;(Retinex) - Einstellungen\nGammasteigung HISTORY_MSG_424;(Retinex) - Einstellungen\nHL-Schwellenwert HISTORY_MSG_425;(Retinex) - Einstellungen\nBasis-Logarithmus -HISTORY_MSG_426;(Retinex) - Einstellungen\nFarbton (H) +HISTORY_MSG_426;(Retinex) - Einstellungen\nKorrekturen - Farbton (H) HISTORY_MSG_427;Ausgabe-Rendering-Intent HISTORY_MSG_428;Monitor-Rendering-Intent -HISTORY_MSG_429;(Retinex) - Einstellungen\nIterationen -HISTORY_MSG_430;(Retinex) - Einstellungen\nTransmission Gradient -HISTORY_MSG_431;(Retinex) - Einstellungen\nIntensität Gradient +HISTORY_MSG_429;(Retinex) - Einstellungen\nDynamikkompression\nIterationen +HISTORY_MSG_430;(Retinex) - Einstellungen\nDynamikkompression\nTransmission Gradient +HISTORY_MSG_431;(Retinex) - Einstellungen\nDynamikkompression\nIntensität Gradient HISTORY_MSG_432;(Retinex) - Maske\nLichter HISTORY_MSG_433;(Retinex) - Maske\nTonwertbreite Lichter HISTORY_MSG_434;(Retinex) - Maske\nSchatten @@ -698,6 +699,8 @@ HISTORY_MSG_437;(Retinex) - Maske\nMethode HISTORY_MSG_438;(Retinex) - Maske\nKurve HISTORY_MSG_439;(Retinex) - Vorschau HISTORY_MSG_440;(Detailebenenkontrast)\nProzessreihenfolge +HISTORY_MSG_441;(Retinex) - Einstellungen\nVerstärkung und Ausgleich\nTransmissionsverstärkung +HISTORY_MSG_442;(Retinex) - Einstellungen\nTransmission - Skalierung HISTORY_NEWSNAPSHOT;Hinzufügen HISTORY_NEWSNAPSHOT_TOOLTIP;Taste: Alt + s HISTORY_SNAPSHOT;Schnappschuss @@ -1674,7 +1677,7 @@ TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;Mit “3-pass“ erzielt man die besten Erg TP_RAW_SENSOR_XTRANS_LABEL;Sensor mit X-Trans-Matrix TP_RESIZE_APPLIESTO;Anwenden auf: TP_RESIZE_CROPPEDAREA;Ausschnitt -TP_RESIZE_FITBOX;Breite & Höhe +TP_RESIZE_FITBOX;Begrenzungsrahmen TP_RESIZE_FULLIMAGE;Ganzes Bild TP_RESIZE_H;Höhe: TP_RESIZE_HEIGHT;Höhe @@ -1696,8 +1699,12 @@ TP_RETINEX_CURVEEDITOR_LH;Intensität=f(H) TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Intensität in Abhängigkeit des Farbtons (H)\nBei der Retinex-Methode "Spitzlichter" wirken sich die Änderungen auch auf die Chromakorrektur aus. TP_RETINEX_CURVEEDITOR_MAP;L=f(L) TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;Die Kurve kann entweder alleine, oder mit der Gaußschen- oder Waveletmaske angewendet werden.\nArtefakte beachten! +TP_RETINEX_EQUAL;Korrekturen TP_RETINEX_FREEGAMMA;Gamma TP_RETINEX_GAIN;Kontrast +TP_RETINEX_GAINOFFS;Verstärkung und Ausgleich (Helligkeit) +TP_RETINEX_GAINTRANSMISSION;Transmissionsverstärkung +TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Ändert die Helligkeit durch Verstärken oder\nReduzieren der Transmissionskarte. TP_RETINEX_GAIN_TOOLTIP;Wirkt sich auf das verarbeitete Bild aus. Wird für schwarze oder weiße Pixel verwendet und hilft das Histogramm auszugleichen. TP_RETINEX_GAMMA;Gammakorrektur TP_RETINEX_GAMMA_FREE;Benutzerdefiniert @@ -1716,7 +1723,8 @@ TP_RETINEX_HIGHLIGHT;Spitzlichter Schwellenwert TP_RETINEX_HIGHLIGHT_TOOLTIP;Benötigt unter Umständen Korrekturen der Einstellungen "Benachbarte Pixel" und "Weißpunkt" unter dem Reiter "RAW". TP_RETINEX_HSLSPACE_LIN;HSL-Linear TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmisch -TP_RETINEX_ITER;Iterationen (Dynamikkompression) +TP_RETINEX_ITER;Iterationen +TP_RETINEX_ITERF;Dynamikkompression TP_RETINEX_ITER_TOOLTIP;Simuliert eine Dynamikkompression.\nHöhere Werte erhöhen die Prozessorzeit. TP_RETINEX_LABEL;Retinex (Bildschleier entfernen) TP_RETINEX_LABEL_MASK;Maske @@ -1728,7 +1736,7 @@ TP_RETINEX_MAP_MAPP;Schärfemaske (Teil-Wavelet) TP_RETINEX_MAP_MAPT;Schärfemaske (Wavelet) TP_RETINEX_MAP_METHOD_TOOLTIP;Keine: Wendet die Maske, die mit der gaußschen Funktion (Radius, Methode) erstellt wurde an, um Halos und Artefakte zu reduzieren.\n\nNur Kurve: Wendet eine diagonale Kontrastkurve auf die Maske an.\nArtefakte beachten.\n\nGaußschenmaske: Wendet eine gaußsche Unschärfe auf die originale Maske an.\n(Schnell)\n\nSchärfemaske: Wendet ein Wavelet auf die originale Maske an.\n(Langsam) TP_RETINEX_MAP_NONE;Keine -TP_RETINEX_MEDIAN;Transmission Medianfilter +TP_RETINEX_MEDIAN;Medianfilter TP_RETINEX_METHOD;Methode TP_RETINEX_METHOD_TOOLTIP;"Schatten" wirkt sich auf dunkle Bereiche aus.\n"Schatten & Lichter" wirkt sich auf dunkle und helle Bereiche aus.\n"Lichter" wirkt sich auf helle Bereiche aus.\n"Spitzlichter" wirkt sich auf sehr helle Bereiche aus und reduziert Magenta-Falschfarben. TP_RETINEX_MLABEL;Schleierreduzierung: Min=%1 Max=%2 @@ -1736,17 +1744,19 @@ TP_RETINEX_MLABEL_TOOLTIP;Sollte nahe bei Min=0 und Max=32768 sein TP_RETINEX_NEIGHBOR;Radius TP_RETINEX_NEUTRAL;Zurücksetzen TP_RETINEX_NEUTRAL_TIP;Setzt alle Regler und Kurven auf ihre Standardwerte zurück. -TP_RETINEX_OFFSET;Helligkeit +TP_RETINEX_OFFSET;Ausgleich (Helligkeit) TP_RETINEX_SCALES;Gaußscher Gradient TP_RETINEX_SCALES_TOOLTIP;Steht der Regler auf 0 sind alle Iterationen identisch.\nBei > 0 werden Skalierung und Radius reduziert und umgekehrt. TP_RETINEX_SETTINGS;Einstellungen +TP_RETINEX_SKAL;Skalierung TP_RETINEX_SLOPE;Gammasteigung TP_RETINEX_STRENGTH;Intensität -TP_RETINEX_THRESHOLD;Transmission Schwellenwert +TP_RETINEX_THRESHOLD;Schwellenwert TP_RETINEX_THRESHOLD_TOOLTIP;Limitiert den Bereich der Transmissionskurve. TP_RETINEX_TLABEL;T: Min=%1 Max=%2 Mittel=%3 Sigma=%4 TP_RETINEX_TLABEL2;T: Tmin=%1 Tmax=%2 TP_RETINEX_TLABEL_TOOLTIP;Ergebnis der Transmissionskurve: Min, Max, Mittel und Sigma\nMin und Max hat Einfluss auf die Abweichung.\n\nTmin = Kleinster Wert der Transmissionskurve\nTmax = Größter Wert der Transmissionskurve +TP_RETINEX_TRANF;Transmission TP_RETINEX_TRANSMISSION;Transmissionskurve TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission in Abhängigkeit der Transmission.\nx-Achse: Transmission negativer Werte (Min), Mittel und positiver Werte (Max).\ny-Achse: Verstärkung oder Reduzierung. TP_RETINEX_UNIFORM;Schatten & Lichter diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index d0979941b..2f97b36d1 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -718,14 +718,14 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_420;Retinex - Histogram - HSL !HISTORY_MSG_421;Retinex - Gamma @@ -746,8 +746,10 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -1679,8 +1681,12 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1700,6 +1706,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1719,10 +1726,11 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1730,6 +1738,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index 677771240..f7a82441c 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -640,14 +640,14 @@ !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -669,8 +669,10 @@ !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -1669,8 +1671,12 @@ !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1690,6 +1696,7 @@ !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1709,10 +1716,11 @@ !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1720,6 +1728,7 @@ !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 7be7aa516..215c21390 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -1674,14 +1674,14 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1703,8 +1703,10 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1853,8 +1855,12 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1874,6 +1880,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1893,10 +1900,11 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1904,6 +1912,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Euskara b/rtdata/languages/Euskara index 251fa4673..5a7e068d2 100644 --- a/rtdata/languages/Euskara +++ b/rtdata/languages/Euskara @@ -919,14 +919,14 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -948,8 +948,10 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1711,8 +1713,12 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1732,6 +1738,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1751,10 +1758,11 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1762,6 +1770,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 7cfe47960..d35371458 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -1893,14 +1893,14 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1922,8 +1922,10 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_PRSHARPENING;Post-resize sharpening @@ -1955,8 +1957,12 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1976,6 +1982,7 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1995,10 +2002,11 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -2006,6 +2014,7 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Greek b/rtdata/languages/Greek index 61a6f844f..1929b0059 100644 --- a/rtdata/languages/Greek +++ b/rtdata/languages/Greek @@ -918,14 +918,14 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -947,8 +947,10 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1710,8 +1712,12 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1731,6 +1737,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1750,10 +1757,11 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1761,6 +1769,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Hebrew b/rtdata/languages/Hebrew index e007ebcd7..54396a92f 100644 --- a/rtdata/languages/Hebrew +++ b/rtdata/languages/Hebrew @@ -919,14 +919,14 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -948,8 +948,10 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1711,8 +1713,12 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1732,6 +1738,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1751,10 +1758,11 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1762,6 +1770,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index 82061c24d..94329b411 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -1539,14 +1539,14 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1568,8 +1568,10 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1794,8 +1796,12 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1815,6 +1821,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1834,10 +1841,11 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1845,6 +1853,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 78cfa3275..967e57e4d 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -1927,14 +1927,14 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1956,8 +1956,10 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_PRSHARPENING;Post-resize sharpening @@ -1987,8 +1989,12 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -2008,6 +2014,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -2027,10 +2034,11 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -2038,6 +2046,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Latvian b/rtdata/languages/Latvian index 4d4415e58..bfbbf4d76 100644 --- a/rtdata/languages/Latvian +++ b/rtdata/languages/Latvian @@ -919,14 +919,14 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -948,8 +948,10 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1711,8 +1713,12 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1732,6 +1738,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1751,10 +1758,11 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1762,6 +1770,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index 9600eb0ce..5183cb9de 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -1200,14 +1200,14 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1229,8 +1229,10 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1773,8 +1775,12 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1794,6 +1800,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1813,10 +1820,11 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1824,6 +1832,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index fa1dbcd09..7806899b6 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -1977,8 +1977,10 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_PRSHARPENING;Post-resize sharpening @@ -2002,13 +2004,18 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !TP_RETINEX_CONTEDIT_MAP;Mask equalizer !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAMMA_TOOLTIP;Restore tones by applying gamma before and after Retinex. Different from Retinex curves or others curves (Lab, Exposure, etc.). !TP_RETINEX_GRAD;Transmission gradient !TP_RETINEX_GRADS;Strength gradient !TP_RETINEX_GRADS_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Strength is reduced when iterations increase, and conversely. !TP_RETINEX_GRAD_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Variance and Threshold are reduced when iterations increase, and conversely. !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL_MASK;Mask !TP_RETINEX_MAP;Mask method @@ -2021,6 +2028,8 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !TP_RETINEX_MLABEL_TOOLTIP;Should be near min=0 max=32768\nRestored image with no mixture. !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. +!TP_RETINEX_SKAL;Scale +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_VIEW;Process !TP_RETINEX_VIEW_MASK;Mask diff --git a/rtdata/languages/Norsk BM b/rtdata/languages/Norsk BM index 105277339..222667cd5 100644 --- a/rtdata/languages/Norsk BM +++ b/rtdata/languages/Norsk BM @@ -918,14 +918,14 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -947,8 +947,10 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1710,8 +1712,12 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1731,6 +1737,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1750,10 +1757,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1761,6 +1769,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index 5f3c30045..323d6ac8a 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -1631,14 +1631,14 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1660,8 +1660,10 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1800,8 +1802,12 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1821,6 +1827,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1840,10 +1847,11 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1851,6 +1859,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters) index 79bf35bea..1967a9e4e 100644 --- a/rtdata/languages/Polish (Latin Characters) +++ b/rtdata/languages/Polish (Latin Characters) @@ -1631,14 +1631,14 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1660,8 +1660,10 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1800,8 +1802,12 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1821,6 +1827,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1840,10 +1847,11 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1851,6 +1859,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index a665b17e4..06cc8b37d 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -919,14 +919,14 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -948,8 +948,10 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1711,8 +1713,12 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1732,6 +1738,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1751,10 +1758,11 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1762,6 +1770,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index 778500cbb..5b9625741 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -1482,14 +1482,14 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1511,8 +1511,10 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1796,8 +1798,12 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1817,6 +1823,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1836,10 +1843,11 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1847,6 +1855,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index c48c5528f..dce9bfd10 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -1123,14 +1123,14 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1152,8 +1152,10 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1730,8 +1732,12 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1751,6 +1757,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1770,10 +1777,11 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1781,6 +1789,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Serbian (Latin Characters) b/rtdata/languages/Serbian (Latin Characters) index ee2df3cdf..5a5f9d454 100644 --- a/rtdata/languages/Serbian (Latin Characters) +++ b/rtdata/languages/Serbian (Latin Characters) @@ -1123,14 +1123,14 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1152,8 +1152,10 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1730,8 +1732,12 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1751,6 +1757,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1770,10 +1777,11 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1781,6 +1789,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Slovak b/rtdata/languages/Slovak index 7ea5ead8a..a3ed2994b 100644 --- a/rtdata/languages/Slovak +++ b/rtdata/languages/Slovak @@ -982,14 +982,14 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1011,8 +1011,10 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1719,8 +1721,12 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1740,6 +1746,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1759,10 +1766,11 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1770,6 +1778,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Suomi b/rtdata/languages/Suomi index 5017c2066..f7962a735 100644 --- a/rtdata/languages/Suomi +++ b/rtdata/languages/Suomi @@ -920,14 +920,14 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -949,8 +949,10 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1711,8 +1713,12 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1732,6 +1738,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1751,10 +1758,11 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1762,6 +1770,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index 3f979abaf..f3ba72af8 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -1758,14 +1758,14 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1787,8 +1787,10 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_COLORTONING;Color toning @@ -1881,8 +1883,12 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1902,6 +1908,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1921,10 +1928,11 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1932,6 +1940,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/Turkish b/rtdata/languages/Turkish index d7f6fa405..b3de5a01f 100644 --- a/rtdata/languages/Turkish +++ b/rtdata/languages/Turkish @@ -919,14 +919,14 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Brightness +!HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength !HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Variance +!HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission median +!HISTORY_MSG_417;Retinex - Transmission Median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -948,8 +948,10 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_436;Retinex - M - Radius !HISTORY_MSG_437;Retinex - M - Method !HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Preview +!HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_440;CbDL - Method +!HISTORY_MSG_441;Retinex - Gain transmission +!HISTORY_MSG_442;Retinex - Scale !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1710,8 +1712,12 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. !TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +!TP_RETINEX_EQUAL;Equalizer !TP_RETINEX_FREEGAMMA;Free gamma !TP_RETINEX_GAIN;Gain +!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +!TP_RETINEX_GAINTRANSMISSION;Gain transmission +!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. !TP_RETINEX_GAMMA;Gamma !TP_RETINEX_GAMMA_FREE;Free @@ -1731,6 +1737,7 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_RETINEX_HSLSPACE_LIN;HSL-Linear !TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic !TP_RETINEX_ITER;Iterations (Tone-mapping) +!TP_RETINEX_ITERF;Tone mapping !TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. !TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask @@ -1750,10 +1757,11 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_RETINEX_NEIGHBOR;Radius !TP_RETINEX_NEUTRAL;Reset !TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Brightness +!TP_RETINEX_OFFSET;Offset (brightness) !TP_RETINEX_SCALES;Gaussian gradient !TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. !TP_RETINEX_SETTINGS;Settings +!TP_RETINEX_SKAL;Scale !TP_RETINEX_SLOPE;Free gamma slope !TP_RETINEX_STRENGTH;Strength !TP_RETINEX_THRESHOLD;Threshold @@ -1761,6 +1769,7 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 !TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. !TP_RETINEX_UNIFORM;Uniform diff --git a/rtdata/languages/default b/rtdata/languages/default index c8d145390..5998c585d 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -639,14 +639,14 @@ HISTORY_MSG_406;W - ES - Neighboring pixels HISTORY_MSG_407;Retinex - Method HISTORY_MSG_408;Retinex - Radius HISTORY_MSG_409;Retinex - Contrast -HISTORY_MSG_410;Retinex - Brightness +HISTORY_MSG_410;Retinex - Offset HISTORY_MSG_411;Retinex - Strength HISTORY_MSG_412;Retinex - Gaussian Gradient -HISTORY_MSG_413;Retinex - Variance +HISTORY_MSG_413;Retinex - Contrast HISTORY_MSG_414;Retinex - Histogram - Lab HISTORY_MSG_415;Retinex - Transmission HISTORY_MSG_416;Retinex -HISTORY_MSG_417;Retinex - Transmission median +HISTORY_MSG_417;Retinex - Transmission Median HISTORY_MSG_418;Retinex - Threshold HISTORY_MSG_419;Retinex - Color space HISTORY_MSG_420;Retinex - Histogram - HSL @@ -668,8 +668,10 @@ HISTORY_MSG_435;Retinex - M - Shadows TW HISTORY_MSG_436;Retinex - M - Radius HISTORY_MSG_437;Retinex - M - Method HISTORY_MSG_438;Retinex - M - Equalizer -HISTORY_MSG_439;Retinex - Preview +HISTORY_MSG_439;Retinex - Process HISTORY_MSG_440;CbDL - Method +HISTORY_MSG_441;Retinex - Gain transmission +HISTORY_MSG_442;Retinex - Scale HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot @@ -1668,8 +1670,12 @@ TP_RETINEX_CURVEEDITOR_LH;Strength=f(H) TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. TP_RETINEX_CURVEEDITOR_MAP;L=f(L) TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! +TP_RETINEX_EQUAL;Equalizer TP_RETINEX_FREEGAMMA;Free gamma TP_RETINEX_GAIN;Gain +TP_RETINEX_GAINOFFS;Gain and Offset (brightness) +TP_RETINEX_GAINTRANSMISSION;Gain transmission +TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. TP_RETINEX_GAMMA;Gamma TP_RETINEX_GAMMA_FREE;Free @@ -1689,6 +1695,7 @@ TP_RETINEX_HIGHLIGHT_TOOLTIP;Increase action of High algorithm.\nMay require you TP_RETINEX_HSLSPACE_LIN;HSL-Linear TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic TP_RETINEX_ITER;Iterations (Tone-mapping) +TP_RETINEX_ITERF;Tone mapping TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. TP_RETINEX_LABEL;Retinex TP_RETINEX_LABEL_MASK;Mask @@ -1708,10 +1715,11 @@ TP_RETINEX_MLABEL_TOOLTIP;Should be near min=0 max=32768\nRestored image with no TP_RETINEX_NEIGHBOR;Radius TP_RETINEX_NEUTRAL;Reset TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -TP_RETINEX_OFFSET;Brightness +TP_RETINEX_OFFSET;Offset (brightness) TP_RETINEX_SCALES;Gaussian gradient TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. TP_RETINEX_SETTINGS;Settings +TP_RETINEX_SKAL;Scale TP_RETINEX_SLOPE;Free gamma slope TP_RETINEX_STRENGTH;Strength TP_RETINEX_THRESHOLD;Threshold @@ -1719,6 +1727,7 @@ TP_RETINEX_THRESHOLD_TOOLTIP;Limits in/out.\nIn = image source,\nOut = image gau TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. +TP_RETINEX_TRANF;Transmission TP_RETINEX_TRANSMISSION;Transmission map TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. TP_RETINEX_UNIFORM;Uniform diff --git a/rtengine/LUT.h b/rtengine/LUT.h index ecf5aa6cc..63b6dc08a 100644 --- a/rtengine/LUT.h +++ b/rtengine/LUT.h @@ -234,7 +234,7 @@ public: LUT & operator+=(LUT &rhs) { if (rhs.size == this->size) { -#ifdef _OPENMP +#ifdef _RT_NESTED_OPENMP // temporary solution to fix Issue #3324 #pragma omp simd #endif diff --git a/rtengine/alignedbuffer.h b/rtengine/alignedbuffer.h index a33d4dfe8..ac8471b7e 100644 --- a/rtengine/alignedbuffer.h +++ b/rtengine/alignedbuffer.h @@ -18,9 +18,10 @@ */ #ifndef _ALIGNEDBUFFER_ #define _ALIGNEDBUFFER_ -#include +#include #include #include +#include #include #include "../rtgui/threadutils.h" @@ -58,7 +59,7 @@ public: /** @brief Return true if there's no memory allocated */ - bool isEmpty() + bool isEmpty() const { return allocatedSize == 0; } @@ -120,28 +121,14 @@ public: void swap(AlignedBuffer &other) { - void *tmpReal = other.real; - other.real = real; - real = tmpReal; - - char tmpAlignt = other.alignment; - other.alignment = alignment; - alignment = tmpAlignt; - - size_t tmpAllocSize = other.allocatedSize; - other.allocatedSize = allocatedSize; - allocatedSize = tmpAllocSize; - - T* tmpData = other.data; - other.data = data; - data = tmpData; - - bool tmpInUse = other.inUse; - other.inUse = inUse; - inUse = tmpInUse; + std::swap(real, other.real); + std::swap(alignment, other.alignment); + std::swap(allocatedSize, other.allocatedSize); + std::swap(data, other.data); + std::swap(inUse, other.inUse); } - unsigned int getSize() + unsigned int getSize() const { return unitSize ? allocatedSize / unitSize : 0; } diff --git a/rtengine/cache.h b/rtengine/cache.h new file mode 100644 index 000000000..2e53aab2a --- /dev/null +++ b/rtengine/cache.h @@ -0,0 +1,236 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2016 Flössie + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#pragma once + +#include +#include +#include +#include +#include + +#include "../rtgui/threadutils.h" + +namespace rtengine +{ + +namespace cache_helper +{ + + // See http://stackoverflow.com/a/20790050 + template + struct has_hash + : std::false_type + { + }; + + template + struct has_hash()(std::declval()), void())> + : std::true_type + { + }; + +} + +template +class Cache +{ +public: + class Hook + { + public: + virtual ~Hook() + { + } + virtual void onDiscard(const K& key, const V& value) = 0; + virtual void onDisplace(const K& key, const V& value) = 0; + virtual void onRemove(const K& key, const V& value) = 0; + virtual void onDestroy() = 0; + }; + + Cache(unsigned long _size, Hook* _hook = 0) : + store_size(_size), + hook(_hook) + { + } + + ~Cache() + { + if (hook) { + resize(0); + hook->onDestroy(); + } + } + + bool get(const K& key, V& value) const + { + mutex.lock(); + const StoreConstIterator store_it = store.find(key); + const bool present = store_it != store.end(); + if (present) { + lru_list.splice( + lru_list.begin(), + lru_list, + store_it->second.lru_list_it + ); + value = store_it->second.value; + } + mutex.unlock(); + + return present; + } + + bool set(const K& key, const V& value) + { + return set(key, value, Mode::UNCOND); + } + + bool replace(const K& key, const V& value) + { + return set(key, value, Mode::KNOWN); + } + + bool insert(const K& key, const V& value) + { + return set(key, value, Mode::UNKNOWN); + } + + bool remove(const K& key) + { + mutex.lock(); + const StoreIterator store_it = store.find(key); + const bool present = store_it != store.end(); + if (present) { + remove(store_it); + } + mutex.unlock(); + + return present; + } + + void resize(unsigned long size) + { + mutex.lock(); + while (lru_list.size() > size) { + discard(); + } + store_size = size; + mutex.unlock(); + } + + void clear() + { + mutex.lock(); + if (hook) { + for (const auto& entry : store) { + hook->onRemove(entry.first, entry.second.value); + } + } + lru_list.clear(); + store.clear(); + mutex.unlock(); + } + +private: + struct Value; + + using Store = typename std::conditional< + cache_helper::has_hash::value, + std::unordered_map, + std::map + >::type; + using StoreIterator = typename Store::iterator; + using StoreConstIterator = typename Store::const_iterator; + + typedef std::list LruList; + using LruListIterator = typename LruList::iterator; + + struct Value { + V value; + LruListIterator lru_list_it; + }; + + enum class Mode { + UNCOND, + KNOWN, + UNKNOWN + }; + + void discard() + { + const StoreIterator store_it = lru_list.back(); + if (hook) { + hook->onDiscard(store_it->first, store_it->second.value); + } + store.erase(store_it); + lru_list.pop_back(); + } + + bool set(const K& key, const V& value, Mode mode) + { + mutex.lock(); + const StoreIterator store_it = store.find(key); + const bool is_new_key = store_it == store.end(); + if (is_new_key) { + if (mode == Mode::UNCOND || mode == Mode::UNKNOWN) { + if (lru_list.size() >= store_size) { + discard(); + } + lru_list.push_front(store.end()); + const Value v = { + value, + lru_list.begin() + }; + lru_list.front() = store.emplace(key, v).first; + } + } else { + if (mode == Mode::UNCOND || mode == Mode::KNOWN) { + if (hook) { + hook->onDisplace(key, store_it->second.value); + } + lru_list.splice( + lru_list.begin(), + lru_list, + store_it->second.lru_list_it + ); + store_it->second.value = value; + } + } + mutex.unlock(); + + return is_new_key; + } + + void remove(const StoreIterator& store_it) + { + if (hook) { + hook->onRemove(store_it->first, store_it->second.value); + } + lru_list.erase(store_it->second.lru_list_it); + store.erase(store_it); + } + + unsigned long store_size; + Hook* const hook; + mutable MyMutex mutex; + Store store; + mutable LruList lru_list; +}; + +} diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 05e21576c..c7bef9ee2 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -36,7 +36,7 @@ missing. That's why this file is needed. It's read once during startup, so if the file is updated you need to restart RawTherapee in order to take effect. The file is not intended for modification by the casual user, but advanced users can add missing camera information to this file. -If you do so please report at http://code.google.com/p/rawtherapee/issues so we can +If you do so please report at https://github.com/Beep6581/RawTherapee/issues so we can extend the distributed version of this file so your provided camera information becomes available to all. @@ -58,9 +58,20 @@ Examples: // make and model separated with single space, must match make // and model as provided by dcraw (case-insensitive). "make_model": "ManufacturerA ModelB", + Some Panasonics and some Canon Dslrs (of the low category like Canon 550D) exist + under alternate naming in various marketplaces (EOS 550D, EOS Rebel T2i, EOS Kiss X4). + For new models that are still not supported by the Dcraw version used in current RT, + we have to fill all the alternate names or else RT will not recognize the alternate model names + For models supported by Dcraw, filling the alternate names is simply desired (for better user info). + The format of multiple naming is to write all names in brackets i.e + instead of .. "make_model": "Canon EOS 550D", + type .. "make_model": [ "Canon EOS 550D", "Canon EOS Rebel T2i", "Canon EOS Kiss X4" ], // ColorMatrix with D65 Calibration Illuminant, in dcraw format "dcraw_matrix": [ 7530, -1942, -255, -4318, 11390, 3362, -926, 1694, 7649 ], // black level (or black offset if a base black is already extracted from exif by Dcraw, see Panasonic, resent Nikon ) + // For some rare cases where Dcraw detects wrong Black Level we need to correct it with absolute black i.e one that is not added up + // the detected. For this job we have to define "black" as 65535+desired_black. For example to correct a wrongly detected black level + of 9 instead of the correct 600 we define "black": 66135 i.e. 65535+600. // and white level same for all colors at all ISOs "ranges": { "black": 10, "white": 1000 }, // crop away masked sensor borders, 10 pixels left, 20 pixels top, resulting image width/height 4000x3000 @@ -68,14 +79,18 @@ Examples: that should be removed but keep in mind that sometimes after converting to DNG the borders are already cropped so the "negative number" way is not totally safe. "raw_crop": [ 10, 20, 4000, 3000 ], - // Almost same as MaskedAreas DNG tag, used for black level measuring here two areas defined - "masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ], - The difference here is the meaning of the numbers which here are expressing the absolute distance (in pixels) + // Almost same as MaskedAreas DNG tag, used for black level measuring. Here up to two areas can be defined + by tetrads of numbers + "masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ], // two tetrads define two areas + The difference vs "raw_crop" is the meaning of the numbers which here are expressing the absolute distance (in pixels) of each side of each rectangular "masked area" from the top and left side of the sensor - the first number is the distance of the top edge from the sensor's top - the second is the distance of the left side from the sensor's left - the third is the distance of the bottom side from the sensor's top - the fourth is the distance of the right side from the sensor's left + It is useful after detecting the masked areas, to not fully use these areas but leave a border of + 2-4 pixels instead, to take care of possible light leaks from the light sensing area to the optically + black (masked) area or sensor imperfections at the outer borders. }, { @@ -179,14 +194,14 @@ we want conservative values. By conservative values we mean that if you see a white level of most often 15760 and occassionally 15759 (ie very small variation of white level which -is a common case), you set the white level around 40-80 14bit units below or -10-20 12bit units. Say at 15700 in this example, or 4080 instead of 4095 for -12bit raws. This way we get a little margin from noise and camera variation. -Since sensor raw values are linear you lose in this example log2(1-50/15760) = --0.005 stop of detail, ie irrelevant. Thus it's better to provide RawTherapee -with knowledge where the image clips rather than keeping that last 0.005 stop -of highlight information and risking that clipping will not be detected -properly. +is a common case), you set the white level around 50-100 14-bit units below or +10-20 12-bit units. Say at 15700 in this example, or 4080 instead of 4095 for +12-bit raws. This way we get a little margin from noise and camera variation. +Since sensor raw values are linear, you lose, for example, +log2(1-50/15760) = -0.005 stops of detail, i.e. irrelevant. Thus it is better +to provide RawTherapee with knowledge where the image clips rather than keeping +that last 0.005 stop of highlight information and risking that clipping will +not be detected properly. It is very usual for white level to be a bell distribution instead of a candle when the camera applies long exposure noise reduction by subtracting a black frame @@ -201,7 +216,13 @@ whole fuzzy noise peak. If a little of the starting edge of the noise will be included it's not harmful, but 99% of it should be above. This would mean that it's better to measure white level on long exposure/ high temp raws but since this if difficult and time consuming we choose to measure on normal -raws and cover the abnormalities whith the conservative WL values. +raws and cover the abnormalities with the conservative WL values. + A more detailed approach when we only have non LENR measures is to subtract +a value according to per ISO read noise. +We can find data regarding read noise (stdev of gaussian distribution) at +http://www.photonstophotos.net/Charts/RN_ADU.htm . We find the per ISO tead_noise and +subtract from the measured value 6*read_noise. This gives confidence that 99.5% of +the bell is clipped out. If you have used Adobe's DNG Converter and analyzed it's output you may have noticed that it's very conservative regarding white levels, ie it cuts away @@ -326,7 +347,7 @@ About black levels: Unlike for white levels it's much more common that black levels can be derived from the format. Either it's simply 0 (typical for old Nikon cameras, -newer Nikons (year2013-14) have a BL at around 150 12bit or 600/768 14bit ), +newer Nikons (year2013-14) have a BL at around 150 12-bit or 600/768 14-bit ), or it can be derived from masked pixels (typical for Canon cameras) or otherwise be extracted from some tag. Some formats have built-in subtraction information and are pre-processed by DCRaw @@ -412,6 +433,46 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ] } }, + { // quality C, INTERMEDIATE ISO SAMPLES MISSING + "make_model": "Canon EOS-1D X Mark II", + "dcraw_matrix": [ 7596,-978,-967,-4808,12571,2503,-1398,2567,5752 ], + // "raw_crop": [ 192, 96, 8696, 5800 ], // Full sensor 5568x3708 top38, left72, official crop left84, top50, right5555, bottom3697, 5472X3648 + // "masked_areas": [ 50, 4, 3697, 68 ], // left out 4 first columns from calculations because possibly the BL is still imbalanced there + "ranges": { + // black levels are read from raw masked pixels + // white levels are same for all colors all ISOs, but safety margin vary on ISO + "white": [ + { "iso": 50, "levels": 16350 }, // typical for all ISOs: 16383, stdev 2.25 + { "iso": 100, "levels": 16350 }, // stdev 2.25 + { "iso": [ 125, 160, 200, 250 ], "levels": 16340 }, // stdev 2.5 + { "iso": [ 320, 400, 500 ], "levels": 16330 }, // stdev 2.95 + { "iso": [ 640, 800, 1000 ], "levels": 16320 },// stdev x, 4.0 , x + { "iso": [ 1250, 1600, 2000 ], "levels": 16300 },// stdev x, 6.0 , x + { "iso": [ 2500, 3200, 4000 ], "levels": 16250 }, // STDEV x, 9.8 , x + { "iso": [ 5000, 6400, 8000 ], "levels": 16150 }, // stdev x, 17, x + { "iso": [ 10000, 12800, 16000 ], "levels": 16100 },// stdev x, 34 , x + { "iso": [ 20000, 25600, 32000 ], "levels": 16000 },// stdev x, 68 , x + { "iso": [ 40000, 51200, 64000 ], "levels": 15700 },// stdev x, 125, x + { "iso": [ 80000, 102400 ], "levels": 15100 },// stdev x, 245 + { "iso": [ 204800 ], "levels": 14000 }, + { "iso": [ 409600 ], "levels": 13000 } + ], + "white_max": 16383, + "aperture_scaling": [ + /* no need for aperture scaling because typical WL is 16383 at all ISOs .. */ + { "aperture": 1.2, "scale_factor": 1.130 }, // guessed by relative 6D data + { "aperture": 1.4, "scale_factor": 1.090 }, + { "aperture": 1.6, "scale_factor": 1.060 }, + { "aperture": 1.8, "scale_factor": 1.040 }, + { "aperture": 2.0, "scale_factor": 1.030 }, + { "aperture": 2.2, "scale_factor": 1.020 }, + { "aperture": 2.5, "scale_factor": 1.015 }, + { "aperture": 2.8, "scale_factor": 1.010 }, + { "aperture": 3.2, "scale_factor": 1.005 }, + { "aperture": 3.5, "scale_factor": 1.003 } + ] + } + }, { // quality A, "make_model": "Canon EOS 5D Mark III", "dcraw_matrix": [ 6722,-635,-963,-4287,12460,2028,-908,2162,5668 ], @@ -468,14 +529,18 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, - { // Quality A, some missing scaling factors are safelly guessed - most samples by sfink16 at RT forums + { // Quality A, some missing scaling factors are safely guessed - samples by sfink16 & RawConvert at RT forums "make_model": "Canon EOS 6D", "dcraw_matrix": [ 7034,-804,-1014,-4420,12564,2058,-851,1994,5758 ], "ranges": { "white": [ - { "iso": [ 50, 100, 125, 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 12800, 16000, 25600 ], "levels": 15180 }, // typical 15283 - { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000, 20000 ], "levels": 13100 }, // typical 13225 - { "iso": [ 51200, 102400 ], "levels": 16280 } // typical 16383 + { "iso": [ 50, 100, 125, 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200 ], "levels": 15180 }, // typical 15283 + { "iso": [ 4000, 6400, 8000, 12800 ], "levels": 15100 }, // typical 15283 + { "iso": [ 16000, 25600 ], "levels": 14900 }, // typical 15283 + { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 13100 }, // typical 13225 + { "iso": [ 5000, 10000 ], "levels": 13000 }, // typical 13225 + { "iso": [ 20000 ], "levels": 12800 }, // typical 13225 + { "iso": [ 51200, 102400 ], "levels": 15900 } // typical 16383 ], "white_max": 16383, "aperture_scaling": [ @@ -484,7 +549,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "aperture": 1.2, "scale_factor": 1.130 }, // from histogramm 1 gap in every 7 levels { "aperture": 1.4, "scale_factor": 1.090 }, // histogram 3 gaps in every 32 levels { "aperture": 1.6, "scale_factor": 1.060 }, // 16213/15283 - { "aperture": 1.8, "scale_factor": 1.040 }, // guessed + { "aperture": 1.8, "scale_factor": 1.040 }, // 16004/15283 { "aperture": 2.0, "scale_factor": 1.030 }, // 15800/15283 { "aperture": 2.2, "scale_factor": 1.020 }, // guessed { "aperture": 2.5, "scale_factor": 1.015 }, // 15541/15283 @@ -521,31 +586,6 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, - { // Quality b, ISO and aperture WL data by ..... at RawTherapee forums, missing samples safely guessed - "make_model": "Canon EOS 550D", - "dcraw_matrix": [ 6941,-1164,-857,-3825,11597,2534,-416,1540,6039 ], // dcraw 550d - "ranges": { - "white": [ - { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 - { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 12550 }, // typical 12650 - { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 5000, 6400, 12800 ], "levels": 15200 } // typical 15304 - ], - "white_max": 16383, - "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.250 }, // guessed - { "aperture": 1.6, "scale_factor": 1.150 }, // guessed - { "aperture": 1.8, "scale_factor": 1.110 }, // 15196/13584 - { "aperture": 2.0, "scale_factor": 1.080 }, // 14734/13584 - { "aperture": 2.2, "scale_factor": 1.050 }, // 14386/13584 - { "aperture": 2.5, "scale_factor": 1.040 }, // 14272/13584 - { "aperture": 2.8, "scale_factor": 1.030 }, // 14042/13584 - { "aperture": 3.2, "scale_factor": 1.015 }, // guessed - { "aperture": 3.5, "scale_factor": 1.000 } // guessed negligible - ] - } - }, { // Quality A, f/1.6 aperture scale factor missing but safely guessed, ISO and aperture data by charlyw at RT forums "make_model": "Canon EOS 7D Mark II", "dcraw_matrix": [ 7268,-1082,-969,-4186,11839,2663,-825,2029,5839 ], // dng_v8.7 d65 @@ -702,8 +742,65 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, + { // Quality C, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed + "make_model": "Canon EOS 80D", + "dcraw_matrix": [ 7457,-671,-937,-4849,12495,2643,-1213,2354,5492 ], // DNG_V9.5 D65 + "raw_crop": [ 264, 34, 6024, 4022 ], // full size 6288x4056, official crop 276,46,6275,4045 + "masked_areas": [ 40, 96, 4000, 260 ], + "ranges": { + "white": [ + { "iso": [ 100, 125, 200, 250 ], "levels": 16200 }, // nominal 16383, LENR blue 16243 + { "iso": [ 160 ], "levels": 13000 }, // nominal 13097, + { "iso": [ 320, 640, 1250, 2500, 5000, 10000 ], "levels": 13200 }, // G1,G2 13415 + { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 16150 }, // nominal 16383, LENR ISO3200 16150 + { "iso": [ 6400, 8000, 12800, 16000, 25600 ], "levels": 16000 } // R,G1,G2 16383, B 16243, LENR B 16000 + ], + "white_max": 16383, + "aperture_scaling": [ + /* note: need for more data to properly fill all scale factors */ + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.020 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } + }, + +// Canon Mid category DSLRs (Rebels) + + { // Quality b, ISO and aperture WL data by ..... at RawTherapee forums, missing samples safely guessed + "make_model": [ "Canon EOS 550D", "Canon EOS Rebel T2i", "Canon EOS Kiss X4" ], + "dcraw_matrix": [ 6941,-1164,-857,-3825,11597,2534,-416,1540,6039 ], // dcraw 550d + "ranges": { + "white": [ + { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 + { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 12550 }, // typical 12650 + { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 5000, 6400, 12800 ], "levels": 15200 } // typical 15304 + ], + "white_max": 16383, + "aperture_scaling": [ + /* note: no scale factors known for f/1.2 and f/1.0 (no lenses to test with), but the + typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ + { "aperture": 1.4, "scale_factor": 1.250 }, // guessed + { "aperture": 1.6, "scale_factor": 1.150 }, // guessed + { "aperture": 1.8, "scale_factor": 1.110 }, // 15196/13584 + { "aperture": 2.0, "scale_factor": 1.080 }, // 14734/13584 + { "aperture": 2.2, "scale_factor": 1.050 }, // 14386/13584 + { "aperture": 2.5, "scale_factor": 1.040 }, // 14272/13584 + { "aperture": 2.8, "scale_factor": 1.030 }, // 14042/13584 + { "aperture": 3.2, "scale_factor": 1.015 }, // guessed + { "aperture": 3.5, "scale_factor": 1.000 } // guessed negligible + ] + } + }, + { // Quality b, scaling factors missing but guessed safely - "make_model": [ "Canon EOS 1200D", "Canon EOS Rebel T5", "Canon EOS 600D", "Canon EOS Rebel T3i" ], + "make_model": [ "Canon EOS 600D", "Canon EOS Rebel T3i", "Canon EOS Kiss X5", "Canon EOS 1200D", "Canon EOS Rebel T5", "Canon EOS Kiss X70" ], "dcraw_matrix": [ 6461,-907,-882,-4300,12184,2378,-819,1944,5931 ], // dcp D65 colormatrix2 "ranges": { "white": [ @@ -722,14 +819,13 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 { "aperture": 2.5, "scale_factor": 1.050 }, // guessed { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // + { "aperture": 3.2, "scale_factor": 1.000 } // ] } }, - { // Quality A, only one scaling factor missing and guessed safely - "make_model": [ "Canon EOS 650D", "Canon EOS Rebel T4i" ], + { // Quality A, only one scaling factor missing and guessed safely, EOS 700D not tested but available samples look same as 650D + "make_model": [ "Canon EOS 650D", "Canon EOS Rebel T4i", "Canon EOS Kiss X6i", "Canon EOS 700D", "Canon EOS Rebel T5i", "Canon EOS Kiss X7i" ], "dcraw_matrix": [ 6602,-841,-939,-4472,12458,2247,-975,2039,6148 ], "ranges": { "white": [ @@ -749,14 +845,13 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "aperture": 2.2, "scale_factor": 1.025 }, // 13921/13583 { "aperture": 2.5, "scale_factor": 1.020 }, // { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // + { "aperture": 3.2, "scale_factor": 1.000 } // ] } }, { // Quality C, aperture scale factors and intermediate ISOs missing but safely guessed - "make_model": [ "Canon EOS 750D", "Canon EOS Rebel T6i", "Canon EOS 760D", "Canon EOS Rebel T6s" ], + "make_model": [ "Canon EOS 750D", "Canon EOS Rebel T6i", "Canon EOS Kiss X8i", "Canon EOS 760D", "Canon EOS Rebel T6s", "Canon EOS 8000D" ], "dcraw_matrix": [ 6362,-823,-847,-4426,12109,2616,-743,1857,5635 ], // dng_v9.0 d65 "raw_crop": [ 72, 34, 6024, 4022 ], // full size 6096x4056, official crop 84,46,6083,4045 "masked_areas": [ 40, 16, 4000, 54 ], @@ -784,6 +879,38 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, +// Canon Low End DSLRs +// Canon EOS 1200D/Rebel T5/Kiss X70" is upper at the same item as 600D/T3i/X5 + + { // Quality B, integer ISOs measured, intermediate ISO samples missing, + // scaling factors safely guessed to be same as 1200D .. + "make_model": [ "Canon EOS 1300D", "Canon EOS Rebel T6", "Canon EOS Kiss X80" ], + "dcraw_matrix": [ 6939,-1016,-866,-4428,12473,2177,-1175,2178,6162 ], // Dcraw 9.27 + "ranges": { + "white": [ + { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 + { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12550 }, // typical 12650 + { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 12800 ], "levels": 15200 } // typical 15303 + ], + "white_max": 16383, + "aperture_scaling": [ + /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ + { "aperture": 1.4, "scale_factor": 1.290 }, // guessed from 60D data + { "aperture": 1.6, "scale_factor": 1.190 }, // guessed + { "aperture": 1.8, "scale_factor": 1.140 }, // guessed + { "aperture": 2.0, "scale_factor": 1.090 }, // 12293/11222 = 1.095 + { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 + { "aperture": 2.5, "scale_factor": 1.050 }, // guessed + { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } + }, + +// Canon Mirrorless with Interchangable Lens + { // Quality B, missing scaling factors are guessed safely from 650D relative data "make_model": "Canon EOS M", "dcraw_matrix": [ 6602,-841,-939,-4472,12458,2247,-975,2039,6148 ], @@ -811,6 +938,39 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, + { // Quality C, inconsistent WL per ISO, missing scaling factors + "make_model": "Canon EOS M10", + "dcraw_matrix": [ 6400,-480,-888,-5294,13416,2047,-1296,2203,6137 ], // DNGv9.3 D65 + "ranges": { + "white": [ + { "iso": [ 100, 125, 160, 320, 500, 2000, 4000, 6400 ], "levels": 16300 }, // typical 16383 + { "iso": 200, "levels": 12900 }, // typical 12940-15570-15376 + { "iso": 250, "levels": 14100 }, // typical 14200 + { "iso": 800, "levels": 13400 }, // typical 13500-16383x2 + { "iso": 1000, "levels": 14900 }, // typical 15010-16383 + { "iso": 1250, "levels": 12300 }, // typical 12400 + { "iso": 1600, "levels": 15200 }, // typical 15290-16075-16380 + { "iso": 2500, "levels": 12200 }, // typical 12300 + { "iso": 3200, "levels": 15000 }, // typical 15080-16383-16100-13660 + { "iso": 5000, "levels": 12800 }, // typical 12840 + { "iso": [ 12800, 25600 ], "levels": 16200 } // typical 16383 + ], + "white_max": 16383, + "aperture_scaling": [ + /* note: all scale factors are copied from EOS M3 */ + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.020 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } + }, + { // Quality C, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed "make_model": "Canon EOS M3", "dcraw_matrix": [ 6362,-823,-847,-4426,12109,2616,-743,1857,5635 ], // DNG_V8.8 D65 @@ -838,7 +998,37 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ] } }, - { /* Quality B, needs a way to auto apply 3/2 or 4/3 crops (read exif tags ..) to work better with auto distortion, + +// Canon Powershot + + { // Quality C, CHDK DNGs, raw frame corrections, experimental infrared support commented out + "make_model": "Canon PowerShot A480", + "dcraw_matrix": [ 8275,-2905,-1261,-128,5305,505,52,482,2450 ], // DNG_CHDK_V1.3.0 Daylight + // "dcraw_matrix": [ 15906,-7425,-2014,-2010,5554,264,404,-265,2706 ], // Infrared guessed + "raw_crop": [ 6, 12, 3684, 2760 ], // full size 3720X2772, official Canon crop 3648x2736 + "masked_areas": [ 12, 3694, 2760, 3716 ], // only left side optically black area is considered + "ranges": { "white": 4080 } + }, + + { // Quality B, experimental infrared support commented out + "make_model": "Canon PowerShot G9", + "dcraw_matrix": [ 7368,-2141,-598,-5621,13254,2625,-1419,1696,5743 ], // DNG_V8.7 D65 + // "dcraw_matrix": [ 8796,-3770,311,-4148,11362,3197,-598,983,5880 ], // DNG_V8.7 A + // "dcraw_matrix": [ 15669,-8084,-2453,-2940,5756,101,126,-401,2463 ], // Infrared guessed 111 + // "dcraw_matrix": [ 13254,-6296,-1798,184,2753,90,1438,-566,1129 ], // Infrared guessed + "ranges": { "white": 4080 } + }, + + { // Quality A, changes for raw crop which is optimistic in Dcraw + "make_model": "Canon PowerShot G12", + "dcraw_matrix": [ 13244,-5501,-1248,-1508,9858,1935,-270,1083,4366 ], + // "raw_crop": [ 62, 18, 3666, 2748 ],// max usable + "raw_crop": [ 68, 20, 3656, 2744 ],// equal to official Canon frame, 72,24,3719,2759 = 3648x2736 + "masked_areas": [ 24, 40, 2770, 44 ],// as declared in maker data + "ranges": { "white": 4080 } // + }, + + { /* Quality B, needs a way to auto apply 3/2 or 4/3 crops (read exif tags ..) to work better with auto distortion, for the moment just comment-uncomment the desired raw crop */ "make_model": "Canon PowerShot G1 X Mark II", "dcraw_matrix": [ 7378,-1255,-1043,-4088,12251,2048,-876,1946,5805 ], // D65 matrix from adobe dcp @@ -850,6 +1040,14 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 16300 } }, + { // Quality B, + "make_model": "Canon PowerShot G3 X", + "dcraw_matrix": [ 9701,-3857,-921,-3149,11537,1817,-786,1817,5147 ], // DNG_V9.1.1 D65 + "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 + "masked_areas": [ 40, 4, 3680, 76 ], + "ranges": { "white": 16300 } + }, + { // Quality B, "make_model": "Canon PowerShot G7 X", "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 @@ -860,8 +1058,9 @@ Quality X: unknown, ie we knowing to little about the camera properties to know }, { // Quality B, - "make_model": "Canon PowerShot G3 X", - "dcraw_matrix": [ 9701,-3857,-921,-3149,11537,1817,-786,1817,5147 ], // DNG_V9.1.1 D65 + "make_model": [ "Canon PowerShot G5 X", "Canon PowerShot G9 X" ], + "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 + // "raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 "masked_areas": [ 40, 4, 3680, 76 ], "ranges": { "white": 16300 } @@ -875,15 +1074,6 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4050 } }, - { // Quality A, changes for raw crop which is optimistic in Dcraw - "make_model": "Canon PowerShot G12", - "dcraw_matrix": [ 13244,-5501,-1248,-1508,9858,1935,-270,1083,4366 ], - // "raw_crop": [ 62, 18, 3666, 2748 ],// max usable - "raw_crop": [ 68, 20, 3656, 2744 ],// equal to official Canon frame, 72,24,3719,2759 = 3648x2736 - "masked_areas": [ 24, 40, 2770, 44 ],// as declared in maker data - "ranges": { "white": 4080 } // - }, - { // Quality B "make_model": "Canon PowerShot SX60 HS", "dcraw_matrix": [ 13161,-5451,-1344,-1989,10654,1531,-47,1271,4955 ], // DNG_V8.7 D65 @@ -902,16 +1092,43 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 10592,-4262,-1008,-3514,11355,2465,-870,2025,6386 ], // DNG_v8.7 D65 "ranges": { "white": 16100 } }, + { // Quality B, + "make_model": "FUJIFILM X70", + "dcraw_matrix": [ 10450,-4329,-878,-3217,11105,2421,-752,1758,6519 ], // DNG_v9.4 D65 + // "raw_crop": [ 4, 0, 4988, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop + "ranges": { "white": 16100 } + }, - { // Quality B + { // Quality B "make_model": "FUJIFILM X-A2", "dcraw_matrix": [ 10763,-4560,-917,-3346,11311,2322,-475,1135,5843 ], // DNG D65 "ranges": { "white": 4050 } }, + { // Quality B "make_model": [ "FUJIFILM X-T1", "FUJIFILM X-T10", "FUJIFILM X-E2" ], "dcraw_matrix": [ 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 ], // DNG D65 // "dcraw_matrix": [ 9289,-3279,-632,-3539,11137,2758,-1049,1950,6544 ], // X-RITE D55 +// "raw_crop": [ 4, 0, 4936, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop + "ranges": { "white": 16100 } + }, + + { // Quality B + "make_model": "FUJIFILM X-E2S", + "dcraw_matrix": [ 11562,-5118,-961,-3022,11007,2311,-525,1569,6097 ], // DNG_v9.4 D65 + "ranges": { "white": 16100 } + }, + + { // Quality B + "make_model": "FUJIFILM X-PRO1", + "dcraw_matrix": [ 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 ], // DNG_v9.4 D65 + "ranges": { "white": 4080 } + }, + + { // Quality B + "make_model": "FUJIFILM X-PRO2", + "dcraw_matrix": [ 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 ], // DNG_v9.4 D65 + "raw_crop": [ 0, 0, 6032, 4032 ], // full raw 6160,4032, Usable 6032,4032 - experimental crop "ranges": { "white": 16100 } }, @@ -927,18 +1144,16 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4040 } }, - { // Quality B - "make_model": "FUJIFILM X-PRO2", - "dcraw_matrix": [ 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 ], // DNG_v9.4 D65 - "raw_crop": [ 0, 0, 6032, 4032 ], // full raw 6160,4032, Usable 6032,4032 - experimental crop - "ranges": { "white": 16100 } - }, - { // Quality B, Matrix from Adobe's dcp D65 instead of the internal in Leica's DNG - "make_model": [ "LEICA SL (Typ 601)", "LEICA Q (Typ 116)" ], + "make_model": "LEICA Q (Typ 116)", "dcraw_matrix": [ 10068,-4043,-1068,-5319,14268,1044,-765,1701,6522 ], // DCP D65 "raw_crop": [ 4, 4, -4, -4 ] // full raw 6016x4016, Official 6000x4000 }, + { // Quality B, Matrix from Adobe's dcp D65 instead of the internal in Leica's DNG + "make_model": "LEICA SL (Typ 601)", + "dcraw_matrix": [ 11492,-4930,-1188,-5593,14673,873,-609,1474,6343 ], // DNGv9.3 D65 + "raw_crop": [ 4, 4, -4, -4 ] // full raw 6016x4016, Official 6000x4000 + }, { // Quality B, frame corrections "make_model": "LG mobile LG-H815", @@ -973,6 +1188,9 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4080 } // BL autodetected from exif }, +// For all Nikon Dslrs which have multiple bitdepth options (14 and 12 bit) we define the 14-bit value and RT adapts it to 12-bit +// when a 12-bit bitdepth is detected (WL12 = WL14*4095/16383) + { // quality B, samples by Johan Thor at RT.Issues, measures at long exposures with LENR are missing // but a safety margin is included - aperture scaling makes no significant difference "make_model": "Nikon D3S", @@ -991,34 +1209,69 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "white_max": 16383 } }, + { // quality B, intermediate ISO samples missing + "make_model": "Nikon D500", + "dcraw_matrix": [ 8813,-3210,-1036,-4703,12868,2021,-1054,1940,6129 ], // DNG_v9.5 D65 + "ranges": { + "white": [ // measured at integer ISOs. Safety margin per ISO groups according to expected WL spread after LENR + { "iso": [ 100, 200, 400, 800, 1600 ], "levels": [ 16300, 16100, 16300 ] }, // typical G1,G2 16180 R,B 16383 + { "iso": [ 3200, 6400 ], "levels": [ 16250, 16050, 16250 ] }, // typical G1,G2,16200 R,B 16383 + { "iso": [ 12800, 25600 ], "levels": 16000 }, // typical G1,G2, R,B 16383 + { "iso": [ 51200, 102400 ], "levels": 15800 }, // typical G1,G2, R,B 16383 + { "iso": [ 204800, 409600 ], "levels": 15500 }, // typical G1,G2,R,B 16383 + { "iso": [ 819200, 1638400 ], "levels": 15000 } // typical G1,G2, R,B 16383 + ], + "white_max": 16383 + } + }, { // quality B, lacks aperture and ISO scaling, known to exist, but little to gain as the levels are so close to white_max "make_model": "Nikon D7000", "dcraw_matrix": [ 7530,-1942,-255,-4318,11390,3362,-926,1694,7649 ], // matrix provided by Tanveer(tsk1979) "ranges": { // measured at ISO 100. ISO differences not measured, but known to exist - "white": [ 16370, 15760, 16370 ], // typical R 16383, G 15778, B 16383 + "white": [ 16300, 15700, 16300 ], // typical R 16383, G 15778, B 16383 "white_max": 16383 // aperture scaling not measured, but known to exist, at f/1.8 the G channels hits white_max } }, + { // quality B, + "make_model": "NIKON COOLPIX A", + "dcraw_matrix": [ 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 ], // dng_d65 + "ranges": { + "white": [ + { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500, 640, 800 ], "levels": [ 16300, 15700, 16300 ] }, // typical G1,G2 15760-15800 R,B 16383 + { "iso": [ 1000, 1250, 1600, 2000, 2500, 3200 ], "levels": 16300 }, // typical G1,G2, R,B 16383 + { "iso": [ 4000, 5000, 6400 ], "levels": 16200 }, // typical G1,G2, R,B 16383 + { "iso": [ 8000, 10000, 12800 ], "levels": 16000 }, // typical G1,G2,R,B 16383 + { "iso": [ 16000, 20000, 25600 ], "levels": 15700 } // typical G1,G2, R,B 16383 + ], + "white_max": 16383 + } + }, - { // Quality B, aperture scaling used to scale WL at safer levels + { // 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 + "ranges": { "black": 0, "white": 16300 } // WL typical 16383 set to 16300 for safety + }, + + { // Quality B "make_model": "Nikon D5300", "dcraw_matrix": [ 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 ], // adobe dng_v8.8 d65 - "ranges": { "white": 16300 } // attention.. WL value is for 14bit files, has to be 4070 for 12bit files. WL typical 16383 set to 16300 for safety + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety }, - { // Quality B, aperture scaling used to scale WL at safer levels + { // Quality B "make_model": "Nikon D5500", "dcraw_matrix": [ 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 ], // adobe dng_v9.0 d65 - "ranges": { "white": 16300 } // attention.. WL value is for 14bit files, has to be 4070 for 12bit files. WL typical 16383 set to 16300 for safety + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety }, - { // Quality B, color matrix from DNG_v9.0 instead of internal Dcraw_v9.25_r1.475, + { // Quality B "make_model": "Nikon D7200", "dcraw_matrix": [ 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 ], // adobe dng_v9.0 d65 - "ranges": { "white": 16300 } // attention.. WL values are for 14bit files, has to be WL4070 for 12bit files. WL typical 16383 set to 16300 for safety, + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety, }, { // quality B, samples by joachip at RT forums, are measures at long exposures with LongExposureNoiseReduction @@ -1030,18 +1283,18 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "white": [ { "iso": [ 50, 100 ], "levels": [ 15800, 15800, 15350 ] }, // typical G1/G2/R 15879, B 15395-15670 lowered to 15800, 15350, 3969 B3917 { "iso": [ 200, 400, 800 ], "levels": [ 16300, 15700, 16300 ] }, // 15878, 16383 - { "iso": 1000, "levels": [ 16300, 16100, 16300 ] }, // 12bit lossless r4095, 3981-10, b4041- 12bit lossy r,g1,g2 3961 - b3917, + { "iso": 1000, "levels": [ 16300, 16100, 16300 ] }, // 12-bit lossless r4095, 3981-10, b4041- 12-bit lossy r,g1,g2 3961 - b3917, { "iso": 1600, "levels": [ 16300, 16100, 16300 ] }, // 16145-165, 16383 { "iso": [ 3200, 6400, 12800, 25600 ], "levels": [ 16300, 16300, 16300 ] } // 16383 ], "white_max": 16383 } - }, - { // quality B, lacks WL measures at intermediate ISOs (160-250-320 ..) and measures at long exposures with LongExposureNoiseReduction + }, + { // quality B, missing WL measures at intermediate ISOs (160-250-320 ..) and at long exposures with LongExposureNoiseReduction set to ON // aperture scaling known to exist, but little to gain as the levels are so close to white_max "make_model": "Nikon D610", "dcraw_matrix": [ 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 ], // dcp d65 - "raw_crop": [ 0, 0, 6034, 4028 ], // Dcraw has no raw crop for D610 + "raw_crop": [ 0, 0, 6034, 4028 ], "ranges": { "white": [ { "iso": [ 50, 100 ], "levels": [ 15800, 15700, 15800 ] }, // typical G1/G2 15778, R/B 15879 lowered to 15700, 15800 for possible WL distribution under LENR @@ -1051,22 +1304,24 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ], "white_max": 16383 } - }, + }, - { // quality B; Data from RusselCottrell at RT forums. sensor is not uniform + { // quality B; Data from RusselCottrell at RT forums. sensor is not uniform "make_model": "Nikon D700", "dcraw_matrix": [ 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 ], - "ranges": { "white": 15750 } // Non linearities start at 15750 (hi ISOs) 15850 (low ISOs) with long exposures (>2sec) and LENR ON .. nominal 15892 - // white 15750 is correct for 14bit files, 12 bit files need white level at 3900 - }, + // "dcraw_matrix": [ 9336,-3405,14,-7321,14779,2764,-914,1171,8248 ], // illuminant A + "ranges": { "white": [ 15500, 15500, 15500 ] } + // Non linearities start at 15500 (hi ISOs) 15850 (low ISOs) with long exposures (>2sec) and LENR ON .. nominal 15892 + // white 15500 is correct for 14-bit files, for 12-bit files RT auto_calculates it 15750*4095/16383=3936 + }, - { // Quality B, + { // Quality B, "make_model": "Nikon D750", "dcraw_matrix": [ 9020,-2890,-715,-4535,12436,2348,-934,1919,7086 ], // adobe dcp d65 DNGv8.7 - "ranges": { "white": 16300 } // attention.. WL values are for 14bit files, has to be WL4070 for 12bit files. WL typical 16383 set to 16300 for safety - }, + "ranges": { "white": 16300 } // WL values for 14-bit files, RT auto adapts it for 12-bit files. TypicalWL 16383 set to 16300 for safety + }, - { // quality B; Data from RussellCottrell at RT forums. Largest aperture scale factor is 1.013, about 1/50th of a stop + { // quality B; Data from RussellCottrell at RT forums. Largest aperture scale factor is 1.013, about 1/50th of a stop "make_model": "Nikon D800E", "dcraw_matrix": [ 7866,-2108,-555,-4869,12483,2681,-1176,2069,7501 ], // D800/D800E from dcraw.c "ranges": { @@ -1076,17 +1331,30 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": [ 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 16300 } // 16383 ] } - }, - { // quality B, WL set at 16300 from nominal 16380 for possible non linearities with LENR + }, + { // quality B, WL set at 16300 from nominal 16380 for possible non linearities with LENR "make_model": "Nikon D810", "dcraw_matrix": [ 9369,-3195,-791,-4488,12430,2301,-893,1796,6872 ], // dcp_v8.6 d65 "raw_crop": [ 0, 0, 7380, 4928 ], // Official raw crop 7380x4928, - "ranges": { "white": 16300 } // attention WL 16300 is for 14bit raws and has to be 4070 for 12 bit raws. Typical WL at 16383 + "ranges": { "white": 16300 } // WL values for 14-bit files, RT auto adapts it for 12-bit files. Typical WL at 16383 }, + { // Quality b, 16Mp and 64Mp raw frames "make_model": "OLYMPUS E-M5MarkII", "dcraw_matrix": [ 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 ], // DNG_v8.8 D65 - "raw_crop": [ 0, 0, -6, -6 ], // largest valid, full 64Mp 9280x6938, official crop 0 0 9216 6912 - safe 5755 + "raw_crop": [ 0, 0, -6, -6 ], // largest valid, full 64Mp 9280x6938, official crop 0 0 9216 6912 + "ranges": { + "white": [ + { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 + { "iso": [ 400, 800, 1600, 3200 ], "levels": 4070 }, // 4070-4095 + { "iso": [ 6400, 12800, 25600 ], "levels": 4040 } // 4000-4095 + ] + } + }, + { // Quality B, 20Mp and 80Mp raw frames + "make_model": "OLYMPUS PEN-F", + "dcraw_matrix": [ 9476,-3182,-765,-2613,10958,1893,-449,1315,5268 ], // dng_v9.5 D65 + // "raw_crop": [ 0, 0, 10372, -7780 ], // Highres mode largest valid, full 80Mp 10400X7796, official crop 10 10 10368 7776 "ranges": { "white": [ { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 @@ -1096,8 +1364,14 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, + { // Quality b, missing per ISO samples + "make_model": "OLYMPUS E-M1", + "dcraw_matrix": [ 7687,-1984,-606,-4327,11928,2721,-1381,2339,6452 ], // dng d65 + "ranges": { "white": 4080 } // nominal 4095-4094, spread with some settings as long exposure + }, + { // Quality b, crop correction - "make_model": "OLYMPUS E-M10", + "make_model": [ "OLYMPUS E-M10", "OLYMPUS E-M10 Mark II" ], "dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], "raw_crop": [ 0, 0, 4624, 3472 ], // largest valid - full frame is 4640x3472 // "raw_crop": [ 4, 4, 4616, 3464 ], // olympus jpeg crop 8, 8, 4608, 3456 @@ -1109,27 +1383,27 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4040 } // nominal 4056 }, - { // Quality B, with long exposure noise reduction White Level gets WL-BL = around 256_12bit levels less + { // Quality B, with long exposure noise reduction White Level gets WL-BL = around 256_12-bit levels less "make_model": "OLYMPUS E-PL7", "dcraw_matrix": [ 9197,-3190,-659,-2606,10830,2039,-458,1250,5458 ], // DNG_V8.7 D65 "ranges": { "white": 4080 } // nominal 4093 }, { // Quality B, per ISO WL measures missing - "make_model": "OLYMPUS SH-2", + "make_model": [ "OLYMPUS SH-2", "Olympus SH-3" ], "dcraw_matrix": [ 10156,-3425,-1077,-2611,11177,1624,-385,1592,5080 ], // DNG_V9.1 D65 "ranges": { "white": 4050 } // safe for worst case detected, nominal is 4093 }, - /* since Dcraw_v9.21 Panasonic base BL is read from exif (tags 0x001c BlackLevelRed15 is BL offstet. - Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue + /* since Dcraw_v9.21 Panasonic base BL is read from exif (tags 0x001c BlackLevelRed15 is BL offset. + Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue and we define here the needed offset of around 15. The total BL is base+offset */ { // Quality B, CameraPhone, some samples are missing but has the same sensor as FZ1000 .. - "make_model": "Panasonic DMC-CM1", + "make_model": [ "Panasonic DMC-CM1", "Panasonic DMC-CM10" ], "dcraw_matrix": [ 8770,-3194,-820,-2871,11281,1803,-513,1552,4434 ], // dcp_v8.7 d65 "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 @@ -1141,20 +1415,33 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { // Quality A , replicated from rawimage.cc "make_model": "Panasonic DMC-FZ150", "dcraw_matrix": [ 10435,-3208,-72,-2293,10506,2067,-486,1725,4682 ], // RT, copy from custom dcp d55 - "ranges": { "black": 15, "white": 4050 } // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset }, { // Quality Β, "make_model": [ "Panasonic DMC-FZ300", "Panasonic DMC-FZ330" ], "dcraw_matrix": [ 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 ], // DNG-V9.1.1 - "ranges": { "black": 15, "white": 4050 } // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset }, { // Quality A, samples by helices at Rt forums "make_model": [ "Panasonic DMC-FZ1000", "Leica V-LUX (Typ 114)" ], "dcraw_matrix": [ 7830,-2696,-763,-3325,11667,1866,-641,1712,4824 ], // dcp_v8.6 d65 "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 + { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 + { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // exif 4095 distribution 4080-4095 + ] + } + }, + { // Quality A, samples by helices at Rt forums and Chris Power at github + "make_model": [ "Panasonic DMC-ZS100", "Panasonic DMC-ZS110", "Panasonic DMC-TZ100", "Panasonic DMC-TZ101", "Panasonic DMC-TZ110", "Panasonic DMC-TX1" ], + "dcraw_matrix": [ 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 ], // dcp_v8.6 d65 + "raw_crop": [ 4, 4, -4, -4 ], // full raw frame 5488x3664 exif crop 5472X3648 with 8pixel borders. Set the borders at 4 pixels which added with RT's 4 pixels border gives exactly the official frame. + "ranges": { + "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 @@ -1162,17 +1449,16 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ] } }, - { // Quality A "make_model": [ "Panasonic DMC-LF1", "Leica C (Typ 112)" ], "dcraw_matrix": [ 9379,-3267,-816,-3227,11560,1881,-926,1928,5340 ], - "ranges": { "black": 15, "white": 4050 } // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset }, { // Quality A "make_model": [ "Panasonic DMC-TZ60", "Panasonic DMC-TZ61", "Panasonic DMC-ZS40", "Panasonic DMC-ZS41" ], "dcraw_matrix": [ 8607,-2822,-808,-3755,11930,2049,-820,2060,5224 ], // matrix from Adobe dcp v8.4 "raw_crop": [ 8, 8, -8, -8 ], // crop according to exif 4896 X 3672 plus 4 pixels borders. RT's frame gets smaller than Dcraw but works better with auto distortion - "ranges": { "black": 14, "white": 4050 } // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 14, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset }, { // Quality B, "make_model": [ "Panasonic DMC-TZ70", "Panasonic DMC-TZ71", "Panasonic DMC-ZS50", "Panasonic DMC-ZS51" ], @@ -1198,7 +1484,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-G1", "dcraw_matrix": [ 7477,-1615,-651,-5016,12769,2506,-1380,2475,7240 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // exif:4095 distribution peak at 3977 +/- up to 50 { "iso": [ 1600, 3200 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 @@ -1209,21 +1495,21 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-G3", "dcraw_matrix": [ 6051,-1406,-671,-4015,11505,2868,-1654,2667,6219 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": 4060 } // exif:4095 normal distribution 4080-4095, 4070-4095 on long exposure NR }, { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-G5", "dcraw_matrix": [ 7122,-2092,-419,-4643,11769,3283,-1363,2413,5944 ], // RT "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": 4060 } // exif:4095 normal distribution 4080-4095, 4070-4095 on long exposure NR }, { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GF1", "dcraw_matrix": [ 7863,-2080,-668,-4623,12331,2578,-1020,2066,7266 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // exif:4095 distribution peak at 3977 +/- up to 50 { "iso": [ 1600, 3200 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 @@ -1235,21 +1521,21 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-GF2", "dcraw_matrix": [ 7694,-1791,-745,-4917,12818,2332,-1221,2322,7197 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": 4050 } // exif:4095 normal distribution 4080-4095, 4050-4095 on long exposure NR }, { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GF3", "dcraw_matrix": [ 8074,-1846,-861,-5026,12999,2239,-1320,2375,7422 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": 4050 } // exif:4095 normal distribution 4080-4095, 4050-4095 on long exposure NR }, { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GH1", "dcraw_matrix": [ 6360,-1557,-375,-4201,11504,3086,-1378,2518,5843 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": [ 100, 200, 400, 800 ], "levels": 3930 }, // exif:4095 distribution peak at 3982 +/- up to 50 { "iso": [ 1600, 3200 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 @@ -1261,7 +1547,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know // "dcraw_matrix": [ 6855,-1765,-456,-4223,11600,2996,-1450,2602,5761 ], // Colin Walker - disabled due to problems with underwater "dcraw_matrix": [ 7780,-2410,-806,-3913,11724,2484,-1018,2390,5298 ], // Dcraw d65 "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": [ 100, 200, 400, 800 ], "levels": 3930 }, // exif:4095 distribution peak at 3982 +/- up to 50 { "iso": [ 1600, 3200, 6400, 12800 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 @@ -1273,7 +1559,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-GH3", "dcraw_matrix": [ 6559,-1752,-491,-3672,11407,2586,-962,1875,5130 ], // dcp d65 "ranges": { - "black": 16, // 16 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 125, "levels": 3500 }, // gaussian 3600-4095 { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 @@ -1285,7 +1571,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-GH4", "dcraw_matrix": [ 7122,-2108,-512,-3155,11201,2231,-541,1423,5045 ], // dng_v8.5 d65 "ranges": { - "black": 16, // 16 is BL offstet. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset + "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 100, "levels": 2700 }, // gaussian center at 2870-2920 range +/- 150, exif 2111 { "iso": 125, "levels": 3100 }, // guessed @@ -1298,7 +1584,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-GM1", "dcraw_matrix": [ 6770,-1895,-744,-5232,13145,2303,-1664,2691,5703 ], "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 125, "levels": 3100 }, // bell shape 3150-3650 - exif 2616 { "iso": 160, "levels": 3600 }, // guessed from relative GX7 data @@ -1311,7 +1597,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-GM5", "dcraw_matrix": [ 8238,-3244,-679,-3921,11814,2384,-836,2022,5852 ], // dng_v8.7 d65 "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 100, "levels": 2800 }, // bell shape 2850-3250 - exif 2111 { "iso": [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 @@ -1319,10 +1605,10 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, { // Quality A, - "make_model": [ "Panasonic DMC-GX7", "Panasonic DMC-GF7" ], + "make_model": [ "Panasonic DMC-GX7", "Panasonic DMC-GF7", "Panasonic DMC-GF8" ], "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ], "ranges": { - "black": 15, // 15 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 125, "levels": 3100 }, { "iso": 160, "levels": 3600 }, @@ -1331,12 +1617,11 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, - { // Quality A, - "make_model": [ "Panasonic DMC-G7", "Panasonic DMC-G70" ], + { // G7 Quality A, GX80 Quality B, BLs and WLs are same, color matrix looks to also be same as G7 + "make_model": [ "Panasonic DMC-G7", "Panasonic DMC-G70", "Panasonic DMC-GX80", "Panasonic DMC-GX85" ], "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ],// DNG_v9.1 D65 - // "dcraw_matrix": [ 8844,-3538,-768,-3709,11762,2200,-698,1792,5220 ], // LX100, DNG_V8.7 d65 "ranges": { - "black": 16, // 16 is BL offstet. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset "white": [ { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 exif_linearitylimit 2111 { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 exif_linearitylimit 2626 @@ -1348,9 +1633,9 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": "Panasonic DMC-GX8", "dcraw_matrix": [ 7564,-2263,-606,-3148,11239,2177,-540,1435,4853 ], // DNG_v9.1.1 D65 "ranges": { - "black": 15, // 16 is BL offstet. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset + "black": 15, // 16 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset "white": [ - { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 exif_linearitylimit 2111 + { "iso": 100, "levels": 2800 }, // gaussian 2900-3200 exif_linearitylimit 2111 { "iso": 125, "levels": 3180 }, // guessed gaussian 3200-3600 exif_linearitylimit 2626 { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 ] @@ -1361,7 +1646,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 8844,-3538,-768,-3709,11762,2200,-698,1792,5220 ], // DNG_V8.7 d65 // "dcraw_matrix": [ 6538,-1614,-549,-5475,13096,2646,-1780,2799,5612 ], // calculated from DxO D50 "ranges": { - "black": 15, // 15 is BL offset calculated from exif data. + "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset. "white": [ { "iso": 100, "levels": 2300 }, // gaussian 2400-2700 exif_linearitylimit 2111 { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 @@ -1369,6 +1654,12 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, + { // Quality B, per ISO info missing + "make_model": "PENTAX K-x", + "dcraw_matrix": [ 8843,-2837,-625,-5025,12644,2668,-411,1234,7410 ], // adobe dcp d65 + "ranges": { "white": 4080 } // nominal at ISO200 4094 + }, + { // Quality B, intermediate ISOs info missing "make_model": [ "RICOH PENTAX K-3", "PENTAX K-3" ], "dcraw_matrix": [ 7415,-2052,-721,-5186,12788,2682,-1446,2157,6773 ], // adobe dcp d65 @@ -1386,10 +1677,25 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, + { // Quality B, intermediate ISOs info missing + "make_model": [ "RICOH PENTAX 645Z", "PENTAX 645Z" ], + "dcraw_matrix": [ 9519,-3591,-664,-4074,11725,2671,-624,1501,6653 ], // adobe dcp d65 + "raw_crop": [ 48, 0, 8276, 6208 ],// full sensor 8384x6208 - official jpeg 8256x6192 + "ranges": { + "white": [ + { "iso": 100, "levels": 16310 }, // 16317 or 16350 + { "iso": 200, "levels": 16120 }, // 16254 or 16125 + { "iso": 400, "levels": 15860 }, // 16125 or 15868 + { "iso": 800, "levels": 15360 }, // 15868 or 15364-15370 + { "iso": [ 1600, 3200, 6400, 12800, 25600, 51200 ], "levels": 16300 } // 16383 - pentax dng tag is 15868-15350 + ] + } + }, + { // Quality B, intermediate ISOs info missing, spread due to blackframe subtraction guessed to be around 10levels "make_model": "PENTAX K10D", "dcraw_matrix": [ 9566,-2863,-803,-7170,15172,2112,-818,803,9705 ], // adobe DNG d65 - // "raw_crop": [ 0, 0, 3888, 2608 ], + // "raw_crop": [ 0, , 3888, 2608 ], "ranges": { "white": [ { "iso": 100, "levels": 4080 }, // R,G1,B = 4095 G2= 4087 @@ -1408,7 +1714,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4030 } // double clipping point for each channel at a) 4095 and b) bell distribution with peak at 4038 .. used the conservative one }, { // Quality A, Conflict with "Samsung NX30" in Dcraw_v9.21_r1.414, frame corrections and color data - "make_model": "Samsung NX3000", + "make_model": [ "Samsung NX3000", "Samsung NX3300" ], "dcraw_matrix": [ 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 ], // DNG_v8.7.1 D65 "raw_crop": [ 92, 38, 5480, 3656 ] // jpeg 5472x3648 - full raw: 5600 x 3714 - Samsung's official crop: 96, 42, 5568, 3690 }, @@ -1417,10 +1723,10 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "make_model": [ "Samsung NX1", "Samsung NX500" ], "dcraw_matrix": [ 10686,-4042,-1052,-3595,13238,276,-464,1259,5931 ], // DNG_v8.7 D65 // "dcraw_matrix": [ 13298,-6099,-296,-5243,16153,-1235,-508,1220,7758 ], // DNG_v8.7 Standard Light A - // "dcraw_matrix": [ 9598,-3268,-634,-5678,14795,824,-1255,2675,4523 ], // SAMSUNG DNG CONVERTER + // "dcraw_matrix": [ 9598,-3268,-634,-5678,14795,824,-1255,2675,4523 ], // SAMSUNG DNG CONVERTER v1.0 "ranges": { "white": [ - { "iso": 100, "levels": 16000 }, // typical 16084, LE 16120 and 16383, LENR 16280 + { "iso": 100, "levels": 16000 }, // 16000 typical 16084, LE 16120 and 16383, LENR 16280 { "iso": [ 200, 400, 800, 1600, 3200, 6400, 12800 ], "levels": 16300 }, // 16383 { "iso": [ 25600, 51200 ], "levels": 16300 } // 16383 ] @@ -1465,14 +1771,14 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "black": 16, "white": 4070 }, // BL is 16 or 31, should be measured at the horizontal black stripe at the top "raw_crop": [ 12, 52, -110, -8 ] // for small size all numbers/2 }, - { // Quality C, correction for frame width, color matrix guessed .. + { // Quality C, correction for frame width, color matrix measured on a DP1 sample .. "make_model": [ "Sigma DP1 Merrill", "Sigma DP2 Merrill", "Sigma DP3 Merrill" ], - "dcraw_matrix": [ 5666,139,-892,3780,5428,270,1366,9757,4526 ], // copy fron SD1 Merrill icc cloudy8140 d65 + // "dcraw_matrix": [ 2149,1003,-530,-494,6073,344,-3935,10665,3608 ], // experimental, inverted icc DP1_Merrill_dpreview_daylight WP1.2 + "dcraw_matrix": [ 2517,1175,-621,-587,7080,404,-4677,12402,4231 ], // experimental, inverted icc DP1_Merrill_dpreview_daylight WP1.4 "ranges": { "black": 16, "white": 4070 }, // BL is 16 or 31, should be measured at the horizontal black stripe at the bottom "raw_crop": [ 12, 0, -110, -62 ] // for small size all numbers/2 }, - { // Quality A, correction for color matrix from Colin Walker's d50 to dng d65 "make_model": "Sony NEX-C3", // "dcraw_matrix": [ 5130,-1055,-269,-4473,11797,3050,-701,1310,7121 ], // Colin walker's d50 kept for possible consistency issues @@ -1486,13 +1792,20 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 0, 0, 4920, 3276 ], "ranges": { "black": 512, "white": 16300 } }, - { // Quality A, + { // Quality A, "make_model": "Sony ILCA-77M2", "dcraw_matrix": [ 5991,-1732,-443,-4100,11989,2381,-704,1467,5992 ], // adobe dcp d65 "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, + { // Quality B, + "make_model": "Sony ILCA-68", + "dcraw_matrix": [ 6435,-1903,-536,-4722,12449,2550,-663,1363,6517 ], // adobe DNGv9.5 d65 + "raw_crop": [ 0, 0, -30, 0 ], + "ranges": { "black": 512, "white": 16300 } + }, + { // Quality A, correction for frame width "make_model": [ "Sony ILCE-3000", "Sony ILCE-3500", "Sony ILCE-5000", "Sony ILCE-QX1" ], "dcraw_matrix": [ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 ], // adobe dcp d65 @@ -1511,6 +1824,12 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, + { // Quality A + "make_model": "Sony ILCE-6300", + "dcraw_matrix": [ 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 ], // DNG_v9.5 D65 + "raw_crop": [ 0, 0, 6024, 4024 ], + "ranges": { "black": 512, "white": 16300 } + }, { // Quality A "make_model": "Sony ILCE-7M2", "dcraw_matrix": [ 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 ], // DNGv8.7.1 @@ -1523,10 +1842,10 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "black": 512, "white": 16300 } }, - { // Quality B, correction for frame width, crop modes not covered - "make_model": "Sony ILCE-7RM2", + { // Quality B, correction for frame width, crop modes covered + "make_model": [ "Sony ILCE-7RM2", "Sony DSC-RX1RM2" ], "dcraw_matrix": [ 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 ], // DNG_v9.1.1 D65 - "raw_crop": [ 0, 0, 7964, 5320 ], // full raw frame 8000x5320 - 36 rightmost columns are garbage + "raw_crop": [ 0, 0, -36, 0 ], // full raw frame 8000x5320 - 36 rightmost columns are garbage "ranges": { "black": 512, "white": 16300 } }, @@ -1592,7 +1911,6 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 4479,-895,-536,-5818,13569,2742,-1186,2190,7909], "ranges": { "black": 0, "white": 64400 } }, - { // Quality A for tested CFV, the other models have the same sensor (16 megapixel square sensor) "make_model": [ "Hasselblad V96C", "Hasselblad CFV", "Hasselblad CFV-II" ], "dcraw_matrix": [ 8519, -3260, -280, -5081, 13459, 1738, -1449, 2960, 7809 ] // borrowed from Adobe's DNG converter diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index a0ea5afb4..f3ef27a79 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -1,442 +1,330 @@ +#include + #include "clutstore.h" + +#include "opthelper.h" #include "rt_math.h" +#include "imagefloat.h" #include "stdimagesource.h" #include "../rtgui/options.h" -rtengine::CLUTStore clutStore; - -using namespace rtengine; - -const float MAXVAL8 = 255.; - -CLUTStore::CLUTStore() +namespace { -} -CLUT* CLUTStore::getClut( const Glib::ustring& filename ) +bool loadFile( + const Glib::ustring& filename, + const Glib::ustring& working_color_space, + AlignedBuffer& clut_image, + unsigned int& clut_level +) { - CLUT *result = 0; - m_mutex.lock(); - Cluts::iterator cluts_it = m_cluts.find(filename); + rtengine::StdImageSource img_src; - if (cluts_it == m_cluts.end()) { - if (m_cluts.size() >= options.clutCacheSize) { - // Evict a "random" entry from cache - Cluts::iterator victim_it = m_cluts.begin(); - - if (--victim_it->second.first == -1) { - delete victim_it->second.second; - m_cluts.erase(victim_it); - } - } - - cluts_it = m_cluts.insert(std::make_pair(filename, std::make_pair(0, new HaldCLUT))).first; - cluts_it->second.second->load( filename ); - } - - if (cluts_it->second.second->isValid()) { - result = cluts_it->second.second; - ++cluts_it->second.first; - } else { - delete cluts_it->second.second; - m_cluts.erase(cluts_it); - } - - m_mutex.unlock(); - - return result; -} - -void CLUTStore::releaseClut( const CLUT* clut ) -{ - m_mutex.lock(); - - for (Cluts::iterator cluts_it = m_cluts.begin(); cluts_it != m_cluts.end(); ++cluts_it) { - if (cluts_it->second.second == clut) { - if (--cluts_it->second.first == -1) { - delete cluts_it->second.second; - m_cluts.erase(cluts_it); - } - - break; - } - } - - m_mutex.unlock(); -} - -void CLUTStore::clearCache() -{ - m_mutex.lock(); - - for (Cluts::iterator cluts_it = m_cluts.begin(); cluts_it != m_cluts.end();) { - if (--cluts_it->second.first == -1) { - delete cluts_it->second.second; - Cluts::iterator tmp = cluts_it; - ++cluts_it; - m_cluts.erase(tmp); - } else { - ++cluts_it; - } - } - - m_mutex.unlock(); -} - -void rtengine::splitClutFilename( Glib::ustring filename, Glib::ustring &name, Glib::ustring &extension, Glib::ustring &profileName ) -{ - filename = Glib::path_get_basename( filename ); - name = filename; - //remove dirs - size_t lastSlashPos = filename.find_last_of( "/" ); - - if ( lastSlashPos == Glib::ustring::npos ) { - lastSlashPos = filename.find_last_of( "\\" ); - } - - size_t lastDotPos = filename.find_last_of( '.' ); - - if ( lastDotPos != Glib::ustring::npos ) { - name = filename.substr( 0, lastDotPos ); - extension = filename.substr( lastDotPos + 1, Glib::ustring::npos ); - } - - profileName = "sRGB"; // sRGB by default - static std::vector workingProfiles = rtengine::getWorkingProfiles(); - - for ( std::vector::iterator it = workingProfiles.begin(); it != workingProfiles.end(); ++it ) { - Glib::ustring ¤tProfile = *it; - - if ( std::search( name.rbegin(), name.rend(), currentProfile.rbegin(), currentProfile.rend() ) == name.rbegin() ) { - profileName = currentProfile; - name = name.substr( 0, name.size() - currentProfile.size() ); - break; - } - } -} - -//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -HaldCLUT::HaldCLUT() - : m_clutImage( 0 ), - m_level (0), - m_profile( "sRGB" ) -{ -} - -HaldCLUT::~HaldCLUT() -{ - if ( m_clutImage ) { - m_clutImage->free(); - m_clutImage = 0; - } -} - -void HaldCLUT::load( Glib::ustring filename ) -{ - m_clutImage = loadFile( filename, "", m_level ); - Glib::ustring name, ext; - splitClutFilename( filename, name, ext, m_profile ); - - if ( m_clutImage ) { - m_filename = filename; - } -} - -Glib::ustring HaldCLUT::profile() const -{ - return m_profile; -} - -Imagefloat* HaldCLUT::loadFile( Glib::ustring filename, Glib::ustring workingColorSpace, int &outLevel ) -{ - Imagefloat *result = 0; - StdImageSource imgSrc; - - if ( !Glib::file_test( filename, Glib::FILE_TEST_EXISTS ) || imgSrc.load(filename) ) { - return result; + if (!Glib::file_test(filename, Glib::FILE_TEST_EXISTS) || img_src.load(filename)) { + return false; } int fw, fh; - imgSrc.getFullSize (fw, fh, TR_NONE); + img_src.getFullSize(fw, fh, TR_NONE); - bool valid = false; + bool res = false; - //test on Hald format, copypasted from http://www.quelsolaar.com/technology/clut.html - if ( fw == fh ) { - outLevel = 1; + if (fw == fh) { + unsigned int level = 1; - for(; outLevel * outLevel * outLevel < fw; outLevel++); + while (level * level * level < fw) { + ++level; + } - if( !( outLevel * outLevel * outLevel > fw ) ) { - valid = true; + if (level * level * level == fw && level > 1) { + clut_level = level; + res = true; } } - if ( valid ) { - ColorTemp currWB = imgSrc.getWB(); - Imagefloat* baseImg = new Imagefloat (fw, fh); - PreviewProps pp (0, 0, fw, fh, 1); + if (res) { + rtengine::ColorTemp curr_wb = img_src.getWB(); + std::unique_ptr img_float = std::unique_ptr(new rtengine::Imagefloat(fw, fh)); + const PreviewProps pp(0, 0, fw, fh, 1); - procparams::ColorManagementParams icm; - icm.working = workingColorSpace; + rtengine::procparams::ColorManagementParams icm; + icm.working = working_color_space; - imgSrc.getImage (currWB, TR_NONE, baseImg, pp, procparams::ToneCurveParams(), icm, procparams::RAWParams()); + img_src.getImage(curr_wb, TR_NONE, img_float.get(), pp, rtengine::procparams::ToneCurveParams(), icm, rtengine::procparams::RAWParams()); - if ( !workingColorSpace.empty() ) { - imgSrc.convertColorSpace(baseImg, icm, currWB); + if (!working_color_space.empty()) { + img_src.convertColorSpace(img_float.get(), icm, curr_wb); } - result = baseImg; + AlignedBuffer image(fw * fh * 4 + 4); // getClutValues() loads one pixel in advance + + std::size_t index = 0; + + for (int y = 0; y < fh; ++y) { + for (int x = 0; x < fw; ++x) { + image.data[index] = img_float->r(y, x); + ++index; + image.data[index] = img_float->g(y, x); + ++index; + image.data[index] = img_float->b(y, x); + index += 2; + } + } + + clut_image.swap(image); + } + + return res; +} + +#ifdef __SSE2__ +vfloat2 getClutValues(const AlignedBuffer& clut_image, size_t index) +{ + const vint v_values = _mm_loadu_si128(reinterpret_cast(clut_image.data + index)); +#ifdef __SSE4_1__ + return { + _mm_cvtepi32_ps(_mm_cvtepu16_epi32(v_values)), + _mm_cvtepi32_ps(_mm_cvtepu16_epi32(_mm_srli_si128(v_values, 8))) + }; +#else + const vint v_mask = _mm_set1_epi32(0x0000FFFF); + + vint v_low = _mm_shuffle_epi32(v_values, _MM_SHUFFLE(1, 0, 1, 0)); + vint v_high = _mm_shuffle_epi32(v_values, _MM_SHUFFLE(3, 2, 3, 2)); + v_low = _mm_shufflelo_epi16(v_low, _MM_SHUFFLE(1, 1, 0, 0)); + v_high = _mm_shufflelo_epi16(v_high, _MM_SHUFFLE(1, 1, 0, 0)); + v_low = _mm_shufflehi_epi16(v_low, _MM_SHUFFLE(3, 3, 2, 2)); + v_high = _mm_shufflehi_epi16(v_high, _MM_SHUFFLE(3, 3, 2, 2)); + v_low = vandm(v_low, v_mask); + v_high = vandm(v_high, v_mask); + + return { + _mm_cvtepi32_ps(v_low), + _mm_cvtepi32_ps(v_high) + }; +#endif +} +#endif + +} + +rtengine::HaldCLUT::HaldCLUT() : + clut_level(0), + flevel_minus_one(0.0f), + flevel_minus_two(0.0f), + clut_profile("sRGB") +{ +} + +rtengine::HaldCLUT::~HaldCLUT() +{ +} + +bool rtengine::HaldCLUT::load(const Glib::ustring& filename) +{ + if (loadFile(filename, "", clut_image, clut_level)) { + Glib::ustring name, ext; + splitClutFilename(filename, name, ext, clut_profile); + + clut_filename = filename; + clut_level *= clut_level; + flevel_minus_one = static_cast(clut_level - 1) / 65535.0f; + flevel_minus_two = static_cast(clut_level - 2); + return true; + } + + return false; +} + +rtengine::HaldCLUT::operator bool() const +{ + return !clut_image.isEmpty(); +} + +Glib::ustring rtengine::HaldCLUT::getFilename() const +{ + return clut_filename; +} + +Glib::ustring rtengine::HaldCLUT::getProfile() const +{ + return clut_profile; +} + +void rtengine::HaldCLUT::getRGB( + float strength, + std::size_t line_size, + const float* r, + const float* g, + const float* b, + float* out_rgbx +) const +{ + const unsigned int level = clut_level; // This is important + + const unsigned int level_square = level * level; + +#ifdef __SSE2__ + const vfloat v_strength = F2V(strength); +#endif + + for (std::size_t column = 0; column < line_size; ++column, ++r, ++g, ++b, out_rgbx += 4) { + const unsigned int red = std::min(flevel_minus_two, *r * flevel_minus_one); + const unsigned int green = std::min(flevel_minus_two, *g * flevel_minus_one); + const unsigned int blue = std::min(flevel_minus_two, *b * flevel_minus_one); + + const unsigned int color = red + green * level + blue * level_square; + +#ifndef __SSE2__ + const float re = *r * flevel_minus_one - red; + const float gr = *g * flevel_minus_one - green; + const float bl = *b * flevel_minus_one - blue; + + size_t index = color * 4; + + float tmp1[4] ALIGNED16; + tmp1[0] = intp(re, clut_image.data[index + 4], clut_image.data[index]); + tmp1[1] = intp(re, clut_image.data[index + 5], clut_image.data[index + 1]); + tmp1[2] = intp(re, clut_image.data[index + 6], clut_image.data[index + 2]); + + index = (color + level) * 4; + + float tmp2[4] ALIGNED16; + tmp2[0] = intp(re, clut_image.data[index + 4], clut_image.data[index]); + tmp2[1] = intp(re, clut_image.data[index + 5], clut_image.data[index + 1]); + tmp2[2] = intp(re, clut_image.data[index + 6], clut_image.data[index + 2]); + + out_rgbx[0] = intp(gr, tmp2[0], tmp1[0]); + out_rgbx[1] = intp(gr, tmp2[1], tmp1[1]); + out_rgbx[2] = intp(gr, tmp2[2], tmp1[2]); + + index = (color + level_square) * 4; + + tmp1[0] = intp(re, clut_image.data[index + 4], clut_image.data[index]); + tmp1[1] = intp(re, clut_image.data[index + 5], clut_image.data[index + 1]); + tmp1[2] = intp(re, clut_image.data[index + 6], clut_image.data[index + 2]); + + index = (color + level + level_square) * 4; + + tmp2[0] = intp(re, clut_image.data[index + 4], clut_image.data[index]); + tmp2[1] = intp(re, clut_image.data[index + 5], clut_image.data[index + 1]); + tmp2[2] = intp(re, clut_image.data[index + 6], clut_image.data[index + 2]); + + tmp1[0] = intp(gr, tmp2[0], tmp1[0]); + tmp1[1] = intp(gr, tmp2[1], tmp1[1]); + tmp1[2] = intp(gr, tmp2[2], tmp1[2]); + + out_rgbx[0] = intp(bl, tmp1[0], out_rgbx[0]); + out_rgbx[1] = intp(bl, tmp1[1], out_rgbx[1]); + out_rgbx[2] = intp(bl, tmp1[2], out_rgbx[2]); + + out_rgbx[0] = intp(strength, out_rgbx[0], *r); + out_rgbx[1] = intp(strength, out_rgbx[1], *g); + out_rgbx[2] = intp(strength, out_rgbx[2], *b); +#else + const vfloat v_in = _mm_set_ps(0.0f, *b, *g, *r); + const vfloat v_tmp = v_in * F2V(flevel_minus_one); + const vfloat v_rgb = v_tmp - _mm_cvtepi32_ps(_mm_cvttps_epi32(_mm_min_ps(F2V(flevel_minus_two), v_tmp))); + + size_t index = color * 4; + + const vfloat v_r = PERMUTEPS(v_rgb, _MM_SHUFFLE(0, 0, 0, 0)); + + vfloat2 v_clut_values = getClutValues(clut_image, index); + vfloat v_tmp1 = vintpf(v_r, v_clut_values.y, v_clut_values.x); + + index = (color + level) * 4; + + v_clut_values = getClutValues(clut_image, index); + vfloat v_tmp2 = vintpf(v_r, v_clut_values.y, v_clut_values.x); + + const vfloat v_g = PERMUTEPS(v_rgb, _MM_SHUFFLE(1, 1, 1, 1)); + + vfloat v_out = vintpf(v_g, v_tmp2, v_tmp1); + + index = (color + level_square) * 4; + + v_clut_values = getClutValues(clut_image, index); + v_tmp1 = vintpf(v_r, v_clut_values.y, v_clut_values.x); + + index = (color + level + level_square) * 4; + + v_clut_values = getClutValues(clut_image, index); + v_tmp2 = vintpf(v_r, v_clut_values.y, v_clut_values.x); + + v_tmp1 = vintpf(v_g, v_tmp2, v_tmp1); + + const vfloat v_b = PERMUTEPS(v_rgb, _MM_SHUFFLE(2, 2, 2, 2)); + + v_out = vintpf(v_b, v_tmp1, v_out); + + STVF(*out_rgbx, vintpf(v_strength, v_out, v_in)); +#endif + } +} + +void rtengine::HaldCLUT::splitClutFilename( + const Glib::ustring& filename, + Glib::ustring& name, + Glib::ustring& extension, + Glib::ustring& profile_name +) +{ + Glib::ustring basename = Glib::path_get_basename(filename); + + const Glib::ustring::size_type last_dot_pos = basename.rfind('.'); + + if (last_dot_pos != Glib::ustring::npos) { + name.assign(basename, 0, last_dot_pos); + extension.assign(basename, last_dot_pos + 1, Glib::ustring::npos); + } else { + name = basename; + } + + profile_name = "sRGB"; + + if (!name.empty()) { + for (const auto& working_profile : rtengine::getWorkingProfiles()) { + if ( + !working_profile.empty() // This isn't strictly needed, but an empty wp name should be skipped anyway + && std::search(name.rbegin(), name.rend(), working_profile.rbegin(), working_profile.rend()) == name.rbegin() + ) { + profile_name = working_profile; + name.erase(name.size() - working_profile.size()); + break; + } + } + } +} + +rtengine::CLUTStore& rtengine::CLUTStore::getInstance() +{ + static CLUTStore instance; + return instance; +} + +std::shared_ptr rtengine::CLUTStore::getClut(const Glib::ustring& filename) +{ + std::shared_ptr result; + + if (!cache.get(filename, result)) { + std::unique_ptr clut(new rtengine::HaldCLUT); + + if (clut->load(filename)) { + result = std::move(clut); + cache.insert(filename, result); + } } return result; } -void HaldCLUT::loadClut( Imagefloat *img, RawClut &outClut ) +void rtengine::CLUTStore::clearCache() { - img->normalizeFloatTo1(); - int y_size = img->getH(); - int x_size = img->getW(); - outClut.resize( x_size * y_size * 3 ); - int clutIdx = 0; - - //int level = m_level * m_level; (unused) - for(int y = 0; y < y_size; y++) { - for(int x = 0; x < x_size; x++) { - outClut[ clutIdx * 3 ] = img->r( y, x ) * MAXVAL8; - outClut[ clutIdx * 3 + 1 ] = img->g( y, x ) * MAXVAL8; - outClut[ clutIdx * 3 + 2 ] = img->b( y, x ) * MAXVAL8; - - ++clutIdx; - } - } + cache.clear(); } -Imagefloat* HaldCLUT::generateIdentImage( int level ) +rtengine::CLUTStore::CLUTStore() : + cache(options.clutCacheSize) { - int imageWidth = level * level * level; - Imagefloat *resultImg = new Imagefloat( imageWidth, imageWidth ); - - int cubeSideSize = level * level; - float step = MAXVALF / (cubeSideSize - 1); - int pos = 0; - - for( int b = 0; b < cubeSideSize; ++b ) { - for ( int g = 0; g < cubeSideSize; ++g ) { - for ( int r = 0; r < cubeSideSize; ++r ) { - int x = pos / imageWidth; - int y = pos % imageWidth; - resultImg->r( x, y ) = step * r; - resultImg->g( x, y ) = step * g; - resultImg->b( x, y ) = step * b; - ++pos; - } - } - } - - return resultImg; -} - - -bool HaldCLUT::isValid() const -{ - return m_clutImage != 0; -} - -void HaldCLUT::getRGB( float rr, float gg, float bb, float &outR, float &outG, float &outB ) const -{ - rr /= MAXVALF; - gg /= MAXVALF; - bb /= MAXVALF; - correct( *m_clutImage, m_level, rr, gg, bb, outR, outG, outB ); -} - -inline float valF( unsigned char val ) -{ - return float( val ) / MAXVAL8; -} - -// copypasted from http://www.quelsolaar.com/technology/clut.html -void HaldCLUT::correct( const HaldCLUT::RawClut& clut, int level, float rr, float gg, float bb, float &outR, float &outG, float &outB ) -{ - int color, red, green, blue, i, j; - float tmp[6], r, g, b; - level = level * level; - - red = rr * (float)(level - 1); - - if(red > level - 2) { - red = (float)level - 2; - } - - if(red < 0) { - red = 0; - } - - green = gg * (float)(level - 1); - - if(green > level - 2) { - green = (float)level - 2; - } - - if(green < 0) { - green = 0; - } - - blue = bb * (float)(level - 1); - - if(blue > level - 2) { - blue = (float)level - 2; - } - - if(blue < 0) { - blue = 0; - } - - r = rr * (float)(level - 1) - red; - g = gg * (float)(level - 1) - green; - b = bb * (float)(level - 1) - blue; - - color = red + green * level + blue * level * level; - - i = color * 3; - j = (color + 1) * 3; - - tmp[0] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[1] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[2] = valF( clut[i] ) * (1 - r) + valF( clut[j] ) * r; - - i = (color + level) * 3; - j = (color + level + 1) * 3; - - tmp[3] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[4] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[5] = valF( clut[i] ) * (1 - r) + valF( clut[j] ) * r; - - outR = tmp[0] * (1 - g) + tmp[3] * g; - outG = tmp[1] * (1 - g) + tmp[4] * g; - outB = tmp[2] * (1 - g) + tmp[5] * g; - - i = (color + level * level) * 3; - j = (color + level * level + 1) * 3; - - tmp[0] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[1] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[2] = valF( clut[i] ) * (1 - r) + valF( clut[j] ) * r; - - i = (color + level + level * level) * 3; - j = (color + level + level * level + 1) * 3; - - tmp[3] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[4] = valF( clut[i++] ) * (1 - r) + valF( clut[j++] ) * r; - tmp[5] = valF( clut[i] ) * (1 - r) + valF( clut[j] ) * r; - - tmp[0] = tmp[0] * (1 - g) + tmp[3] * g; - tmp[1] = tmp[1] * (1 - g) + tmp[4] * g; - tmp[2] = tmp[2] * (1 - g) + tmp[5] * g; - - outR = outR * (1 - b) + tmp[0] * b; - outG = outG * (1 - b) + tmp[1] * b; - outB = outB * (1 - b) + tmp[2] * b; -} - -inline void pos2xy( int pos, int imageSideSize, int &outX, int &outY ) -{ - outX = pos / imageSideSize; - outY = pos % imageSideSize; -} - -void HaldCLUT::correct( Imagefloat &clutImage, int level, float rr, float gg, float bb, float &outR, float &outG, float &outB ) -{ - int color, red, green, blue, i, j; - float tmp[6], r, g, b; - level = level * level; - int imageSideSize = clutImage.getW(); - - red = rr * (float)(level - 1); - - if(red > level - 2) { - red = (float)level - 2; - } - - if(red < 0) { - red = 0; - } - - green = gg * (float)(level - 1); - - if(green > level - 2) { - green = (float)level - 2; - } - - if(green < 0) { - green = 0; - } - - blue = bb * (float)(level - 1); - - if(blue > level - 2) { - blue = (float)level - 2; - } - - if(blue < 0) { - blue = 0; - } - - r = rr * (float)(level - 1) - red; - g = gg * (float)(level - 1) - green; - b = bb * (float)(level - 1) - blue; - - color = red + green * level + blue * level * level; - - - i = color; - j = color + 1; - int xi, yi, xj, yj; - pos2xy( i, imageSideSize, xi, yi ); - pos2xy( j, imageSideSize, xj, yj ); - - tmp[0] = clutImage.r( xi, yi ) * (1 - r) + clutImage.r( xj, yj ) * r; - tmp[1] = clutImage.g( xi, yi ) * (1 - r) + clutImage.g( xj, yj ) * r; - tmp[2] = clutImage.b( xi, yi ) * (1 - r) + clutImage.b( xj, yj ) * r; - - i = color + level; - j = color + level + 1; - pos2xy( i, imageSideSize, xi, yi ); - pos2xy( j, imageSideSize, xj, yj ); - - tmp[3] = clutImage.r( xi, yi ) * (1 - r) + clutImage.r( xj, yj ) * r; - tmp[4] = clutImage.g( xi, yi ) * (1 - r) + clutImage.g( xj, yj ) * r; - tmp[5] = clutImage.b( xi, yi ) * (1 - r) + clutImage.b( xj, yj ) * r; - - outR = tmp[0] * (1 - g) + tmp[3] * g; - outG = tmp[1] * (1 - g) + tmp[4] * g; - outB = tmp[2] * (1 - g) + tmp[5] * g; - - i = color + level * level; - j = color + level * level + 1; - pos2xy( i, imageSideSize, xi, yi ); - pos2xy( j, imageSideSize, xj, yj ); - - tmp[0] = clutImage.r( xi, yi ) * (1 - r) + clutImage.r( xj, yj ) * r; - tmp[1] = clutImage.g( xi, yi ) * (1 - r) + clutImage.g( xj, yj ) * r; - tmp[2] = clutImage.b( xi, yi ) * (1 - r) + clutImage.b( xj, yj ) * r; - - i = color + level + level * level; - j = color + level + level * level + 1; - pos2xy( i, imageSideSize, xi, yi ); - pos2xy( j, imageSideSize, xj, yj ); - - tmp[3] = clutImage.r( xi, yi ) * (1 - r) + clutImage.r( xj, yj ) * r; - tmp[4] = clutImage.g( xi, yi ) * (1 - r) + clutImage.g( xj, yj ) * r; - tmp[5] = clutImage.b( xi, yi ) * (1 - r) + clutImage.b( xj, yj ) * r; - - tmp[0] = tmp[0] * (1 - g) + tmp[3] * g; - tmp[1] = tmp[1] * (1 - g) + tmp[4] * g; - tmp[2] = tmp[2] * (1 - g) + tmp[5] * g; - - outR = outR * (1 - b) + tmp[0] * b; - outG = outG * (1 - b) + tmp[1] * b; - outB = outB * (1 - b) + tmp[2] * b; } diff --git a/rtengine/clutstore.h b/rtengine/clutstore.h index de080b737..7383b597f 100644 --- a/rtengine/clutstore.h +++ b/rtengine/clutstore.h @@ -1,107 +1,72 @@ -#ifndef CLUT_STORE_INCLUDED -#define CLUT_STORE_INCLUDED +#pragma once + +#include +#include #include -#include "../rtgui/threadutils.h" -#include "imagefloat.h" -#include -#include + +#include "cache.h" +#include "alignedbuffer.h" namespace rtengine { -// simple CLUT interface -class CLUT -{ -public: - virtual void getRGB( float r, float g, float b, float &outR, float &outG, float &outB ) const = 0; - virtual Glib::ustring profile() const = 0; -protected: - virtual ~CLUT() {}; -}; - -class HaldCLUT : public CLUT +class HaldCLUT { public: HaldCLUT(); + HaldCLUT(const HaldCLUT& other) = delete; + HaldCLUT& operator =(const HaldCLUT& other) = delete; ~HaldCLUT(); - void load( Glib::ustring filename ); - bool isValid() const; - void getRGB( float r, float g, float b, float &outR, float &outG, float &outB ) const; - Glib::ustring profile() const; + bool load(const Glib::ustring& filename); - typedef std::vector RawClut; // using 8 bit for reduce memory usage - static void correct( const RawClut&, int level, float r, float g, float b, float &outR, float &outG, float &outB ); - static void correct( Imagefloat &clutImage, int level, float rr, float gg, float bb, float &outR, float &outG, float &outB ); - static Imagefloat* generateIdentImage( int level ); - static Imagefloat* loadFile( Glib::ustring filename, Glib::ustring workingColorSpace, int &outLevel ); + explicit operator bool() const; + + Glib::ustring getFilename() const; + Glib::ustring getProfile() const; + + void getRGB( + float strength, + std::size_t line_size, + const float* r, + const float* g, + const float* b, + float* out_rgbx + ) const; + + static void splitClutFilename( + const Glib::ustring& filename, + Glib::ustring& name, + Glib::ustring& extension, + Glib::ustring& profile_name + ); private: - - void loadClut( Imagefloat *img, RawClut &outClut ); - - Imagefloat *m_clutImage; - int m_level; - Glib::ustring m_filename; - Glib::ustring m_profile; + AlignedBuffer clut_image; + unsigned int clut_level; + float flevel_minus_one; + float flevel_minus_two; + Glib::ustring clut_filename; + Glib::ustring clut_profile; }; -// CLUT cache class CLUTStore { public: - CLUTStore(); + static CLUTStore& getInstance(); - CLUT* getClut( const Glib::ustring& filename ); - void releaseClut( const CLUT* clut ); + CLUTStore(const CLUTStore& other) = delete; + CLUTStore& operator =(const CLUTStore& other) = delete; + + std::shared_ptr getClut(const Glib::ustring& filename); void clearCache(); private: - typedef std::map > Cluts; + CLUTStore(); - Cluts m_cluts; - MyMutex m_mutex; + Cache> cache; }; -void splitClutFilename( Glib::ustring filename, Glib::ustring &name, Glib::ustring &extension, Glib::ustring &profileName ); - -}; //namespace rtengine - -extern rtengine::CLUTStore clutStore; - -namespace rtengine -{ - -//support class for automate call of clutStore.releaseClut() -class ClutPtr -{ -public: - ClutPtr() : m_point( 0 ) {} - explicit ClutPtr(CLUT *p) : m_point( p ) {} - ~ClutPtr() - { - clutStore.releaseClut( m_point ); - } - const CLUT* operator-> () const - { - return m_point; - } - operator bool() const - { - return m_point != 0; - } - void set( CLUT *p ) - { - m_point = p; - } - -private: - ClutPtr& operator=(ClutPtr const& cp ); - CLUT *m_point; -}; - -}; //namespace rtengine - -#endif +} diff --git a/rtengine/color.cc b/rtengine/color.cc index db6824486..4e180690e 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -821,6 +821,15 @@ void Color::rgbxyz (float r, float g, float b, float &x, float &y, float &z, con z = ((xyz_rgb[2][0] * r + xyz_rgb[2][1] * g + xyz_rgb[2][2] * b)) ; } +#ifdef __SSE2__ +void Color::rgbxyz (vfloat r, vfloat g, vfloat b, vfloat &x, vfloat &y, vfloat &z, const vfloat xyz_rgb[3][3]) +{ + x = ((xyz_rgb[0][0] * r + xyz_rgb[0][1] * g + xyz_rgb[0][2] * b)) ; + y = ((xyz_rgb[1][0] * r + xyz_rgb[1][1] * g + xyz_rgb[1][2] * b)) ; + z = ((xyz_rgb[2][0] * r + xyz_rgb[2][1] * g + xyz_rgb[2][2] * b)) ; +} +#endif + void Color::xyz2rgb (float x, float y, float z, float &r, float &g, float &b, const double rgb_xyz[3][3]) { //Transform to output color. Standard sRGB is D65, but internal representation is D50 @@ -1837,21 +1846,13 @@ void Color::transitred (const float HH, float const Chprov1, const float dred, c if(HH >= 0.15f && HH < 1.3f) { if (Chprov1 < dred) { factor = factorskin; - } else if(Chprov1 < (dred + protect_red)) - // factor = (factorsat-factorskin)/protect_red*Chprov1+factorsat-(dred+protect_red)*(factorsat-factorskin)/protect_red; - // optimized formula - { + } else if(Chprov1 < (dred + protect_red)) { factor = ((factorsat - factorskin) * Chprov1 + factorsat * protect_red - (dred + protect_red) * (factorsat - factorskin)) / protect_red; } - } - // then test if chroma is in the extanded range - else if ( HH > (0.15f - deltaHH) || HH < (1.3f + deltaHH) ) { + } else if ( HH > (0.15f - deltaHH) && HH < (1.3f + deltaHH) ) { // test if chroma is in the extended range if (Chprov1 < dred) { factor = factorskinext; // C=dred=55 => real max of skin tones - } else if (Chprov1 < (dred + protect_red)) // transition - // factor = (factorsat-factorskinext)/protect_red*Chprov1+factorsat-(dred+protect_red)*(factorsat-factorskinext)/protect_red; - // optimized formula - { + } else if (Chprov1 < (dred + protect_red)) {// transition factor = ((factorsat - factorskinext) * Chprov1 + factorsat * protect_red - (dred + protect_red) * (factorsat - factorskinext)) / protect_red; } } diff --git a/rtengine/color.h b/rtengine/color.h index 3f78692d8..be7740e2a 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -325,7 +325,9 @@ public: */ static void rgbxyz (float r, float g, float b, float &x, float &y, float &z, const double xyz_rgb[3][3]); static void rgbxyz (float r, float g, float b, float &x, float &y, float &z, const float xyz_rgb[3][3]); - +#ifdef __SSE2__ + static void rgbxyz (vfloat r, vfloat g, vfloat b, vfloat &x, vfloat &y, vfloat &z, const vfloat xyz_rgb[3][3]); +#endif /** * @brief Convert Lab in xyz @@ -1077,6 +1079,10 @@ public: { return gammatab_srgb[x]; } + static inline float gamma_srgbclipped (float x) + { + return gamma2curve[x]; + } static inline float gamma (float x) { return gammatab[x]; diff --git a/rtengine/curves.cc b/rtengine/curves.cc index 95185c4c8..9b68cc9ee 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -1024,6 +1024,39 @@ void RetinextransmissionCurve::Set(const std::vector &curvePoints) } } + +RetinexgaintransmissionCurve::RetinexgaintransmissionCurve() {}; + +void RetinexgaintransmissionCurve::Reset() +{ + lutgaintransmission.reset(); +} + +void RetinexgaintransmissionCurve::Set(const Curve &pCurve) +{ + if (pCurve.isIdentity()) { + lutgaintransmission.reset(); // raise this value if the quality suffers from this number of samples + return; + } + + lutgaintransmission(501); // raise this value if the quality suffers from this number of samples + + for (int i = 0; i < 501; i++) { + lutgaintransmission[i] = pCurve.getVal(double(i) / 500.); + } +} + +void RetinexgaintransmissionCurve::Set(const std::vector &curvePoints) +{ + if (!curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) { + FlatCurve tcurve(curvePoints, false, CURVES_MIN_POLY_POINTS / 2); + tcurve.setIdentityValue(0.); + Set(tcurve); + } else { + Reset(); + } +} + void ToneCurve::Reset() { lutToneCurve.reset(); diff --git a/rtengine/curves.h b/rtengine/curves.h index 64bf3ed1a..a06502c71 100644 --- a/rtengine/curves.h +++ b/rtengine/curves.h @@ -452,6 +452,30 @@ public: } }; +class RetinexgaintransmissionCurve +{ +private: + LUTf lutgaintransmission; // 0xffff range + void Set(const Curve &pCurve); + +public: + virtual ~RetinexgaintransmissionCurve() {}; + RetinexgaintransmissionCurve(); + + void Reset(); + void Set(const Curve *pCurve); + void Set(const std::vector &curvePoints); + float operator[](float index) const + { + return lutgaintransmission[index]; + } + + operator bool (void) const + { + return lutgaintransmission; + } +}; + class ToneCurve diff --git a/rtengine/dcraw.c b/rtengine/dcraw.c index cf1afe4ac..441f967da 100644 --- a/rtengine/dcraw.c +++ b/rtengine/dcraw.c @@ -1,6 +1,6 @@ /* dcraw.c -- Dave Coffin's raw photo decoder - Copyright 1997-2015 by Dave Coffin, dcoffin a cybercom o net + Copyright 1997-2016 by Dave Coffin, dcoffin a cybercom o net This is a command-line ANSI C program to convert raw photos from any digital camera on any computer running any operating system. @@ -19,11 +19,11 @@ *If you have not modified dcraw.c in any way, a link to my homepage qualifies as "full source code". - $Revision: 1.475 $ - $Date: 2015/04/11 00:08:36 $ + $Revision: 1.477 $ + $Date: 2016/05/10 21:30:43 $ */ -#define DCRAW_VERSION "9.25" +#define DCRAW_VERSION "9.27" #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -89,15 +89,6 @@ typedef unsigned long long UINT64; #define _(String) (String) #endif -#ifdef LJPEG_DECODE -#error Please compile dcraw.c by itself. -#error Do not link it with ljpeg_decode. -#endif - -#ifndef LONG_BIT -#define LONG_BIT (8 * sizeof (long)) -#endif - #if !defined(uchar) #define uchar unsigned char #endif @@ -158,6 +149,7 @@ struct decode { struct tiff_ifd { int width, height, bps, comp, phint, offset, flip, samples, bytes; int tile_width, tile_length; + float shutter; } tiff_ifd[10]; struct ph1 { @@ -179,7 +171,7 @@ struct ph1 { #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define LIM(x,min,max) MAX(min,MIN(x,max)) #define ULIM(x,y,z) ((y) < (z) ? LIM(x,y,z) : LIM(x,z,y)) -#define CLIP(x) LIM(x,0,65535) +#define CLIP(x) LIM((int)(x),0,65535) #define SWAP(a,b) { a=a+b; b=a-b; a=a-b; } /* @@ -813,27 +805,22 @@ void CLASS canon_load_raw() FORC(2) free (huff[c]); } -/* - Not a full implementation of Lossless JPEG, just - enough to decode Canon, Kodak and Adobe DNG images. - */ struct jhead { - int bits, high, wide, clrs, sraw, psv, restart, vpred[6]; - ushort *huff[6], *free[4], *row; + int algo, bits, high, wide, clrs, sraw, psv, restart, vpred[6]; + ushort quant[64], idct[64], *huff[20], *free[20], *row; }; int CLASS ljpeg_start (struct jhead *jh, int info_only) { - int c, tag, len; + ushort c, tag, len; uchar data[0x10000]; const uchar *dp; memset (jh, 0, sizeof *jh); jh->restart = INT_MAX; - fread (data, 2, 1, ifp); - if (data[1] != 0xd8) return 0; + if ((fgetc(ifp),fgetc(ifp)) != 0xd8) return 0; do { - fread (data, 2, 2, ifp); + if (!fread (data, 2, 2, ifp)) return 0; tag = data[0] << 8 | data[1]; len = (data[2] << 8 | data[3]) - 2; if (tag <= 0xff00) return 0; @@ -841,7 +828,9 @@ int CLASS ljpeg_start (struct jhead *jh, int info_only) switch (tag) { case 0xffc3: jh->sraw = ((data[7] >> 4) * (data[7] & 15) - 1) & 3; + case 0xffc1: case 0xffc0: + jh->algo = tag & 0xff; jh->bits = data[0]; jh->high = data[1] << 8 | data[2]; jh->wide = data[3] << 8 | data[4]; @@ -850,20 +839,25 @@ int CLASS ljpeg_start (struct jhead *jh, int info_only) break; case 0xffc4: if (info_only) break; - for (dp = data; dp < data+len && (c = *dp++) < 4; ) + for (dp = data; dp < data+len && !((c = *dp++) & -20); ) jh->free[c] = jh->huff[c] = make_decoder_ref (&dp); break; case 0xffda: jh->psv = data[1+data[0]*2]; jh->bits -= data[3+data[0]*2] & 15; break; + case 0xffdb: + FORC(64) jh->quant[c] = data[c*2+1] << 8 | data[c*2+2]; + break; case 0xffdd: jh->restart = data[0] << 8 | data[1]; } } while (tag != 0xffda); + if (jh->bits > 16 || jh->clrs > 6 || + !jh->bits || !jh->high || !jh->wide || !jh->clrs) return 0; if (info_only) return 1; - if (jh->clrs > 6 || !jh->huff[0]) return 0; - FORC(5) if (!jh->huff[c+1]) jh->huff[c+1] = jh->huff[c]; + if (!jh->huff[0]) return 0; + FORC(19) if (!jh->huff[c+1]) jh->huff[c+1] = jh->huff[c]; if (jh->sraw) { FORC(4) jh->huff[2+c] = jh->huff[1]; FORC(jh->sraw) jh->huff[1+c] = jh->huff[0]; @@ -1042,23 +1036,59 @@ void CLASS adobe_copy_pixel (unsigned row, unsigned col, ushort **rp) { int c; - if (is_raw == 2 && shot_select) (*rp)++; + if (tiff_samples == 2 && shot_select) (*rp)++; if (raw_image) { if (row < raw_height && col < raw_width) RAW(row,col) = curve[**rp]; - *rp += is_raw; + *rp += tiff_samples; } else { if (row < height && col < width) FORC(tiff_samples) image[row*width+col][c] = curve[(*rp)[c]]; *rp += tiff_samples; } - if (is_raw == 2 && shot_select) (*rp)--; + if (tiff_samples == 2 && shot_select) (*rp)--; +} + +void CLASS ljpeg_idct (struct jhead *jh) +{ + int c, i, j, len, skip, coef; + float work[3][8][8]; + static float cs[106] = { 0 }; + static const uchar zigzag[80] = + { 0, 1, 8,16, 9, 2, 3,10,17,24,32,25,18,11, 4, 5,12,19,26,33, + 40,48,41,34,27,20,13, 6, 7,14,21,28,35,42,49,56,57,50,43,36, + 29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54, + 47,55,62,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 }; + + if (!cs[0]) + FORC(106) cs[c] = cos((c & 31)*M_PI/16)/2; + memset (work, 0, sizeof work); + work[0][0][0] = jh->vpred[0] += ljpeg_diff (jh->huff[0]) * jh->quant[0]; + for (i=1; i < 64; i++ ) { + len = gethuff (jh->huff[16]); + i += skip = len >> 4; + if (!(len &= 15) && skip < 15) break; + coef = getbits(len); + if ((coef & (1 << (len-1))) == 0) + coef -= (1 << len) - 1; + ((float *)work)[zigzag[i]] = coef * jh->quant[i]; + } + FORC(8) work[0][0][c] *= M_SQRT1_2; + FORC(8) work[0][c][0] *= M_SQRT1_2; + for (i=0; i < 8; i++) + for (j=0; j < 8; j++) + FORC(8) work[1][i][j] += work[0][i][c] * cs[(j*2+1)*c]; + for (i=0; i < 8; i++) + for (j=0; j < 8; j++) + FORC(8) work[2][i][j] += work[1][c][j] * cs[(i*2+1)*c]; + + FORC(64) jh->idct[c] = CLIP(((float *)work[2])[c]+0.5); } void CLASS lossless_dng_load_raw() { - unsigned save, trow=0, tcol=0, jwide, jrow, jcol, row, col; + unsigned save, trow=0, tcol=0, jwide, jrow, jcol, row, col, i, j; struct jhead jh; ushort *rp; @@ -1069,14 +1099,32 @@ void CLASS lossless_dng_load_raw() if (!ljpeg_start (&jh, 0)) break; jwide = jh.wide; if (filters) jwide *= jh.clrs; - jwide /= is_raw; - for (row=col=jrow=0; jrow < jh.high; jrow++) { - rp = ljpeg_row (jrow, &jh); - for (jcol=0; jcol < jwide; jcol++) { - adobe_copy_pixel (trow+row, tcol+col, &rp); - if (++col >= tile_width || col >= raw_width) - row += 1 + (col = 0); - } + jwide /= MIN (is_raw, tiff_samples); + switch (jh.algo) { + case 0xc1: + jh.vpred[0] = 16384; + getbits(-1); + for (jrow=0; jrow+7 < jh.high; jrow += 8) { + for (jcol=0; jcol+7 < jh.wide; jcol += 8) { + ljpeg_idct (&jh); + rp = jh.idct; + row = trow + jcol/tile_width + jrow*2; + col = tcol + jcol%tile_width; + for (i=0; i < 16; i+=2) + for (j=0; j < 8; j++) + adobe_copy_pixel (row+i, col+j, &rp); + } + } + break; + case 0xc3: + for (row=col=jrow=0; jrow < jh.high; jrow++) { + rp = ljpeg_row (jrow, &jh); + for (jcol=0; jcol < jwide; jcol++) { + adobe_copy_pixel (trow+row, tcol+col, &rp); + if (++col >= tile_width || col >= raw_width) + row += 1 + (col = 0); + } + } } fseek (ifp, save+4, SEEK_SET); if ((tcol += tile_width) >= raw_width) @@ -1721,7 +1769,7 @@ void CLASS phase_one_load_raw_c() pixel[col] = curve[pixel[col]]; } for (col=0; col < raw_width; col++) { - i = (pixel[col] << 2) - ph1.black + i = (pixel[col] << 2*(ph1.format != 8)) - ph1.black + cblack[row][col >= ph1.split_col] + rblack[col][row >= ph1.split_row]; if (i > 0) RAW(row,col) = i; @@ -2813,6 +2861,8 @@ void CLASS smal_decode_segment (unsigned seg[2][2], int holes) fseek (ifp, seg[0][1]+1, SEEK_SET); getbits(-1); + if (seg[1][0] > raw_width*raw_height) + seg[1][0] = raw_width*raw_height; for (pix=seg[0][0]; pix < seg[1][0]; pix++) { for (s=0; s < 3; s++) { data = data << nbits | getbits(nbits); @@ -5261,7 +5311,7 @@ nf: order = 0x4949; FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get4(); } if (tag == 0x3d && type == 3 && len == 4) - FORC4 cblack[c ^ c >> 1] = get2() >> (14-tiff_ifd[2].bps); + FORC4 cblack[c ^ c >> 1] = get2() >> (14-tiff_bps); if (tag == 0x81 && type == 4) { data_offset = get4(); fseek (ifp, data_offset + 41, SEEK_SET); @@ -5291,7 +5341,8 @@ nf: order = 0x4949; break; case 102: fseek (ifp, 6, SEEK_CUR); - goto get2_rggb; + FORC4 cam_mul[c ^ (c >> 1)] = get2(); + break; case 103: fseek (ifp, 16, SEEK_CUR); FORC4 cam_mul[c] = get2(); @@ -5325,7 +5376,7 @@ nf: order = 0x4949; if (tag == 0x200 && len == 4) FORC4 cblack[c ^ c >> 1] = get2(); if (tag == 0x201 && len == 4) - goto get2_rggb; + FORC4 cam_mul[c ^ (c >> 1)] = get2(); if (tag == 0x220 && type == 7) meta_offset = ftell(ifp); if (tag == 0x401 && type == 4 && len == 4) @@ -5371,7 +5422,7 @@ get2_256: } if ((tag | 0x70) == 0x2070 && (type == 4 || type == 13)) fseek (ifp, get4()+base, SEEK_SET); - if (tag == 0x2020) + if (tag == 0x2020 && !strncmp(buf,"OLYMP",5)) parse_thumb_note (base, 257, 258); if (tag == 0x2040) parse_makernote (base, 0x2040); @@ -5382,11 +5433,12 @@ get2_256: if (tag == 0x4001 && len > 500) { i = len == 582 ? 50 : len == 653 ? 68 : len == 5120 ? 142 : 126; fseek (ifp, i, SEEK_CUR); -get2_rggb: FORC4 cam_mul[c ^ (c >> 1)] = get2(); - i = len >> 3 == 164 || len == 1506 ? 112:22; - fseek (ifp, i, SEEK_CUR); - FORC4 sraw_mul[c ^ (c >> 1)] = get2(); + for (i+=18; i <= len; i+=10) { + get2(); + FORC4 sraw_mul[c ^ (c >> 1)] = get2(); + if (sraw_mul[1] == 1170) break; + } } if (tag == 0x4021 && get4() && get4()) FORC4 cam_mul[c] = 1024; @@ -5439,12 +5491,14 @@ void CLASS parse_exif (int base) while (entries--) { tiff_get (base, &tag, &type, &len, &save); switch (tag) { - case 33434: shutter = getreal(type); break; + case 33434: tiff_ifd[tiff_nifds-1].shutter = + shutter = getreal(type); break; case 33437: aperture = getreal(type); break; case 34855: iso_speed = get2(); break; case 36867: case 36868: get_timestamp(0); break; case 37377: if ((expo = -getreal(type)) < 128) + tiff_ifd[tiff_nifds-1].shutter = shutter = pow (2, expo); break; case 37378: aperture = pow (2, getreal(type)/2); break; case 37386: focal_len = getreal(type); break; @@ -5682,6 +5736,8 @@ int CLASS parse_tiff_ifd (int base) case 61443: tiff_ifd[ifd].samples = len & 7; tiff_ifd[ifd].bps = getint(type); + if (tiff_bps < tiff_ifd[ifd].bps) + tiff_bps = tiff_ifd[ifd].bps; break; case 61446: raw_height = 0; @@ -5843,7 +5899,7 @@ int CLASS parse_tiff_ifd (int base) parse_kodak_ifd (base); break; case 33434: /* ExposureTime */ - shutter = getreal(type); + tiff_ifd[ifd].shutter = shutter = getreal(type); break; case 33437: /* FNumber */ aperture = getreal(type); @@ -5971,6 +6027,14 @@ int CLASS parse_tiff_ifd (int base) if (!make[0]) strcpy (make, "DNG"); is_raw = 1; break; + case 50708: /* UniqueCameraModel */ + if (model[0]) break; + fgets (make, 64, ifp); + if ((cp = strchr(make,' '))) { + strcpy(model,cp+1); + *cp = 0; + } + break; case 50710: /* CFAPlaneColor */ if (filters == 9) break; if (len > 4) len = 4; @@ -5984,10 +6048,7 @@ guess_cfa_pc: filters -= !filters; break; case 50711: /* CFALayout */ - if (get2() == 2) { - fuji_width = 1; - filters = 0x49494949; - } + if (get2() == 2) fuji_width = 1; break; case 291: case 50712: /* LinearizationTable */ @@ -6010,7 +6071,7 @@ guess_cfa_pc: break; case 50715: /* BlackLevelDeltaH */ case 50716: /* BlackLevelDeltaV */ - for (num=i=0; i < len; i++) + for (num=i=0; i < (len & 0xffff); i++) num += getreal(type); black += num/len + 0.5; break; @@ -6128,7 +6189,7 @@ int CLASS parse_tiff (int base) void CLASS apply_tiff() { - int max_samp=0, raw=-1, thm=-1, i; + int max_samp=0, ties=0, os, ns, raw=-1, thm=-1, i; struct jhead jh; thumb_misc = 16; @@ -6140,13 +6201,25 @@ void CLASS apply_tiff() thumb_height = jh.high; } } + for (i=tiff_nifds; i--; ) { + if (tiff_ifd[i].shutter) + shutter = tiff_ifd[i].shutter; + tiff_ifd[i].shutter = shutter; + } for (i=0; i < tiff_nifds; i++) { if (max_samp < tiff_ifd[i].samples) max_samp = tiff_ifd[i].samples; if (max_samp > 3) max_samp = 3; + os = raw_width*raw_height; + ns = tiff_ifd[i].width*tiff_ifd[i].height; + if (tiff_bps) { + os *= tiff_bps; + ns *= tiff_ifd[i].bps; + } if ((tiff_ifd[i].comp != 6 || tiff_ifd[i].samples != 3) && (tiff_ifd[i].width | tiff_ifd[i].height) < 0x10000 && - tiff_ifd[i].width*tiff_ifd[i].height > raw_width*raw_height) { + ns && ((ns > os && (ties = 1)) || + (ns == os && shot_select == ties++))) { raw_width = tiff_ifd[i].width; raw_height = tiff_ifd[i].height; tiff_bps = tiff_ifd[i].bps; @@ -6156,9 +6229,11 @@ void CLASS apply_tiff() tiff_samples = tiff_ifd[i].samples; tile_width = tiff_ifd[i].tile_width; tile_length = tiff_ifd[i].tile_length; + shutter = tiff_ifd[i].shutter; raw = i; } } + if (is_raw == 1 && ties) is_raw = ties; if (!tile_width ) tile_width = INT_MAX; if (!tile_length) tile_length = INT_MAX; for (i=tiff_nifds; i--; ) @@ -6235,8 +6310,8 @@ void CLASS apply_tiff() if (!dng_version) if ( (tiff_samples == 3 && tiff_ifd[raw].bytes && tiff_bps != 14 && (tiff_compress & -16) != 32768) - || (tiff_bps == 8 && !strcasestr(make,"Kodak") && - !strstr(model2,"DEBUG RAW"))) + || (tiff_bps == 8 && strncmp(make,"Phase",5) && + !strcasestr(make,"Kodak") && !strstr(model2,"DEBUG RAW"))) is_raw = 0; for (i=0; i < tiff_nifds; i++) if (i != raw && tiff_ifd[i].samples == max_samp && @@ -6377,9 +6452,7 @@ void CLASS ciff_block_1030() bitbuf = bitbuf << 16 | (get2() ^ key[i++ & 1]); vbits += 16; } - white[row][col] = - bitbuf << (LONG_BIT - vbits) >> (LONG_BIT - bpp); - vbits -= bpp; + white[row][col] = bitbuf >> (vbits -= bpp) & ~(-1 << bpp); } } @@ -6658,7 +6731,7 @@ void CLASS parse_fuji (int offset) } else if (tag == 0xc000) { c = order; order = 0x4949; - if ((tag = get4()) > 10000) tag = get4(); + while ((tag = get4()) > raw_width); width = tag; height = get4(); order = c; @@ -6680,7 +6753,7 @@ int CLASS parse_jpeg (int offset) order = 0x4d4d; len = get2() - 2; save = ftell(ifp); - if (mark == 0xc0 || mark == 0xc3) { + if (mark == 0xc0 || mark == 0xc3 || mark == 0xc9) { fgetc(ifp); raw_height = get2(); raw_width = get2(); @@ -6974,8 +7047,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9805,-2689,-1312,-5803,13064,3068,-2438,3075,8775 } }, { "Canon EOS D60", 0, 0xfa0, { 6188,-1341,-890,-7168,14489,2937,-2640,3228,8483 } }, - { "Canon EOS 5DS", 0, 0x3c96, /* DJC */ - { 6885,-753,-856,-4416,11752,2665,-1266,2393,5468 } }, + { "Canon EOS 5DS", 0, 0x3c96, + { 6250,-711,-808,-5153,12794,2636,-1249,2198,5610 } }, { "Canon EOS 5D Mark III", 0, 0x3c80, { 6722,-635,-963,-4287,12460,2028,-908,2162,5668 } }, { "Canon EOS 5D Mark II", 0, 0x3cf0, @@ -7004,6 +7077,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6719,-994,-925,-4408,12426,2211,-887,2129,6051 } }, { "Canon EOS 70D", 0, 0x3bc7, { 7034,-804,-1014,-4420,12564,2058,-851,1994,5758 } }, + { "Canon EOS 80D", 0, 0, + { 7457,-671,-937,-4849,12495,2643,-1213,2354,5492 } }, { "Canon EOS 100D", 0, 0x350f, { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, { "Canon EOS 300D", 0, 0xfa0, @@ -7024,12 +7099,22 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, { "Canon EOS 700D", 0, 0x3c00, { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, + { "Canon EOS 750D", 0, 0x368e, + { 6362,-823,-847,-4426,12109,2616,-743,1857,5635 } }, + { "Canon EOS 760D", 0, 0x350f, + { 6362,-823,-847,-4426,12109,2616,-743,1857,5635 } }, { "Canon EOS 1000D", 0, 0xe43, { 6771,-1139,-977,-7818,15123,2928,-1244,1437,7533 } }, { "Canon EOS 1100D", 0, 0x3510, { 6444,-904,-893,-4563,12308,2535,-903,2016,6728 } }, { "Canon EOS 1200D", 0, 0x37c2, { 6461,-907,-882,-4300,12184,2378,-819,1944,5931 } }, + { "Canon EOS 1300D", 0, 0x3510, + { 6939,-1016,-866,-4428,12473,2177,-1175,2178,6162 } }, + { "Canon EOS M3", 0, 0, + { 6362,-823,-847,-4426,12109,2616,-743,1857,5635 } }, + { "Canon EOS M10", 0, 0, + { 6400,-480,-888,-5294,13416,2047,-1296,2203,6137 } }, { "Canon EOS M", 0, 0, { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, { "Canon EOS-1Ds Mark III", 0, 0x3bb0, @@ -7048,6 +7133,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 4374,3631,-1743,-7520,15212,2472,-2892,3632,8161 } }, { "Canon EOS-1D C", 0, 0x3c4e, { 6847,-614,-1014,-4669,12737,2139,-1197,2488,6846 } }, + { "Canon EOS-1D X Mark II", 0, 0, + { 7596,-978,-967,-4808,12571,2503,-1398,2567,5752 } }, { "Canon EOS-1D X", 0, 0x3c4e, { 6847,-614,-1014,-4669,12737,2139,-1197,2488,6846 } }, { "Canon EOS-1D", 0, 0xe20, @@ -7076,14 +7163,20 @@ void CLASS adobe_coeff (const char *make, const char *model) { -4778,9467,2172,4743,-1141,4344,-5146,9908,6077,-1566,11051,557 } }, { "Canon PowerShot G2", 0, 0, { 9087,-2693,-1049,-6715,14382,2537,-2291,2819,7790 } }, + { "Canon PowerShot G3 X", 0, 0, + { 9701,-3857,-921,-3149,11537,1817,-786,1817,5147 } }, { "Canon PowerShot G3", 0, 0, { 9212,-2781,-1073,-6573,14189,2605,-2300,2844,7664 } }, + { "Canon PowerShot G5 X", 0, 0, + { 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 } }, { "Canon PowerShot G5", 0, 0, { 9757,-2872,-933,-5972,13861,2301,-1622,2328,7212 } }, { "Canon PowerShot G6", 0, 0, { 9877,-3775,-871,-7613,14807,3072,-1448,1305,7485 } }, { "Canon PowerShot G7 X", 0, 0, { 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 } }, + { "Canon PowerShot G9 X", 0, 0, + { 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 } }, { "Canon PowerShot G9", 0, 0, { 7368,-2141,-598,-5621,13254,2625,-1418,1696,5743 } }, { "Canon PowerShot Pro1", 0, 0, @@ -7142,6 +7235,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 14134,-5576,-1527,-1991,10719,1273,-1158,1929,3581 } }, { "Canon PowerShot SX220", 0, 0, /* DJC */ { 13898,-5076,-1447,-1405,10109,1297,-244,1860,3687 } }, + { "Canon IXUS 160", 0, 0, /* DJC */ + { 11657,-3781,-1136,-3544,11262,2283,-160,1219,4700 } }, { "Casio EX-S20", 0, 0, /* DJC */ { 11634,-3924,-1128,-4968,12954,2015,-1588,2648,7206 } }, { "Casio EX-Z750", 0, 0, /* DJC */ @@ -7156,6 +7251,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 20183,-4295,-423,-3940,15330,3985,-280,4870,9800 } }, { "Contax N Digital", 0, 0xf1e, { 7777,1285,-1053,-9280,16543,2916,-3677,5679,7060 } }, + { "DXO ONE", 0, 0, + { 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 } }, { "Epson R-D1", 0, 0, { 6827,-1878,-732,-8429,16012,2564,-704,592,7145 } }, { "Fujifilm E550", 0, 0, @@ -7236,25 +7333,31 @@ void CLASS adobe_coeff (const char *make, const char *model) { 11768,-4971,-1133,-4904,12927,2183,-480,1723,4605 } }, { "Fujifilm X30", 0, 0, { 12328,-5256,-1144,-4469,12927,1675,-87,1291,4351 } }, + { "Fujifilm X70", 0, 0, + { 10450,-4329,-878,-3217,11105,2421,-752,1758,6519 } }, { "Fujifilm X-Pro1", 0, 0, { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, + { "Fujifilm X-Pro2", 0, 0, + { 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 } }, { "Fujifilm X-A1", 0, 0, { 11086,-4555,-839,-3512,11310,2517,-815,1341,5940 } }, { "Fujifilm X-A2", 0, 0, { 10763,-4560,-917,-3346,11311,2322,-475,1135,5843 } }, { "Fujifilm X-E1", 0, 0, { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, + { "Fujifilm X-E2S", 0, 0, + { 11562,-5118,-961,-3022,11007,2311,-525,1569,6097 } }, { "Fujifilm X-E2", 0, 0, { 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 } }, { "Fujifilm X-M1", 0, 0, { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, { "Fujifilm X-S1", 0, 0, { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, - { "Fujifilm X-T1", 0, 0, + { "Fujifilm X-T1", 0, 0, /* also X-T10 */ { 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 } }, { "Fujifilm XF1", 0, 0, { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, - { "Fujifilm XQ", 0, 0, // XQ1 and XQ2 + { "Fujifilm XQ", 0, 0, /* XQ1 and XQ2 */ { 9252,-2704,-1064,-5893,14265,1717,-1101,2341,4349 } }, { "Imacon Ixpress", 0, 0, /* DJC */ { 7025,-1415,-704,-5188,13765,1424,-1248,2742,6038 } }, @@ -7396,8 +7499,12 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 } }, { "Nikon D5500", 0, 0, { 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 } }, + { "Nikon D500", 0, 0, + { 8813,-3210,-1036,-4703,12868,2021,-1054,1940,6129 } }, { "Nikon D50", 0, 0, { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } }, + { "Nikon D5", 0, 0, + { 9200,-3522,-992,-5755,13803,2117,-753,1486,6338 } }, { "Nikon D600", 0, 0x3e07, { 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 } }, { "Nikon D610", 0, 0, @@ -7408,8 +7515,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } }, { "Nikon D7100", 0, 0, { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } }, - { "Nikon D7200", 0, 0, /* DJC */ - { 6111,-2759,-358,-5108,10766,4343,-769,1691,8030 } }, + { "Nikon D7200", 0, 0, + { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } }, { "Nikon D750", 0, 0, { 9020,-2890,-715,-4535,12436,2348,-934,1919,7086 } }, { "Nikon D700", 0, 0, @@ -7474,8 +7581,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 } }, { "Nikon 1 J4", 0, 0, { 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 } }, - { "Nikon 1 J5", 0, 0, /* DJC */ - { 2621,-856,500,-4471,8761,5711,-1321,2644,11945 } }, + { "Nikon 1 J5", 0, 0, + { 7520,-2518,-645,-3844,12102,1945,-913,2249,6835 } }, { "Nikon 1 S2", 200, 0, { 6612,-1342,-618,-3338,11055,2623,-174,1792,5075 } }, { "Nikon 1 V2", 0, 0, @@ -7486,6 +7593,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } }, { "Nikon 1 ", 0, 0, /* J1, J2, S1, V1 */ { 8994,-2667,-865,-4594,12324,2552,-699,1786,6260 } }, + { "Olympus AIR A01", 0, 0, + { 8992,-3093,-639,-2563,10721,2122,-437,1270,5473 } }, { "Olympus C5050", 0, 0, { 10508,-3124,-1273,-6079,14294,1901,-1653,2306,6237 } }, { "Olympus C5060", 0, 0, @@ -7556,7 +7665,7 @@ void CLASS adobe_coeff (const char *make, const char *model) { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } }, { "Olympus E-PM2", 0, 0, { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, - { "Olympus E-M10", 0, 0, + { "Olympus E-M10", 0, 0, /* also E-M10 Mark II */ { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, { "Olympus E-M1", 0, 0, { 7687,-1984,-606,-4327,11928,2721,-1381,2339,6452 } }, @@ -7564,6 +7673,10 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 } }, { "Olympus E-M5", 0, 0xfe1, { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, + { "Olympus PEN-F", 0, 0, + { 9476,-3182,-765,-2613,10958,1893,-449,1315,5268 } }, + { "Olympus SH-2", 0, 0, + { 10156,-3425,-1077,-2611,11177,1624,-385,1592,5080 } }, { "Olympus SP350", 0, 0, { 12078,-4836,-1069,-6671,14306,2578,-786,939,7418 } }, { "Olympus SP3", 0, 0, @@ -7580,6 +7693,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 11522,-4044,-1146,-4736,12172,2904,-988,1829,6039 } }, { "Olympus STYLUS1", 0, 0, { 8360,-2420,-880,-3928,12353,1739,-1381,2416,5173 } }, + { "Olympus TG-4", 0, 0, + { 11426,-4159,-1126,-2066,10678,1593,-120,1327,4998 } }, { "Olympus XZ-10", 0, 0, { 9777,-3483,-925,-2886,11297,1800,-602,1663,5134 } }, { "Olympus XZ-1", 0, 0, @@ -7614,6 +7729,12 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8843,-2837,-625,-5025,12644,2668,-411,1234,7410 } }, { "Pentax K-r", 0, 0, { 9895,-3077,-850,-5304,13035,2521,-883,1768,6936 } }, + { "Pentax K-1", 0, 0, + { 8566,-2746,-1201,-3612,12204,1550,-893,1680,6264 } }, + { "Pentax K-30", 0, 0, + { 8710,-2632,-1167,-3995,12301,1881,-981,1719,6535 } }, + { "Pentax K-3 II", 0, 0, + { 8626,-2607,-1155,-3995,12301,1881,-1039,1822,6925 } }, { "Pentax K-3", 0, 0, { 7415,-2052,-721,-5186,12788,2682,-1446,2157,6773 } }, { "Pentax K-5 II", 0, 0, @@ -7624,6 +7745,10 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9142,-2947,-678,-8648,16967,1663,-2224,2898,8615 } }, { "Pentax K-S1", 0, 0, { 8512,-3211,-787,-4167,11966,2487,-638,1288,6054 } }, + { "Pentax K-S2", 0, 0, + { 8662,-3280,-798,-3928,11771,2444,-586,1232,6054 } }, + { "Pentax Q-S1", 0, 0, + { 12995,-5593,-1107,-1879,10139,2027,-64,1233,4919 } }, { "Pentax 645D", 0, 0x3e00, { 10646,-3593,-1158,-3329,11699,1831,-667,2874,6287 } }, { "Panasonic DMC-CM1", 15, 0, @@ -7634,6 +7759,10 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9932,-3060,-935,-5809,13331,2753,-1267,2155,5575 } }, { "Panasonic DMC-FZ28", 15, 0xf96, { 10109,-3488,-993,-5412,12812,2916,-1305,2140,5543 } }, + { "Panasonic DMC-FZ330", 15, 0, + { 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 } }, + { "Panasonic DMC-FZ300", 15, 0, + { 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 } }, { "Panasonic DMC-FZ30", 0, 0xf94, { 10976,-4029,-1141,-7918,15491,2600,-1670,2071,8246 } }, { "Panasonic DMC-FZ3", 15, 0, @@ -7714,6 +7843,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 7798,-2562,-740,-3879,11584,2613,-1055,2248,5434 } }, { "Panasonic DMC-G6", 15, 0xfff, { 8294,-2891,-651,-3869,11590,2595,-1183,2267,5352 } }, + { "Panasonic DMC-G7", 15, 0xfff, + { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, { "Panasonic DMC-GF1", 15, 0xf92, { 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } }, { "Panasonic DMC-GF2", 15, 0xfff, @@ -7726,6 +7857,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8130,-2801,-946,-3520,11289,2552,-1314,2511,5791 } }, { "Panasonic DMC-GF7", 15, 0, { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, + { "Panasonic DMC-GF8", 15, 0, + { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, { "Panasonic DMC-GH1", 15, 0xf92, { 6299,-1466,-532,-6535,13852,2969,-2331,3112,5984 } }, { "Panasonic DMC-GH2", 15, 0xf95, @@ -7742,6 +7875,12 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6763,-1919,-863,-3868,11515,2684,-1216,2387,5879 } }, { "Panasonic DMC-GX7", 15, 0, { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, + { "Panasonic DMC-GX8", 15, 0, + { 7564,-2263,-606,-3148,11239,2177,-540,1435,4853 } }, + { "Panasonic DMC-TZ1", 15, 0, + { 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 } }, + { "Panasonic DMC-ZS1", 15, 0, + { 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 } }, { "Panasonic DMC-TZ6", 15, 0, { 8607,-2822,-808,-3755,11930,2049,-820,2060,5224 } }, { "Panasonic DMC-ZS4", 15, 0, @@ -7750,6 +7889,20 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8802,-3135,-789,-3151,11468,1904,-550,1745,4810 } }, { "Panasonic DMC-ZS5", 15, 0, { 8802,-3135,-789,-3151,11468,1904,-550,1745,4810 } }, + { "Panasonic DMC-TZ8", 15, 0, + { 8550,-2908,-842,-3195,11529,1881,-338,1603,4631 } }, + { "Panasonic DMC-ZS6", 15, 0, + { 8550,-2908,-842,-3195,11529,1881,-338,1603,4631 } }, + { "Leica S (Typ 007)", 0, 0, + { 6063,-2234,-231,-5210,13787,1500,-1043,2866,6997 } }, + { "Leica X", 0, 0, /* X and X-U, both (Typ 113) */ + { 7712,-2059,-653,-3882,11494,2726,-710,1332,5958 } }, + { "Leica Q (Typ 116)", 0, 0, + { 11865,-4523,-1441,-5423,14458,935,-1587,2687,4830 } }, + { "Leica M (Typ 262)", 0, 0, + { 6653,-1486,-611,-4221,13303,929,-881,2416,7226 } }, + { "Leica SL (Typ 601)", 0, 0, + { 11865,-4523,-1441,-5423,14458,935,-1587,2687,4830} }, { "Phase One H 20", 0, 0, /* DJC */ { 1313,1855,-109,-6715,15908,808,-327,1840,6020 } }, { "Phase One H 25", 0, 0, @@ -7764,8 +7917,14 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, { "Phase One P65", 0, 0, { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, + { "Photron BC2-HD", 0, 0, /* DJC */ + { 14603,-4122,-528,-1810,9794,2017,-297,2763,5936 } }, { "Red One", 704, 0xffff, /* DJC */ { 21014,-7891,-2613,-3056,12201,856,-2203,5125,8042 } }, + { "Ricoh GR II", 0, 0, + { 4630,-834,-423,-4977,12805,2417,-638,1467,6115 } }, + { "Ricoh GR", 0, 0, + { 3708,-543,-160,-5381,12254,3556,-1471,1929,8234 } }, { "Samsung EX1", 0, 0x3e00, { 8898,-2498,-994,-3144,11328,2066,-760,1381,4576 } }, { "Samsung EX2F", 0, 0x7ff, @@ -7774,6 +7933,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 7557,-2522,-739,-4679,12949,1894,-840,1777,5311 } }, { "Samsung NX mini", 0, 0, { 5222,-1196,-550,-6540,14649,2009,-1666,2819,5657 } }, + { "Samsung NX3300", 0, 0, + { 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 } }, { "Samsung NX3000", 0, 0, { 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 } }, { "Samsung NX30", 0, 0, /* NX30, NX300, NX300M */ @@ -7790,8 +7951,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, { "Samsung NX10", 0, 0, /* also NX100 */ { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, - { "Samsung NX500", 0, 0, /* DJC */ - { 10196,-4532,-272,-3888,11489,2400,-1203,2424,9173 } }, + { "Samsung NX500", 0, 0, + { 10686,-4042,-1052,-3595,13238,276,-464,1259,5931 } }, { "Samsung NX5", 0, 0, { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, { "Samsung NX1", 0, 0, @@ -7808,17 +7969,19 @@ void CLASS adobe_coeff (const char *make, const char *model) { 16442,-2956,-2422,-2877,12128,750,-1136,6066,4559 } }, { "Sony DSC-F828", 0, 0, { 7924,-1910,-777,-8226,15459,2998,-1517,2199,6818,-7242,11401,3481 } }, - { "Sony DSC-R1", 512, 0, + { "Sony DSC-R1", 0, 0, { 8512,-2641,-694,-8042,15670,2526,-1821,2117,7414 } }, { "Sony DSC-V3", 0, 0, { 7511,-2571,-692,-7894,15088,3060,-948,1111,8128 } }, - { "Sony DSC-RX100M", 200, 0, /* M2 and M3 */ + { "Sony DSC-RX100M", 0, 0, /* M2, M3, and M4 */ { 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 } }, - { "Sony DSC-RX100", 200, 0, + { "Sony DSC-RX100", 0, 0, { 8651,-2754,-1057,-3464,12207,1373,-568,1398,4434 } }, - { "Sony DSC-RX10", 200, 0, + { "Sony DSC-RX10", 0, 0, /* also RX10M2 */ { 6679,-1825,-745,-5047,13256,1953,-1580,2422,5183 } }, - { "Sony DSC-RX1", 128, 0, + { "Sony DSC-RX1RM2", 0, 0, + { 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 } }, + { "Sony DSC-RX1", 0, 0, { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, { "Sony DSLR-A100", 0, 0xfeb, { 9437,-2811,-774,-8405,16215,2290,-710,596,7181 } }, @@ -7836,71 +7999,77 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, { "Sony DSLR-A390", 0, 0, { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, - { "Sony DSLR-A450", 128, 0xfeb, + { "Sony DSLR-A450", 0, 0xfeb, { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, - { "Sony DSLR-A580", 128, 0xfeb, + { "Sony DSLR-A580", 0, 0xfeb, { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, - { "Sony DSLR-A500", 128, 0xfeb, + { "Sony DSLR-A500", 0, 0xfeb, { 6046,-1127,-278,-5574,13076,2786,-691,1419,7625 } }, - { "Sony DSLR-A5", 128, 0xfeb, + { "Sony DSLR-A5", 0, 0xfeb, { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, - { "Sony DSLR-A700", 128, 0, + { "Sony DSLR-A700", 0, 0, { 5775,-805,-359,-8574,16295,2391,-1943,2341,7249 } }, - { "Sony DSLR-A850", 128, 0, + { "Sony DSLR-A850", 0, 0, { 5413,-1162,-365,-5665,13098,2866,-608,1179,8440 } }, - { "Sony DSLR-A900", 128, 0, + { "Sony DSLR-A900", 0, 0, { 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } }, - { "Sony ILCA-77M2", 128, 0, + { "Sony ILCA-68", 0, 0, + { 6435,-1903,-536,-4722,12449,2550,-663,1363,6517 } }, + { "Sony ILCA-77M2", 0, 0, { 5991,-1732,-443,-4100,11989,2381,-704,1467,5992 } }, - { "Sony ILCE-7M2", 128, 0, + { "Sony ILCE-6300", 0, 0, + { 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 } }, + { "Sony ILCE-7M2", 0, 0, { 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 } }, - { "Sony ILCE-7S", 128, 0, + { "Sony ILCE-7S", 0, 0, /* also ILCE-7SM2 */ { 5838,-1430,-246,-3497,11477,2297,-748,1885,5778 } }, - { "Sony ILCE-7R", 128, 0, + { "Sony ILCE-7RM2", 0, 0, + { 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 } }, + { "Sony ILCE-7R", 0, 0, { 4913,-541,-202,-6130,13513,2906,-1564,2151,7183 } }, - { "Sony ILCE-7", 128, 0, + { "Sony ILCE-7", 0, 0, { 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 } }, - { "Sony ILCE", 128, 0, /* 3000, 5000, 5100, 6000, and QX1 */ + { "Sony ILCE", 0, 0, /* 3000, 5000, 5100, 6000, and QX1 */ { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony NEX-5N", 128, 0, + { "Sony NEX-5N", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony NEX-5R", 128, 0, + { "Sony NEX-5R", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, - { "Sony NEX-5T", 128, 0, + { "Sony NEX-5T", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, - { "Sony NEX-3N", 128, 0, + { "Sony NEX-3N", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, { "Sony NEX-3", 138, 0, /* DJC */ { 6907,-1256,-645,-4940,12621,2320,-1710,2581,6230 } }, { "Sony NEX-5", 116, 0, /* DJC */ { 6807,-1350,-342,-4216,11649,2567,-1089,2001,6420 } }, - { "Sony NEX-3", 128, 0, /* Adobe */ + { "Sony NEX-3", 0, 0, /* Adobe */ { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, - { "Sony NEX-5", 128, 0, /* Adobe */ + { "Sony NEX-5", 0, 0, /* Adobe */ { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, - { "Sony NEX-6", 128, 0, + { "Sony NEX-6", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, - { "Sony NEX-7", 128, 0, + { "Sony NEX-7", 0, 0, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "Sony NEX", 128, 0, /* NEX-C3, NEX-F3 */ + { "Sony NEX", 0, 0, /* NEX-C3, NEX-F3 */ { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A33", 128, 0, + { "Sony SLT-A33", 0, 0, { 6069,-1221,-366,-5221,12779,2734,-1024,2066,6834 } }, - { "Sony SLT-A35", 128, 0, + { "Sony SLT-A35", 0, 0, { 5986,-1618,-415,-4557,11820,3120,-681,1404,6971 } }, - { "Sony SLT-A37", 128, 0, + { "Sony SLT-A37", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A55", 128, 0, + { "Sony SLT-A55", 0, 0, { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, - { "Sony SLT-A57", 128, 0, + { "Sony SLT-A57", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A58", 128, 0, + { "Sony SLT-A58", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A65", 128, 0, + { "Sony SLT-A65", 0, 0, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "Sony SLT-A77", 128, 0, + { "Sony SLT-A77", 0, 0, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "Sony SLT-A99", 128, 0, + { "Sony SLT-A99", 0, 0, { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, }; double cam_xyz[4][3]; @@ -8057,6 +8226,8 @@ void CLASS identify() { 5712, 3774, 62, 20, 10, 2 }, { 5792, 3804, 158, 51, 0, 0 }, { 5920, 3950, 122, 80, 2, 0 }, + { 6096, 4056, 72, 34, 0, 0 }, + { 6288, 4056, 264, 34, 0, 0 }, { 8896, 5920, 160, 64, 0, 0 }, }; static const struct { @@ -8070,6 +8241,7 @@ void CLASS identify() { 0x261, "EOS 50D" }, { 0x281, "EOS-1D Mark IV" }, { 0x287, "EOS 60D" }, { 0x167, "EOS-1DS" }, { 0x325, "EOS 70D" }, + { 0x350, "EOS 80D" }, { 0x328, "EOS-1D X Mark II" }, { 0x170, "EOS 300D" }, { 0x188, "EOS-1Ds Mark II" }, { 0x176, "EOS 450D" }, { 0x215, "EOS-1Ds Mark III" }, { 0x189, "EOS 350D" }, { 0x324, "EOS-1D C" }, @@ -8079,9 +8251,12 @@ void CLASS identify() { 0x286, "EOS 600D" }, { 0x285, "EOS 5D Mark III" }, { 0x301, "EOS 650D" }, { 0x302, "EOS 6D" }, { 0x326, "EOS 700D" }, { 0x250, "EOS 7D" }, + { 0x393, "EOS 750D" }, { 0x289, "EOS 7D Mark II" }, + { 0x347, "EOS 760D" }, { 0x254, "EOS 1000D" }, { 0x288, "EOS 1100D" }, - { 0x327, "EOS 1200D" }, + { 0x327, "EOS 1200D" }, { 0x382, "Canon EOS 5DS" }, + { 0x404, "EOS 1300D" }, { 0x401, "Canon EOS 5DS R" }, { 0x346, "EOS 100D" }, }, sonique[] = { { 0x002, "DSC-R1" }, { 0x100, "DSLR-A100" }, @@ -8109,7 +8284,10 @@ void CLASS identify() { 0x139, "ILCE-5000" }, { 0x13d, "DSC-RX100M3" }, { 0x13e, "ILCE-7S" }, { 0x13f, "ILCA-77M2" }, { 0x153, "ILCE-5100" }, { 0x154, "ILCE-7M2" }, - { 0x15a, "ILCE-QX1" }, + { 0x155, "DSC-RX100M4" },{ 0x156, "DSC-RX10M2" }, + { 0x158, "DSC-RX1RM2" }, { 0x15a, "ILCE-QX1" }, + { 0x15b, "ILCE-7RM2" }, { 0x15e, "ILCE-7SM2" }, + { 0x161, "ILCA-68" }, { 0x165, "ILCE-6300" }, }; static const struct { unsigned fsize; @@ -8146,6 +8324,7 @@ void CLASS identify() { 19131120,4168,3060,92,16, 4, 1,40,0x94,0,2,"Canon","PowerShot SX220 HS" }, { 21936096,4464,3276,25,10,73,12,40,0x16,0,2,"Canon","PowerShot SX30 IS" }, { 24724224,4704,3504, 8,16,56, 8,40,0x94,0,2,"Canon","PowerShot A3300 IS" }, + { 30858240,5248,3920, 8,16,56,16,40,0x94,0,2,"Canon","IXUS 160" }, { 1976352,1632,1211, 0, 2, 0, 1, 0,0x94,0,1,"Casio","QV-2000UX" }, { 3217760,2080,1547, 0, 0,10, 1, 0,0x94,0,1,"Casio","QV-3*00EX" }, { 6218368,2585,1924, 0, 0, 9, 0, 0,0x94,0,1,"Casio","QV-5700" }, @@ -8204,6 +8383,8 @@ void CLASS identify() { 4841984,2090,1544, 0, 0,22, 0, 0,0x94,7,1,"Pentax","Optio S" }, { 6114240,2346,1737, 0, 0,22, 0, 0,0x94,7,1,"Pentax","Optio S4" }, { 10702848,3072,2322, 0, 0, 0,21,30,0x94,0,1,"Pentax","Optio 750Z" }, + { 4147200,1920,1080, 0, 0, 0, 0, 0,0x49,0,0,"Photron","BC2-HD" }, + { 4151666,1920,1080, 0, 0, 0, 0, 0,0x49,0,0,"Photron","BC2-HD",8 }, { 13248000,2208,3000, 0, 0, 0, 0,13,0x61,0,0,"Pixelink","A782" }, { 6291456,2048,1536, 0, 0, 0, 0,96,0x61,0,0,"RoverShot","3320AF" }, { 311696, 644, 484, 0, 0, 0, 0, 0,0x16,0,8,"ST Micro","STV680 VGA" }, @@ -8220,7 +8401,7 @@ void CLASS identify() static const char *corp[] = { "AgfaPhoto", "Canon", "Casio", "Epson", "Fujifilm", "Mamiya", "Minolta", "Motorola", "Kodak", "Konica", "Leica", - "Nikon", "Nokia", "Olympus", "Pentax", "Phase One", "Ricoh", + "Nikon", "Nokia", "Olympus", "Ricoh", "Pentax", "Phase One", "Samsung", "Sigma", "Sinar", "Sony" }; char head[32], *cp; int hlen, flen, fsize, zero_fsize=1, i, c; @@ -8387,7 +8568,7 @@ void CLASS identify() parse_foveon(); else if (!memcmp (head,"CI",2)) parse_cine(); - else + if (make[0] == 0) for (zero_fsize=i=0; i < sizeof table / sizeof *table; i++) if (fsize == table[i].fsize) { strcpy (make, table[i].make ); @@ -8482,9 +8663,10 @@ void CLASS identify() width = 4014; if (dng_version) { if (filters == UINT_MAX) filters = 0; - if (filters) is_raw = tiff_samples; - else colors = tiff_samples; + if (filters) is_raw *= tiff_samples; + else colors = tiff_samples; switch (tiff_compress) { + case 0: case 1: load_raw = &CLASS packed_dng_load_raw; break; case 7: load_raw = &CLASS lossless_dng_load_raw; break; case 34892: load_raw = &CLASS lossy_dng_load_raw; break; @@ -8536,6 +8718,8 @@ void CLASS identify() top_margin = filters = 0; strcpy (model,"C603"); } + if (!strcmp(make,"Sony") && raw_width > 3888) + black = 128 << (tiff_bps - 12); if (is_foveon) { if (height*2 < width) pixel_aspect = 0.5; if (height > width) pixel_aspect = 2; @@ -8550,6 +8734,10 @@ void CLASS identify() SWAP(height,width); SWAP(raw_height,raw_width); } + if (width == 7200 && height == 3888) { + raw_width = width = 6480; + raw_height = height = 4320; + } filters = 0; tiff_samples = colors = 3; load_raw = &CLASS canon_sraw_load_raw; @@ -8725,7 +8913,7 @@ canon_a5: top_margin = (raw_height - height) >> 2 << 1; left_margin = (raw_width - width ) >> 2 << 1; if (width == 2848 || width == 3664) filters = 0x16161616; - if (width == 4032 || width == 4952) left_margin = 0; + if (width == 4032 || width == 4952 || width == 6032) left_margin = 0; if (width == 3328 && (width -= 66)) left_margin = 34; if (width == 4936) left_margin = 4; if (!strcmp(model,"HS50EXR") || @@ -8968,6 +9156,8 @@ konica_400z: thumb_length = flen - (thumb_offset = 0xa39800); thumb_height = 480; thumb_width = 640; + } else if (!strcmp(model,"TG-4")) { + width -= 16; } } else if (!strcmp(model,"N Digital")) { height = 2047; @@ -8995,16 +9185,29 @@ konica_400z: order = 0x4d4d; } else if (!strcmp(make,"Sony") && raw_width == 4288) { width -= 32; + } else if (!strcmp(make,"Sony") && raw_width == 4600) { + if (!strcmp(model,"DSLR-A350")) + height -= 4; + black = 0; } else if (!strcmp(make,"Sony") && raw_width == 4928) { if (height < 3280) width -= 8; } else if (!strcmp(make,"Sony") && raw_width == 5504) { width -= height > 3664 ? 8 : 32; + if (!strncmp(model,"DSC",3)) + black = 200 << (tiff_bps - 12); } else if (!strcmp(make,"Sony") && raw_width == 6048) { width -= 24; if (strstr(model,"RX1") || strstr(model,"A99")) width -= 6; } else if (!strcmp(make,"Sony") && raw_width == 7392) { width -= 30; + } else if (!strcmp(make,"Sony") && raw_width == 8000) { + width -= 32; + if (!strncmp(model,"DSC",3)) { + tiff_bps = 14; + load_raw = &CLASS unpacked_load_raw; + black = 512; + } } else if (!strcmp(model,"DSLR-A100")) { if (width == 3880) { height--; @@ -9016,8 +9219,6 @@ konica_400z: load_flags = 2; } filters = 0x61616161; - } else if (!strcmp(model,"DSLR-A350")) { - height -= 4; } else if (!strcmp(model,"PIXL")) { height -= top_margin = 4; width -= left_margin = 32; @@ -9082,6 +9283,7 @@ bw: colors = 1; width = 768; data_offset = 1152; load_raw = &CLASS kodak_radc_load_raw; + tiff_bps = 12; } else if (strstr(model,"DC50")) { strcpy (model, "DC50"); height = 512; @@ -9160,7 +9362,7 @@ dng_skip: if (raw_color) adobe_coeff ("Apple","Quicktake"); if (fuji_width) { fuji_width = width >> !fuji_layout; - if (~fuji_width & 1) filters = 0x49494949; + filters = fuji_width & 1 ? 0x94949494 : 0x49494949; width = (height >> fuji_layout) + fuji_width; height = width - 1; pixel_aspect = 1; @@ -9274,10 +9476,14 @@ void CLASS convert_to_rgb() { { 0.529317, 0.330092, 0.140588 }, { 0.098368, 0.873465, 0.028169 }, { 0.016879, 0.117663, 0.865457 } }; + static const double aces_rgb[3][3] = + { { 0.432996, 0.375380, 0.189317 }, + { 0.089427, 0.816523, 0.102989 }, + { 0.019165, 0.118150, 0.941914 } }; static const double (*out_rgb[])[3] = - { rgb_rgb, adobe_rgb, wide_rgb, prophoto_rgb, xyz_rgb }; + { rgb_rgb, adobe_rgb, wide_rgb, prophoto_rgb, xyz_rgb, aces_rgb }; static const char *name[] = - { "sRGB", "Adobe RGB (1998)", "WideGamut D65", "ProPhoto D65", "XYZ" }; + { "sRGB", "Adobe RGB (1998)", "WideGamut D65", "ProPhoto D65", "XYZ", "ACES" }; static const unsigned phead[] = { 1024, 0, 0x2100000, 0x6d6e7472, 0x52474220, 0x58595a20, 0, 0, 0, 0x61637370, 0, 0, 0x6e6f6e65, 0, 0, 0, 0, 0xf6d6, 0x10000, 0xd32d }; @@ -9298,7 +9504,7 @@ void CLASS convert_to_rgb() gamma_curve (gamm[0], gamm[1], 0, 0); memcpy (out_cam, rgb_cam, sizeof out_cam); raw_color |= colors == 1 || document_mode || - output_color < 1 || output_color > 5; + output_color < 1 || output_color > 6; if (!raw_color) { oprof = (unsigned *) calloc (phead[0], 1); merror (oprof, "convert_to_rgb()"); @@ -9461,21 +9667,25 @@ struct tiff_hdr { char desc[512], make[64], model[64], soft[32], date[20], artist[64]; }; -void CLASS tiff_set (ushort *ntag, +void CLASS tiff_set (struct tiff_hdr *th, ushort *ntag, ushort tag, ushort type, int count, int val) { struct tiff_tag *tt; int c; tt = (struct tiff_tag *)(ntag+1) + (*ntag)++; - tt->tag = tag; - tt->type = type; - tt->count = count; - if (type < 3 && count <= 4) + tt->val.i = val; + if (type == 1 && count <= 4) FORC(4) tt->val.c[c] = val >> (c << 3); - else if (type == 3 && count <= 2) + else if (type == 2) { + count = strnlen((char *)th + val, count-1) + 1; + if (count <= 4) + FORC(4) tt->val.c[c] = ((char *)th)[val+c]; + } else if (type == 3 && count <= 2) FORC(2) tt->val.s[c] = val >> (c << 4); - else tt->val.i = val; + tt->count = count; + tt->type = type; + tt->tag = tag; } #define TOFF(ptr) ((char *)(&(ptr)) - (char *)th) @@ -9489,55 +9699,6 @@ void CLASS tiff_head (struct tiff_hdr *th, int full) th->order = htonl(0x4d4d4949) >> 16; th->magic = 42; th->ifd = 10; - if (full) { - tiff_set (&th->ntag, 254, 4, 1, 0); - tiff_set (&th->ntag, 256, 4, 1, width); - tiff_set (&th->ntag, 257, 4, 1, height); - tiff_set (&th->ntag, 258, 3, colors, output_bps); - if (colors > 2) - th->tag[th->ntag-1].val.i = TOFF(th->bps); - FORC4 th->bps[c] = output_bps; - tiff_set (&th->ntag, 259, 3, 1, 1); - tiff_set (&th->ntag, 262, 3, 1, 1 + (colors > 1)); - } - tiff_set (&th->ntag, 270, 2, 512, TOFF(th->desc)); - tiff_set (&th->ntag, 271, 2, 64, TOFF(th->make)); - tiff_set (&th->ntag, 272, 2, 64, TOFF(th->model)); - if (full) { - if (oprof) psize = ntohl(oprof[0]); - tiff_set (&th->ntag, 273, 4, 1, sizeof *th + psize); - tiff_set (&th->ntag, 277, 3, 1, colors); - tiff_set (&th->ntag, 278, 4, 1, height); - tiff_set (&th->ntag, 279, 4, 1, height*width*colors*output_bps/8); - } else - tiff_set (&th->ntag, 274, 3, 1, "12435867"[flip]-'0'); - tiff_set (&th->ntag, 282, 5, 1, TOFF(th->rat[0])); - tiff_set (&th->ntag, 283, 5, 1, TOFF(th->rat[2])); - tiff_set (&th->ntag, 284, 3, 1, 1); - tiff_set (&th->ntag, 296, 3, 1, 2); - tiff_set (&th->ntag, 305, 2, 32, TOFF(th->soft)); - tiff_set (&th->ntag, 306, 2, 20, TOFF(th->date)); - tiff_set (&th->ntag, 315, 2, 64, TOFF(th->artist)); - tiff_set (&th->ntag, 34665, 4, 1, TOFF(th->nexif)); - if (psize) tiff_set (&th->ntag, 34675, 7, psize, sizeof *th); - tiff_set (&th->nexif, 33434, 5, 1, TOFF(th->rat[4])); - tiff_set (&th->nexif, 33437, 5, 1, TOFF(th->rat[6])); - tiff_set (&th->nexif, 34855, 3, 1, iso_speed); - tiff_set (&th->nexif, 37386, 5, 1, TOFF(th->rat[8])); - if (gpsdata[1]) { - tiff_set (&th->ntag, 34853, 4, 1, TOFF(th->ngps)); - tiff_set (&th->ngps, 0, 1, 4, 0x202); - tiff_set (&th->ngps, 1, 2, 2, gpsdata[29]); - tiff_set (&th->ngps, 2, 5, 3, TOFF(th->gps[0])); - tiff_set (&th->ngps, 3, 2, 2, gpsdata[30]); - tiff_set (&th->ngps, 4, 5, 3, TOFF(th->gps[6])); - tiff_set (&th->ngps, 5, 1, 1, gpsdata[31]); - tiff_set (&th->ngps, 6, 5, 1, TOFF(th->gps[18])); - tiff_set (&th->ngps, 7, 5, 3, TOFF(th->gps[12])); - tiff_set (&th->ngps, 18, 2, 12, TOFF(th->gps[20])); - tiff_set (&th->ngps, 29, 2, 12, TOFF(th->gps[23])); - memcpy (th->gps, gpsdata, sizeof th->gps); - } th->rat[0] = th->rat[2] = 300; th->rat[1] = th->rat[3] = 1; FORC(6) th->rat[4+c] = 1000000; @@ -9552,6 +9713,55 @@ void CLASS tiff_head (struct tiff_hdr *th, int full) sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); strncpy (th->artist, artist, 64); + if (full) { + tiff_set (th, &th->ntag, 254, 4, 1, 0); + tiff_set (th, &th->ntag, 256, 4, 1, width); + tiff_set (th, &th->ntag, 257, 4, 1, height); + tiff_set (th, &th->ntag, 258, 3, colors, output_bps); + if (colors > 2) + th->tag[th->ntag-1].val.i = TOFF(th->bps); + FORC4 th->bps[c] = output_bps; + tiff_set (th, &th->ntag, 259, 3, 1, 1); + tiff_set (th, &th->ntag, 262, 3, 1, 1 + (colors > 1)); + } + tiff_set (th, &th->ntag, 270, 2, 512, TOFF(th->desc)); + tiff_set (th, &th->ntag, 271, 2, 64, TOFF(th->make)); + tiff_set (th, &th->ntag, 272, 2, 64, TOFF(th->model)); + if (full) { + if (oprof) psize = ntohl(oprof[0]); + tiff_set (th, &th->ntag, 273, 4, 1, sizeof *th + psize); + tiff_set (th, &th->ntag, 277, 3, 1, colors); + tiff_set (th, &th->ntag, 278, 4, 1, height); + tiff_set (th, &th->ntag, 279, 4, 1, height*width*colors*output_bps/8); + } else + tiff_set (th, &th->ntag, 274, 3, 1, "12435867"[flip]-'0'); + tiff_set (th, &th->ntag, 282, 5, 1, TOFF(th->rat[0])); + tiff_set (th, &th->ntag, 283, 5, 1, TOFF(th->rat[2])); + tiff_set (th, &th->ntag, 284, 3, 1, 1); + tiff_set (th, &th->ntag, 296, 3, 1, 2); + tiff_set (th, &th->ntag, 305, 2, 32, TOFF(th->soft)); + tiff_set (th, &th->ntag, 306, 2, 20, TOFF(th->date)); + tiff_set (th, &th->ntag, 315, 2, 64, TOFF(th->artist)); + tiff_set (th, &th->ntag, 34665, 4, 1, TOFF(th->nexif)); + if (psize) tiff_set (th, &th->ntag, 34675, 7, psize, sizeof *th); + tiff_set (th, &th->nexif, 33434, 5, 1, TOFF(th->rat[4])); + tiff_set (th, &th->nexif, 33437, 5, 1, TOFF(th->rat[6])); + tiff_set (th, &th->nexif, 34855, 3, 1, iso_speed); + tiff_set (th, &th->nexif, 37386, 5, 1, TOFF(th->rat[8])); + if (gpsdata[1]) { + tiff_set (th, &th->ntag, 34853, 4, 1, TOFF(th->ngps)); + tiff_set (th, &th->ngps, 0, 1, 4, 0x202); + tiff_set (th, &th->ngps, 1, 2, 2, gpsdata[29]); + tiff_set (th, &th->ngps, 2, 5, 3, TOFF(th->gps[0])); + tiff_set (th, &th->ngps, 3, 2, 2, gpsdata[30]); + tiff_set (th, &th->ngps, 4, 5, 3, TOFF(th->gps[6])); + tiff_set (th, &th->ngps, 5, 1, 1, gpsdata[31]); + tiff_set (th, &th->ngps, 6, 5, 1, TOFF(th->gps[18])); + tiff_set (th, &th->ngps, 7, 5, 3, TOFF(th->gps[12])); + tiff_set (th, &th->ngps, 18, 2, 12, TOFF(th->gps[20])); + tiff_set (th, &th->ngps, 29, 2, 12, TOFF(th->gps[23])); + memcpy (th->gps, gpsdata, sizeof th->gps); + } } void CLASS jpeg_thumb() @@ -9672,7 +9882,7 @@ int CLASS main (int argc, const char **argv) puts(_("-n Set threshold for wavelet denoising")); puts(_("-H [0-9] Highlight mode (0=clip, 1=unclip, 2=blend, 3+=rebuild)")); puts(_("-t [0-7] Flip image (0=none, 3=180, 5=90CCW, 6=90CW)")); - puts(_("-o [0-5] Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ)")); + puts(_("-o [0-6] Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ,ACES)")); #ifndef NO_LCMS puts(_("-o Apply output ICC profile from file")); puts(_("-p Apply camera ICC profile from file or \"embed\"")); diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index c0dbd816d..8ebc073d1 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -12,7 +12,7 @@ /* dcraw.c -- Dave Coffin's raw photo decoder - Copyright 1997-2015 by Dave Coffin, dcoffin a cybercom o net + Copyright 1997-2016 by Dave Coffin, dcoffin a cybercom o net This is a command-line ANSI C program to convert raw photos from any digital camera on any computer running any operating system. @@ -31,11 +31,11 @@ *If you have not modified dcraw.c in any way, a link to my homepage qualifies as "full source code". - $Revision: 1.475 $ - $Date: 2015/04/11 00:08:36 $ + $Revision: 1.477 $ + $Date: 2016/05/10 21:30:43 $ */ -#define DCRAW_VERSION "9.25" +#define DCRAW_VERSION "9.27" #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -100,15 +100,6 @@ typedef unsigned long long UINT64; #define _(String) (String) #endif -#ifdef LJPEG_DECODE -#error Please compile dcraw.c by itself. -#error Do not link it with ljpeg_decode. -#endif - -#ifndef LONG_BIT -#define LONG_BIT (8 * sizeof (long)) -#endif - #define ushort UshORt typedef unsigned char uchar; typedef unsigned short ushort; @@ -787,17 +778,15 @@ struct jhead { int CLASS ljpeg_start (struct jhead *jh, int info_only) { - int c, tag; - ushort len; + ushort c, tag, len; uchar data[0x10000]; const uchar *dp; memset (jh, 0, sizeof *jh); jh->restart = INT_MAX; - fread (data, 2, 1, ifp); - if (data[1] != 0xd8) return 0; + if ((fgetc(ifp),fgetc(ifp)) != 0xd8) return 0; do { - fread (data, 2, 2, ifp); + if (!fread (data, 2, 2, ifp)) return 0; tag = data[0] << 8 | data[1]; len = (data[2] << 8 | data[3]) - 2; if (tag <= 0xff00) return 0; @@ -805,7 +794,9 @@ int CLASS ljpeg_start (struct jhead *jh, int info_only) switch (tag) { case 0xffc3: jh->sraw = ((data[7] >> 4) * (data[7] & 15) - 1) & 3; + case 0xffc1: case 0xffc0: + jh->algo = tag & 0xff; jh->bits = data[0]; jh->high = data[1] << 8 | data[2]; jh->wide = data[3] << 8 | data[4]; @@ -814,20 +805,25 @@ int CLASS ljpeg_start (struct jhead *jh, int info_only) break; case 0xffc4: if (info_only) break; - for (dp = data; dp < data+len && (c = *dp++) < 4; ) + for (dp = data; dp < data+len && !((c = *dp++) & -20); ) jh->free[c] = jh->huff[c] = make_decoder_ref (&dp); break; case 0xffda: jh->psv = data[1+data[0]*2]; jh->bits -= data[3+data[0]*2] & 15; break; + case 0xffdb: + FORC(64) jh->quant[c] = data[c*2+1] << 8 | data[c*2+2]; + break; case 0xffdd: jh->restart = data[0] << 8 | data[1]; } } while (tag != 0xffda); + if (jh->bits > 16 || jh->clrs > 6 || + !jh->bits || !jh->high || !jh->wide || !jh->clrs) return 0; if (info_only) return 1; - if (jh->clrs > 6 || !jh->huff[0]) return 0; - FORC(5) if (!jh->huff[c+1]) jh->huff[c+1] = jh->huff[c]; + if (!jh->huff[0]) return 0; + FORC(19) if (!jh->huff[c+1]) jh->huff[c+1] = jh->huff[c]; if (jh->sraw) { FORC(4) jh->huff[2+c] = jh->huff[1]; FORC(jh->sraw) jh->huff[1+c] = jh->huff[0]; @@ -1006,23 +1002,59 @@ void CLASS adobe_copy_pixel (unsigned row, unsigned col, ushort **rp) { int c; - if (is_raw == 2 && shot_select) (*rp)++; + if (tiff_samples == 2 && shot_select) (*rp)++; if (raw_image) { if (row < raw_height && col < raw_width) RAW(row,col) = curve[**rp]; - *rp += is_raw; + *rp += tiff_samples; } else { if (row < height && col < width) FORC(tiff_samples) image[row*width+col][c] = curve[(*rp)[c]]; *rp += tiff_samples; } - if (is_raw == 2 && shot_select) (*rp)--; + if (tiff_samples == 2 && shot_select) (*rp)--; +} + +void CLASS ljpeg_idct (struct jhead *jh) +{ + int c, i, j, len, skip, coef; + float work[3][8][8]; + static float cs[106] = { 0 }; + static const uchar zigzag[80] = + { 0, 1, 8,16, 9, 2, 3,10,17,24,32,25,18,11, 4, 5,12,19,26,33, + 40,48,41,34,27,20,13, 6, 7,14,21,28,35,42,49,56,57,50,43,36, + 29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54, + 47,55,62,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 }; + + if (!cs[0]) + FORC(106) cs[c] = cos((c & 31)*M_PI/16)/2; + memset (work, 0, sizeof work); + work[0][0][0] = jh->vpred[0] += ljpeg_diff (jh->huff[0]) * jh->quant[0]; + for (i=1; i < 64; i++ ) { + len = gethuff (jh->huff[16]); + i += skip = len >> 4; + if (!(len &= 15) && skip < 15) break; + coef = getbits(len); + if ((coef & (1 << (len-1))) == 0) + coef -= (1 << len) - 1; + ((float *)work)[zigzag[i]] = coef * jh->quant[i]; + } + FORC(8) work[0][0][c] *= M_SQRT1_2; + FORC(8) work[0][c][0] *= M_SQRT1_2; + for (i=0; i < 8; i++) + for (j=0; j < 8; j++) + FORC(8) work[1][i][j] += work[0][i][c] * cs[(j*2+1)*c]; + for (i=0; i < 8; i++) + for (j=0; j < 8; j++) + FORC(8) work[2][i][j] += work[1][c][j] * cs[(i*2+1)*c]; + + FORC(64) jh->idct[c] = CLIP(((float *)work[2])[c]+0.5); } void CLASS lossless_dng_load_raw() { - unsigned save, trow=0, tcol=0, jwide, jrow, jcol, row, col; + unsigned save, trow=0, tcol=0, jwide, jrow, jcol, row, col, i, j; struct jhead jh; ushort *rp; @@ -1033,15 +1065,32 @@ void CLASS lossless_dng_load_raw() if (!ljpeg_start (&jh, 0)) break; jwide = jh.wide; if (filters) jwide *= jh.clrs; - jwide /= is_raw; - for (row=col=jrow=0; jrow < jh.high; jrow++) { - rp = ljpeg_row (jrow, &jh); - for (jcol=0; jcol < jwide; jcol++) { - adobe_copy_pixel (trow+row, tcol+col, &rp); - if (++col >= tile_width || col >= raw_width) - row += 1 + (col = 0); - } - } + jwide /= MIN (is_raw, tiff_samples); + switch (jh.algo) { + case 0xc1: + jh.vpred[0] = 16384; + getbits(-1); + for (jrow=0; jrow+7 < jh.high; jrow += 8) { + for (jcol=0; jcol+7 < jh.wide; jcol += 8) { + ljpeg_idct (&jh); + rp = jh.idct; + row = trow + jcol/tile_width + jrow*2; + col = tcol + jcol%tile_width; + for (i=0; i < 16; i+=2) + for (j=0; j < 8; j++) + adobe_copy_pixel (row+i, col+j, &rp); + } + } + break; + case 0xc3: + for (row=col=jrow=0; jrow < jh.high; jrow++) { + rp = ljpeg_row (jrow, &jh); + for (jcol=0; jcol < jwide; jcol++) { + adobe_copy_pixel (trow+row, tcol+col, &rp); + if (++col >= tile_width || col >= raw_width) + row += 1 + (col = 0); + } + } } fseek (ifp, save+4, SEEK_SET); if ((tcol += tile_width) >= raw_width) trow += tile_length + (tcol = 0); @@ -1685,8 +1734,7 @@ void CLASS phase_one_load_raw_c() pixel[col] = curve[pixel[col]]; } for (col=0; col < raw_width; col++) { - if (ph1.format != 8) pixel[col] <<= 2; - i = pixel[col] - ph1.black + i = (pixel[col] << 2*(ph1.format != 8)) - ph1.black + cblack[row][col >= ph1.split_col] + rblack[col][row >= ph1.split_row]; if (i > 0) RAW(row,col) = i; @@ -3111,6 +3159,8 @@ void CLASS smal_decode_segment (unsigned seg[2][2], int holes) fseek (ifp, seg[0][1]+1, SEEK_SET); getbits(-1); + if (seg[1][0] > raw_width*raw_height) + seg[1][0] = raw_width*raw_height; for (pix=seg[0][0]; pix < seg[1][0]; pix++) { for (s=0; s < 3; s++) { data = data << nbits | getbits(nbits); @@ -5237,7 +5287,7 @@ nf: order = 0x4949; FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get4(); } if (tag == 0x3d && type == 3 && len == 4) - FORC4 cblack[c ^ c >> 1] = get2() >> (14-tiff_ifd[2].bps); + FORC4 cblack[c ^ c >> 1] = get2() >> (14-tiff_bps); if (tag == 0x81 && type == 4) { data_offset = get4(); fseek (ifp, data_offset + 41, SEEK_SET); @@ -5267,7 +5317,8 @@ nf: order = 0x4949; break; case 102: fseek (ifp, 6, SEEK_CUR); - goto get2_rggb; + FORC4 cam_mul[c ^ (c >> 1)] = get2(); + break; case 103: fseek (ifp, 16, SEEK_CUR); FORC4 cam_mul[c] = get2(); @@ -5301,7 +5352,7 @@ nf: order = 0x4949; if (tag == 0x200 && len == 4) FORC4 cblack[c ^ c >> 1] = get2(); if (tag == 0x201 && len == 4) - goto get2_rggb; + FORC4 cam_mul[c ^ (c >> 1)] = get2(); if (tag == 0x220 && type == 7) meta_offset = ftell(ifp); if (tag == 0x401 && type == 4 && len == 4) @@ -5347,7 +5398,7 @@ get2_256: } if ((tag | 0x70) == 0x2070 && (type == 4 || type == 13)) fseek (ifp, get4()+base, SEEK_SET); - if (tag == 0x2020) + if (tag == 0x2020 && !strncmp(buf,"OLYMP",5)) parse_thumb_note (base, 257, 258); if (tag == 0x2040) parse_makernote (base, 0x2040); @@ -5358,11 +5409,12 @@ get2_256: if (tag == 0x4001 && len > 500) { i = len == 582 ? 50 : len == 653 ? 68 : len == 5120 ? 142 : 126; fseek (ifp, i, SEEK_CUR); -get2_rggb: FORC4 cam_mul[c ^ (c >> 1)] = get2(); - i = len >> 3 == 164 || len == 1506 ? 112:22; - fseek (ifp, i, SEEK_CUR); - FORC4 sraw_mul[c ^ (c >> 1)] = get2(); + for (i+=18; i <= len; i+=10) { + get2(); + FORC4 sraw_mul[c ^ (c >> 1)] = get2(); + if (sraw_mul[1] == 1170) break; + } } if (tag == 0x4021 && get4() && get4()) FORC4 cam_mul[c] = 1024; @@ -5415,13 +5467,14 @@ void CLASS parse_exif (int base) while (entries--) { tiff_get (base, &tag, &type, &len, &save); switch (tag) { - case 33434: shutter = getreal(type); break; + case 33434: tiff_ifd[tiff_nifds-1].shutter = shutter = getreal(type); break; case 33437: aperture = getreal(type); break; case 34855: iso_speed = get2(); break; case 34866: if((!iso_speed) || iso_speed == 65535) iso_speed = get4();break; case 36867: case 36868: get_timestamp(0); break; case 37377: if ((expo = -getreal(type)) < 128) + tiff_ifd[tiff_nifds-1].shutter = shutter = pow (2, expo); break; case 37378: aperture = pow (2, getreal(type)/2); break; case 37386: focal_len = getreal(type); break; @@ -5664,6 +5717,8 @@ int CLASS parse_tiff_ifd (int base) case 61443: tiff_ifd[ifd].samples = len & 7; tiff_ifd[ifd].bps = getint(type); + if (tiff_bps < tiff_ifd[ifd].bps) + tiff_bps = tiff_ifd[ifd].bps; break; case 61446: raw_height = 0; @@ -5835,7 +5890,7 @@ int CLASS parse_tiff_ifd (int base) parse_kodak_ifd (base); break; case 33434: /* ExposureTime */ - shutter = getreal(type); + tiff_ifd[ifd].shutter = shutter = getreal(type); break; case 33437: /* FNumber */ aperture = getreal(type); @@ -5964,7 +6019,12 @@ int CLASS parse_tiff_ifd (int base) is_raw = 1; break; case 50708: /* UniqueCameraModel */ - fgets (model3, 64, ifp); + if (model[0]) break; + fgets (make, 64, ifp); + if ((cp = strchr(make,' '))) { + strcpy(model,cp+1); + *cp = 0; + } break; case 50710: /* CFAPlaneColor */ if (filters == 9) break; @@ -5979,10 +6039,7 @@ guess_cfa_pc: filters -= !filters; break; case 50711: /* CFALayout */ - if (get2() == 2) { - fuji_width = 1; - filters = 0x49494949; - } + if (get2() == 2) fuji_width = 1; break; case 291: case 50712: /* LinearizationTable */ @@ -6014,7 +6071,7 @@ guess_cfa_pc: break; case 50715: /* BlackLevelDeltaH */ case 50716: /* BlackLevelDeltaV */ - for (num=i=0; i < len; i++) + for (num=i=0; i < (len & 0xffff); i++) num += getreal(type); black += num/len + 0.5; break; @@ -6144,7 +6201,7 @@ int CLASS parse_tiff (int base) void CLASS apply_tiff() { - int max_samp=0, raw=-1, thm=-1, i; + int max_samp=0, ties=0, os, ns, raw=-1, thm=-1, i; struct jhead jh; thumb_misc = 16; @@ -6156,13 +6213,26 @@ void CLASS apply_tiff() thumb_height = jh.high; } } + for (i=tiff_nifds; i--; ) { + if (tiff_ifd[i].shutter) + shutter = tiff_ifd[i].shutter; + tiff_ifd[i].shutter = shutter; + } + for (i=0; i < tiff_nifds; i++) { if (max_samp < tiff_ifd[i].samples) max_samp = tiff_ifd[i].samples; if (max_samp > 3) max_samp = 3; + os = raw_width*raw_height; + ns = tiff_ifd[i].width*tiff_ifd[i].height; + if (tiff_bps) { + os *= tiff_bps; + ns *= tiff_ifd[i].bps; + } if ((tiff_ifd[i].comp != 6 || tiff_ifd[i].samples != 3) && (tiff_ifd[i].width | tiff_ifd[i].height) < 0x10000 && - tiff_ifd[i].width*tiff_ifd[i].height > raw_width*raw_height) { + ns && ((ns > os && (ties = 1)) || + (ns == os && shot_select == ties++))) { raw_width = tiff_ifd[i].width; raw_height = tiff_ifd[i].height; tiff_bps = tiff_ifd[i].bps; @@ -6172,9 +6242,11 @@ void CLASS apply_tiff() tiff_samples = tiff_ifd[i].samples; tile_width = tiff_ifd[i].tile_width; tile_length = tiff_ifd[i].tile_length; + shutter = tiff_ifd[i].shutter; raw = i; } } + if (is_raw == 1 && ties) is_raw = ties; if (!tile_width ) tile_width = INT_MAX; if (!tile_length) tile_length = INT_MAX; for (i=tiff_nifds; i--; ) @@ -6257,8 +6329,8 @@ void CLASS apply_tiff() if (!dng_version) if ( (tiff_samples == 3 && tiff_ifd[raw].bytes && tiff_bps != 14 && (tiff_compress & -16) != 32768) - || (tiff_bps == 8 && !strcasestr(make,"Kodak") && - !strstr(model2,"DEBUG RAW"))) + || (tiff_bps == 8 && strncmp(make,"Phase",5) && + !strcasestr(make,"Kodak") && !strstr(model2,"DEBUG RAW"))) is_raw = 0; for (i=0; i < tiff_nifds; i++) if (i != raw && tiff_ifd[i].samples == max_samp && @@ -6400,9 +6472,7 @@ void CLASS ciff_block_1030() bitbuf = bitbuf << 16 | (get2() ^ key[i++ & 1]); vbits += 16; } - white[row][col] = - bitbuf << (LONG_BIT - vbits) >> (LONG_BIT - bpp); - vbits -= bpp; + white[row][col] = bitbuf >> (vbits -= bpp) & ~(-1 << bpp); } } @@ -6682,7 +6752,7 @@ void CLASS parse_fuji (int offset) } else if (tag == 0xc000) { c = order; order = 0x4949; - while ((tag = get4()) > 10000); + while ((tag = get4()) > raw_width); width = tag; height = get4(); order = c; @@ -6704,7 +6774,7 @@ int CLASS parse_jpeg (int offset) order = 0x4d4d; len = get2() - 2; save = ftell(ifp); - if (mark == 0xc0 || mark == 0xc3) { + if (mark == 0xc0 || mark == 0xc3 || mark == 0xc9) { fgetc(ifp); raw_height = get2(); raw_width = get2(); @@ -7003,8 +7073,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9805,-2689,-1312,-5803,13064,3068,-2438,3075,8775 } }, { "Canon EOS D60", 0, 0xfa0, { 6188,-1341,-890,-7168,14489,2937,-2640,3228,8483 } }, - { "Canon EOS 5DS", 0, 0x3c96, /* DJC */ - { 6885,-753,-856,-4416,11752,2665,-1266,2393,5468 } }, + { "Canon EOS 5DS", 0, 0x3c96, + { 6250,-711,-808,-5153,12794,2636,-1249,2198,5610 } }, { "Canon EOS 5D Mark III", 0, 0x3c80, { 6722,-635,-963,-4287,12460,2028,-908,2162,5668 } }, { "Canon EOS 5D Mark II", 0, 0x3cf0, @@ -7033,6 +7103,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6719,-994,-925,-4408,12426,2211,-887,2129,6051 } }, { "Canon EOS 70D", 0, 0x3bc7, { 7034,-804,-1014,-4420,12564,2058,-851,1994,5758 } }, + { "Canon EOS 80D", 0, 0, + { 7457,-671,-937,-4849,12495,2643,-1213,2354,5492 } }, { "Canon EOS 100D", 0, 0x350f, { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, { "Canon EOS 300D", 0, 0xfa0, @@ -7053,12 +7125,22 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, { "Canon EOS 700D", 0, 0x3c00, { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, + { "Canon EOS 750D", 0, 0x368e, + { 6362,-823,-847,-4426,12109,2616,-743,1857,5635 } }, + { "Canon EOS 760D", 0, 0x350f, + { 6362,-823,-847,-4426,12109,2616,-743,1857,5635 } }, { "Canon EOS 1000D", 0, 0xe43, { 6771,-1139,-977,-7818,15123,2928,-1244,1437,7533 } }, { "Canon EOS 1100D", 0, 0x3510, { 6444,-904,-893,-4563,12308,2535,-903,2016,6728 } }, { "Canon EOS 1200D", 0, 0x37c2, { 6461,-907,-882,-4300,12184,2378,-819,1944,5931 } }, + { "Canon EOS 1300D", 0, 0x3510, + { 6939,-1016,-866,-4428,12473,2177,-1175,2178,6162 } }, + { "Canon EOS M3", 0, 0, + { 6362,-823,-847,-4426,12109,2616,-743,1857,5635 } }, + { "Canon EOS M10", 0, 0, + { 6400,-480,-888,-5294,13416,2047,-1296,2203,6137 } }, { "Canon EOS M", 0, 0, { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } }, { "Canon EOS-1Ds Mark III", 0, 0x3bb0, @@ -7077,6 +7159,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 4374,3631,-1743,-7520,15212,2472,-2892,3632,8161 } }, { "Canon EOS-1D C", 0, 0x3c4e, { 6847,-614,-1014,-4669,12737,2139,-1197,2488,6846 } }, + { "Canon EOS-1D X Mark II", 0, 0, + { 7596,-978,-967,-4808,12571,2503,-1398,2567,5752 } }, { "Canon EOS-1D X", 0, 0x3c4e, { 6847,-614,-1014,-4669,12737,2139,-1197,2488,6846 } }, { "Canon EOS-1D", 0, 0xe20, @@ -7105,14 +7189,20 @@ void CLASS adobe_coeff (const char *make, const char *model) { -4778,9467,2172,4743,-1141,4344,-5146,9908,6077,-1566,11051,557 } }, { "Canon PowerShot G2", 0, 0, { 9087,-2693,-1049,-6715,14382,2537,-2291,2819,7790 } }, + { "Canon PowerShot G3 X", 0, 0, + { 9701,-3857,-921,-3149,11537,1817,-786,1817,5147 } }, { "Canon PowerShot G3", 0, 0, { 9212,-2781,-1073,-6573,14189,2605,-2300,2844,7664 } }, + { "Canon PowerShot G5 X", 0, 0, + { 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 } }, { "Canon PowerShot G5", 0, 0, { 9757,-2872,-933,-5972,13861,2301,-1622,2328,7212 } }, { "Canon PowerShot G6", 0, 0, { 9877,-3775,-871,-7613,14807,3072,-1448,1305,7485 } }, { "Canon PowerShot G7 X", 0, 0, { 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 } }, + { "Canon PowerShot G9 X", 0, 0, + { 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 } }, { "Canon PowerShot G9", 0, 0, { 7368,-2141,-598,-5621,13254,2625,-1418,1696,5743 } }, { "Canon PowerShot Pro1", 0, 0, @@ -7171,6 +7261,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 14134,-5576,-1527,-1991,10719,1273,-1158,1929,3581 } }, { "Canon PowerShot SX220", 0, 0, /* DJC */ { 13898,-5076,-1447,-1405,10109,1297,-244,1860,3687 } }, + { "Canon IXUS 160", 0, 0, /* DJC */ + { 11657,-3781,-1136,-3544,11262,2283,-160,1219,4700 } }, { "Casio EX-S20", 0, 0, /* DJC */ { 11634,-3924,-1128,-4968,12954,2015,-1588,2648,7206 } }, { "Casio EX-Z750", 0, 0, /* DJC */ @@ -7185,6 +7277,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 20183,-4295,-423,-3940,15330,3985,-280,4870,9800 } }, { "Contax N Digital", 0, 0xf1e, { 7777,1285,-1053,-9280,16543,2916,-3677,5679,7060 } }, + { "DXO ONE", 0, 0, + { 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 } }, { "Epson R-D1", 0, 0, { 6827,-1878,-732,-8429,16012,2564,-704,592,7145 } }, { "Fujifilm E550", 0, 0, @@ -7265,25 +7359,31 @@ void CLASS adobe_coeff (const char *make, const char *model) { 11768,-4971,-1133,-4904,12927,2183,-480,1723,4605 } }, { "Fujifilm X30", 0, 0, { 12328,-5256,-1144,-4469,12927,1675,-87,1291,4351 } }, + { "Fujifilm X70", 0, 0, + { 10450,-4329,-878,-3217,11105,2421,-752,1758,6519 } }, { "Fujifilm X-Pro1", 0, 0, { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, + { "Fujifilm X-Pro2", 0, 0, + { 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 } }, { "Fujifilm X-A1", 0, 0, { 11086,-4555,-839,-3512,11310,2517,-815,1341,5940 } }, { "Fujifilm X-A2", 0, 0, { 10763,-4560,-917,-3346,11311,2322,-475,1135,5843 } }, { "Fujifilm X-E1", 0, 0, { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, + { "Fujifilm X-E2S", 0, 0, + { 11562,-5118,-961,-3022,11007,2311,-525,1569,6097 } }, { "Fujifilm X-E2", 0, 0, { 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 } }, { "Fujifilm X-M1", 0, 0, { 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 } }, { "Fujifilm X-S1", 0, 0, { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, - { "Fujifilm X-T1", 0, 0, + { "Fujifilm X-T1", 0, 0, /* also X-T10 */ { 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 } }, { "Fujifilm XF1", 0, 0, { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, - { "Fujifilm XQ", 0, 0, // XQ1 and XQ2 + { "Fujifilm XQ", 0, 0, /* XQ1 and XQ2 */ { 9252,-2704,-1064,-5893,14265,1717,-1101,2341,4349 } }, { "Imacon Ixpress", 0, 0, /* DJC */ { 7025,-1415,-704,-5188,13765,1424,-1248,2742,6038 } }, @@ -7425,8 +7525,12 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 } }, { "Nikon D5500", 0, 0, { 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 } }, + { "Nikon D500", 0, 0, + { 8813,-3210,-1036,-4703,12868,2021,-1054,1940,6129 } }, { "Nikon D50", 0, 0, { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } }, + { "Nikon D5", 0, 0, + { 9200,-3522,-992,-5755,13803,2117,-753,1486,6338 } }, { "Nikon D600", 0, 0x3e07, { 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 } }, { "Nikon D610", 0, 0, @@ -7437,8 +7541,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } }, { "Nikon D7100", 0, 0, { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } }, - { "Nikon D7200", 0, 0, /* DJC */ - { 6111,-2759,-358,-5108,10766,4343,-769,1691,8030 } }, + { "Nikon D7200", 0, 0, + { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } }, { "Nikon D750", 0, 0, { 9020,-2890,-715,-4535,12436,2348,-934,1919,7086 } }, { "Nikon D700", 0, 0, @@ -7503,8 +7607,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 } }, { "Nikon 1 J4", 0, 0, { 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 } }, - { "Nikon 1 J5", 0, 0, /* DJC */ - { 2621,-856,500,-4471,8761,5711,-1321,2644,11945 } }, + { "Nikon 1 J5", 0, 0, + { 7520,-2518,-645,-3844,12102,1945,-913,2249,6835 } }, { "Nikon 1 S2", 200, 0, { 6612,-1342,-618,-3338,11055,2623,-174,1792,5075 } }, { "Nikon 1 V2", 0, 0, @@ -7515,6 +7619,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } }, { "Nikon 1 ", 0, 0, /* J1, J2, S1, V1 */ { 8994,-2667,-865,-4594,12324,2552,-699,1786,6260 } }, + { "Olympus AIR A01", 0, 0, + { 8992,-3093,-639,-2563,10721,2122,-437,1270,5473 } }, { "Olympus C5050", 0, 0, { 10508,-3124,-1273,-6079,14294,1901,-1653,2306,6237 } }, { "Olympus C5060", 0, 0, @@ -7585,7 +7691,7 @@ void CLASS adobe_coeff (const char *make, const char *model) { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } }, { "Olympus E-PM2", 0, 0, { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, - { "Olympus E-M10", 0, 0, + { "Olympus E-M10", 0, 0, /* also E-M10 Mark II */ { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, { "Olympus E-M1", 0, 0, { 7687,-1984,-606,-4327,11928,2721,-1381,2339,6452 } }, @@ -7593,6 +7699,10 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 } }, { "Olympus E-M5", 0, 0xfe1, { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, + { "Olympus PEN-F", 0, 0, + { 9476,-3182,-765,-2613,10958,1893,-449,1315,5268 } }, + { "Olympus SH-2", 0, 0, + { 10156,-3425,-1077,-2611,11177,1624,-385,1592,5080 } }, { "Olympus SP350", 0, 0, { 12078,-4836,-1069,-6671,14306,2578,-786,939,7418 } }, { "Olympus SP3", 0, 0, @@ -7609,6 +7719,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 11522,-4044,-1146,-4736,12172,2904,-988,1829,6039 } }, { "Olympus STYLUS1", 0, 0, { 8360,-2420,-880,-3928,12353,1739,-1381,2416,5173 } }, + { "Olympus TG-4", 0, 0, + { 11426,-4159,-1126,-2066,10678,1593,-120,1327,4998 } }, { "Olympus XZ-10", 0, 0, { 9777,-3483,-925,-2886,11297,1800,-602,1663,5134 } }, { "Olympus XZ-1", 0, 0, @@ -7643,6 +7755,12 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8843,-2837,-625,-5025,12644,2668,-411,1234,7410 } }, { "Pentax K-r", 0, 0, { 9895,-3077,-850,-5304,13035,2521,-883,1768,6936 } }, + { "Pentax K-1", 0, 0, + { 8566,-2746,-1201,-3612,12204,1550,-893,1680,6264 } }, + { "Pentax K-30", 0, 0, + { 8710,-2632,-1167,-3995,12301,1881,-981,1719,6535 } }, + { "Pentax K-3 II", 0, 0, + { 8626,-2607,-1155,-3995,12301,1881,-1039,1822,6925 } }, { "Pentax K-3", 0, 0, { 7415,-2052,-721,-5186,12788,2682,-1446,2157,6773 } }, { "Pentax K-5 II", 0, 0, @@ -7653,6 +7771,10 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9142,-2947,-678,-8648,16967,1663,-2224,2898,8615 } }, { "Pentax K-S1", 0, 0, { 8512,-3211,-787,-4167,11966,2487,-638,1288,6054 } }, + { "Pentax K-S2", 0, 0, + { 8662,-3280,-798,-3928,11771,2444,-586,1232,6054 } }, + { "Pentax Q-S1", 0, 0, + { 12995,-5593,-1107,-1879,10139,2027,-64,1233,4919 } }, { "Pentax 645D", 0, 0x3e00, { 10646,-3593,-1158,-3329,11699,1831,-667,2874,6287 } }, { "Panasonic DMC-CM1", 15, 0, @@ -7663,6 +7785,10 @@ void CLASS adobe_coeff (const char *make, const char *model) { 9932,-3060,-935,-5809,13331,2753,-1267,2155,5575 } }, { "Panasonic DMC-FZ28", 15, 0xf96, { 10109,-3488,-993,-5412,12812,2916,-1305,2140,5543 } }, + { "Panasonic DMC-FZ330", 15, 0, + { 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 } }, + { "Panasonic DMC-FZ300", 15, 0, + { 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 } }, { "Panasonic DMC-FZ30", 0, 0xf94, { 10976,-4029,-1141,-7918,15491,2600,-1670,2071,8246 } }, { "Panasonic DMC-FZ3", 15, 0, @@ -7743,6 +7869,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 7798,-2562,-740,-3879,11584,2613,-1055,2248,5434 } }, { "Panasonic DMC-G6", 15, 0xfff, { 8294,-2891,-651,-3869,11590,2595,-1183,2267,5352 } }, + { "Panasonic DMC-G7", 15, 0xfff, + { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, { "Panasonic DMC-GF1", 15, 0xf92, { 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } }, { "Panasonic DMC-GF2", 15, 0xfff, @@ -7755,6 +7883,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8130,-2801,-946,-3520,11289,2552,-1314,2511,5791 } }, { "Panasonic DMC-GF7", 15, 0, { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, + { "Panasonic DMC-GF8", 15, 0, + { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, { "Panasonic DMC-GH1", 15, 0xf92, { 6299,-1466,-532,-6535,13852,2969,-2331,3112,5984 } }, { "Panasonic DMC-GH2", 15, 0xf95, @@ -7771,6 +7901,12 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6763,-1919,-863,-3868,11515,2684,-1216,2387,5879 } }, { "Panasonic DMC-GX7", 15, 0, { 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 } }, + { "Panasonic DMC-GX8", 15, 0, + { 7564,-2263,-606,-3148,11239,2177,-540,1435,4853 } }, + { "Panasonic DMC-TZ1", 15, 0, + { 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 } }, + { "Panasonic DMC-ZS1", 15, 0, + { 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 } }, { "Panasonic DMC-TZ6", 15, 0, { 8607,-2822,-808,-3755,11930,2049,-820,2060,5224 } }, { "Panasonic DMC-ZS4", 15, 0, @@ -7779,6 +7915,20 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8802,-3135,-789,-3151,11468,1904,-550,1745,4810 } }, { "Panasonic DMC-ZS5", 15, 0, { 8802,-3135,-789,-3151,11468,1904,-550,1745,4810 } }, + { "Panasonic DMC-TZ8", 15, 0, + { 8550,-2908,-842,-3195,11529,1881,-338,1603,4631 } }, + { "Panasonic DMC-ZS6", 15, 0, + { 8550,-2908,-842,-3195,11529,1881,-338,1603,4631 } }, + { "Leica S (Typ 007)", 0, 0, + { 6063,-2234,-231,-5210,13787,1500,-1043,2866,6997 } }, + { "Leica X", 0, 0, /* X and X-U, both (Typ 113) */ + { 7712,-2059,-653,-3882,11494,2726,-710,1332,5958 } }, + { "Leica Q (Typ 116)", 0, 0, + { 11865,-4523,-1441,-5423,14458,935,-1587,2687,4830 } }, + { "Leica M (Typ 262)", 0, 0, + { 6653,-1486,-611,-4221,13303,929,-881,2416,7226 } }, + { "Leica SL (Typ 601)", 0, 0, + { 11865,-4523,-1441,-5423,14458,935,-1587,2687,4830} }, { "Phase One H 20", 0, 0, /* DJC */ { 1313,1855,-109,-6715,15908,808,-327,1840,6020 } }, { "Phase One H 25", 0, 0, @@ -7793,8 +7943,14 @@ void CLASS adobe_coeff (const char *make, const char *model) { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, { "Phase One P65", 0, 0, { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, + { "Photron BC2-HD", 0, 0, /* DJC */ + { 14603,-4122,-528,-1810,9794,2017,-297,2763,5936 } }, { "Red One", 704, 0xffff, /* DJC */ { 21014,-7891,-2613,-3056,12201,856,-2203,5125,8042 } }, + { "Ricoh GR II", 0, 0, + { 4630,-834,-423,-4977,12805,2417,-638,1467,6115 } }, + { "Ricoh GR", 0, 0, + { 3708,-543,-160,-5381,12254,3556,-1471,1929,8234 } }, { "Samsung EX1", 0, 0x3e00, { 8898,-2498,-994,-3144,11328,2066,-760,1381,4576 } }, { "Samsung EX2F", 0, 0x7ff, @@ -7803,6 +7959,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 7557,-2522,-739,-4679,12949,1894,-840,1777,5311 } }, { "Samsung NX mini", 0, 0, { 5222,-1196,-550,-6540,14649,2009,-1666,2819,5657 } }, + { "Samsung NX3300", 0, 0, + { 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 } }, { "Samsung NX3000", 0, 0, { 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 } }, { "Samsung NX30", 0, 0, /* NX30, NX300, NX300M */ @@ -7819,8 +7977,8 @@ void CLASS adobe_coeff (const char *make, const char *model) { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, { "Samsung NX10", 0, 0, /* also NX100 */ { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, - { "Samsung NX500", 0, 0, /* DJC */ - { 10196,-4532,-272,-3888,11489,2400,-1203,2424,9173 } }, + { "Samsung NX500", 0, 0, + { 10686,-4042,-1052,-3595,13238,276,-464,1259,5931 } }, { "Samsung NX5", 0, 0, { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, { "Samsung NX1", 0, 0, @@ -7837,18 +7995,20 @@ void CLASS adobe_coeff (const char *make, const char *model) { 16442,-2956,-2422,-2877,12128,750,-1136,6066,4559 } }, { "Sony DSC-F828", 0, 0, { 7924,-1910,-777,-8226,15459,2998,-1517,2199,6818,-7242,11401,3481 } }, - { "Sony DSC-R1", 512, 0, + { "Sony DSC-R1", 0, 0, { 8512,-2641,-694,-8042,15670,2526,-1821,2117,7414 } }, { "Sony DSC-V3", 0, 0, { 7511,-2571,-692,-7894,15088,3060,-948,1111,8128 } }, - { "Sony DSC-RX100M", 200, 0, /* M2 and M3 */ + { "Sony DSC-RX100M", 0, 0, /* M2, M3, and M4 */ { 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 } }, - { "Sony DSC-RX100", 200, 0, + { "Sony DSC-RX100", 0, 0, { 8651,-2754,-1057,-3464,12207,1373,-568,1398,4434 } }, - { "Sony DSC-RX10", 200, 0, + { "Sony DSC-RX10", 0, 0, { 6679,-1825,-745,-5047,13256,1953,-1580,2422,5183 } }, - { "Sony DSC-RX1", 128, 0, - { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, + { "Sony DSC-RX1RM2", 0, 0, + { 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 } }, + { "Sony DSC-RX1", 0, 0, + { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, { "Sony DSLR-A100", 0, 0xfeb, { 9437,-2811,-774,-8405,16215,2290,-710,596,7181 } }, { "Sony DSLR-A290", 0, 0, @@ -7865,71 +8025,77 @@ void CLASS adobe_coeff (const char *make, const char *model) { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, { "Sony DSLR-A390", 0, 0, { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, - { "Sony DSLR-A450", 128, 0xfeb, + { "Sony DSLR-A450", 0, 0xfeb, { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, - { "Sony DSLR-A580", 128, 0xfeb, + { "Sony DSLR-A580", 0, 0xfeb, { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, - { "Sony DSLR-A500", 128, 0xfeb, + { "Sony DSLR-A500", 0, 0xfeb, { 6046,-1127,-278,-5574,13076,2786,-691,1419,7625 } }, - { "Sony DSLR-A5", 128, 0xfeb, + { "Sony DSLR-A5", 0, 0xfeb, { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, - { "Sony DSLR-A700", 128, 0, + { "Sony DSLR-A700", 0, 0, { 5775,-805,-359,-8574,16295,2391,-1943,2341,7249 } }, - { "Sony DSLR-A850", 128, 0, + { "Sony DSLR-A850", 0, 0, { 5413,-1162,-365,-5665,13098,2866,-608,1179,8440 } }, - { "Sony DSLR-A900", 128, 0, + { "Sony DSLR-A900", 0, 0, { 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } }, - { "Sony ILCA-77M2", 128, 0, + { "Sony ILCA-68", 0, 0, + { 6435,-1903,-536,-4722,12449,2550,-663,1363,6517 } }, + { "Sony ILCA-77M2", 0, 0, { 5991,-1732,-443,-4100,11989,2381,-704,1467,5992 } }, - { "Sony ILCE-7M2", 128, 0, + { "Sony ILCE-6300", 0, 0, + { 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 } }, + { "Sony ILCE-7M2", 0, 0, { 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 } }, - { "Sony ILCE-7S", 128, 0, + { "Sony ILCE-7S", 0, 0, /* also ILCE-7SM2 */ { 5838,-1430,-246,-3497,11477,2297,-748,1885,5778 } }, - { "Sony ILCE-7R", 128, 0, + { "Sony ILCE-7RM2", 0, 0, + { 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 } }, + { "Sony ILCE-7R", 0, 0, { 4913,-541,-202,-6130,13513,2906,-1564,2151,7183 } }, - { "Sony ILCE-7", 128, 0, + { "Sony ILCE-7", 0, 0, { 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 } }, - { "Sony ILCE", 128, 0, /* 3000, 5000, 5100, 6000, and QX1 */ + { "Sony ILCE", 0, 0, /* 3000, 5000, 5100, 6000, and QX1 */ { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony NEX-5N", 128, 0, + { "Sony NEX-5N", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony NEX-5R", 128, 0, + { "Sony NEX-5R", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, - { "Sony NEX-5T", 128, 0, + { "Sony NEX-5T", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, - { "Sony NEX-3N", 128, 0, + { "Sony NEX-3N", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, { "Sony NEX-3", 138, 0, /* DJC */ { 6907,-1256,-645,-4940,12621,2320,-1710,2581,6230 } }, { "Sony NEX-5", 116, 0, /* DJC */ { 6807,-1350,-342,-4216,11649,2567,-1089,2001,6420 } }, - { "Sony NEX-3", 128, 0, /* Adobe */ + { "Sony NEX-3", 0, 0, /* Adobe */ { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, - { "Sony NEX-5", 128, 0, /* Adobe */ + { "Sony NEX-5", 0, 0, /* Adobe */ { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, - { "Sony NEX-6", 128, 0, + { "Sony NEX-6", 0, 0, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, - { "Sony NEX-7", 128, 0, + { "Sony NEX-7", 0, 0, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "Sony NEX", 128, 0, /* NEX-C3, NEX-F3 */ + { "Sony NEX", 0, 0, /* NEX-C3, NEX-F3 */ { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A33", 128, 0, + { "Sony SLT-A33", 0, 0, { 6069,-1221,-366,-5221,12779,2734,-1024,2066,6834 } }, - { "Sony SLT-A35", 128, 0, + { "Sony SLT-A35", 0, 0, { 5986,-1618,-415,-4557,11820,3120,-681,1404,6971 } }, - { "Sony SLT-A37", 128, 0, + { "Sony SLT-A37", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A55", 128, 0, + { "Sony SLT-A55", 0, 0, { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, - { "Sony SLT-A57", 128, 0, + { "Sony SLT-A57", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A58", 128, 0, + { "Sony SLT-A58", 0, 0, { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { "Sony SLT-A65", 128, 0, + { "Sony SLT-A65", 0, 0, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "Sony SLT-A77", 128, 0, + { "Sony SLT-A77", 0, 0, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { "Sony SLT-A99", 128, 0, + { "Sony SLT-A99", 0, 0, { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, }; double cam_xyz[4][3]; @@ -8113,6 +8279,8 @@ void CLASS identify() { 5712, 3774, 62, 20, 10, 2 }, { 5792, 3804, 158, 51, 0, 0 }, { 5920, 3950, 122, 80, 2, 0 }, + { 6096, 4056, 72, 34, 0, 0 }, + { 6288, 4056, 264, 34, 0, 0 }, { 8896, 5920, 160, 64, 0, 0 }, }; static const struct { @@ -8126,6 +8294,7 @@ void CLASS identify() { 0x261, "EOS 50D" }, { 0x281, "EOS-1D Mark IV" }, { 0x287, "EOS 60D" }, { 0x167, "EOS-1DS" }, { 0x325, "EOS 70D" }, + { 0x350, "EOS 80D" }, { 0x328, "EOS-1D X Mark II" }, { 0x170, "EOS 300D" }, { 0x188, "EOS-1Ds Mark II" }, { 0x176, "EOS 450D" }, { 0x215, "EOS-1Ds Mark III" }, { 0x189, "EOS 350D" }, { 0x324, "EOS-1D C" }, @@ -8135,9 +8304,12 @@ void CLASS identify() { 0x286, "EOS 600D" }, { 0x285, "EOS 5D Mark III" }, { 0x301, "EOS 650D" }, { 0x302, "EOS 6D" }, { 0x326, "EOS 700D" }, { 0x250, "EOS 7D" }, + { 0x393, "EOS 750D" }, { 0x289, "EOS 7D Mark II" }, + { 0x347, "EOS 760D" }, { 0x254, "EOS 1000D" }, { 0x288, "EOS 1100D" }, - { 0x327, "EOS 1200D" }, + { 0x327, "EOS 1200D" }, { 0x382, "Canon EOS 5DS" }, + { 0x404, "EOS 1300D" }, { 0x401, "Canon EOS 5DS R" }, { 0x346, "EOS 100D" }, }, sonique[] = { { 0x002, "DSC-R1" }, { 0x100, "DSLR-A100" }, @@ -8165,7 +8337,10 @@ void CLASS identify() { 0x139, "ILCE-5000" }, { 0x13d, "DSC-RX100M3" }, { 0x13e, "ILCE-7S" }, { 0x13f, "ILCA-77M2" }, { 0x153, "ILCE-5100" }, { 0x154, "ILCE-7M2" }, - { 0x15a, "ILCE-QX1" }, + { 0x155, "DSC-RX100M4" },{ 0x156, "DSC-RX10M2" }, + { 0x158, "DSC-RX1RM2" }, { 0x15a, "ILCE-QX1" }, + { 0x15b, "ILCE-7RM2" }, { 0x15e, "ILCE-7SM2" }, + { 0x161, "ILCA-68" }, { 0x165, "ILCE-6300" }, }; static const struct { unsigned fsize; @@ -8202,6 +8377,7 @@ void CLASS identify() { 19131120,4168,3060,92,16, 4, 1,40,0x94,0,2,"Canon","PowerShot SX220 HS" }, { 21936096,4464,3276,25,10,73,12,40,0x16,0,2,"Canon","PowerShot SX30 IS" }, { 24724224,4704,3504, 8,16,56, 8,40,0x94,0,2,"Canon","PowerShot A3300 IS" }, + { 30858240,5248,3920, 8,16,56,16,40,0x94,0,2,"Canon","IXUS 160" }, { 1976352,1632,1211, 0, 2, 0, 1, 0,0x94,0,1,"Casio","QV-2000UX" }, { 3217760,2080,1547, 0, 0,10, 1, 0,0x94,0,1,"Casio","QV-3*00EX" }, { 6218368,2585,1924, 0, 0, 9, 0, 0,0x94,0,1,"Casio","QV-5700" }, @@ -8260,6 +8436,8 @@ void CLASS identify() { 4841984,2090,1544, 0, 0,22, 0, 0,0x94,7,1,"Pentax","Optio S" }, { 6114240,2346,1737, 0, 0,22, 0, 0,0x94,7,1,"Pentax","Optio S4" }, { 10702848,3072,2322, 0, 0, 0,21,30,0x94,0,1,"Pentax","Optio 750Z" }, + { 4147200,1920,1080, 0, 0, 0, 0, 0,0x49,0,0,"Photron","BC2-HD" }, + { 4151666,1920,1080, 0, 0, 0, 0, 0,0x49,0,0,"Photron","BC2-HD",8 }, { 13248000,2208,3000, 0, 0, 0, 0,13,0x61,0,0,"Pixelink","A782" }, { 6291456,2048,1536, 0, 0, 0, 0,96,0x61,0,0,"RoverShot","3320AF" }, { 311696, 644, 484, 0, 0, 0, 0, 0,0x16,0,8,"ST Micro","STV680 VGA" }, @@ -8276,7 +8454,7 @@ void CLASS identify() static const char *corp[] = { "AgfaPhoto", "Canon", "Casio", "Epson", "Fujifilm", "Mamiya", "Minolta", "Motorola", "Kodak", "Konica", "Leica", - "Nikon", "Nokia", "Olympus", "Pentax", "Phase One", "Ricoh", + "Nikon", "Nokia", "Olympus", "Ricoh", "Pentax", "Phase One", "Samsung", "Sigma", "Sinar", "Sony" }; char head[32], *cp; int hlen, flen, fsize, zero_fsize=1, i, c; @@ -8451,7 +8629,7 @@ void CLASS identify() parse_foveon(); else if (!memcmp (head,"CI",2)) parse_cine(); - else + if (make[0] == 0) for (zero_fsize=i=0; i < sizeof table / sizeof *table; i++) if (fsize == table[i].fsize) { strcpy (make, table[i].make ); @@ -8548,9 +8726,10 @@ void CLASS identify() width = 4014; if (dng_version) { if (filters == UINT_MAX) filters = 0; - if (filters) is_raw = tiff_samples; - else colors = tiff_samples; + if (filters) is_raw *= tiff_samples; + else colors = tiff_samples; switch (tiff_compress) { + case 0: case 1: load_raw = &CLASS packed_dng_load_raw; break; case 7: load_raw = &CLASS lossless_dng_load_raw; break; case 8: load_raw = &CLASS deflate_dng_load_raw; break; @@ -8603,6 +8782,8 @@ void CLASS identify() top_margin = filters = 0; strcpy (model,"C603"); } + if (!strcmp(make,"Sony") && raw_width > 3888) + black = 128 << (tiff_bps - 12); if (is_foveon) { if (height*2 < width) pixel_aspect = 0.5; if (height > width) pixel_aspect = 2; @@ -8618,6 +8799,10 @@ void CLASS identify() SWAP(height,width); SWAP(raw_height,raw_width); } + if (width == 7200 && height == 3888) { + raw_width = width = 6480; + raw_height = height = 4320; + } filters = 0; tiff_samples = colors = 3; load_raw = &CLASS canon_sraw_load_raw; @@ -8793,7 +8978,7 @@ canon_a5: top_margin = (raw_height - height) >> 2 << 1; left_margin = (raw_width - width ) >> 2 << 1; if (width == 2848 || width == 3664) filters = 0x16161616; - if (width == 4032 || width == 4952) left_margin = 0; + if (width == 4032 || width == 4952 || width == 6032) left_margin = 0; if (width == 3328 && (width -= 66)) left_margin = 34; if (width == 4936) left_margin = 4; if (!strcmp(model,"HS50EXR") || @@ -9067,6 +9252,8 @@ konica_400z: thumb_length = flen - (thumb_offset = 0xa39800); thumb_height = 480; thumb_width = 640; + } else if (!strcmp(model,"TG-4")) { + width -= 16; } } else if (!strcmp(model,"N Digital")) { height = 2047; @@ -9094,16 +9281,29 @@ konica_400z: order = 0x4d4d; } else if (!strcmp(make,"Sony") && raw_width == 4288) { width -= 32; + } else if (!strcmp(make,"Sony") && raw_width == 4600) { + if (!strcmp(model,"DSLR-A350")) + height -= 4; + black = 0; } else if (!strcmp(make,"Sony") && raw_width == 4928) { if (height < 3280) width -= 8; } else if (!strcmp(make,"Sony") && raw_width == 5504) { width -= height > 3664 ? 8 : 32; + if (!strncmp(model,"DSC",3)) + black = 200 << (tiff_bps - 12); } else if (!strcmp(make,"Sony") && raw_width == 6048) { width -= 24; if (strstr(model,"RX1") || strstr(model,"A99")) width -= 6; } else if (!strcmp(make,"Sony") && raw_width == 7392) { width -= 30; + } else if (!strcmp(make,"Sony") && raw_width == 8000) { + width -= 32; + if (!strncmp(model,"DSC",3)) { + tiff_bps = 14; + load_raw = &CLASS unpacked_load_raw; + black = 512; + } } else if (!strcmp(model,"DSLR-A100")) { if (width == 3880) { height--; @@ -9115,8 +9315,6 @@ konica_400z: load_flags = 2; } filters = 0x61616161; - } else if (!strcmp(model,"DSLR-A350")) { - height -= 4; } else if (!strcmp(model,"PIXL")) { height -= top_margin = 4; width -= left_margin = 32; @@ -9181,6 +9379,7 @@ bw: colors = 1; width = 768; data_offset = 1152; load_raw = &CLASS kodak_radc_load_raw; + tiff_bps = 12; } else if (strstr(model,"DC50")) { strcpy (model, "DC50"); height = 512; @@ -9271,7 +9470,7 @@ dng_skip: if (raw_color) adobe_coeff ("Apple","Quicktake"); if (fuji_width) { fuji_width = width >> !fuji_layout; - if (~fuji_width & 1) filters = 0x49494949; + filters = fuji_width & 1 ? 0x94949494 : 0x49494949; width = (height >> fuji_layout) + fuji_width; height = width - 1; pixel_aspect = 1; diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h index 856da84d1..405f202bd 100644 --- a/rtengine/dcraw.h +++ b/rtengine/dcraw.h @@ -127,6 +127,7 @@ protected: struct tiff_ifd { int width, height, bps, comp, phint, offset, flip, samples, bytes; int tile_width, tile_length, sample_format, predictor; + float shutter; } tiff_ifd[10]; struct ph1 { @@ -139,8 +140,8 @@ protected: } hbd; struct jhead { - int bits, high, wide, clrs, sraw, psv, restart, vpred[6]; - ushort *huff[6], *free[4], *row; + int algo, bits, high, wide, clrs, sraw, psv, restart, vpred[6]; + ushort quant[64], idct[64], *huff[20], *free[20], *row; }; struct tiff_tag { @@ -217,6 +218,8 @@ void ljpeg_end (struct jhead *jh); int ljpeg_diff (ushort *huff); ushort * ljpeg_row (int jrow, struct jhead *jh); void lossless_jpeg_load_raw(); +void ljpeg_idct (struct jhead *jh); + void canon_sraw_load_raw(); void adobe_copy_pixel (unsigned row, unsigned col, ushort **rp); diff --git a/rtengine/dcraw.patch b/rtengine/dcraw.patch index 88a56068c..2b4ee4102 100644 --- a/rtengine/dcraw.patch +++ b/rtengine/dcraw.patch @@ -1,5 +1,5 @@ ---- dcraw.c 2016-02-11 22:56:58.043957200 +0100 -+++ dcraw.cc 2016-02-11 23:13:28.708268000 +0100 +--- dcraw.c 2016-05-29 22:32:01.173135400 +0200 ++++ dcraw.cc 2016-05-29 21:57:44.144527700 +0200 @@ -1,3 +1,15 @@ +/*RT*/#include +/*RT*/#include @@ -15,7 +15,7 @@ + /* dcraw.c -- Dave Coffin's raw photo decoder - Copyright 1997-2015 by Dave Coffin, dcoffin a cybercom o net + Copyright 1997-2016 by Dave Coffin, dcoffin a cybercom o net @@ -29,17 +41,17 @@ #define _GNU_SOURCE #endif @@ -52,8 +52,8 @@ #define snprintf _snprintf #define strcasecmp stricmp #define strncasecmp strnicmp -@@ -98,88 +109,38 @@ - #define LONG_BIT (8 * sizeof (long)) +@@ -89,89 +100,38 @@ + #define _(String) (String) #endif -#if !defined(uchar) @@ -123,6 +123,7 @@ -struct tiff_ifd { - int width, height, bps, comp, phint, offset, flip, samples, bytes; - int tile_width, tile_length; +- float shutter; -} tiff_ifd[10]; - -struct ph1 { @@ -147,7 +148,7 @@ -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#define LIM(x,min,max) MAX(min,MIN(x,max)) -#define ULIM(x,y,z) ((y) < (z) ? LIM(x,y,z) : LIM(x,z,y)) --#define CLIP(x) LIM(x,0,65535) +-#define CLIP(x) LIM((int)(x),0,65535) +#define MIN(a,b) rtengine::min(a,static_cast<__typeof__(a)>(b)) +#define MAX(a,b) rtengine::max(a,static_cast<__typeof__(a)>(b)) +#define LIM(x,min,max) rtengine::LIM(x,static_cast<__typeof__(x)>(min),static_cast<__typeof__(x)>(max)) @@ -156,7 +157,7 @@ #define SWAP(a,b) { a=a+b; b=a-b; a=a-b; } /* -@@ -255,6 +216,7 @@ +@@ -247,6 +207,7 @@ if (filters == 1) return filter[(row+top_margin)&15][(col+left_margin)&15]; if (filters == 9) return xtrans[(row+6) % 6][(col+6) % 6]; @@ -164,7 +165,7 @@ return FC(row,col); } -@@ -297,6 +259,7 @@ +@@ -289,6 +250,7 @@ fprintf (stderr,_("Corrupt data near 0x%llx\n"), (INT64) ftello(ifp)); } data_error++; @@ -172,7 +173,7 @@ } ushort CLASS sget2 (uchar *s) -@@ -370,7 +333,7 @@ +@@ -362,7 +324,7 @@ { if (fread (pixel, 2, count, ifp) < count) derror(); if ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) @@ -181,7 +182,7 @@ } void CLASS cubic_spline (const int *x_, const int *y_, const int len) -@@ -597,10 +560,10 @@ +@@ -589,10 +551,10 @@ return 0; } @@ -195,17 +196,45 @@ unsigned c; if (nbits > 25) return 0; -@@ -824,7 +787,8 @@ +@@ -805,9 +767,13 @@ + FORC(2) free (huff[c]); + } + ++/* ++ Not a full implementation of Lossless JPEG, just ++ enough to decode Canon, Kodak and Adobe DNG images. ++ */ + struct jhead { +- int algo, bits, high, wide, clrs, sraw, psv, restart, vpred[6]; +- ushort quant[64], idct[64], *huff[20], *free[20], *row; ++ int bits, high, wide, clrs, sraw, psv, restart, vpred[6]; ++ ushort *huff[6], *free[4], *row; + }; int CLASS ljpeg_start (struct jhead *jh, int info_only) - { -- int c, tag, len; -+ int c, tag; -+ ushort len; - uchar data[0x10000]; - const uchar *dp; - -@@ -1284,14 +1248,14 @@ +@@ -828,9 +794,9 @@ + switch (tag) { + case 0xffc3: + jh->sraw = ((data[7] >> 4) * (data[7] & 15) - 1) & 3; +- case 0xffc1: ++ case 0xffc1: + case 0xffc0: +- jh->algo = tag & 0xff; ++ jh->algo = tag & 0xff; + jh->bits = data[0]; + jh->high = data[1] << 8 | data[2]; + jh->wide = data[3] << 8 | data[4]; +@@ -1124,8 +1090,7 @@ + if (++col >= tile_width || col >= raw_width) + row += 1 + (col = 0); + } +- } +- } ++ } } + fseek (ifp, save+4, SEEK_SET); + if ((tcol += tile_width) >= raw_width) + trow += tile_length + (tcol = 0); +@@ -1332,14 +1297,14 @@ int i, nz; char tail[424]; @@ -222,7 +251,7 @@ void CLASS ppm_thumb() { -@@ -1653,10 +1617,10 @@ +@@ -1701,10 +1666,10 @@ } } @@ -236,17 +265,7 @@ unsigned c; if (nbits == -1) -@@ -1721,7 +1685,8 @@ - pixel[col] = curve[pixel[col]]; - } - for (col=0; col < raw_width; col++) { -- i = (pixel[col] << 2) - ph1.black -+ if (ph1.format != 8) pixel[col] <<= 2; -+ i = pixel[col] - ph1.black - + cblack[row][col >= ph1.split_col] - + rblack[col][row >= ph1.split_row]; - if (i > 0) RAW(row,col) = i; -@@ -1731,6 +1696,338 @@ +@@ -1779,6 +1744,338 @@ maximum = 0xfffc - ph1.black; } @@ -585,7 +604,7 @@ void CLASS hasselblad_load_raw() { struct jhead jh; -@@ -1954,10 +2251,10 @@ +@@ -2002,10 +2299,10 @@ maximum = curve[0x3ff]; } @@ -599,7 +618,7 @@ int byte; if (!nbits) return vbits=0; -@@ -2140,7 +2437,7 @@ +@@ -2188,7 +2485,7 @@ void CLASS kodak_radc_load_raw() { @@ -608,7 +627,7 @@ 1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8, 1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8, 2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8, -@@ -2246,11 +2543,11 @@ +@@ -2294,11 +2591,11 @@ METHODDEF(boolean) fill_input_buffer (j_decompress_ptr cinfo) { @@ -622,7 +641,7 @@ cinfo->src->next_input_byte = jpeg_buffer; cinfo->src->bytes_in_buffer = nbytes; return TRUE; -@@ -2600,10 +2897,9 @@ +@@ -2648,10 +2945,9 @@ maximum = (1 << (thumb_misc & 31)) - 1; } @@ -635,7 +654,7 @@ if (start) { for (p=0; p < 4; p++) pad[p] = key = key * 48828125 + 1; -@@ -2688,11 +2984,13 @@ +@@ -2736,11 +3032,13 @@ bit += 7; } for (i=0; i < 16; i++, col+=2) @@ -650,7 +669,7 @@ } void CLASS samsung_load_raw() -@@ -2988,7 +3286,7 @@ +@@ -3038,7 +3336,7 @@ void CLASS foveon_decoder (unsigned size, unsigned code) { @@ -659,7 +678,7 @@ struct decode *cur; int i, len; -@@ -3085,7 +3383,7 @@ +@@ -3135,7 +3433,7 @@ pred[c] += diff[dindex->leaf]; if (pred[c] >> 16 && ~pred[c] >> 16) derror(); } @@ -668,7 +687,7 @@ } } } -@@ -3696,6 +3994,8 @@ +@@ -3746,6 +4044,8 @@ if (load_raw == &CLASS phase_one_load_raw || load_raw == &CLASS phase_one_load_raw_c) phase_one_correct(); @@ -677,7 +696,7 @@ if (fuji_width) { for (row=0; row < raw_height-top_margin*2; row++) { for (col=0; col < fuji_width << !fuji_layout; col++) { -@@ -3711,10 +4011,13 @@ +@@ -3761,10 +4061,13 @@ } } } else { @@ -693,7 +712,7 @@ if (mask[0][3] > 0) goto mask_set; if (load_raw == &CLASS canon_load_raw || load_raw == &CLASS lossless_jpeg_load_raw) { -@@ -4316,239 +4619,8 @@ +@@ -4366,239 +4669,8 @@ } } @@ -702,8 +721,7 @@ - int code[16][16][32], size=16, *ip, sum[4]; - int f, c, i, x, y, row, col, shift, color; - ushort *pix; -+/* RT: delete interpolation functions */ - +- - if (verbose) fprintf (stderr,_("Bilinear interpolation...\n")); - if (filters == 9) size = 6; - border_interpolate(1); @@ -886,7 +904,8 @@ - int dir[5] = { 1, width, -1, -width, 1 }; - int row, col, diff[2], guess[2], c, d, i; - ushort (*pix)[4]; -- ++/* RT: delete interpolation functions */ + - border_interpolate(3); - if (verbose) fprintf (stderr,_("PPG interpolation...\n")); - @@ -934,7 +953,7 @@ void CLASS cielab (ushort rgb[3], short lab[3]) { -@@ -4814,112 +4886,7 @@ +@@ -4864,112 +4936,7 @@ } #undef fcol @@ -952,7 +971,7 @@ - char (*homo)[TS][TS], *buffer; - - if (verbose) fprintf (stderr,_("AHD interpolation...\n")); - +- - cielab (0,0); - border_interpolate(5); - buffer = (char *) malloc (26*TS*TS); @@ -960,7 +979,7 @@ - rgb = (ushort(*)[TS][TS][3]) buffer; - lab = (short (*)[TS][TS][3])(buffer + 12*TS*TS); - homo = (char (*)[TS][TS]) (buffer + 24*TS*TS); -- + - for (top=2; top < height-5; top += TS-6) - for (left=2; left < width-5; left += TS-6) { - @@ -1047,7 +1066,7 @@ #undef TS void CLASS median_filter() -@@ -5089,7 +5056,7 @@ +@@ -5139,7 +5106,7 @@ } } @@ -1056,7 +1075,7 @@ void CLASS parse_makernote (int base, int uptag) { -@@ -5194,6 +5161,11 @@ +@@ -5244,6 +5211,11 @@ tag |= uptag << 16; if (tag == 2 && strstr(make,"NIKON") && !iso_speed) iso_speed = (get2(),get2()); @@ -1068,7 +1087,7 @@ if (tag == 4 && len > 26 && len < 35) { if ((i=(get4(),get2())) != 0x7fff && !iso_speed) iso_speed = 50 * pow (2, i/32.0 - 4); -@@ -5246,12 +5218,16 @@ +@@ -5296,12 +5268,16 @@ cam_mul[2] = get4() << 2; } } @@ -1086,15 +1105,25 @@ if (tag == 0x1d) while ((c = fgetc(ifp)) && c != EOF) serial = serial*10 + (isdigit(c) ? c - '0' : c % 10); -@@ -5442,6 +5418,7 @@ - case 33434: shutter = getreal(type); break; +@@ -5491,14 +5467,14 @@ + while (entries--) { + tiff_get (base, &tag, &type, &len, &save); + switch (tag) { +- case 33434: tiff_ifd[tiff_nifds-1].shutter = +- shutter = getreal(type); break; ++ case 33434: tiff_ifd[tiff_nifds-1].shutter = shutter = getreal(type); break; case 33437: aperture = getreal(type); break; case 34855: iso_speed = get2(); break; + case 34866: if((!iso_speed) || iso_speed == 65535) iso_speed = get4();break; case 36867: case 36868: get_timestamp(0); break; case 37377: if ((expo = -getreal(type)) < 128) -@@ -5613,28 +5590,33 @@ +- tiff_ifd[tiff_nifds-1].shutter = ++ tiff_ifd[tiff_nifds-1].shutter = + shutter = pow (2, expo); break; + case 37378: aperture = pow (2, getreal(type)/2); break; + case 37386: focal_len = getreal(type); break; +@@ -5667,28 +5643,33 @@ } } @@ -1134,7 +1163,7 @@ entries = get2(); if (entries > 512) return 1; while (entries--) { -@@ -5702,7 +5684,8 @@ +@@ -5758,7 +5739,8 @@ fgets (make, 64, ifp); break; case 272: /* Model */ @@ -1144,7 +1173,7 @@ break; case 280: /* Panasonic RW2 offset */ if (type != 4) break; -@@ -5762,6 +5745,9 @@ +@@ -5818,6 +5800,9 @@ case 315: /* Artist */ fread (artist, 64, 1, ifp); break; @@ -1154,7 +1183,7 @@ case 322: /* TileWidth */ tiff_ifd[ifd].tile_width = getint(type); break; -@@ -5777,6 +5763,9 @@ +@@ -5833,6 +5818,9 @@ is_raw = 5; } break; @@ -1164,7 +1193,7 @@ case 330: /* SubIFDs */ if (!strcmp(model,"DSLR-A100") && tiff_ifd[ifd].width == 3872) { load_raw = &CLASS sony_arw_load_raw; -@@ -5790,6 +5779,9 @@ +@@ -5846,6 +5834,9 @@ fseek (ifp, i+4, SEEK_SET); } break; @@ -1174,17 +1203,7 @@ case 400: strcpy (make, "Sarnoff"); maximum = 0xfff; -@@ -5971,6 +5963,9 @@ - if (!make[0]) strcpy (make, "DNG"); - is_raw = 1; - break; -+ case 50708: /* UniqueCameraModel */ -+ fgets (model3, 64, ifp); -+ break; - case 50710: /* CFAPlaneColor */ - if (filters == 9) break; - if (len > 4) len = 4; -@@ -6002,12 +5997,21 @@ +@@ -6063,12 +6054,21 @@ case 61450: cblack[4] = cblack[5] = MIN(sqrt(len),64); case 50714: /* BlackLevel */ @@ -1211,8 +1230,8 @@ + break; case 50715: /* BlackLevelDeltaH */ case 50716: /* BlackLevelDeltaV */ - for (num=i=0; i < len; i++) -@@ -6024,13 +6028,13 @@ + for (num=i=0; i < (len & 0xffff); i++) +@@ -6085,13 +6085,13 @@ case 50721: /* ColorMatrix1 */ case 50722: /* ColorMatrix2 */ FORCC for (j=0; j < 3; j++) @@ -1228,7 +1247,7 @@ break; case 50727: /* AnalogBalance */ FORCC ab[c] = getreal(type); -@@ -6053,6 +6057,11 @@ +@@ -6114,6 +6114,11 @@ case 50752: read_shorts (cr2_slice, 3); break; @@ -1240,7 +1259,7 @@ case 50829: /* ActiveArea */ top_margin = getint(type); left_margin = getint(type); -@@ -6085,21 +6094,27 @@ +@@ -6146,21 +6151,27 @@ fread (buf, sony_length, 1, ifp); sony_decrypt (buf, sony_length/4, 1, sony_key); sfp = ifp; @@ -1276,7 +1295,7 @@ cam_xyz_coeff (cmatrix, cam_xyz); } if (asn[0]) { -@@ -6107,13 +6122,14 @@ +@@ -6168,13 +6179,14 @@ FORCC cam_mul[c] = 1 / asn[c]; } if (!use_cm) @@ -1292,7 +1311,15 @@ fseek (ifp, base, SEEK_SET); order = get2(); -@@ -6191,7 +6207,12 @@ +@@ -6206,6 +6218,7 @@ + shutter = tiff_ifd[i].shutter; + tiff_ifd[i].shutter = shutter; + } ++ + for (i=0; i < tiff_nifds; i++) { + if (max_samp < tiff_ifd[i].samples) + max_samp = tiff_ifd[i].samples; +@@ -6266,7 +6279,12 @@ case 8: load_raw = &CLASS eight_bit_load_raw; break; case 12: if (tiff_ifd[raw].phint == 2) load_flags = 6; @@ -1306,7 +1333,7 @@ case 14: load_flags = 0; case 16: load_raw = &CLASS unpacked_load_raw; if (!strncmp(make,"OLYMPUS",7) && -@@ -6230,6 +6251,7 @@ +@@ -6305,6 +6323,7 @@ case 32803: load_raw = &CLASS kodak_65000_load_raw; } case 32867: case 34892: break; @@ -1314,7 +1341,7 @@ default: is_raw = 0; } if (!dng_version) -@@ -6315,7 +6337,7 @@ +@@ -6390,7 +6409,7 @@ { const char *file, *ext; char *jname, *jfile, *jext; @@ -1323,7 +1350,7 @@ ext = strrchr (ifname, '.'); file = strrchr (ifname, '/'); -@@ -6337,13 +6359,14 @@ +@@ -6412,13 +6431,14 @@ } else while (isdigit(*--jext)) { if (*jext != '9') { @@ -1340,7 +1367,7 @@ if (verbose) fprintf (stderr,_("Reading metadata from %s ...\n"), jname); parse_tiff (12); -@@ -6620,6 +6643,7 @@ +@@ -6693,6 +6713,7 @@ load_raw = ph1.format < 3 ? &CLASS phase_one_load_raw : &CLASS phase_one_load_raw_c; maximum = 0xffff; @@ -1348,16 +1375,7 @@ strcpy (make, "Phase One"); if (model[0]) return; switch (raw_height) { -@@ -6658,7 +6682,7 @@ - } else if (tag == 0xc000) { - c = order; - order = 0x4949; -- if ((tag = get4()) > 10000) tag = get4(); -+ while ((tag = get4()) > 10000); - width = tag; - height = get4(); - order = c; -@@ -6688,7 +6712,11 @@ +@@ -6761,7 +6782,11 @@ order = get2(); hlen = get4(); if (get4() == 0x48454150) /* "HEAP" */ @@ -1369,7 +1387,7 @@ if (parse_tiff (save+6)) apply_tiff(); fseek (ifp, save+len, SEEK_SET); } -@@ -6960,7 +6988,8 @@ +@@ -7033,7 +7058,8 @@ { static const struct { const char *prefix; @@ -1379,7 +1397,22 @@ } table[] = { { "AgfaPhoto DC-833m", 0, 0, /* DJC */ { 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } }, -@@ -7919,6 +7948,33 @@ +@@ -7977,12 +8003,12 @@ + { 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 } }, + { "Sony DSC-RX100", 0, 0, + { 8651,-2754,-1057,-3464,12207,1373,-568,1398,4434 } }, +- { "Sony DSC-RX10", 0, 0, /* also RX10M2 */ ++ { "Sony DSC-RX10", 0, 0, + { 6679,-1825,-745,-5047,13256,1953,-1580,2422,5183 } }, + { "Sony DSC-RX1RM2", 0, 0, + { 6629,-1900,-483,-4618,12349,2550,-622,1381,6514 } }, + { "Sony DSC-RX1", 0, 0, +- { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, ++ { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, + { "Sony DSLR-A100", 0, 0xfeb, + { 9437,-2811,-774,-8405,16215,2290,-710,596,7181 } }, + { "Sony DSLR-A290", 0, 0, +@@ -8088,6 +8114,33 @@ } break; } @@ -1413,7 +1446,7 @@ } void CLASS simple_coeff (int index) -@@ -8229,7 +8285,7 @@ +@@ -8410,7 +8463,7 @@ tiff_flip = flip = filters = UINT_MAX; /* unknown */ raw_height = raw_width = fuji_width = fuji_layout = cr2_slice[0] = 0; maximum = height = width = top_margin = left_margin = 0; @@ -1422,7 +1455,7 @@ iso_speed = shutter = aperture = focal_len = unique_id = 0; tiff_nifds = 0; memset (tiff_ifd, 0, sizeof tiff_ifd); -@@ -8261,13 +8317,20 @@ +@@ -8442,13 +8495,20 @@ fread (head, 1, 32, ifp); fseek (ifp, 0, SEEK_END); flen = fsize = ftell(ifp); @@ -1445,7 +1478,7 @@ parse_ciff (hlen, flen-hlen, 0); load_raw = &CLASS canon_load_raw; } else if (parse_tiff(0)) apply_tiff(); -@@ -8313,6 +8376,7 @@ +@@ -8494,6 +8554,7 @@ fseek (ifp, 100+28*(shot_select > 0), SEEK_SET); parse_tiff (data_offset = get4()); parse_tiff (thumb_offset+12); @@ -1453,7 +1486,7 @@ apply_tiff(); } else if (!memcmp (head,"RIFF",4)) { fseek (ifp, 0, SEEK_SET); -@@ -8426,9 +8490,10 @@ +@@ -8607,9 +8668,10 @@ if (make[0] == 0) parse_smal (0, flen); if (make[0] == 0) { parse_jpeg(0); @@ -1467,7 +1500,7 @@ strcpy (make, "OmniVision"); data_offset = ftell(ifp) + 0x8000-32; width = raw_width; -@@ -8437,6 +8502,7 @@ +@@ -8618,6 +8680,7 @@ filters = 0x16161616; } else is_raw = 0; } @@ -1475,7 +1508,7 @@ for (i=0; i < sizeof corp / sizeof *corp; i++) if (strcasestr (make, corp[i])) /* Simplify company names */ -@@ -8468,7 +8534,7 @@ +@@ -8649,7 +8712,7 @@ if (height == 3136 && width == 4864) /* Pentax K20D and Samsung GX20 */ { height = 3124; width = 4688; filters = 0x16161616; } if (width == 4352 && (!strcmp(model,"K-r") || !strcmp(model,"K-x"))) @@ -1484,15 +1517,15 @@ if (width >= 4960 && !strncmp(model,"K-5",3)) { left_margin = 10; width = 4950; filters = 0x16161616; } if (width == 4736 && !strcmp(model,"K-7")) -@@ -8487,6 +8553,7 @@ - switch (tiff_compress) { +@@ -8669,6 +8732,7 @@ + case 0: case 1: load_raw = &CLASS packed_dng_load_raw; break; case 7: load_raw = &CLASS lossless_dng_load_raw; break; + case 8: load_raw = &CLASS deflate_dng_load_raw; break; case 34892: load_raw = &CLASS lossy_dng_load_raw; break; default: load_raw = 0; } -@@ -8541,6 +8608,7 @@ +@@ -8725,6 +8789,7 @@ if (height > width) pixel_aspect = 2; filters = 0; simple_coeff(0); @@ -1500,7 +1533,7 @@ } else if (!strcmp(make,"Canon") && tiff_bps == 15) { switch (width) { case 3344: width -= 66; -@@ -8846,24 +8914,53 @@ +@@ -9034,24 +9099,53 @@ if (load_raw == &CLASS lossless_jpeg_load_raw) load_raw = &CLASS hasselblad_load_raw; if (raw_width == 7262) { @@ -1559,7 +1592,7 @@ } else if (raw_width == 4090) { strcpy (model, "V96C"); height -= (top_margin = 6); -@@ -8921,6 +9018,7 @@ +@@ -9109,6 +9203,7 @@ filters = 0x16161616; } } else if (!strcmp(make,"Leica") || !strcmp(make,"Panasonic")) { @@ -1567,7 +1600,7 @@ if ((flen - data_offset) / (raw_width*8/7) == raw_height) load_raw = &CLASS panasonic_load_raw; if (!load_raw) { -@@ -8938,6 +9036,7 @@ +@@ -9126,6 +9221,7 @@ } filters = 0x01010101 * (uchar) "\x94\x61\x49\x16" [((filters-1) ^ (left_margin & 1) ^ (top_margin << 1)) & 3]; @@ -1575,7 +1608,7 @@ } else if (!strcmp(model,"C770UZ")) { height = 1718; width = 2304; -@@ -9155,6 +9254,18 @@ +@@ -9357,6 +9453,18 @@ memcpy (rgb_cam, cmatrix, sizeof cmatrix); raw_color = 0; } @@ -1594,7 +1627,7 @@ if (raw_color) adobe_coeff (make, model); if (load_raw == &CLASS kodak_radc_load_raw) if (raw_color) adobe_coeff ("Apple","Quicktake"); -@@ -9169,9 +9280,9 @@ +@@ -9371,9 +9479,9 @@ if (raw_width < width ) raw_width = width; } if (!tiff_bps) tiff_bps = 12; @@ -1606,7 +1639,7 @@ is_raw = 0; #ifdef NO_JASPER if (load_raw == &CLASS redcine_load_raw) { -@@ -9250,194 +9361,249 @@ +@@ -9452,199 +9560,250 @@ } #endif @@ -1634,10 +1667,14 @@ - { { 0.529317, 0.330092, 0.140588 }, - { 0.098368, 0.873465, 0.028169 }, - { 0.016879, 0.117663, 0.865457 } }; +- static const double aces_rgb[3][3] = +- { { 0.432996, 0.375380, 0.189317 }, +- { 0.089427, 0.816523, 0.102989 }, +- { 0.019165, 0.118150, 0.941914 } }; - static const double (*out_rgb[])[3] = -- { rgb_rgb, adobe_rgb, wide_rgb, prophoto_rgb, xyz_rgb }; +- { rgb_rgb, adobe_rgb, wide_rgb, prophoto_rgb, xyz_rgb, aces_rgb }; - static const char *name[] = -- { "sRGB", "Adobe RGB (1998)", "WideGamut D65", "ProPhoto D65", "XYZ" }; +- { "sRGB", "Adobe RGB (1998)", "WideGamut D65", "ProPhoto D65", "XYZ", "ACES" }; - static const unsigned phead[] = - { 1024, 0, 0x2100000, 0x6d6e7472, 0x52474220, 0x58595a20, 0, 0, 0, - 0x61637370, 0, 0, 0x6e6f6e65, 0, 0, 0, 0, 0xf6d6, 0x10000, 0xd32d }; @@ -1658,7 +1695,7 @@ - gamma_curve (gamm[0], gamm[1], 0, 0); - memcpy (out_cam, rgb_cam, sizeof out_cam); - raw_color |= colors == 1 || document_mode || -- output_color < 1 || output_color > 5; +- output_color < 1 || output_color > 6; - if (!raw_color) { - oprof = (unsigned *) calloc (phead[0], 1); - merror (oprof, "convert_to_rgb()"); @@ -2023,37 +2060,42 @@ + + delete [] cBuffer; + delete [] uBuffer; - } ++} + } + + if (ifd->sample_format == 3) { // Floating point data + copyFloatDataToInt(float_raw_image, raw_image, raw_width*raw_height, maximum); + } -+} -+ -+/* RT: removed unused functions */ + } ++/* RT: removed unused functions */ ++ struct tiff_tag { ushort tag, type; -@@ -9461,590 +9627,11 @@ + int count; +@@ -9667,594 +9826,11 @@ char desc[512], make[64], model[64], soft[32], date[20], artist[64]; }; --void CLASS tiff_set (ushort *ntag, +-void CLASS tiff_set (struct tiff_hdr *th, ushort *ntag, - ushort tag, ushort type, int count, int val) -{ - struct tiff_tag *tt; - int c; - - tt = (struct tiff_tag *)(ntag+1) + (*ntag)++; -- tt->tag = tag; -- tt->type = type; -- tt->count = count; -- if (type < 3 && count <= 4) +- tt->val.i = val; +- if (type == 1 && count <= 4) - FORC(4) tt->val.c[c] = val >> (c << 3); -- else if (type == 3 && count <= 2) +- else if (type == 2) { +- count = strnlen((char *)th + val, count-1) + 1; +- if (count <= 4) +- FORC(4) tt->val.c[c] = ((char *)th)[val+c]; +- } else if (type == 3 && count <= 2) - FORC(2) tt->val.s[c] = val >> (c << 4); -- else tt->val.i = val; +- tt->count = count; +- tt->type = type; +- tt->tag = tag; -} - -#define TOFF(ptr) ((char *)(&(ptr)) - (char *)th) @@ -2067,55 +2109,6 @@ - th->order = htonl(0x4d4d4949) >> 16; - th->magic = 42; - th->ifd = 10; -- if (full) { -- tiff_set (&th->ntag, 254, 4, 1, 0); -- tiff_set (&th->ntag, 256, 4, 1, width); -- tiff_set (&th->ntag, 257, 4, 1, height); -- tiff_set (&th->ntag, 258, 3, colors, output_bps); -- if (colors > 2) -- th->tag[th->ntag-1].val.i = TOFF(th->bps); -- FORC4 th->bps[c] = output_bps; -- tiff_set (&th->ntag, 259, 3, 1, 1); -- tiff_set (&th->ntag, 262, 3, 1, 1 + (colors > 1)); -- } -- tiff_set (&th->ntag, 270, 2, 512, TOFF(th->desc)); -- tiff_set (&th->ntag, 271, 2, 64, TOFF(th->make)); -- tiff_set (&th->ntag, 272, 2, 64, TOFF(th->model)); -- if (full) { -- if (oprof) psize = ntohl(oprof[0]); -- tiff_set (&th->ntag, 273, 4, 1, sizeof *th + psize); -- tiff_set (&th->ntag, 277, 3, 1, colors); -- tiff_set (&th->ntag, 278, 4, 1, height); -- tiff_set (&th->ntag, 279, 4, 1, height*width*colors*output_bps/8); -- } else -- tiff_set (&th->ntag, 274, 3, 1, "12435867"[flip]-'0'); -- tiff_set (&th->ntag, 282, 5, 1, TOFF(th->rat[0])); -- tiff_set (&th->ntag, 283, 5, 1, TOFF(th->rat[2])); -- tiff_set (&th->ntag, 284, 3, 1, 1); -- tiff_set (&th->ntag, 296, 3, 1, 2); -- tiff_set (&th->ntag, 305, 2, 32, TOFF(th->soft)); -- tiff_set (&th->ntag, 306, 2, 20, TOFF(th->date)); -- tiff_set (&th->ntag, 315, 2, 64, TOFF(th->artist)); -- tiff_set (&th->ntag, 34665, 4, 1, TOFF(th->nexif)); -- if (psize) tiff_set (&th->ntag, 34675, 7, psize, sizeof *th); -- tiff_set (&th->nexif, 33434, 5, 1, TOFF(th->rat[4])); -- tiff_set (&th->nexif, 33437, 5, 1, TOFF(th->rat[6])); -- tiff_set (&th->nexif, 34855, 3, 1, iso_speed); -- tiff_set (&th->nexif, 37386, 5, 1, TOFF(th->rat[8])); -- if (gpsdata[1]) { -- tiff_set (&th->ntag, 34853, 4, 1, TOFF(th->ngps)); -- tiff_set (&th->ngps, 0, 1, 4, 0x202); -- tiff_set (&th->ngps, 1, 2, 2, gpsdata[29]); -- tiff_set (&th->ngps, 2, 5, 3, TOFF(th->gps[0])); -- tiff_set (&th->ngps, 3, 2, 2, gpsdata[30]); -- tiff_set (&th->ngps, 4, 5, 3, TOFF(th->gps[6])); -- tiff_set (&th->ngps, 5, 1, 1, gpsdata[31]); -- tiff_set (&th->ngps, 6, 5, 1, TOFF(th->gps[18])); -- tiff_set (&th->ngps, 7, 5, 3, TOFF(th->gps[12])); -- tiff_set (&th->ngps, 18, 2, 12, TOFF(th->gps[20])); -- tiff_set (&th->ngps, 29, 2, 12, TOFF(th->gps[23])); -- memcpy (th->gps, gpsdata, sizeof th->gps); -- } - th->rat[0] = th->rat[2] = 300; - th->rat[1] = th->rat[3] = 1; - FORC(6) th->rat[4+c] = 1000000; @@ -2130,6 +2123,55 @@ - sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", - t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); - strncpy (th->artist, artist, 64); +- if (full) { +- tiff_set (th, &th->ntag, 254, 4, 1, 0); +- tiff_set (th, &th->ntag, 256, 4, 1, width); +- tiff_set (th, &th->ntag, 257, 4, 1, height); +- tiff_set (th, &th->ntag, 258, 3, colors, output_bps); +- if (colors > 2) +- th->tag[th->ntag-1].val.i = TOFF(th->bps); +- FORC4 th->bps[c] = output_bps; +- tiff_set (th, &th->ntag, 259, 3, 1, 1); +- tiff_set (th, &th->ntag, 262, 3, 1, 1 + (colors > 1)); +- } +- tiff_set (th, &th->ntag, 270, 2, 512, TOFF(th->desc)); +- tiff_set (th, &th->ntag, 271, 2, 64, TOFF(th->make)); +- tiff_set (th, &th->ntag, 272, 2, 64, TOFF(th->model)); +- if (full) { +- if (oprof) psize = ntohl(oprof[0]); +- tiff_set (th, &th->ntag, 273, 4, 1, sizeof *th + psize); +- tiff_set (th, &th->ntag, 277, 3, 1, colors); +- tiff_set (th, &th->ntag, 278, 4, 1, height); +- tiff_set (th, &th->ntag, 279, 4, 1, height*width*colors*output_bps/8); +- } else +- tiff_set (th, &th->ntag, 274, 3, 1, "12435867"[flip]-'0'); +- tiff_set (th, &th->ntag, 282, 5, 1, TOFF(th->rat[0])); +- tiff_set (th, &th->ntag, 283, 5, 1, TOFF(th->rat[2])); +- tiff_set (th, &th->ntag, 284, 3, 1, 1); +- tiff_set (th, &th->ntag, 296, 3, 1, 2); +- tiff_set (th, &th->ntag, 305, 2, 32, TOFF(th->soft)); +- tiff_set (th, &th->ntag, 306, 2, 20, TOFF(th->date)); +- tiff_set (th, &th->ntag, 315, 2, 64, TOFF(th->artist)); +- tiff_set (th, &th->ntag, 34665, 4, 1, TOFF(th->nexif)); +- if (psize) tiff_set (th, &th->ntag, 34675, 7, psize, sizeof *th); +- tiff_set (th, &th->nexif, 33434, 5, 1, TOFF(th->rat[4])); +- tiff_set (th, &th->nexif, 33437, 5, 1, TOFF(th->rat[6])); +- tiff_set (th, &th->nexif, 34855, 3, 1, iso_speed); +- tiff_set (th, &th->nexif, 37386, 5, 1, TOFF(th->rat[8])); +- if (gpsdata[1]) { +- tiff_set (th, &th->ntag, 34853, 4, 1, TOFF(th->ngps)); +- tiff_set (th, &th->ngps, 0, 1, 4, 0x202); +- tiff_set (th, &th->ngps, 1, 2, 2, gpsdata[29]); +- tiff_set (th, &th->ngps, 2, 5, 3, TOFF(th->gps[0])); +- tiff_set (th, &th->ngps, 3, 2, 2, gpsdata[30]); +- tiff_set (th, &th->ngps, 4, 5, 3, TOFF(th->gps[6])); +- tiff_set (th, &th->ngps, 5, 1, 1, gpsdata[31]); +- tiff_set (th, &th->ngps, 6, 5, 1, TOFF(th->gps[18])); +- tiff_set (th, &th->ngps, 7, 5, 3, TOFF(th->gps[12])); +- tiff_set (th, &th->ngps, 18, 2, 12, TOFF(th->gps[20])); +- tiff_set (th, &th->ngps, 29, 2, 12, TOFF(th->gps[23])); +- memcpy (th->gps, gpsdata, sizeof th->gps); +- } -} - -void CLASS jpeg_thumb() @@ -2250,7 +2292,7 @@ - puts(_("-n Set threshold for wavelet denoising")); - puts(_("-H [0-9] Highlight mode (0=clip, 1=unclip, 2=blend, 3+=rebuild)")); - puts(_("-t [0-7] Flip image (0=none, 3=180, 5=90CCW, 6=90CW)")); -- puts(_("-o [0-5] Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ)")); +- puts(_("-o [0-6] Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ,ACES)")); -#ifndef NO_LCMS - puts(_("-o Apply output ICC profile from file")); - puts(_("-p Apply camera ICC profile from file or \"embed\"")); diff --git a/rtengine/iccmatrices.h b/rtengine/iccmatrices.h index 9e9682a73..292f45612 100644 --- a/rtengine/iccmatrices.h +++ b/rtengine/iccmatrices.h @@ -54,7 +54,7 @@ const double sRGB_xyz[3][3] = {{3.13593293538656, -1.61878246026431, // Color space conversion to/from XYZ; color spaces adapted to D50 using Bradford transform -const double xyz_sRGB[3][3] = {{0.4360747, 0.3850649, 0.1430804}, +const double xyz_sRGB[3][3] = {{0.4360747, 0.3850649, 0.1430804}, {0.2225045, 0.7168786, 0.0606169}, {0.0139322, 0.0971045, 0.7141733} }; @@ -83,6 +83,26 @@ const double prophoto_xyz[3][3] = {{1.3459433, -0.2556075, -0.0511118}, { -0.5445989, 1.5081673, 0.0205351}, {0.0000000, 0.0000000, 1.2118128} }; +/* +const double xyz_rec2020[3][3] = {{0.636958, 0.144617, 0.168881}, + {0.262700, 0.677998, 0.059302}, + {0.0000000, 0.028073, 1.060985} +}; + +const double rec2020_xyz[3][3] = {{1.716651, -0.355671, -0.253366}, + { -0.666684, 1.616481, 0.015769}, + {0.017640, -0.042771, 0.942103} +}; +*/ +const double xyz_rec2020[3][3] = {{0.6734241, 0.1656411, 0.1251286}, + {0.2790177, 0.6753402, 0.0456377}, + { -0.0019300, 0.0299784, 0.7973330} +}; + +const double rec2020_xyz[3][3] = {{1.6473376, -0.3935675, -0.2359961}, + { -0.6826036, 1.6475887, 0.0128190}, + {0.0296524, -0.0628993, 1.2531279} +}; const double xyz_widegamut[3][3] = {{0.7161046, 0.1009296, 0.1471858}, {0.2581874, 0.7249378, 0.0168748}, diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index cb5314489..82f280e54 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -41,8 +41,9 @@ void loadProfiles (const Glib::ustring& dirName, std::map* profileNames, bool nameUpper, bool onlyRgb) { - if (dirName.empty ()) + if (dirName.empty ()) { return; + } try { @@ -52,23 +53,27 @@ void loadProfiles (const Glib::ustring& dirName, const Glib::ustring fileName = *entry; - if (fileName.size () < 4) + if (fileName.size () < 4) { continue; + } const Glib::ustring extension = fileName.substr (fileName.size () - 4).casefold (); - if (extension.compare (".icc") != 0 && extension.compare (".icm") != 0) + if (extension.compare (".icc") != 0 && extension.compare (".icm") != 0) { continue; + } const Glib::ustring filePath = Glib::build_filename (dirName, fileName); - if (!Glib::file_test (filePath, Glib::FILE_TEST_IS_REGULAR)) + if (!Glib::file_test (filePath, Glib::FILE_TEST_IS_REGULAR)) { continue; + } Glib::ustring name = fileName.substr (0, fileName.size() - 4); - if (nameUpper) + if (nameUpper) { name = name.uppercase (); + } if (profiles) { const rtengine::ProfileContent content (filePath); @@ -77,28 +82,31 @@ void loadProfiles (const Glib::ustring& dirName, if (profile && (!onlyRgb || cmsGetColorSpace (profile) == cmsSigRgbData)) { profiles->insert (std::make_pair (name, profile)); - if (profileContents) + if (profileContents) { profileContents->insert (std::make_pair (name, content)); + } } } - if (profileNames) + if (profileNames) { profileNames->insert (std::make_pair (name, filePath)); + } } - } - catch (Glib::Exception&) {} + } catch (Glib::Exception&) {} } inline void getSupportedIntent (cmsHPROFILE profile, cmsUInt32Number intent, cmsUInt32Number direction, std::uint8_t& result) { - if (cmsIsIntentSupported (profile, intent, direction)) + if (cmsIsIntentSupported (profile, intent, direction)) { result |= 1 << intent; + } } inline std::uint8_t getSupportedIntents (cmsHPROFILE profile, cmsUInt32Number direction) { - if (!profile) + if (!profile) { return 0; + } std::uint8_t result = 0; @@ -116,9 +124,9 @@ inline cmsHPROFILE createXYZProfile () return rtengine::ICCStore::createFromMatrix (mat, false, "XYZ"); } -const double (*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_bruce, xyz_beta, xyz_best}; -const double (*iwprofiles[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, bruce_xyz, beta_xyz, best_xyz}; -const char* wpnames[] = {"sRGB", "Adobe RGB", "ProPhoto", "WideGamut", "BruceRGB", "Beta RGB", "BestRGB"}; +const double (*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_bruce, xyz_beta, xyz_best, xyz_rec2020}; +const double (*iwprofiles[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, bruce_xyz, beta_xyz, best_xyz, rec2020_xyz}; +const char* wpnames[] = {"sRGB", "Adobe RGB", "ProPhoto", "WideGamut", "BruceRGB", "Beta RGB", "BestRGB", "Rec2020"}; const char* wpgamma[] = {"default", "BT709_g2.2_s4.5", "sRGB_g2.4_s12.92", "linear_g1.0", "standard_g2.2", "standard_g1.8", "High_g1.3_s3.35", "Low_g2.6_s6.9"}; //gamma free //default = gamma inside profile //BT709 g=2.22 s=4.5 sRGB g=2.4 s=12.92 @@ -163,8 +171,9 @@ std::vector ICCStore::getProfiles () const std::vector res; - for (ProfileMap::const_iterator profile = fileProfiles.begin (); profile != fileProfiles.end (); ++profile) + for (ProfileMap::const_iterator profile = fileProfiles.begin (); profile != fileProfiles.end (); ++profile) { res.push_back (profile->first); + } return res; } @@ -181,8 +190,9 @@ std::vector ICCStore::getProfilesFromDir (const Glib::ustring& di loadProfiles (profilesDir, &profiles, NULL, NULL, false, true); loadProfiles (dirName, &profiles, NULL, NULL, false, true); - for (ProfileMap::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) + for (ProfileMap::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) { res.push_back (profile->first); + } return res; } @@ -253,7 +263,7 @@ cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) tags[i].sig == 0x6B545243) { // kTRC if (gamma_offset == 0) { gamma_offset = offset; - uint32_t pcurve[] = { htonl(0x63757276), htonl(0), htonl(gamma_size == 12 ? 0 : 1) }; + uint32_t pcurve[] = { htonl(0x63757276), htonl(0), htonl(gamma_size == 12 ? 0U : 1U) }; memcpy(&nd[offset], pcurve, 12); if (gamma_size == 14) { @@ -388,22 +398,25 @@ cmsHPROFILE ICCStore::getStdProfile (const Glib::ustring& name) const const ProfileMap::const_iterator r = fileStdProfiles.find (nameUpper); // return profile from store - if (r != fileStdProfiles.end ()) + if (r != fileStdProfiles.end ()) { return r->second; + } // profile is not yet in store const NameMap::const_iterator f = fileStdProfilesFileNames.find (nameUpper); // profile does not exist - if (f == fileStdProfilesFileNames.end ()) + if (f == fileStdProfilesFileNames.end ()) { return NULL; + } // but there exists one => load it const ProfileContent content (f->second); const cmsHPROFILE profile = content.toProfile (); - if (profile) + if (profile) { const_cast(fileStdProfiles).insert (std::make_pair (f->first, profile)); + } // profile is not valid or it is now stored => remove entry from fileStdProfilesFileNames const_cast(fileStdProfilesFileNames).erase (f); @@ -481,6 +494,7 @@ void ICCStore::findDefaultMonitorProfile () defaultMonitorProfile = Glib::ustring(profileName); defaultMonitorProfile = Glib::path_get_basename(defaultMonitorProfile); size_t pos = defaultMonitorProfile.rfind("."); + if (pos != Glib::ustring::npos) { defaultMonitorProfile = defaultMonitorProfile.substr(0, pos); } diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index c0da10761..bbfc303fc 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -44,7 +44,7 @@ ImageMetaData* ImageMetaData::fromFile (const Glib::ustring& fname, RawMetaDataL return new ImageData (fname, rml); } -ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) +ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) : iso_speed(0), aperture(0.), shutter(0.) { size_t dotpos = fname.find_last_of ('.'); diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h index 79389f24c..52949756c 100644 --- a/rtengine/imagesource.h +++ b/rtengine/imagesource.h @@ -69,14 +69,14 @@ public: virtual int load (const Glib::ustring &fname, bool batch = false) = 0; virtual void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse) {}; virtual void demosaic (const RAWParams &raw) {}; - virtual void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {}; - virtual void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {}; + virtual void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {}; + virtual void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {}; virtual void retinexPrepareBuffers (ColorManagementParams cmp, RetinexParams retinexParams, multi_array2D &conversionBuffer, LUTu &lhist16RETI) {}; virtual void flushRawData () {}; virtual void flushRGB () {}; virtual void HLRecovery_Global (ToneCurveParams hrp) {}; virtual void HLRecovery_inpaint (float** red, float** green, float** blue) {}; - virtual void MSR(LabImage* lab, LUTf & mapcurve, bool &mapcontlutili, int width, int height, int skip, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) {}; + virtual void MSR(LabImage* lab, LUTf & mapcurve, bool &mapcontlutili, int width, int height, int skip, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) {}; virtual bool IsrgbSourceModified() const = 0; // tracks whether cached rgb output of demosaic has been modified diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 2cdd389af..268e8421a 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -56,7 +56,7 @@ ImProcCoordinator::ImProcCoordinator () vhist16(65536), vhist16bw(65536), lhist16CAM(65536), lhist16CCAM(65536), - lhist16RETI(65536), + lhist16RETI(), lhist16LClad(65536), histRed(256), histRedRaw(256), histGreen(256), histGreenRaw(256), @@ -234,6 +234,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } if (params.retinex.enabled) { + lhist16RETI(32768); lhist16RETI.clear(); imgsrc->retinexPrepareBuffers(params.icm, params.retinex, conversionBuffer, lhist16RETI); @@ -247,9 +248,9 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) LUTf cdcurve (65536, 0); LUTf mapcurve (65536, 0); - imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehacontlutili, mapcontlutili, useHsl, lhist16RETI, histLRETI); + imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, lhist16RETI, histLRETI); float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI);//enabled Retinex + imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI);//enabled Retinex if(dehaListener) { dehaListener->minmaxChanged(maxCD, minCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 428fe4922..4f1a6a691 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -134,6 +134,7 @@ protected: WavOpacityCurveW waOpacityCurveW; WavOpacityCurveWL waOpacityCurveWL; RetinextransmissionCurve dehatransmissionCurve; + RetinexgaintransmissionCurve dehagaintransmissionCurve; ColorAppearance customColCurve1; ColorAppearance customColCurve2; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 42c1c27b6..20d26d646 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -19,6 +19,9 @@ #include #include #include +#ifdef _OPENMP +#include +#endif #include "rtengine.h" #include "improcfun.h" @@ -39,9 +42,6 @@ #include "ciecam02.h" #define BENCHMARK #include "StopWatch.h" -#ifdef _OPENMP -#include -#endif #undef CLIPD #define CLIPD(a) ((a)>0.0f?((a)<1.0f?(a):1.0f):0.0f) @@ -3081,25 +3081,42 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } } - ClutPtr colorLUT; + std::shared_ptr hald_clut; bool clutAndWorkingProfilesAreSame = false; TMatrix xyz2clut, clut2xyz; +#ifdef __SSE2__ + vfloat v_work2xyz[3][3] ALIGNED16; + vfloat v_xyz2clut[3][3] ALIGNED16; + vfloat v_clut2xyz[3][3] ALIGNED16; + vfloat v_xyz2work[3][3] ALIGNED16; +#endif if ( params->filmSimulation.enabled && !params->filmSimulation.clutFilename.empty() ) { - colorLUT.set( clutStore.getClut( params->filmSimulation.clutFilename ) ); + hald_clut = CLUTStore::getInstance().getClut( params->filmSimulation.clutFilename ); - if ( colorLUT ) { - clutAndWorkingProfilesAreSame = colorLUT->profile() == params->icm.working; + if ( hald_clut ) { + clutAndWorkingProfilesAreSame = hald_clut->getProfile() == params->icm.working; if ( !clutAndWorkingProfilesAreSame ) { - xyz2clut = iccStore->workingSpaceInverseMatrix( colorLUT->profile() ); - clut2xyz = iccStore->workingSpaceMatrix( colorLUT->profile() ); + xyz2clut = iccStore->workingSpaceInverseMatrix( hald_clut->getProfile() ); + clut2xyz = iccStore->workingSpaceMatrix( hald_clut->getProfile() ); + +#ifdef __SSE2__ + for (int i = 0; i < 3; ++i) { + for (int j = 0; j < 3; ++j) { + v_work2xyz[i][j] = F2V(wprof[i][j]); + v_xyz2clut[i][j] = F2V(xyz2clut[i][j]); + v_xyz2work[i][j] = F2V(wiprof[i][j]); + v_clut2xyz[i][j] = F2V(clut2xyz[i][j]); + } + } +#endif + } } } - double filmSimCorrectedStrength = double(params->filmSimulation.strength) / 100.; - double filmSimSourceStrength = double(100 - params->filmSimulation.strength) / 100.; + const float film_simulation_strength = static_cast(params->filmSimulation.strength) / 100.0f; const float exp_scale = pow (2.0, expcomp); const float comp = (max(0.0, expcomp) + 1.0) * hlcompr / 100.0; @@ -3295,6 +3312,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer editWhateverTmp = (float(*))data; } + float out_rgbx[4 * TS] ALIGNED16; // Line buffer for CLUT #ifdef _OPENMP #pragma omp for schedule(dynamic) collapse(2) @@ -4193,50 +4211,114 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } - //Film Simulations - if ( colorLUT ) { + // Film Simulations + if (hald_clut) { + for (int i = istart, ti = 0; i < tH; i++, ti++) { + if (!clutAndWorkingProfilesAreSame) { + // Convert from working to clut profile + int j = jstart; + int tj = 0; + +#ifdef __SSE2__ + for (; j < tW - 3; j += 4, tj += 4) { + vfloat sourceR = LVF(rtemp[ti * TS + tj]); + vfloat sourceG = LVF(gtemp[ti * TS + tj]); + vfloat sourceB = LVF(btemp[ti * TS + tj]); + + vfloat x; + vfloat y; + vfloat z; + Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_work2xyz); + Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2clut); + + STVF(rtemp[ti * TS + tj], sourceR); + STVF(gtemp[ti * TS + tj], sourceG); + STVF(btemp[ti * TS + tj], sourceB); + } +#endif + + for (; j < tW; j++, tj++) { + float &sourceR = rtemp[ti * TS + tj]; + float &sourceG = gtemp[ti * TS + tj]; + float &sourceB = btemp[ti * TS + tj]; + + float x, y, z; + Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, wprof ); + Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, xyz2clut); + } + } + for (int j = jstart, tj = 0; j < tW; j++, tj++) { float &sourceR = rtemp[ti * TS + tj]; float &sourceG = gtemp[ti * TS + tj]; float &sourceB = btemp[ti * TS + tj]; - if (!clutAndWorkingProfilesAreSame) { - //convert from working to clut profile - float x, y, z; - Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, wprof ); - Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, xyz2clut ); + // Apply gamma sRGB (default RT) + sourceR = Color::gamma_srgbclipped(sourceR); + sourceG = Color::gamma_srgbclipped(sourceG); + sourceB = Color::gamma_srgbclipped(sourceB); + } + + const std::size_t line_offset = ti * TS; + hald_clut->getRGB( + film_simulation_strength, + std::min(TS, tW - jstart), + rtemp + line_offset, + gtemp + line_offset, + btemp + line_offset, + out_rgbx + ); + + for (int j = jstart, tj = 0; j < tW; j++, tj++) { + float &sourceR = rtemp[ti * TS + tj]; + float &sourceG = gtemp[ti * TS + tj]; + float &sourceB = btemp[ti * TS + tj]; + + // Apply inverse gamma sRGB + sourceR = Color::igamma_srgb(out_rgbx[tj * 4 + 0]); + sourceG = Color::igamma_srgb(out_rgbx[tj * 4 + 1]); + sourceB = Color::igamma_srgb(out_rgbx[tj * 4 + 2]); + } + + if (!clutAndWorkingProfilesAreSame) { + // Convert from clut to working profile + int j = jstart; + int tj = 0; + +#ifdef __SSE2__ + for (; j < tW - 3; j += 4, tj += 4) { + vfloat sourceR = LVF(rtemp[ti * TS + tj]); + vfloat sourceG = LVF(gtemp[ti * TS + tj]); + vfloat sourceB = LVF(btemp[ti * TS + tj]); + + vfloat x; + vfloat y; + vfloat z; + Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_clut2xyz); + Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2work); + + STVF(rtemp[ti * TS + tj], sourceR); + STVF(gtemp[ti * TS + tj], sourceG); + STVF(btemp[ti * TS + tj], sourceB); } +#endif - //appply gamma sRGB (default RT) - sourceR = CLIP( Color::gamma_srgb( sourceR ) ); - sourceG = CLIP( Color::gamma_srgb( sourceG ) ); - sourceB = CLIP( Color::gamma_srgb( sourceB ) ); + for (; j < tW; j++, tj++) { + float &sourceR = rtemp[ti * TS + tj]; + float &sourceG = gtemp[ti * TS + tj]; + float &sourceB = btemp[ti * TS + tj]; - float r, g, b; - colorLUT->getRGB( sourceR, sourceG, sourceB, r, g, b ); - // apply strength - sourceR = r * filmSimCorrectedStrength + sourceR * filmSimSourceStrength; - sourceG = g * filmSimCorrectedStrength + sourceG * filmSimSourceStrength; - sourceB = b * filmSimCorrectedStrength + sourceB * filmSimSourceStrength; - // apply inverse gamma sRGB - sourceR = Color::igamma_srgb( sourceR ); - sourceG = Color::igamma_srgb( sourceG ); - sourceB = Color::igamma_srgb( sourceB ); - - if (!clutAndWorkingProfilesAreSame) { - //convert from clut to working profile float x, y, z; - Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, clut2xyz ); + Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, clut2xyz); Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, wiprof ); } - } } } - if(!blackwhite) { + if (!blackwhite) { // ready, fill lab for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 4d78a2a4f..489ca60bc 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -202,7 +202,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, } } else { - const auto rgb_xyz = iccStore->workingSpaceMatrix (profile); + const auto xyz_rgb = iccStore->workingSpaceInverseMatrix (profile); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) @@ -227,7 +227,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, float z_ = 65535.0 * Color::f2xyz(fz) * Color::D50z; float y_ = (LL > Color::epskap) ? 65535.0 * fy * fy * fy : 65535.0 * LL / Color::kappa; - Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyz); + Color::xyz2rgb(x_, y_, z_, R, G, B, xyz_rgb); image->data[ix++] = (int)Color::gamma2curve[R] >> 8; image->data[ix++] = (int)Color::gamma2curve[G] >> 8; @@ -429,6 +429,14 @@ Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int p5 = 0.1300; p6 = 0.0350; select_temp = 1; + } else if (profi == "Rec2020") { + p1 = 0.7080; // Rec2020 primaries + p2 = 0.2920; + p3 = 0.1700; + p4 = 0.7970; + p5 = 0.1310; + p6 = 0.0460; + select_temp = 2; } else { p1 = 0.7347; //ProPhoto and default primaries p2 = 0.2653; @@ -511,7 +519,7 @@ Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int if(select_temp == 1) { t50 = 5003; // for Widegamut, Prophoto Best, Beta D50 } else if (select_temp == 2) { - t50 = 6504; // for sRGB, AdobeRGB, Bruce D65 + t50 = 6504; // for sRGB, AdobeRGB, Bruce Rec2020 D65 } cmsCIExyY xyD; diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index 1cd1d56e1..6773e7a12 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -45,10 +45,8 @@ #include "rawimagesource.h" #include "improcfun.h" #include "opthelper.h" -//#define BENCHMARK #include "StopWatch.h" -#define MAX_RETINEX_SCALES 8 #define clipretinex( val, minv, maxv ) (( val = (val < minv ? minv : val ) ) > maxv ? maxv : val ) #define med3(a0,a1,a2,a3,a4,a5,a6,a7,a8,median) { \ @@ -61,13 +59,9 @@ PIX_SORT(pp[3],pp[6]); PIX_SORT(pp[1],pp[4]); PIX_SORT(pp[2],pp[5]); \ PIX_SORT(pp[4],pp[7]); PIX_SORT(pp[4],pp[2]); PIX_SORT(pp[6],pp[4]); \ PIX_SORT(pp[4],pp[2]); median=pp[4];} //pp4 = median -namespace rtengine + +namespace { - -extern const Settings* settings; - -static float RetinexScales[MAX_RETINEX_SCALES]; - void retinex_scales( float* scales, int nscales, int mode, int s, float high) { if ( nscales == 1 ) { @@ -103,6 +97,7 @@ void retinex_scales( float* scales, int nscales, int mode, int s, float high) } } } + void mean_stddv2( float **dst, float &mean, float &stddv, int W_L, int H_L, float &maxtr, float &mintr) { // summation using double precision to avoid too large summation error for large pictures @@ -124,14 +119,8 @@ void mean_stddv2( float **dst, float &mean, float &stddv, int W_L, int H_L, floa sum += dst[i][j]; vsquared += (dst[i][j] * dst[i][j]); - if ( dst[i][j] > lmax) { - lmax = dst[i][j] ; - } - - if ( dst[i][j] < lmin) { - lmin = dst[i][j] ; - } - + lmax = dst[i][j] > lmax ? dst[i][j] : lmax; + lmin = dst[i][j] < lmin ? dst[i][j] : lmin; } #ifdef _OPENMP @@ -149,82 +138,30 @@ void mean_stddv2( float **dst, float &mean, float &stddv, int W_L, int H_L, floa stddv = (float)sqrt(stddv); } - - - - - -void mean_stddv( float **dst, float &mean, float &stddv, int W_L, int H_L, const float factor, float &maxtr, float &mintr) - -{ - // summation using double precision to avoid too large summation error for large pictures - double vsquared = 0.f; - double sum = 0.f; - maxtr = 0.f; - mintr = 0.f; -#ifdef _OPENMP - #pragma omp parallel -#endif - { - float lmax = 0.f, lmin = 0.f; - -#ifdef _OPENMP - #pragma omp for reduction(+:sum,vsquared) // this can lead to differences, but parallel summation is more accurate -#endif - - for (int i = 0; i < H_L; i++ ) - for (int j = 0; j < W_L; j++) { - sum += dst[i][j]; - vsquared += (dst[i][j] * dst[i][j]); - - if ( dst[i][j] > lmax) { - lmax = dst[i][j] ; - } - - if ( dst[i][j] < lmin) { - lmin = dst[i][j] ; - } - - } - -#ifdef _OPENMP - #pragma omp critical -#endif - { - maxtr = maxtr > lmax ? maxtr : lmax; - mintr = mintr < lmin ? mintr : lmin; - } - - } - - sum *= factor; - maxtr *= factor; - mintr *= factor; - vsquared *= (factor * factor); - mean = sum / (float) (W_L * H_L); - vsquared /= (float) W_L * H_L; - stddv = ( vsquared - (mean * mean) ); - stddv = (float)sqrt(stddv); } -void RawImageSource::MSR(float** luminance, float** originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) + +namespace rtengine +{ + +extern const Settings* settings; + +void RawImageSource::MSR(float** luminance, float** originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) { - BENCHFUN if (deh.enabled) {//enabled float mean, stddv, maxtr, mintr; - //float mini, delta, maxi; float delta; - float eps = 2.f; + constexpr float eps = 2.f; bool useHsl = deh.retinexcolorspace == "HSLLOG"; bool useHslLin = deh.retinexcolorspace == "HSLLIN"; float gain2 = (float) deh.gain / 100.f; //def =1 not use gain2 = useHslLin ? gain2 * 0.5f : gain2; float offse = (float) deh.offs; //def = 0 not use int iter = deh.iter; - int gradient = deh.scal; + int gradient = deh.scal; int scal = 3;//disabled scal - int nei = (int) 2.8f * deh.neigh; //def = 220 + int nei = (int) (2.8f * deh.neigh); //def = 220 float vart = (float)deh.vart / 100.f;//variance float gradvart = (float)deh.grad; float gradstr = (float)deh.grads; @@ -233,11 +170,10 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e limD = pow(limD, 1.7f);//about 2500 enough limD *= useHslLin ? 10.f : 1.f; float ilimD = 1.f / limD; - int moderetinex = 2; // default to 2 ( deh.retinexMethod == "high" ) float hig = ((float) deh.highl) / 100.f; - bool higplus = false ; float elogt; float hl = deh.baselog; + scal = deh.skal; if(hl >= 2.71828f) { elogt = 2.71828f + SQR(SQR(hl - 2.71828f)); @@ -249,52 +185,45 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e int W_L = width; float *tran[H_L] ALIGNED16; - float *tranBuffer; - int viewmet = 0; + float *tranBuffer = nullptr; elogt = 2.71828f;//disabled baselog - FlatCurve* shcurve = NULL;//curve L=f(H) bool lhutili = false; - if (deh.enabled) { - shcurve = new FlatCurve(deh.lhcurve); + FlatCurve* shcurve = new FlatCurve(deh.lhcurve); //curve L=f(H) - if (!shcurve || shcurve->isIdentity()) { - if (shcurve) { - delete shcurve; - shcurve = NULL; - } - } else { - lhutili = true; + if (!shcurve || shcurve->isIdentity()) { + if (shcurve) { + delete shcurve; + shcurve = nullptr; } + } else { + lhutili = true; } + bool higplus = false ; + int moderetinex = 2; // default to 2 ( deh.retinexMethod == "high" ) + if(deh.retinexMethod == "highliplus") { higplus = true; - } - - if (deh.retinexMethod == "uni") { + moderetinex = 3; + } else if (deh.retinexMethod == "uni") { moderetinex = 0; - } - - if (deh.retinexMethod == "low") { + } else if (deh.retinexMethod == "low") { moderetinex = 1; - } - - if (deh.retinexMethod == "highli" || deh.retinexMethod == "highliplus") { + } else { /*if (deh.retinexMethod == "highli") */ moderetinex = 3; } - for(int it = 1; it < iter + 1; it++) { //iter nb max of iterations - float aahi = 49.f / 99.f; ////reduce sensibility 50% - float bbhi = 1.f - aahi; - float high; - high = bbhi + aahi * (float) deh.highl; + constexpr float aahi = 49.f / 99.f; ////reduce sensibility 50% + constexpr float bbhi = 1.f - aahi; + + for(int it = 1; it < iter + 1; it++) { //iter nb max of iterations + float high = bbhi + aahi * (float) deh.highl; - float grads; float grad = 1.f; - float sc = 3.f; + float sc = scal; if(gradient == 0) { grad = 1.f; @@ -338,6 +267,23 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e sc = 3.f; } + if(iter == 1) { + sc = scal; + } else { + //adjust sc in function of choice of scale by user if iterations + if(scal < 3) { + sc -= 1; + + if(sc < 1.f) {//avoid 0 + sc = 1.f; + } + } + + if(scal > 4) { + sc += 1; + } + } + float varx; float limdx, ilimdx; @@ -366,7 +312,6 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } scal = round(sc); - float strengthx; float ks = 1.f; if(gradstr != 0) { @@ -397,7 +342,10 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } } - strengthx = ks * strength; + float strengthx = ks * strength; + + constexpr auto maxRetinexScales = 8; + float RetinexScales[maxRetinexScales]; retinex_scales( RetinexScales, scal, moderetinex, nei / grad, high ); @@ -412,39 +360,28 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e int shHighlights = deh.highlights; int shShadows = deh.shadows; + int mapmet = 0; if(deh.mapMethod == "map") { mapmet = 2; - } - - if(deh.mapMethod == "mapT") { + } else if(deh.mapMethod == "mapT") { mapmet = 3; - } - - /*if(deh.mapMethod == "curv") { - mapmet = 1; - }*/ - - if(deh.mapMethod == "gaus") { + } else if(deh.mapMethod == "gaus") { mapmet = 4; } const double shradius = mapmet == 4 ? (double) deh.radius : 40.; + int viewmet = 0; + if(deh.viewMethod == "mask") { viewmet = 1; - } - - if(deh.viewMethod == "tran") { + } else if(deh.viewMethod == "tran") { viewmet = 2; - } - - if(deh.viewMethod == "tran2") { + } else if(deh.viewMethod == "tran2") { viewmet = 3; - } - - if(deh.viewMethod == "unsharp") { + } else if(deh.viewMethod == "unsharp") { viewmet = 4; } @@ -538,6 +475,12 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e #endif if(mapmet > 0 && mapcontlutili && it == 1) { + // TODO: When rgbcurvespeedup branch is merged into master we can simplify the code by + // 1) in rawimagesource.retinexPrepareCurves() insert + // mapcurve *= 0.5f; + // after + // CurveFactory::mapcurve (mapcontlutili, retinexParams.mapcurve, mapcurve, 1, lhist16RETI, histLRETI); + // 2) remove the division by 2.f from the code 7 lines below this line #ifdef _OPENMP #pragma omp parallel for #endif @@ -551,21 +494,21 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } if(((mapmet == 2 && scale > 2) || mapmet == 3 || mapmet == 4) && it == 1) { - - + float hWeight = (100.f - shHighlights) / 100.f; + float sWeight = (100.f - shShadows) / 100.f; #ifdef _OPENMP - #pragma omp parallel for + #pragma omp parallel for schedule(dynamic,16) #endif for (int i = 0; i < H_L; i++) { for (int j = 0; j < W_L; j++) { - double mapval = 1.0 + shmap->map[i][j]; - double factor = 1.0; + float mapval = 1.f + shmap->map[i][j]; + float factor = 1.f; if (mapval > h_th) { - factor = (h_th + (100.0 - shHighlights) * (mapval - h_th) / 100.0) / mapval; + factor = (h_th + hWeight * (mapval - h_th)) / mapval; } else if (mapval < s_th) { - factor = (s_th - (100.0 - shShadows) * (s_th - mapval) / 100.0) / mapval; + factor = (s_th - sWeight * (s_th - mapval)) / mapval; } out[i][j] *= factor; @@ -613,10 +556,9 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } } - shmap = NULL; + shmap = nullptr; delete [] buffer; - //delete [] outBuffer; delete [] srcBuffer; mean = 0.f; @@ -641,6 +583,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e bmax *= 500.f; amin *= 500.f; bmin *= 500.f; + #ifdef _OPENMP #pragma omp parallel #endif @@ -660,6 +603,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e absciss = amin * luminance[i][j] + bmin; } + //TODO : move multiplication by 4.f and subtraction of 1.f inside the curve luminance[i][j] *= (-1.f + 4.f * dehatransmissionCurve[absciss]); //new transmission if(viewmet == 3 || viewmet == 2) { @@ -733,7 +677,8 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e delta = 1.0f; } - float cdfactor = gain2 * 32768.f / delta; + // float cdfactor = gain2 * 32768.f / delta; + float cdfactor = 32768.f / delta; maxCD = -9999999.f; minCD = 9999999.f; // coeff for auto "transmission" with 2 sigma #95% datas @@ -742,34 +687,80 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e float bza = 16300.f / (2.f * stddv); float bzb = 16300.f - bza * (mean); +//prepare work for curve gain +#ifdef _OPENMP + #pragma omp parallel for +#endif + for (int i = 0; i < H_L; i++) { + for (int j = 0; j < W_L; j++) { + luminance[i][j] = luminance[i][j] - mini; + } + } + + mean = 0.f; + stddv = 0.f; + // I call mean_stddv2 instead of mean_stddv ==> logBetaGain + + mean_stddv2( luminance, mean, stddv, W_L, H_L, maxtr, mintr); + float asig, bsig, amax, bmax, amin, bmin; + + if (dehagaintransmissionCurve && mean != 0.f && stddv != 0.f) { //if curve + asig = 0.166666f / stddv; + bsig = 0.5f - asig * mean; + amax = 0.333333f / (maxtr - mean - stddv); + bmax = 1.f - amax * maxtr; + amin = 0.333333f / (mean - stddv - mintr); + bmin = -amin * mintr; + + asig *= 500.f; + bsig *= 500.f; + amax *= 500.f; + bmax *= 500.f; + amin *= 500.f; + bmin *= 500.f; + } #ifdef _OPENMP #pragma omp parallel #endif { float cdmax = -999999.f, cdmin = 999999.f; - #ifdef _OPENMP - #pragma omp for + #pragma omp for schedule(dynamic,16) nowait #endif for ( int i = 0; i < H_L; i ++ ) for (int j = 0; j < W_L; j++) { - //float cd = cdfactor * ( luminance[i][j] * logBetaGain - mini ) + offse; - float cd = cdfactor * ( luminance[i][j] - mini ) + offse; + float gan; - if(cd > cdmax) { - cdmax = cd; + if (dehagaintransmissionCurve && mean != 0.f && stddv != 0.f) { + float absciss; + + if (LIKELY(fabsf(luminance[i][j] - mean) < stddv)) { + absciss = asig * luminance[i][j] + bsig; + } else if (luminance[i][j] >= mean) { + absciss = amax * luminance[i][j] + bmax; + } else { /*if(luminance[i][j] <= mean - stddv)*/ + absciss = amin * luminance[i][j] + bmin; + } + + + // float cd = cdfactor * ( luminance[i][j] - mini ) + offse; + // TODO : move multiplication by 2.f inside the curve + gan = 2.f * (dehagaintransmissionCurve[absciss]); //new gain function transmission + } else { + gan = 0.5f; } - if(cd < cdmin) { - cdmin = cd; - } + float cd = gan * cdfactor * ( luminance[i][j] ) + offse; + + cdmax = cd > cdmax ? cd : cdmax; + cdmin = cd < cdmin ? cd : cdmin; float str = strengthx; - if(lhutili && it == 1) { // S=f(H) + if(lhutili && it == 1) { // S=f(H) { float HH = exLuminance[i][j]; float valparam; @@ -784,31 +775,23 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } } - if(exLuminance[i][j] > 65535.f * hig && higplus) { + if(higplus && exLuminance[i][j] > 65535.f * hig) { str *= hig; } if(viewmet == 0) { - luminance[i][j] = clipretinex( cd, 0.f, 32768.f ) * str + (1.f - str) * originalLuminance[i][j]; - } - - if(viewmet == 1) { + luminance[i][j] = intp(str, clipretinex( cd, 0.f, 32768.f ), originalLuminance[i][j]); + } else if(viewmet == 1) { luminance[i][j] = out[i][j]; - } - - if(viewmet == 4) { - luminance[i][j] = (1.f + str) * originalLuminance[i][j] - str * out[i][j]; //unsharp - } - - if(viewmet == 2) { + } else if(viewmet == 4) { + luminance[i][j] = originalLuminance[i][j] + str * (originalLuminance[i][j] - out[i][j]);//unsharp + } else if(viewmet == 2) { if(tran[i][j] <= mean) { luminance[i][j] = azb + aza * tran[i][j]; //auto values } else { luminance[i][j] = bzb + bza * tran[i][j]; } - } - - if(viewmet == 3) { + } else { /*if(viewmet == 3) */ luminance[i][j] = 1000.f + tran[i][j] * 700.f; //arbitrary values to help display log values which are between -20 to + 30 - usage values -4 + 5 } @@ -823,23 +806,23 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } } + delete [] outBuffer; - outBuffer = NULL; + outBuffer = nullptr; //printf("cdmin=%f cdmax=%f\n",minCD, maxCD); Tmean = mean; Tsigma = stddv; Tmin = mintr; Tmax = maxtr; - - if (shcurve && it == 1) { + if (shcurve) { delete shcurve; + shcurve = nullptr; } } - if(viewmet == 3 || viewmet == 2) { + if(tranBuffer) { delete [] tranBuffer; - tranBuffer = NULL; } } diff --git a/rtengine/jdatasrc.cc b/rtengine/jdatasrc.cc index c8567387b..ff509301d 100644 --- a/rtengine/jdatasrc.cc +++ b/rtengine/jdatasrc.cc @@ -32,6 +32,8 @@ /* Expanded data source object for stdio input */ +namespace +{ typedef struct { struct jpeg_source_mgr pub; /* public fields */ @@ -44,6 +46,8 @@ typedef struct { typedef my_source_mgr * my_src_ptr; +} + #define INPUT_BUF_SIZE 4096 /* choose an efficiently fread'able size */ diff --git a/rtengine/jpeg_memsrc.cc b/rtengine/jpeg_memsrc.cc index 75a0b25bc..ab4ecf7d6 100644 --- a/rtengine/jpeg_memsrc.cc +++ b/rtengine/jpeg_memsrc.cc @@ -26,6 +26,8 @@ /* Expanded data source object for memory input */ +namespace +{ typedef struct { struct jpeg_source_mgr pub; /* public fields */ @@ -36,6 +38,7 @@ typedef struct { typedef my_source_mgr * my_src_ptr; +} /* * Initialize source --- called by jpeg_read_header diff --git a/rtengine/previewimage.cc b/rtengine/previewimage.cc index 7103cadd4..16355a8c0 100644 --- a/rtengine/previewimage.cc +++ b/rtengine/previewimage.cc @@ -84,26 +84,16 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext unsigned char *dst; #pragma omp for schedule(static,10) - for (unsigned int i = 0; i < (unsigned int)(h); i++) { + for (unsigned int i = 0; i < (unsigned int)(h); ++i) { src = data + i * w * 3; dst = previewImage->get_data() + i * w * 4; - for (unsigned int j = 0; j < (unsigned int)(w); j++) { + for (unsigned int j = 0; j < (unsigned int)(w); ++j) { unsigned char r = *(src++); unsigned char g = *(src++); unsigned char b = *(src++); -#if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ - *(dst++) = b; - *(dst++) = g; - *(dst++) = r; - *(dst++) = 0; -#else - *(dst++) = 0; - *(dst++) = r; - *(dst++) = g; - *(dst++) = b; -#endif + poke255_uc(dst, r, g, b); } } } @@ -171,17 +161,8 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext unsigned char r = *(src++); unsigned char g = *(src++); unsigned char b = *(src++); -#if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ - *(dst++) = b; - *(dst++) = g; - *(dst++) = r; - *(dst++) = 0; -#else - *(dst++) = 0; - *(dst++) = r; - *(dst++) = g; - *(dst++) = b; -#endif + + poke255_uc(dst, r, g, b); } } } diff --git a/rtengine/previewimage.h b/rtengine/previewimage.h index 5135ddd9a..26b9a85d2 100644 --- a/rtengine/previewimage.h +++ b/rtengine/previewimage.h @@ -20,7 +20,7 @@ #define _PREVIEWIMAGE_ #include -#include "cairomm/cairomm.h" +#include namespace rtengine { diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 3d4f90af1..62d2a4ac1 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -467,6 +467,8 @@ enum ProcEvent { EvRetinexmapcurve = 437, EvviewMethod = 438, EvcbdlMethod = 439, + EvRetinexgaintransmission = 440, + EvLskal = 441, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index d954e5edc..90afbc965 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -121,7 +121,7 @@ RetinexParams::RetinexParams () void RetinexParams::getDefaulttransmissionCurve(std::vector &curve) { - double v[12] = { 0.00, 0.34, 0.35, 0.35, + double v[12] = { 0.00, 0.50, 0.35, 0.35, 0.60, 0.75, 0.35, 0.35, 1.00, 0.50, 0.35, 0.35, }; @@ -134,6 +134,23 @@ void RetinexParams::getDefaulttransmissionCurve(std::vector &curve) curve.at(i) = v[i - 1]; } } +void RetinexParams::getDefaultgaintransmissionCurve(std::vector &curve) +{ + double v[16] = { 0.00, 0.1, 0.35, 0.00, + 0.25, 0.25, 0.35, 0.35, + 0.70, 0.25, 0.35, 0.35, + 1.00, 0.1, 0.00, 0.00 + }; + + + curve.resize(17); + curve.at(0 ) = double(FCT_MinMaxCPoints); + + for (size_t i = 1; i < curve.size(); ++i) { + curve.at(i) = v[i - 1]; + } +} + void RetinexParams::setDefaults() { @@ -158,7 +175,7 @@ void RetinexParams::setDefaults() radius = 40; baselog = 2.71828; -// grbl = 50; + skal = 3; retinexMethod = "high"; mapMethod = "none"; viewMethod = "none"; @@ -173,13 +190,16 @@ void RetinexParams::setDefaults() lhcurve.push_back(DCT_Linear); mapcurve.clear(); mapcurve.push_back(DCT_Linear); + getDefaultgaintransmissionCurve(gaintransmissionCurve); getDefaulttransmissionCurve(transmissionCurve); } -void RetinexParams::getCurves(RetinextransmissionCurve &transmissionCurveLUT) const +void RetinexParams::getCurves(RetinextransmissionCurve &transmissionCurveLUT, RetinexgaintransmissionCurve &gaintransmissionCurveLUT) const { transmissionCurveLUT.Set(this->transmissionCurve); + gaintransmissionCurveLUT.Set(this->gaintransmissionCurve); + } @@ -1521,9 +1541,9 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_double ("Retinex", "baselog", retinex.baselog); } -// if (!pedited || pedited->retinex.grbl) { -// keyFile.set_integer ("Retinex", "grbl", retinex.grbl); -// } + if (!pedited || pedited->retinex.skal) { + keyFile.set_integer ("Retinex", "skal", retinex.skal); + } if (!pedited || pedited->retinex.retinexMethod) { keyFile.set_string ("Retinex", "RetinexMethod", retinex.retinexMethod); @@ -1590,6 +1610,11 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_double_list("Retinex", "TransmissionCurve", transmissionCurve); } + if (!pedited || pedited->retinex.gaintransmissionCurve) { + Glib::ArrayHandle gaintransmissionCurve = retinex.gaintransmissionCurve; + keyFile.set_double_list("Retinex", "GainTransmissionCurve", gaintransmissionCurve); + } + // save channel mixer if (!pedited || pedited->chmixer.red[0] || pedited->chmixer.red[1] || pedited->chmixer.red[2]) { Glib::ArrayHandle rmix (chmixer.red, 3, Glib::OWNERSHIP_NONE); @@ -4057,14 +4082,14 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - /* if (keyFile.has_key ("Retinex", "grbl")) { - retinex.grbl = keyFile.get_integer ("Retinex", "grbl"); + if (keyFile.has_key ("Retinex", "skal")) { + retinex.skal = keyFile.get_integer ("Retinex", "skal"); + + if (pedited) { + pedited->retinex.skal = true; + } + } - if (pedited) { - pedited->retinex.grbl = true; - } - } - */ if (keyFile.has_key ("Retinex", "CDCurve")) { retinex.cdcurve = keyFile.get_double_list ("Retinex", "CDCurve"); @@ -4146,6 +4171,16 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) pedited->retinex.transmissionCurve = true; } } + + + if (keyFile.has_key ("Retinex", "GainTransmissionCurve")) { + retinex.gaintransmissionCurve = keyFile.get_double_list ("Retinex", "GainTransmissionCurve"); + + if (pedited) { + pedited->retinex.gaintransmissionCurve = true; + } + } + } @@ -7551,6 +7586,7 @@ bool ProcParams::operator== (const ProcParams& other) && retinex.cdHcurve == other.retinex.cdHcurve && retinex.lhcurve == other.retinex.lhcurve && retinex.transmissionCurve == other.retinex.transmissionCurve + && retinex.gaintransmissionCurve == other.retinex.gaintransmissionCurve && retinex.str == other.retinex.str && retinex.scal == other.retinex.scal && retinex.iter == other.retinex.iter @@ -7569,7 +7605,7 @@ bool ProcParams::operator== (const ProcParams& other) && retinex.radius == other.retinex.radius && retinex.baselog == other.retinex.baselog -// && retinex.grbl == other.retinex.grbl + && retinex.skal == other.retinex.skal && retinex.offs == other.retinex.offs && retinex.retinexMethod == other.retinex.retinexMethod && retinex.mapMethod == other.retinex.mapMethod diff --git a/rtengine/procparams.h b/rtengine/procparams.h index aa6c78922..cf02b9f10 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -41,6 +41,7 @@ class WavOpacityCurveBY; class WavOpacityCurveW; class WavOpacityCurveWL; class RetinextransmissionCurve; +class RetinexgaintransmissionCurve; enum RenderingIntent { RI_PERCEPTUAL = INTENT_PERCEPTUAL, @@ -282,6 +283,7 @@ public: std::vector cdHcurve; std::vector lhcurve; std::vector transmissionCurve; + std::vector gaintransmissionCurve; std::vector mapcurve; int str; int scal; @@ -308,11 +310,13 @@ public: int limd; int highl; double baselog; -// int grbl; + int skal; bool medianmap; RetinexParams (); void setDefaults(); - void getCurves(RetinextransmissionCurve &transmissionCurveLUT) const; + void getCurves(RetinextransmissionCurve &transmissionCurveLUT, RetinexgaintransmissionCurve &gaintransmissionCurveLUT) const; + + static void getDefaultgaintransmissionCurve(std::vector &curve); static void getDefaulttransmissionCurve(std::vector &curve); }; diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index 3f4b2ac3f..919b1c7be 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -580,7 +580,9 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene if (cc) { for (int i = 0; i < 4; i++) { if (RT_blacklevel_from_constant) { - black_c4[i] = cblack[i] + cc->get_BlackLevel(i, iso_speed); + int blackFromCc = cc->get_BlackLevel(i, iso_speed); + // if black level from camconst > 0xffff it is an absolute value. + black_c4[i] = blackFromCc > 0xffff ? (blackFromCc & 0xffff) : blackFromCc + cblack[i]; } // load 4 channel white level here, will be used if available diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index a16ec1194..984925145 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1762,7 +1762,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le LCPProfile *pLCPProf = lcpStore->getProfile(lensProf.lcpFile); if (pLCPProf) { // don't check focal length to allow distortion correction for lenses without chip, also pass dummy focal length 1 in case of 0 - LCPMapper map(pLCPProf, max(idata->getFocalLen(),1.0), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1); + LCPMapper map(pLCPProf, max(idata->getFocalLen(), 1.0), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1); #ifdef _OPENMP #pragma omp parallel for @@ -1968,7 +1968,6 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar LUTf *retinexgamtab;//gamma before and after Retinex to restore tones LUTf lutTonereti; - lutTonereti(65536); if(retinexParams.gammaretinex == "low") { retinexgamtab = &(Color::gammatab_115_2); @@ -1984,24 +1983,33 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar double gamm2 = retinexParams.gam; if(gamm2 < 1.) { - pwr = 1. / pwr; - gamm = 1. / gamm; + std::swap(pwr, gamm); } int mode = 0, imax = 0; Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope // printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); + double start; + double add; + + if(gamm2 < 1.) { + start = g_a2; + add = g_a4; + } else { + start = g_a3; + add = g_a4; + } + + double mul = 1. + g_a4; + + lutTonereti(65536); + for (int i = 0; i < 65536; i++) { double val = (i) / 65535.; - double start = g_a3; - double add = g_a4; - double mul = 1. + g_a4; double x; if(gamm2 < 1.) { - start = g_a2; - add = g_a4; x = Color::igammareti (val, gamm, start, ts, mul , add); } else { x = Color::gammareti (val, gamm, start, ts, mul , add); @@ -2053,6 +2061,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } */ if(retinexParams.gammaretinex != "none" && retinexParams.str != 0) {//gamma + #ifdef _OPENMP #pragma omp parallel for #endif @@ -2081,7 +2090,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar if(lhist16RETI) { - lhist16RETIThr(32769, 0); + lhist16RETIThr(lhist16RETI.getSize()); lhist16RETIThr.clear(); } @@ -2099,7 +2108,6 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar for (; j < W - border - 3; j += 4) { vfloat H, S, L; - int pos; Color::rgb2hsl(LVFU(red[i][j]), LVFU(green[i][j]), LVFU(blue[i][j]), H, S, L); STVFU(conversionBuffer[0][i - border][j - border], H); STVFU(conversionBuffer[1][i - border][j - border], S); @@ -2109,7 +2117,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar if(lhist16RETI) { for(int p = 0; p < 4; p++) { - pos = (int) clipretinex( conversionBuffer[2][i - border][j - border + p], 0.f, 32768.f);//histogram in curve HSL + int pos = ( conversionBuffer[2][i - border][j - border + p]);//histogram in curve HSL lhist16RETIThr[pos]++; } } @@ -2119,14 +2127,13 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar for (; j < W - border; j++) { float H, S, L; - int pos; //rgb=>lab Color::rgb2hslfloat(red[i][j], green[i][j], blue[i][j], conversionBuffer[0][i - border][j - border], conversionBuffer[1][i - border][j - border], L); L *= 32768.f; conversionBuffer[2][i - border][j - border] = L; if(lhist16RETI) { - pos = (int) clipretinex(L, 0, 32768); + int pos = L; lhist16RETIThr[pos]++; } } @@ -2137,10 +2144,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar { if(lhist16RETI) { - // Add per Thread LUT to global LUT - for(int i = 0; i < 32769; i++) { - lhist16RETI[i] += lhist16RETIThr[i]; - } + lhist16RETI += lhist16RETIThr; // Add per Thread LUT to global LUT } } #endif @@ -2148,10 +2152,10 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } } else { TMatrix wprof = iccStore->workingSpaceMatrix (cmp.working); - double wp[3][3] = { - {wprof[0][0], wprof[0][1], wprof[0][2]}, - {wprof[1][0], wprof[1][1], wprof[1][2]}, - {wprof[2][0], wprof[2][1], wprof[2][2]} + float wp[3][3] = { + {static_cast(wprof[0][0]), static_cast(wprof[0][1]), static_cast(wprof[0][2])}, + {static_cast(wprof[1][0]), static_cast(wprof[1][1]), static_cast(wprof[1][2])}, + {static_cast(wprof[2][0]), static_cast(wprof[2][1]), static_cast(wprof[2][2])} }; // Conversion rgb -> lab is hard to vectorize because it uses a lut (that's not the main problem) @@ -2164,25 +2168,19 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar LUTu lhist16RETIThr; if(lhist16RETI) { - lhist16RETIThr(32769, 0); + lhist16RETIThr(lhist16RETI.getSize()); lhist16RETIThr.clear(); } #ifdef _OPENMP - #pragma omp for + #pragma omp for schedule(dynamic,16) #endif for (int i = border; i < H - border; i++ ) for (int j = border; j < W - border; j++) { float X, Y, Z, L, aa, bb; - int pos; - float R_, G_, B_; - R_ = red[i][j]; - G_ = green[i][j]; - B_ = blue[i][j]; - float k; //rgb=>lab - Color::rgbxyz(R_, G_, B_, X, Y, Z, wp); + Color::rgbxyz(red[i][j], green[i][j], blue[i][j], X, Y, Z, wp); //convert Lab Color::XYZ2Lab(X, Y, Z, L, aa, bb); conversionBuffer[0][i - border][j - border] = aa; @@ -2193,7 +2191,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar // if(R_>40000.f && G_ > 30000.f && B_ > 30000.f) conversionBuffer[3][i - border][j - border] = R_; // else conversionBuffer[3][i - border][j - border] = 0.f; if(lhist16RETI) { - pos = (int) clipretinex(L, 0, 32768); + int pos = L; lhist16RETIThr[pos]++;//histogram in Curve Lab } } @@ -2202,10 +2200,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar #pragma omp critical { if(lhist16RETI) { - // Add per Thread LUT to global LUT - for(int i = 0; i < 32769; i++) { - lhist16RETI[i] += lhist16RETIThr[i]; - } + lhist16RETI += lhist16RETIThr; // Add per Thread LUT to global LUT } } #endif @@ -2217,7 +2212,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } -void RawImageSource::retinexPrepareCurves(RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) +void RawImageSource::retinexPrepareCurves(RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) { useHsl = (retinexParams.retinexcolorspace == "HSLLOG" || retinexParams.retinexcolorspace == "HSLLIN"); @@ -2229,13 +2224,11 @@ void RawImageSource::retinexPrepareCurves(RetinexParams retinexParams, LUTf &cdc CurveFactory::mapcurve (mapcontlutili, retinexParams.mapcurve, mapcurve, 1, lhist16RETI, histLRETI); - retinexParams.getCurves(retinextransmissionCurve); + retinexParams.getCurves(retinextransmissionCurve, retinexgaintransmissionCurve); } -//void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) -void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) +void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) { - MyTime t4, t5; t4.set(); @@ -2263,23 +2256,29 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC int mode = 0, imax = 0; if(gamm2 < 1.) { - pwr = 1. / pwr; - gamm = 1. / gamm; + std::swap(pwr, gamm); } Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope + double mul = 1. + g_a4; + double add; + double start; + + if(gamm2 < 1.) { + start = g_a3; + add = g_a3; + } else { + add = g_a4; + start = g_a2; + } + // printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); for (int i = 0; i < 65536; i++) { double val = (i) / 65535.; double x; - double mul = 1. + g_a4; - double add = g_a4; - double start = g_a2; if(gamm2 < 1.) { - start = g_a3; - add = g_a3; x = Color::gammareti (val, gamm, start, ts, mul , add); } else { x = Color::igammareti (val, gamm, start, ts, mul , add); @@ -2303,11 +2302,10 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC float val; if(dehacontlutili && histLRETI) { - hist16RET(32769, 0); + hist16RET(32768); hist16RET.clear(); histLRETI.clear(); - dLcurve(32769, 0); - dLcurve.clear(); + dLcurve(32768); } FlatCurve* chcurve = NULL;//curve c=f(H) @@ -2335,8 +2333,8 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC // one LUT per thread LUTu hist16RETThr; - if(dehacontlutili && histLRETI) { - hist16RETThr(32769, 0); + if(hist16RET) { + hist16RETThr(hist16RET.getSize()); hist16RETThr.clear(); } @@ -2350,7 +2348,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC LBuffer[i][j] = cdcurve[2.f * temp[i][j]] / 2.f; if(histLRETI) { - int pos = (int) clipretinex(LBuffer[i][j], 0.f, 32768.f); + int pos = LBuffer[i][j]; hist16RETThr[pos]++; //histogram in Curve } } @@ -2363,29 +2361,29 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC #pragma omp critical #endif { - if(dehacontlutili && histLRETI) { - // Add per Thread LUT to global LUT - for(int i = 0; i < 32769; i++) { - hist16RET[i] += hist16RETThr[i]; - } + if(hist16RET) { + hist16RET += hist16RETThr; // Add per Thread LUT to global LUT } } } - if(dehacontlutili && histLRETI) {//update histogram + if(hist16RET) {//update histogram + // TODO : When rgbcurvesspeedup branch is merged into master, replace this by the following 1-liner + // hist16RET.compressTo(histLRETI); + // also remove declaration and init of dLcurve some lines above then and finally remove this comment :) for (int i = 0; i < 32768; i++) { val = (double)i / 32767.0; - dLcurve[i] = CLIPD(val); + dLcurve[i] = val; } for (int i = 0; i < 32768; i++) { float hval = dLcurve[i]; - int hi = (int)(255.0f * CLIPD(hval)); + int hi = (int)(255.0f * hval); histLRETI[hi] += hist16RET[i]; } } - MSR(LBuffer, conversionBuffer[2], conversionBuffer[3], mapcurve, mapcontlutili, WNew, HNew, deh, dehatransmissionCurve, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); + MSR(LBuffer, conversionBuffer[2], conversionBuffer[3], mapcurve, mapcontlutili, WNew, HNew, deh, dehatransmissionCurve, dehagaintransmissionCurve, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); if(useHsl) { if(chutili) { @@ -2399,7 +2397,6 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC for (; j < W - border; j++) { float valp; - float chr; // if(chutili) { // c=f(H) { valp = float((chcurve->getVal(conversionBuffer[3][i - border][j - border]) - 0.5f)); @@ -2448,46 +2445,113 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC // gamut control only in Lab mode const bool highlight = Tc.hrenabled; #ifdef _OPENMP - #pragma omp parallel for + #pragma omp parallel +#endif + { +#ifdef __SSE2__ + // we need some line buffers to precalculate some expensive stuff using SSE + float atan2Buffer[W] ALIGNED16; + float sqrtBuffer[W] ALIGNED16; + float sincosxBuffer[W] ALIGNED16; + float sincosyBuffer[W] ALIGNED16; + const vfloat c327d68v = F2V(327.68); + const vfloat onev = F2V(1.f); +#endif // __SSE2__ +#ifdef _OPENMP + #pragma omp for #endif - for (int i = border; i < H - border; i++ ) { - for (int j = border; j < W - border; j++) { + for (int i = border; i < H - border; i++ ) { +#ifdef __SSE2__ + // vectorized precalculation + { + int j = border; - float Lprov1 = (LBuffer[i - border][j - border]) / 327.68f; - float Chprov1 = sqrt(SQR(conversionBuffer[0][i - border][j - border]) + SQR(conversionBuffer[1][i - border][j - border])) / 327.68f; - float HH = xatan2f(conversionBuffer[1][i - border][j - border], conversionBuffer[0][i - border][j - border]); - float2 sincosval; - float valp; - float chr; - - if(chutili) { // c=f(H) + for (; j < W - border - 3; j += 4) { - valp = float((chcurve->getVal(Color::huelab_to_huehsv2(HH)) - 0.5f)); - Chprov1 *= (1.f + 2.f * valp); + vfloat av = LVFU(conversionBuffer[0][i - border][j - border]); + vfloat bv = LVFU(conversionBuffer[1][i - border][j - border]); + vfloat chprovv = vsqrtf(SQRV(av) + SQRV(bv)); + STVF(sqrtBuffer[j - border], chprovv / c327d68v); + vfloat HHv = xatan2f(bv, av); + STVF(atan2Buffer[j - border], HHv); + av /= chprovv; + bv /= chprovv; + vmask selMask = vmaskf_eq(chprovv, ZEROV); + STVF(sincosyBuffer[j - border], vself(selMask, onev, av)); + STVF(sincosxBuffer[j - border], vselfnotzero(selMask, bv)); + } + + for (; j < W - border; j++) + { + float aa = conversionBuffer[0][i - border][j - border]; + float bb = conversionBuffer[1][i - border][j - border]; + float Chprov1 = sqrt(SQR(aa) + SQR(bb)) / 327.68f; + sqrtBuffer[j - border] = Chprov1; + float HH = xatan2f(bb, aa); + atan2Buffer[j - border] = HH; + + if(Chprov1 == 0.0f) { + sincosyBuffer[j - border] = 1.f; + sincosxBuffer[j - border] = 0.0f; + } else { + sincosyBuffer[j - border] = aa / (Chprov1 * 327.68f); + sincosxBuffer[j - border] = bb / (Chprov1 * 327.68f); + } } } +#endif // __SSE2__ + + for (int j = border; j < W - border; j++) { + float Lprov1 = (LBuffer[i - border][j - border]) / 327.68f; +#ifdef __SSE2__ + float Chprov1 = sqrtBuffer[j - border]; + float HH = atan2Buffer[j - border]; + float2 sincosval; + sincosval.x = sincosxBuffer[j - border]; + sincosval.y = sincosyBuffer[j - border]; - sincosval = xsincosf(HH); - float R, G, B; -#ifdef _DEBUG - bool neg = false; - bool more_rgb = false; - //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f, neg, more_rgb); #else - //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f); + float aa = conversionBuffer[0][i - border][j - border]; + float bb = conversionBuffer[1][i - border][j - border]; + float Chprov1 = sqrt(SQR(aa) + SQR(bb)) / 327.68f; + float HH = xatan2f(bb, aa); + float2 sincosval;// = xsincosf(HH); + + if(Chprov1 == 0.0f) { + sincosval.y = 1.f; + sincosval.x = 0.0f; + } else { + sincosval.y = aa / (Chprov1 * 327.68f); + sincosval.x = bb / (Chprov1 * 327.68f); + } + +#endif + + if(chutili) { // c=f(H) + float valp = float((chcurve->getVal(Color::huelab_to_huehsv2(HH)) - 0.5f)); + Chprov1 *= (1.f + 2.f * valp); + } + + float R, G, B; +#ifdef _DEBUG + bool neg = false; + bool more_rgb = false; + //gamut control : Lab values are in gamut + Color::gamutLchonly(HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f, neg, more_rgb); +#else + //gamut control : Lab values are in gamut + Color::gamutLchonly(HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f); #endif - conversionBuffer[0][i - border][j - border] = 327.68f * Chprov1 * sincosval.y; - conversionBuffer[1][i - border][j - border] = 327.68f * Chprov1 * sincosval.x; - LBuffer[i - border][j - border] = Lprov1 * 327.68f; + conversionBuffer[0][i - border][j - border] = 327.68f * Chprov1 * sincosval.y; + conversionBuffer[1][i - border][j - border] = 327.68f * Chprov1 * sincosval.x; + LBuffer[i - border][j - border] = Lprov1 * 327.68f; + } } } - //end gamut control #ifdef __SSE2__ vfloat wipv[3][3]; @@ -4298,12 +4362,12 @@ void RawImageSource::hlRecovery (std::string method, float* red, float* green, f void RawImageSource::getAutoExpHistogram (LUTu & histogram, int& histcompr) { -BENCHFUN + BENCHFUN histcompr = 3; histogram(65536 >> histcompr); histogram.clear(); - const float refwb[3] = {static_cast(refwb_red),static_cast(refwb_green),static_cast(refwb_blue)}; + const float refwb[3] = {static_cast(refwb_red), static_cast(refwb_green), static_cast(refwb_blue)}; #ifdef _OPENMP #pragma omp parallel @@ -4321,11 +4385,11 @@ BENCHFUN if (ri->getSensorType() == ST_BAYER) { for (int j = start; j < end; j++) { - tmphistogram[(int)(refwb[ri->FC(i,j)] * rawData[i][j]) >> histcompr] += 4; + tmphistogram[(int)(refwb[ri->FC(i, j)] * rawData[i][j]) >> histcompr] += 4; } } else if (ri->getSensorType() == ST_FUJI_XTRANS) { for (int j = start; j < end; j++) { - tmphistogram[(int)(refwb[ri->XTRANSFC(i,j)] * rawData[i][j]) >> histcompr] += 4; + tmphistogram[(int)(refwb[ri->XTRANSFC(i, j)] * rawData[i][j]) >> histcompr] += 4; } } else if (ri->get_colors() == 1) { for (int j = start; j < end; j++) { @@ -4352,7 +4416,7 @@ BENCHFUN // Histogram MUST be 256 in size; gamma is applied, blackpoint and gain also void RawImageSource::getRAWHistogram (LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw) { -BENCHFUN + BENCHFUN histRedRaw.clear(); histGreenRaw.clear(); histBlueRaw.clear(); @@ -4362,18 +4426,20 @@ BENCHFUN 65535.0f / ri->get_white(3) }; - const bool fourColours = ri->getSensorType() == ST_BAYER && ((mult[1] != mult[3] || cblacksom[1] != cblacksom[3]) || FC(0,0) == 3 || FC(0,1) == 3 || FC(1,0) == 3 || FC(1,1) == 3); + const bool fourColours = ri->getSensorType() == ST_BAYER && ((mult[1] != mult[3] || cblacksom[1] != cblacksom[3]) || FC(0, 0) == 3 || FC(0, 1) == 3 || FC(1, 0) == 3 || FC(1, 1) == 3); constexpr int histoSize = 65536; LUTu hist[4]; hist[0](histoSize); hist[0].clear(); + if (ri->get_colors() > 1) { hist[1](histoSize); hist[1].clear(); hist[2](histoSize); hist[2].clear(); } + if (fourColours) { hist[3](histoSize); hist[3].clear(); @@ -4392,16 +4458,19 @@ BENCHFUN LUTu tmphist[4]; tmphist[0](histoSize); tmphist[0].clear(); + if (ri->get_colors() > 1) { tmphist[1](histoSize); tmphist[1].clear(); tmphist[2](histoSize); tmphist[2].clear(); + if (fourColours) { tmphist[3](histoSize); tmphist[3].clear(); } } + #ifdef _OPENMP #pragma omp for nowait #endif @@ -4448,9 +4517,11 @@ BENCHFUN #endif { hist[0] += tmphist[0]; + if (ri->get_colors() > 1) { hist[1] += tmphist[1]; hist[2] += tmphist[2]; + if (fourColours) { hist[3] += tmphist[3]; } @@ -4462,13 +4533,16 @@ BENCHFUN int idx; idx = CLIP((int)Color::gamma(mult[0] * (i - (cblacksom[0]/*+black_lev[0]*/)))); histRedRaw[idx >> 8] += hist[0][i]; + if (ri->get_colors() > 1) { idx = CLIP((int)Color::gamma(mult[1] * (i - (cblacksom[1]/*+black_lev[1]*/)))); histGreenRaw[idx >> 8] += hist[1][i]; + if (fourColours) { idx = CLIP((int)Color::gamma(mult[3] * (i - (cblacksom[3]/*+black_lev[3]*/)))); histGreenRaw[idx >> 8] += hist[3][i]; } + idx = CLIP((int)Color::gamma(mult[2] * (i - (cblacksom[2]/*+black_lev[2]*/)))); histBlueRaw[idx >> 8] += hist[2][i]; } @@ -4508,6 +4582,7 @@ void RawImageSource::getAutoWBMultipliers (double &rm, double &gm, double &bm) { BENCHFUN constexpr double clipHigh = 64000.0; + if (ri->get_colors() == 1) { rm = gm = bm = 1; return; @@ -4587,6 +4662,7 @@ void RawImageSource::getAutoWBMultipliers (double &rm, double &gm, double &bm) #ifdef _OPENMP #pragma omp for schedule(dynamic,16) nowait #endif + for (int i = 32; i < H - 32; i++) { for (int j = 32; j < W - 32; j++) { // each loop read 1 rgb triplet value diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 6eebba3ca..ec14d14c1 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -118,8 +118,8 @@ public: int load (const Glib::ustring &fname, bool batch = false); void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse); void demosaic (const RAWParams &raw); - void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI); - void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI); + void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI); + void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI); void retinexPrepareBuffers (ColorManagementParams cmp, RetinexParams retinexParams, multi_array2D &conversionBuffer, LUTu &lhist16RETI); void flushRawData (); void flushRGB (); @@ -196,7 +196,7 @@ public: void boxblur2(float** src, float** dst, float** temp, int H, int W, int box ); void boxblur_resamp(float **src, float **dst, float** temp, int H, int W, int box, int samp ); - void MSR(float** luminance, float **originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax); + void MSR(float** luminance, float **originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax); void HLRecovery_inpaint (float** red, float** green, float** blue); static void HLRecovery_Luminance (float* rin, float* gin, float* bin, float* rout, float* gout, float* bout, int width, float maxval); static void HLRecovery_CIELab (float* rin, float* gin, float* bin, float* rout, float* gout, float* bout, int width, float maxval, double cam[3][3], double icam[3][3]); diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 26e8f53d4..5175836e4 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -466,6 +466,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = { RETINEX, // EvmapMethod DEMOSAIC, // EvRetinexmapcurve DEMOSAIC, // EvviewMethod - ALLNORAW // EvcbdlMethod + ALLNORAW, // EvcbdlMethod + RETINEX, // EvRetinexgaintransmission + RETINEX //EvLskal + }; diff --git a/rtengine/settings.h b/rtengine/settings.h index 3e9c9d38a..4053a547f 100644 --- a/rtengine/settings.h +++ b/rtengine/settings.h @@ -56,6 +56,7 @@ public: Glib::ustring bruce; // default name of Bruce Glib::ustring srgb; // default name of SRGB space profile Glib::ustring srgb10; // default name of SRGB space profile + Glib::ustring rec2020; // default name of rec2020 bool gamutICC; // no longer used bool gamutLch; diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 1bf832bc0..018ef18e6 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -129,15 +129,16 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p LUTf mapcurve (65536, 0); LUTu dummy; RetinextransmissionCurve dehatransmissionCurve; + RetinexgaintransmissionCurve dehagaintransmissionCurve; bool dehacontlutili = false; bool mapcontlutili = false; bool useHsl = false; // multi_array2D conversionBuffer(1, 1); multi_array2D conversionBuffer(1, 1); imgsrc->retinexPrepareBuffers(params.icm, params.retinex, conversionBuffer, dummy); - imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehacontlutili, mapcontlutili, useHsl, dummy, dummy ); + imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, dummy, dummy ); float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, dummy); + imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, dummy); } if (pl) { @@ -293,6 +294,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p adjustr = 1.f / 1.3f; } else if (params.icm.working == "WideGamut") { adjustr = 1.f / 1.1f; + } else if (params.icm.working == "Rec2020") { + adjustr = 1.f / 1.1f; } else if (params.icm.working == "Beta RGB") { adjustr = 1.f / 1.2f; } else if (params.icm.working == "BestRGB") { @@ -532,6 +535,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p adjustr = 1.f / 1.3f; } else if (params.icm.working == "WideGamut") { adjustr = 1.f / 1.1f; + } else if (params.icm.working == "Rec2020") { + adjustr = 1.f / 1.1f; } else if (params.icm.working == "Beta RGB") { adjustr = 1.f / 1.2f; } else if (params.icm.working == "BestRGB") { @@ -857,7 +862,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // if clut was used and size of clut cache == 1 we free the memory used by the clutstore (default clut cache size = 1 for 32 bit OS) if ( params.filmSimulation.enabled && !params.filmSimulation.clutFilename.empty() && options.clutCacheSize == 1) { - clutStore.clearCache(); + CLUTStore::getInstance().clearCache(); } // freeing up some memory @@ -1165,11 +1170,11 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p useLCMS = false; bool pro = false; Glib::ustring chpro, outProfile; - bool present_space[9] = {false, false, false, false, false, false, false, false, false}; + bool present_space[10] = {false, false, false, false, false, false, false, false, false, false}; std::vector opnames = iccStore->getProfiles (); //test if files are in system - for (int j = 0; j < 9; j++) { + for (int j = 0; j < 10; j++) { // one can modify "option" [Color Management] to adapt the profile's name if they are different for windows, MacOS, Linux ?? // some of them are actually provided by RT, thanks to Jacques Desmis if (j == 0) { @@ -1190,6 +1195,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p chpro = options.rtSettings.srgb10; //gamma 1.0 } else if(j == 8) { chpro = options.rtSettings.prophoto10; //gamma 1.0 + } else if(j == 9) { + chpro = options.rtSettings.rec2020; } for (unsigned int i = 0; i < opnames.size(); i++) { @@ -1229,6 +1236,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p outProfile = options.rtSettings.srgb10; } else if (params.icm.working == "ProPhoto" && present_space[8] && pro) { outProfile = options.rtSettings.prophoto10; + } else if (params.icm.working == "Rec2020" && present_space[9]) { + outProfile = options.rtSettings.rec2020; } else { // Should not occurs if (settings->verbose) { diff --git a/rtengine/utils.cc b/rtengine/utils.cc index b45e4b436..2366f3a0c 100644 --- a/rtengine/utils.cc +++ b/rtengine/utils.cc @@ -29,6 +29,51 @@ using namespace std; namespace rtengine { +void poke255_uc(unsigned char* &dest, unsigned char r, unsigned char g, unsigned char b) +{ +#if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ + *(dest++) = b; + *(dest++) = g; + *(dest++) = r; + *(dest++) = 0; +#else + *(dest++) = 0; + *(dest++) = r; + *(dest++) = g; + *(dest++) = b; +#endif +} + +void poke01_d(unsigned char* &dest, double r, double g, double b) +{ +#if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ + *(dest++) = (unsigned char)(b * 255.); + *(dest++) = (unsigned char)(g * 255.); + *(dest++) = (unsigned char)(r * 255.); + *(dest++) = 0; +#else + *(dest++) = 0; + *(dest++) = (unsigned char)(r * 255.); + *(dest++) = (unsigned char)(g * 255.); + *(dest++) = (unsigned char)(b * 255.); +#endif +} + +void poke01_f(unsigned char* &dest, float r, float g, float b) +{ +#if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ + *(dest++) = (unsigned char)(b * 255.f); + *(dest++) = (unsigned char)(g * 255.f); + *(dest++) = (unsigned char)(r * 255.f); + *(dest++) = 0; +#else + *(dest++) = 0; + *(dest++) = (unsigned char)(r * 255.f); + *(dest++) = (unsigned char)(g * 255.f); + *(dest++) = (unsigned char)(b * 255.f); +#endif +} + void bilinearInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh) { diff --git a/rtengine/utils.h b/rtengine/utils.h index 3040e39b9..1e742ffb3 100644 --- a/rtengine/utils.h +++ b/rtengine/utils.h @@ -22,6 +22,13 @@ namespace rtengine { +// update a point of a Cairo::Surface by accessing the raw data +void poke255_uc(unsigned char* &dest, unsigned char r, unsigned char g, unsigned char b); +// update a point of a Cairo::Surface by accessing the raw data +void poke01_d(unsigned char* &dest, double r, double g, double b); +// update a point of a Cairo::Surface by accessing the raw data +void poke01_f(unsigned char* &dest, float r, float g, float b); + void bilinearInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh); void nearestInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh); void rotate (unsigned char* img, int& w, int& h, int deg); diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index 2d6c800fc..471f9fbe3 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -558,7 +558,7 @@ protected: lensAperture = exp( log(a1) + (log(a2) - log(a1)) / (log(f2) - log(f1)) * (log(focalLength) - log(f1)) ); } - dif = abs(lensAperture - maxApertureAtFocal); + dif = std::abs(lensAperture - maxApertureAtFocal); } else { dif = 0; } diff --git a/rtgui/filmsimulation.cc b/rtgui/filmsimulation.cc index 07f85df94..f916a5397 100644 --- a/rtgui/filmsimulation.cc +++ b/rtgui/filmsimulation.cc @@ -72,7 +72,7 @@ void FilmSimulation::onClutSelected() if ( getEnabled() && !currentClutFilename.empty() && listener && currentClutFilename != m_oldClutFilename ) { Glib::ustring clutName, dummy; - splitClutFilename( currentClutFilename, clutName, dummy, dummy ); + HaldCLUT::splitClutFilename( currentClutFilename, clutName, dummy, dummy ); listener->panelChanged( EvFilmSimulationFilename, clutName ); m_oldClutFilename = currentClutFilename; @@ -132,7 +132,7 @@ void FilmSimulation::read( const rtengine::procparams::ProcParams* pp, const Par if ( !get_inconsistent() && !pp->filmSimulation.enabled ) { if (options.clutCacheSize == 1) { - clutStore.clearCache(); + CLUTStore::getInstance().clearCache(); } } @@ -279,7 +279,7 @@ int ClutComboBox::parseDir (const Glib::ustring& path) for (const auto& entry : entries) { Glib::ustring name, extension, profileName; - splitClutFilename (entry, name, extension, profileName); + HaldCLUT::splitClutFilename (entry, name, extension, profileName); extension = extension.casefold (); if (extension.compare ("tif") != 0 && extension.compare ("png") != 0) { diff --git a/rtgui/options.cc b/rtgui/options.cc index 88b795687..e723361be 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -644,6 +644,7 @@ void Options::setDefaults () rtSettings.bruce = "Bruce"; rtSettings.beta = "BetaRGB"; rtSettings.best = "BestRGB"; + rtSettings.rec2020 = "Rec2020"; rtSettings.verbose = false; rtSettings.gamutICC = true; rtSettings.gamutLch = true; @@ -1542,6 +1543,10 @@ int Options::readFromFile (Glib::ustring fname) rtSettings.best = keyFile.get_string("Color Management", "Best"); } + if( keyFile.has_key ("Color Management", "Rec2020")) { + rtSettings.rec2020 = keyFile.get_string("Color Management", "Rec2020"); + } + if( keyFile.has_key ("Color Management", "Bruce")) { rtSettings.bruce = keyFile.get_string("Color Management", "Bruce"); } @@ -1776,11 +1781,13 @@ int Options::readFromFile (Glib::ustring fname) if (options.rtSettings.verbose) { printf("Options::readFromFile / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); } + setDefaults (); } catch (...) { if (options.rtSettings.verbose) { printf("Options::readFromFile / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); } + setDefaults (); } @@ -1810,309 +1817,310 @@ int Options::saveToFile (Glib::ustring fname) try { - Glib::KeyFile keyFile; + Glib::KeyFile keyFile; - keyFile.set_boolean ("General", "TabbedEditor", tabbedUI); - keyFile.set_boolean ("General", "StoreLastProfile", savesParamsAtExit); + keyFile.set_boolean ("General", "TabbedEditor", tabbedUI); + keyFile.set_boolean ("General", "StoreLastProfile", savesParamsAtExit); - if (startupDir == STARTUPDIR_HOME) { - keyFile.set_string ("General", "StartupDirectory", "home"); - } else if (startupDir == STARTUPDIR_CURRENT) { - keyFile.set_string ("General", "StartupDirectory", "current"); - } else if (startupDir == STARTUPDIR_CUSTOM) { - keyFile.set_string ("General", "StartupDirectory", "custom"); - } else if (startupDir == STARTUPDIR_LAST) { - keyFile.set_string ("General", "StartupDirectory", "last"); - } - - keyFile.set_string ("General", "StartupPath", startupPath); - keyFile.set_string ("General", "DateFormat", dateFormat); - keyFile.set_integer ("General", "AdjusterMinDelay", adjusterMinDelay); - keyFile.set_integer ("General", "AdjusterMaxDelay", adjusterMaxDelay); - keyFile.set_boolean ("General", "MultiUser", multiUser); - keyFile.set_string ("General", "Language", language); - keyFile.set_boolean ("General", "LanguageAutoDetect", languageAutoDetect); - keyFile.set_string ("General", "Theme", theme); - keyFile.set_boolean ("General", "SlimUI", slimUI); - keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme); - keyFile.set_string ("General", "Version", VERSION); - keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath); - keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath); - keyFile.set_boolean ("General", "Verbose", rtSettings.verbose); - keyFile.set_double ("General", "BotLeft", rtSettings.bot_left); - keyFile.set_double ("General", "TopLeft", rtSettings.top_left); - keyFile.set_double ("General", "TopRight", rtSettings.top_right); - keyFile.set_double ("General", "BotRight", rtSettings.bot_right); - keyFile.set_double ("General", "EDdetec", rtSettings.ed_detec); - keyFile.set_double ("General", "EDdetecStr", rtSettings.ed_detecStr); - keyFile.set_double ("General", "EDLow", rtSettings.ed_low); - keyFile.set_double ("General", "EDLipinfl", rtSettings.ed_lipinfl); - keyFile.set_double ("General", "EDLipampl", rtSettings.ed_lipampl); - - - keyFile.set_integer ("External Editor", "EditorKind", editorToSendTo); - keyFile.set_string ("External Editor", "GimpDir", gimpDir); - keyFile.set_string ("External Editor", "PhotoshopDir", psDir); - keyFile.set_string ("External Editor", "CustomEditor", customEditorProg); - - keyFile.set_boolean ("File Browser", "BrowseOnlyRaw", fbOnlyRaw); - keyFile.set_boolean ("File Browser", "BrowserShowsDate", fbShowDateTime); - keyFile.set_boolean ("File Browser", "BrowserShowsExif", fbShowBasicExif); - keyFile.set_boolean ("File Browser", "BrowserShowsExpComp", fbShowExpComp); - keyFile.set_boolean ("File Browser", "BrowserShowsHidden", fbShowHidden); - keyFile.set_integer ("File Browser", "ThumbnailSize", thumbSize); - keyFile.set_integer ("File Browser", "ThumbnailSizeTab", thumbSizeTab); - keyFile.set_integer ("File Browser", "ThumbnailSizeQueue", thumbSizeQueue); - keyFile.set_integer ("File Browser", "SameThumbSize", sameThumbSize); - keyFile.set_integer ("File Browser", "MaxPreviewHeight", maxThumbnailHeight); - keyFile.set_integer ("File Browser", "MaxCacheEntries", maxCacheEntries); - Glib::ArrayHandle pext = parseExtensions; - keyFile.set_string_list ("File Browser", "ParseExtensions", pext); - Glib::ArrayHandle pextena = parseExtensionsEnabled; - keyFile.set_integer_list ("File Browser", "ParseExtensionsEnabled", pextena); - keyFile.set_integer ("File Browser", "ThumbnailArrangement", fbArrangement); - keyFile.set_integer ("File Browser", "ThumbnailInterpolation", thumbInterp); - keyFile.set_boolean ("File Browser", "LiveThumbnails", liveThumbnails); - Glib::ArrayHandle pfav = favoriteDirs; - keyFile.set_string_list ("File Browser", "FavoriteDirs", pfav); - Glib::ArrayHandle pren = renameTemplates; - keyFile.set_string_list ("File Browser", "RenameTemplates", pren); - keyFile.set_boolean ("File Browser", "RenameUseTemplates", renameUseTemplates); - Glib::ArrayHandle ptzoom = thumbnailZoomRatios; - keyFile.set_double_list ("File Browser", "ThumbnailZoomRatios", ptzoom); - keyFile.set_boolean ("File Browser", "OverlayedFileNames", overlayedFileNames); - keyFile.set_boolean ("File Browser", "FilmStripOverlayedFileNames", filmStripOverlayedFileNames); - keyFile.set_boolean ("File Browser", "ShowFileNames", showFileNames ); - keyFile.set_boolean ("File Browser", "FilmStripShowFileNames", filmStripShowFileNames ); - keyFile.set_boolean ("File Browser", "InternalThumbIfUntouched", internalThumbIfUntouched ); - keyFile.set_boolean ("File Browser", "menuGroupRank", menuGroupRank); - keyFile.set_boolean ("File Browser", "menuGroupLabel", menuGroupLabel); - keyFile.set_boolean ("File Browser", "menuGroupFileOperations", menuGroupFileOperations); - keyFile.set_boolean ("File Browser", "menuGroupProfileOperations", menuGroupProfileOperations); - keyFile.set_boolean ("File Browser", "menuGroupExtProg", menuGroupExtProg); - keyFile.set_integer ("File Browser", "MaxRecentFolders", maxRecentFolders); - { - std::vector temp; - temp.reserve(maxRecentFolders); - - for(unsigned int i = 0; i < std::min(recentFolders.size(), maxRecentFolders); i++) { - temp.push_back(recentFolders[i]); + if (startupDir == STARTUPDIR_HOME) { + keyFile.set_string ("General", "StartupDirectory", "home"); + } else if (startupDir == STARTUPDIR_CURRENT) { + keyFile.set_string ("General", "StartupDirectory", "current"); + } else if (startupDir == STARTUPDIR_CUSTOM) { + keyFile.set_string ("General", "StartupDirectory", "custom"); + } else if (startupDir == STARTUPDIR_LAST) { + keyFile.set_string ("General", "StartupDirectory", "last"); } - keyFile.set_string_list ("File Browser", "RecentFolders", temp); - } - keyFile.set_integer ("Clipping Indication", "HighlightThreshold", highlightThreshold); - keyFile.set_integer ("Clipping Indication", "ShadowThreshold", shadowThreshold); - keyFile.set_boolean ("Clipping Indication", "BlinkClipped", blinkClipped); + keyFile.set_string ("General", "StartupPath", startupPath); + keyFile.set_string ("General", "DateFormat", dateFormat); + keyFile.set_integer ("General", "AdjusterMinDelay", adjusterMinDelay); + keyFile.set_integer ("General", "AdjusterMaxDelay", adjusterMaxDelay); + keyFile.set_boolean ("General", "MultiUser", multiUser); + keyFile.set_string ("General", "Language", language); + keyFile.set_boolean ("General", "LanguageAutoDetect", languageAutoDetect); + keyFile.set_string ("General", "Theme", theme); + keyFile.set_boolean ("General", "SlimUI", slimUI); + keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme); + keyFile.set_string ("General", "Version", VERSION); + keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath); + keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath); + keyFile.set_boolean ("General", "Verbose", rtSettings.verbose); + keyFile.set_double ("General", "BotLeft", rtSettings.bot_left); + keyFile.set_double ("General", "TopLeft", rtSettings.top_left); + keyFile.set_double ("General", "TopRight", rtSettings.top_right); + keyFile.set_double ("General", "BotRight", rtSettings.bot_right); + keyFile.set_double ("General", "EDdetec", rtSettings.ed_detec); + keyFile.set_double ("General", "EDdetecStr", rtSettings.ed_detecStr); + keyFile.set_double ("General", "EDLow", rtSettings.ed_low); + keyFile.set_double ("General", "EDLipinfl", rtSettings.ed_lipinfl); + keyFile.set_double ("General", "EDLipampl", rtSettings.ed_lipampl); - keyFile.set_integer ("Performance", "RgbDenoiseThreadLimit", rgbDenoiseThreadLimit); - keyFile.set_double ("Performance", "NRauto", rtSettings.nrauto); - keyFile.set_double ("Performance", "NRautomax", rtSettings.nrautomax); - keyFile.set_double ("Performance", "NRhigh", rtSettings.nrhigh); - keyFile.set_integer ("Performance", "NRWavlevel", rtSettings.nrwavlevel); - keyFile.set_integer ("Performance", "LevNR", rtSettings.leveldnv); - keyFile.set_integer ("Performance", "LevNRTI", rtSettings.leveldnti); - keyFile.set_integer ("Performance", "LevNRAUT", rtSettings.leveldnaut); - keyFile.set_integer ("Performance", "LevNRLISS", rtSettings.leveldnliss); - keyFile.set_integer ("Performance", "SIMPLNRAUT", rtSettings.leveldnautsimpl); - keyFile.set_integer ("Performance", "ClutCacheSize", clutCacheSize); - keyFile.set_integer ("Performance", "MaxInspectorBuffers", maxInspectorBuffers); - keyFile.set_integer ("Performance", "PreviewDemosaicFromSidecar", prevdemo); - keyFile.set_boolean ("Performance", "Daubechies", rtSettings.daubech); - keyFile.set_boolean ("Performance", "SerializeTiffRead", serializeTiffRead); - keyFile.set_string ("Output", "Format", saveFormat.format); - keyFile.set_integer ("Output", "JpegQuality", saveFormat.jpegQuality); - keyFile.set_integer ("Output", "JpegSubSamp", saveFormat.jpegSubSamp); - keyFile.set_integer ("Output", "PngCompression", saveFormat.pngCompression); - keyFile.set_integer ("Output", "PngBps", saveFormat.pngBits); - keyFile.set_integer ("Output", "TiffBps", saveFormat.tiffBits); - keyFile.set_boolean ("Output", "TiffUncompressed", saveFormat.tiffUncompressed); - keyFile.set_boolean ("Output", "SaveProcParams", saveFormat.saveParams); + keyFile.set_integer ("External Editor", "EditorKind", editorToSendTo); + keyFile.set_string ("External Editor", "GimpDir", gimpDir); + keyFile.set_string ("External Editor", "PhotoshopDir", psDir); + keyFile.set_string ("External Editor", "CustomEditor", customEditorProg); - keyFile.set_string ("Output", "FormatBatch", saveFormatBatch.format); - keyFile.set_integer ("Output", "JpegQualityBatch", saveFormatBatch.jpegQuality); - keyFile.set_integer ("Output", "JpegSubSampBatch", saveFormatBatch.jpegSubSamp); - keyFile.set_integer ("Output", "PngCompressionBatch", saveFormatBatch.pngCompression); - keyFile.set_integer ("Output", "PngBpsBatch", saveFormatBatch.pngBits); - keyFile.set_integer ("Output", "TiffBpsBatch", saveFormatBatch.tiffBits); - keyFile.set_boolean ("Output", "TiffUncompressedBatch", saveFormatBatch.tiffUncompressed); - keyFile.set_boolean ("Output", "SaveProcParamsBatch", saveFormatBatch.saveParams); + keyFile.set_boolean ("File Browser", "BrowseOnlyRaw", fbOnlyRaw); + keyFile.set_boolean ("File Browser", "BrowserShowsDate", fbShowDateTime); + keyFile.set_boolean ("File Browser", "BrowserShowsExif", fbShowBasicExif); + keyFile.set_boolean ("File Browser", "BrowserShowsExpComp", fbShowExpComp); + keyFile.set_boolean ("File Browser", "BrowserShowsHidden", fbShowHidden); + keyFile.set_integer ("File Browser", "ThumbnailSize", thumbSize); + keyFile.set_integer ("File Browser", "ThumbnailSizeTab", thumbSizeTab); + keyFile.set_integer ("File Browser", "ThumbnailSizeQueue", thumbSizeQueue); + keyFile.set_integer ("File Browser", "SameThumbSize", sameThumbSize); + keyFile.set_integer ("File Browser", "MaxPreviewHeight", maxThumbnailHeight); + keyFile.set_integer ("File Browser", "MaxCacheEntries", maxCacheEntries); + Glib::ArrayHandle pext = parseExtensions; + keyFile.set_string_list ("File Browser", "ParseExtensions", pext); + Glib::ArrayHandle pextena = parseExtensionsEnabled; + keyFile.set_integer_list ("File Browser", "ParseExtensionsEnabled", pextena); + keyFile.set_integer ("File Browser", "ThumbnailArrangement", fbArrangement); + keyFile.set_integer ("File Browser", "ThumbnailInterpolation", thumbInterp); + keyFile.set_boolean ("File Browser", "LiveThumbnails", liveThumbnails); + Glib::ArrayHandle pfav = favoriteDirs; + keyFile.set_string_list ("File Browser", "FavoriteDirs", pfav); + Glib::ArrayHandle pren = renameTemplates; + keyFile.set_string_list ("File Browser", "RenameTemplates", pren); + keyFile.set_boolean ("File Browser", "RenameUseTemplates", renameUseTemplates); + Glib::ArrayHandle ptzoom = thumbnailZoomRatios; + keyFile.set_double_list ("File Browser", "ThumbnailZoomRatios", ptzoom); + keyFile.set_boolean ("File Browser", "OverlayedFileNames", overlayedFileNames); + keyFile.set_boolean ("File Browser", "FilmStripOverlayedFileNames", filmStripOverlayedFileNames); + keyFile.set_boolean ("File Browser", "ShowFileNames", showFileNames ); + keyFile.set_boolean ("File Browser", "FilmStripShowFileNames", filmStripShowFileNames ); + keyFile.set_boolean ("File Browser", "InternalThumbIfUntouched", internalThumbIfUntouched ); + keyFile.set_boolean ("File Browser", "menuGroupRank", menuGroupRank); + keyFile.set_boolean ("File Browser", "menuGroupLabel", menuGroupLabel); + keyFile.set_boolean ("File Browser", "menuGroupFileOperations", menuGroupFileOperations); + keyFile.set_boolean ("File Browser", "menuGroupProfileOperations", menuGroupProfileOperations); + keyFile.set_boolean ("File Browser", "menuGroupExtProg", menuGroupExtProg); + keyFile.set_integer ("File Browser", "MaxRecentFolders", maxRecentFolders); + { + std::vector temp; + temp.reserve(maxRecentFolders); - keyFile.set_string ("Output", "PathTemplate", savePathTemplate); - keyFile.set_string ("Output", "PathFolder", savePathFolder); - keyFile.set_boolean ("Output", "AutoSuffix", autoSuffix); - keyFile.set_boolean ("Output", "ForceFormatOpts", forceFormatOpts); - keyFile.set_integer ("Output", "SaveMethodNum", saveMethodNum); - keyFile.set_boolean ("Output", "UsePathTemplate", saveUsePathTemplate); - keyFile.set_string ("Output", "LastSaveAsPath", lastSaveAsPath); - keyFile.set_boolean ("Output", "OverwriteOutputFile", overwriteOutputFile); - keyFile.set_boolean ("Output", "TunnelMetaData", tunnelMetaData); + for(unsigned int i = 0; i < std::min(recentFolders.size(), maxRecentFolders); i++) { + temp.push_back(recentFolders[i]); + } - keyFile.set_string ("Profiles", "Directory", profilePath); - keyFile.set_boolean ("Profiles", "UseBundledProfiles", useBundledProfiles); - keyFile.set_string ("Profiles", "LoadSaveProfilePath", loadSaveProfilePath); - keyFile.set_string ("Profiles", "RawDefault", defProfRaw); - keyFile.set_string ("Profiles", "ImgDefault", defProfImg); - keyFile.set_boolean ("Profiles", "FilledProfile", filledProfile); - keyFile.set_boolean ("Profiles", "SaveParamsWithFile", saveParamsFile); - keyFile.set_boolean ("Profiles", "SaveParamsToCache", saveParamsCache); - keyFile.set_integer ("Profiles", "LoadParamsFromLocation", paramsLoadLocation); - keyFile.set_string ("Profiles", "CustomProfileBuilderPath", CPBPath); - keyFile.set_integer ("Profiles", "CustomProfileBuilderKeys", CPBKeys); + keyFile.set_string_list ("File Browser", "RecentFolders", temp); + } + keyFile.set_integer ("Clipping Indication", "HighlightThreshold", highlightThreshold); + keyFile.set_integer ("Clipping Indication", "ShadowThreshold", shadowThreshold); + keyFile.set_boolean ("Clipping Indication", "BlinkClipped", blinkClipped); - keyFile.set_string ("GUI", "Font", font); - keyFile.set_integer ("GUI", "WindowWidth", windowWidth); - keyFile.set_integer ("GUI", "WindowHeight", windowHeight); - keyFile.set_integer ("GUI", "WindowX", windowX); - keyFile.set_integer ("GUI", "WindowY", windowY); - keyFile.set_boolean ("GUI", "WindowMaximized", windowMaximized); - keyFile.set_integer ("GUI", "DetailWindowWidth", detailWindowWidth); - keyFile.set_integer ("GUI", "DetailWindowHeight", detailWindowHeight); - keyFile.set_integer ("GUI", "DirBrowserWidth", dirBrowserWidth); - keyFile.set_integer ("GUI", "DirBrowserHeight", dirBrowserHeight); - keyFile.set_integer ("GUI", "SortType", dirBrowserSortType); - keyFile.set_integer ("GUI", "PreferencesWidth", preferencesWidth); - keyFile.set_integer ("GUI", "PreferencesHeight", preferencesHeight); - keyFile.set_integer ("GUI", "SaveAsDialogWidth", saveAsDialogWidth); - keyFile.set_integer ("GUI", "SaveAsDialogHeight", saveAsDialogHeight); - keyFile.set_integer ("GUI", "ToolPanelWidth", toolPanelWidth); - keyFile.set_integer ("GUI", "BrowserToolPanelWidth", browserToolPanelWidth); - keyFile.set_integer ("GUI", "BrowserToolPanelHeight", browserToolPanelHeight); - keyFile.set_boolean ("GUI", "BrowserToolPanelOpened", browserToolPanelOpened); - keyFile.set_boolean ("GUI", "EditorFilmStripOpened", editorFilmStripOpened); - keyFile.set_boolean ("GUI", "BrowserDirPanelOpened", browserDirPanelOpened); - keyFile.set_integer ("GUI", "HistoryPanelWidth", historyPanelWidth); - keyFile.set_integer ("GUI", "LastPreviewScale", lastScale); - keyFile.set_integer ("GUI", "PanAccelFactor", panAccelFactor); - keyFile.set_boolean ("GUI", "RememberZoomAndPan", rememberZoomAndPan); - keyFile.set_integer ("GUI", "LastCropSize", lastCropSize); - keyFile.set_boolean ("GUI", "ShowHistory", showHistory); - keyFile.set_integer ("GUI", "ShowFilePanelState", showFilePanelState); - keyFile.set_boolean ("GUI", "ShowInfo", showInfo); - keyFile.set_boolean ("GUI", "MainNBVertical", mainNBVertical); - keyFile.set_boolean ("GUI", "ShowClippedHighlights", showClippedHighlights); - keyFile.set_boolean ("GUI", "ShowClippedShadows", showClippedShadows); - keyFile.set_integer ("GUI", "FrameColor", bgcolor); - keyFile.set_boolean ("GUI", "ProcessingQueueEnbled", procQueueEnabled); - Glib::ArrayHandle tpopen = tpOpen; - keyFile.set_integer_list ("GUI", "ToolPanelsExpanded", tpopen); - keyFile.set_integer ("GUI", "MultiDisplayMode", multiDisplayMode); - keyFile.set_double_list ("GUI", "CutOverlayBrush", cutOverlayBrush); - keyFile.set_double_list ("GUI", "NavGuideBrush", navGuideBrush); - keyFile.set_integer ("GUI", "HistogramPosition", histogramPosition); - keyFile.set_boolean ("GUI", "HistogramBar", histogramBar); - keyFile.set_boolean ("GUI", "HistogramFullMode", histogramFullMode); - keyFile.set_boolean ("GUI", "ShowFilmStripToolBar", showFilmStripToolBar); - keyFile.set_boolean ("GUI", "FileBrowserToolbarSingleRow", FileBrowserToolbarSingleRow); - keyFile.set_boolean ("GUI", "HideTPVScrollbar", hideTPVScrollbar); - keyFile.set_boolean ("GUI", "UseIconNoText", UseIconNoText); - keyFile.set_boolean ("GUI", "HistogramWorking", rtSettings.HistogramWorking); - keyFile.set_integer ("GUI", "CurveBBoxPosition", curvebboxpos); + keyFile.set_integer ("Performance", "RgbDenoiseThreadLimit", rgbDenoiseThreadLimit); + keyFile.set_double ("Performance", "NRauto", rtSettings.nrauto); + keyFile.set_double ("Performance", "NRautomax", rtSettings.nrautomax); + keyFile.set_double ("Performance", "NRhigh", rtSettings.nrhigh); + keyFile.set_integer ("Performance", "NRWavlevel", rtSettings.nrwavlevel); + keyFile.set_integer ("Performance", "LevNR", rtSettings.leveldnv); + keyFile.set_integer ("Performance", "LevNRTI", rtSettings.leveldnti); + keyFile.set_integer ("Performance", "LevNRAUT", rtSettings.leveldnaut); + keyFile.set_integer ("Performance", "LevNRLISS", rtSettings.leveldnliss); + keyFile.set_integer ("Performance", "SIMPLNRAUT", rtSettings.leveldnautsimpl); + keyFile.set_integer ("Performance", "ClutCacheSize", clutCacheSize); + keyFile.set_integer ("Performance", "MaxInspectorBuffers", maxInspectorBuffers); + keyFile.set_integer ("Performance", "PreviewDemosaicFromSidecar", prevdemo); + keyFile.set_boolean ("Performance", "Daubechies", rtSettings.daubech); + keyFile.set_boolean ("Performance", "SerializeTiffRead", serializeTiffRead); - //Glib::ArrayHandle crvopen = crvOpen; - //keyFile.set_integer_list ("GUI", "CurvePanelsExpanded", crvopen); + keyFile.set_string ("Output", "Format", saveFormat.format); + keyFile.set_integer ("Output", "JpegQuality", saveFormat.jpegQuality); + keyFile.set_integer ("Output", "JpegSubSamp", saveFormat.jpegSubSamp); + keyFile.set_integer ("Output", "PngCompression", saveFormat.pngCompression); + keyFile.set_integer ("Output", "PngBps", saveFormat.pngBits); + keyFile.set_integer ("Output", "TiffBps", saveFormat.tiffBits); + keyFile.set_boolean ("Output", "TiffUncompressed", saveFormat.tiffUncompressed); + keyFile.set_boolean ("Output", "SaveProcParams", saveFormat.saveParams); - keyFile.set_integer ("Crop Settings", "PPI", cropPPI); + keyFile.set_string ("Output", "FormatBatch", saveFormatBatch.format); + keyFile.set_integer ("Output", "JpegQualityBatch", saveFormatBatch.jpegQuality); + keyFile.set_integer ("Output", "JpegSubSampBatch", saveFormatBatch.jpegSubSamp); + keyFile.set_integer ("Output", "PngCompressionBatch", saveFormatBatch.pngCompression); + keyFile.set_integer ("Output", "PngBpsBatch", saveFormatBatch.pngBits); + keyFile.set_integer ("Output", "TiffBpsBatch", saveFormatBatch.tiffBits); + keyFile.set_boolean ("Output", "TiffUncompressedBatch", saveFormatBatch.tiffUncompressed); + keyFile.set_boolean ("Output", "SaveProcParamsBatch", saveFormatBatch.saveParams); - keyFile.set_string ("Color Management", "ICCDirectory", rtSettings.iccDirectory); - keyFile.set_string ("Color Management", "MonitorProfile", rtSettings.monitorProfile); - keyFile.set_boolean ("Color Management", "AutoMonitorProfile", rtSettings.autoMonitorProfile); - keyFile.set_boolean ("Color Management", "Autocielab", rtSettings.autocielab); - keyFile.set_boolean ("Color Management", "RGBcurvesLumamode_Gamut", rtSettings.rgbcurveslumamode_gamut); - keyFile.set_integer ("Color Management", "Intent", rtSettings.monitorIntent); - keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); - keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); - keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); + keyFile.set_string ("Output", "PathTemplate", savePathTemplate); + keyFile.set_string ("Output", "PathFolder", savePathFolder); + keyFile.set_boolean ("Output", "AutoSuffix", autoSuffix); + keyFile.set_boolean ("Output", "ForceFormatOpts", forceFormatOpts); + keyFile.set_integer ("Output", "SaveMethodNum", saveMethodNum); + keyFile.set_boolean ("Output", "UsePathTemplate", saveUsePathTemplate); + keyFile.set_string ("Output", "LastSaveAsPath", lastSaveAsPath); + keyFile.set_boolean ("Output", "OverwriteOutputFile", overwriteOutputFile); + keyFile.set_boolean ("Output", "TunnelMetaData", tunnelMetaData); - keyFile.set_string ("Color Management", "AdobeRGB", rtSettings.adobe); - keyFile.set_string ("Color Management", "ProPhoto", rtSettings.prophoto); - keyFile.set_string ("Color Management", "ProPhoto10", rtSettings.prophoto10); - keyFile.set_string ("Color Management", "WideGamut", rtSettings.widegamut); - keyFile.set_string ("Color Management", "sRGB", rtSettings.srgb); - keyFile.set_string ("Color Management", "sRGB10", rtSettings.srgb10); - keyFile.set_string ("Color Management", "Beta", rtSettings.beta); - keyFile.set_string ("Color Management", "Best", rtSettings.best); - keyFile.set_string ("Color Management", "Bruce", rtSettings.bruce); - keyFile.set_integer ("Color Management", "WhiteBalanceSpotSize", whiteBalanceSpotSize); - keyFile.set_boolean ("Color Management", "GamutICC", rtSettings.gamutICC); + keyFile.set_string ("Profiles", "Directory", profilePath); + keyFile.set_boolean ("Profiles", "UseBundledProfiles", useBundledProfiles); + keyFile.set_string ("Profiles", "LoadSaveProfilePath", loadSaveProfilePath); + keyFile.set_string ("Profiles", "RawDefault", defProfRaw); + keyFile.set_string ("Profiles", "ImgDefault", defProfImg); + keyFile.set_boolean ("Profiles", "FilledProfile", filledProfile); + keyFile.set_boolean ("Profiles", "SaveParamsWithFile", saveParamsFile); + keyFile.set_boolean ("Profiles", "SaveParamsToCache", saveParamsCache); + keyFile.set_integer ("Profiles", "LoadParamsFromLocation", paramsLoadLocation); + keyFile.set_string ("Profiles", "CustomProfileBuilderPath", CPBPath); + keyFile.set_integer ("Profiles", "CustomProfileBuilderKeys", CPBKeys); + + keyFile.set_string ("GUI", "Font", font); + keyFile.set_integer ("GUI", "WindowWidth", windowWidth); + keyFile.set_integer ("GUI", "WindowHeight", windowHeight); + keyFile.set_integer ("GUI", "WindowX", windowX); + keyFile.set_integer ("GUI", "WindowY", windowY); + keyFile.set_boolean ("GUI", "WindowMaximized", windowMaximized); + keyFile.set_integer ("GUI", "DetailWindowWidth", detailWindowWidth); + keyFile.set_integer ("GUI", "DetailWindowHeight", detailWindowHeight); + keyFile.set_integer ("GUI", "DirBrowserWidth", dirBrowserWidth); + keyFile.set_integer ("GUI", "DirBrowserHeight", dirBrowserHeight); + keyFile.set_integer ("GUI", "SortType", dirBrowserSortType); + keyFile.set_integer ("GUI", "PreferencesWidth", preferencesWidth); + keyFile.set_integer ("GUI", "PreferencesHeight", preferencesHeight); + keyFile.set_integer ("GUI", "SaveAsDialogWidth", saveAsDialogWidth); + keyFile.set_integer ("GUI", "SaveAsDialogHeight", saveAsDialogHeight); + keyFile.set_integer ("GUI", "ToolPanelWidth", toolPanelWidth); + keyFile.set_integer ("GUI", "BrowserToolPanelWidth", browserToolPanelWidth); + keyFile.set_integer ("GUI", "BrowserToolPanelHeight", browserToolPanelHeight); + keyFile.set_boolean ("GUI", "BrowserToolPanelOpened", browserToolPanelOpened); + keyFile.set_boolean ("GUI", "EditorFilmStripOpened", editorFilmStripOpened); + keyFile.set_boolean ("GUI", "BrowserDirPanelOpened", browserDirPanelOpened); + keyFile.set_integer ("GUI", "HistoryPanelWidth", historyPanelWidth); + keyFile.set_integer ("GUI", "LastPreviewScale", lastScale); + keyFile.set_integer ("GUI", "PanAccelFactor", panAccelFactor); + keyFile.set_boolean ("GUI", "RememberZoomAndPan", rememberZoomAndPan); + keyFile.set_integer ("GUI", "LastCropSize", lastCropSize); + keyFile.set_boolean ("GUI", "ShowHistory", showHistory); + keyFile.set_integer ("GUI", "ShowFilePanelState", showFilePanelState); + keyFile.set_boolean ("GUI", "ShowInfo", showInfo); + keyFile.set_boolean ("GUI", "MainNBVertical", mainNBVertical); + keyFile.set_boolean ("GUI", "ShowClippedHighlights", showClippedHighlights); + keyFile.set_boolean ("GUI", "ShowClippedShadows", showClippedShadows); + keyFile.set_integer ("GUI", "FrameColor", bgcolor); + keyFile.set_boolean ("GUI", "ProcessingQueueEnbled", procQueueEnabled); + Glib::ArrayHandle tpopen = tpOpen; + keyFile.set_integer_list ("GUI", "ToolPanelsExpanded", tpopen); + keyFile.set_integer ("GUI", "MultiDisplayMode", multiDisplayMode); + keyFile.set_double_list ("GUI", "CutOverlayBrush", cutOverlayBrush); + keyFile.set_double_list ("GUI", "NavGuideBrush", navGuideBrush); + keyFile.set_integer ("GUI", "HistogramPosition", histogramPosition); + keyFile.set_boolean ("GUI", "HistogramBar", histogramBar); + keyFile.set_boolean ("GUI", "HistogramFullMode", histogramFullMode); + keyFile.set_boolean ("GUI", "ShowFilmStripToolBar", showFilmStripToolBar); + keyFile.set_boolean ("GUI", "FileBrowserToolbarSingleRow", FileBrowserToolbarSingleRow); + keyFile.set_boolean ("GUI", "HideTPVScrollbar", hideTPVScrollbar); + keyFile.set_boolean ("GUI", "UseIconNoText", UseIconNoText); + keyFile.set_boolean ("GUI", "HistogramWorking", rtSettings.HistogramWorking); + keyFile.set_integer ("GUI", "CurveBBoxPosition", curvebboxpos); + + //Glib::ArrayHandle crvopen = crvOpen; + //keyFile.set_integer_list ("GUI", "CurvePanelsExpanded", crvopen); + + keyFile.set_integer ("Crop Settings", "PPI", cropPPI); + + keyFile.set_string ("Color Management", "ICCDirectory", rtSettings.iccDirectory); + keyFile.set_string ("Color Management", "MonitorProfile", rtSettings.monitorProfile); + keyFile.set_boolean ("Color Management", "AutoMonitorProfile", rtSettings.autoMonitorProfile); + keyFile.set_boolean ("Color Management", "Autocielab", rtSettings.autocielab); + keyFile.set_boolean ("Color Management", "RGBcurvesLumamode_Gamut", rtSettings.rgbcurveslumamode_gamut); + keyFile.set_integer ("Color Management", "Intent", rtSettings.monitorIntent); + keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); + keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); + keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); + + keyFile.set_string ("Color Management", "AdobeRGB", rtSettings.adobe); + keyFile.set_string ("Color Management", "ProPhoto", rtSettings.prophoto); + keyFile.set_string ("Color Management", "ProPhoto10", rtSettings.prophoto10); + keyFile.set_string ("Color Management", "WideGamut", rtSettings.widegamut); + keyFile.set_string ("Color Management", "sRGB", rtSettings.srgb); + keyFile.set_string ("Color Management", "sRGB10", rtSettings.srgb10); + keyFile.set_string ("Color Management", "Beta", rtSettings.beta); + keyFile.set_string ("Color Management", "Best", rtSettings.best); + keyFile.set_string ("Color Management", "Rec2020", rtSettings.rec2020); + keyFile.set_string ("Color Management", "Bruce", rtSettings.bruce); + keyFile.set_integer ("Color Management", "WhiteBalanceSpotSize", whiteBalanceSpotSize); + keyFile.set_boolean ("Color Management", "GamutICC", rtSettings.gamutICC); // keyFile.set_boolean ("Color Management", "BWcomplement", rtSettings.bw_complementary); - keyFile.set_boolean ("Color Management", "Ciecamfloat", rtSettings.ciecamfloat); - keyFile.set_boolean ("Color Management", "GamutLch", rtSettings.gamutLch); - keyFile.set_integer ("Color Management", "ProtectRed", rtSettings.protectred); - keyFile.set_integer ("Color Management", "Amountchroma", rtSettings.amchroma); - keyFile.set_double ("Color Management", "ProtectRedH", rtSettings.protectredh); - keyFile.set_integer ("Color Management", "CRI", rtSettings.CRI_color); - keyFile.set_integer ("Color Management", "DenoiseLabgamma", rtSettings.denoiselabgamma); + keyFile.set_boolean ("Color Management", "Ciecamfloat", rtSettings.ciecamfloat); + keyFile.set_boolean ("Color Management", "GamutLch", rtSettings.gamutLch); + keyFile.set_integer ("Color Management", "ProtectRed", rtSettings.protectred); + keyFile.set_integer ("Color Management", "Amountchroma", rtSettings.amchroma); + keyFile.set_double ("Color Management", "ProtectRedH", rtSettings.protectredh); + keyFile.set_integer ("Color Management", "CRI", rtSettings.CRI_color); + keyFile.set_integer ("Color Management", "DenoiseLabgamma", rtSettings.denoiselabgamma); // keyFile.set_boolean ("Color Management", "Ciebadpixgauss", rtSettings.ciebadpixgauss); - keyFile.set_double ("Color Management", "CBDLArtif", rtSettings.artifact_cbdl); - keyFile.set_double ("Color Management", "CBDLlevel0", rtSettings.level0_cbdl); - keyFile.set_double ("Color Management", "CBDLlevel123", rtSettings.level123_cbdl); + keyFile.set_double ("Color Management", "CBDLArtif", rtSettings.artifact_cbdl); + keyFile.set_double ("Color Management", "CBDLlevel0", rtSettings.level0_cbdl); + keyFile.set_double ("Color Management", "CBDLlevel123", rtSettings.level123_cbdl); // keyFile.set_double ("Color Management", "Colortoningab", rtSettings.colortoningab); // keyFile.set_double ("Color Management", "Decaction", rtSettings.decaction); - keyFile.set_string ("Color Management", "ClutsDirectory", clutsDir); + keyFile.set_string ("Color Management", "ClutsDirectory", clutsDir); - Glib::ArrayHandle bab = baBehav; - keyFile.set_integer_list ("Batch Processing", "AdjusterBehavior", bab); + Glib::ArrayHandle bab = baBehav; + keyFile.set_integer_list ("Batch Processing", "AdjusterBehavior", bab); - keyFile.set_boolean ("Sounds", "Enable", sndEnable); - keyFile.set_string ("Sounds", "BatchQueueDone", sndBatchQueueDone); - keyFile.set_string ("Sounds", "LngEditProcDone", sndLngEditProcDone); - keyFile.set_double ("Sounds", "LngEditProcDoneSecs", sndLngEditProcDoneSecs); + keyFile.set_boolean ("Sounds", "Enable", sndEnable); + keyFile.set_string ("Sounds", "BatchQueueDone", sndBatchQueueDone); + keyFile.set_string ("Sounds", "LngEditProcDone", sndLngEditProcDone); + keyFile.set_double ("Sounds", "LngEditProcDoneSecs", sndLngEditProcDoneSecs); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpening" , fastexport_bypass_sharpening ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenEdge" , fastexport_bypass_sharpenEdge ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenMicro" , fastexport_bypass_sharpenMicro ); - //keyFile.set_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" , fastexport_bypass_lumaDenoise ); - //keyFile.set_boolean ("Fast Export", "fastexport_bypass_colorDenoise" , fastexport_bypass_colorDenoise ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_defringe" , fastexport_bypass_defringe ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" , fastexport_bypass_dirpyrDenoise ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sh_hq" , fastexport_bypass_sh_hq ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" , fastexport_bypass_dirpyrequalizer ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_wavelet" , fastexport_bypass_wavelet ); - keyFile.set_string ("Fast Export", "fastexport_raw_bayer_method" , fastexport_raw_bayer_method ); - //keyFile.set_boolean ("Fast Export", "fastexport_bypass_bayer_raw_all_enhance" , fastexport_bypass_raw_bayer_all_enhance ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" , fastexport_bypass_raw_bayer_dcb_iterations ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" , fastexport_bypass_raw_bayer_dcb_enhance ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations", fastexport_bypass_raw_bayer_lmmse_iterations); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" , fastexport_bypass_raw_bayer_linenoise ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" , fastexport_bypass_raw_bayer_greenthresh ); - keyFile.set_string ("Fast Export", "fastexport_raw_xtrans_method" , fastexport_raw_xtrans_method ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps" , fastexport_bypass_raw_ccSteps ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ca" , fastexport_bypass_raw_ca ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_df" , fastexport_bypass_raw_df ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ff" , fastexport_bypass_raw_ff ); - keyFile.set_string ("Fast Export", "fastexport_icm_input" , fastexport_icm_input ); - keyFile.set_string ("Fast Export", "fastexport_icm_working" , fastexport_icm_working ); - keyFile.set_string ("Fast Export", "fastexport_icm_output" , fastexport_icm_output ); - keyFile.set_integer ("Fast Export", "fastexport_icm_output_intent" , fastexport_icm_outputIntent ); - keyFile.set_string ("Fast Export", "fastexport_icm_gamma" , fastexport_icm_gamma ); - keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled" , fastexport_resize_enabled ); - keyFile.set_double ("Fast Export", "fastexport_resize_scale" , fastexport_resize_scale ); - keyFile.set_string ("Fast Export", "fastexport_resize_appliesTo" , fastexport_resize_appliesTo ); - keyFile.set_string ("Fast Export", "fastexport_resize_method" , fastexport_resize_method ); - keyFile.set_integer ("Fast Export", "fastexport_resize_dataspec" , fastexport_resize_dataspec ); - keyFile.set_integer ("Fast Export", "fastexport_resize_width" , fastexport_resize_width ); - keyFile.set_integer ("Fast Export", "fastexport_resize_height" , fastexport_resize_height ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpening" , fastexport_bypass_sharpening ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenEdge" , fastexport_bypass_sharpenEdge ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenMicro" , fastexport_bypass_sharpenMicro ); + //keyFile.set_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" , fastexport_bypass_lumaDenoise ); + //keyFile.set_boolean ("Fast Export", "fastexport_bypass_colorDenoise" , fastexport_bypass_colorDenoise ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_defringe" , fastexport_bypass_defringe ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" , fastexport_bypass_dirpyrDenoise ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sh_hq" , fastexport_bypass_sh_hq ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" , fastexport_bypass_dirpyrequalizer ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_wavelet" , fastexport_bypass_wavelet ); + keyFile.set_string ("Fast Export", "fastexport_raw_bayer_method" , fastexport_raw_bayer_method ); + //keyFile.set_boolean ("Fast Export", "fastexport_bypass_bayer_raw_all_enhance" , fastexport_bypass_raw_bayer_all_enhance ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" , fastexport_bypass_raw_bayer_dcb_iterations ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" , fastexport_bypass_raw_bayer_dcb_enhance ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations", fastexport_bypass_raw_bayer_lmmse_iterations); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" , fastexport_bypass_raw_bayer_linenoise ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" , fastexport_bypass_raw_bayer_greenthresh ); + keyFile.set_string ("Fast Export", "fastexport_raw_xtrans_method" , fastexport_raw_xtrans_method ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps" , fastexport_bypass_raw_ccSteps ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ca" , fastexport_bypass_raw_ca ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_df" , fastexport_bypass_raw_df ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ff" , fastexport_bypass_raw_ff ); + keyFile.set_string ("Fast Export", "fastexport_icm_input" , fastexport_icm_input ); + keyFile.set_string ("Fast Export", "fastexport_icm_working" , fastexport_icm_working ); + keyFile.set_string ("Fast Export", "fastexport_icm_output" , fastexport_icm_output ); + keyFile.set_integer ("Fast Export", "fastexport_icm_output_intent" , fastexport_icm_outputIntent ); + keyFile.set_string ("Fast Export", "fastexport_icm_gamma" , fastexport_icm_gamma ); + keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled" , fastexport_resize_enabled ); + keyFile.set_double ("Fast Export", "fastexport_resize_scale" , fastexport_resize_scale ); + keyFile.set_string ("Fast Export", "fastexport_resize_appliesTo" , fastexport_resize_appliesTo ); + keyFile.set_string ("Fast Export", "fastexport_resize_method" , fastexport_resize_method ); + keyFile.set_integer ("Fast Export", "fastexport_resize_dataspec" , fastexport_resize_dataspec ); + keyFile.set_integer ("Fast Export", "fastexport_resize_width" , fastexport_resize_width ); + keyFile.set_integer ("Fast Export", "fastexport_resize_height" , fastexport_resize_height ); - keyFile.set_string ("Dialogs", "LastIccDir", lastIccDir); - keyFile.set_string ("Dialogs", "LastDarkframeDir", lastDarkframeDir); - keyFile.set_string ("Dialogs", "LastFlatfieldDir", lastFlatfieldDir); - keyFile.set_string ("Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir); - keyFile.set_string ("Dialogs", "LastLabCurvesDir", lastLabCurvesDir); - keyFile.set_string ("Dialogs", "LastRetinexDir", lastRetinexDir); - keyFile.set_string ("Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); - keyFile.set_string ("Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); - keyFile.set_string ("Dialogs", "LastPFCurvesDir", lastPFCurvesDir); - keyFile.set_string ("Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); - keyFile.set_string ("Dialogs", "LastBWCurvesDir", lastBWCurvesDir); - keyFile.set_string ("Dialogs", "LastToneCurvesDir", lastToneCurvesDir); - keyFile.set_string ("Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); - keyFile.set_string ("Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); + keyFile.set_string ("Dialogs", "LastIccDir", lastIccDir); + keyFile.set_string ("Dialogs", "LastDarkframeDir", lastDarkframeDir); + keyFile.set_string ("Dialogs", "LastFlatfieldDir", lastFlatfieldDir); + keyFile.set_string ("Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir); + keyFile.set_string ("Dialogs", "LastLabCurvesDir", lastLabCurvesDir); + keyFile.set_string ("Dialogs", "LastRetinexDir", lastRetinexDir); + keyFile.set_string ("Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); + keyFile.set_string ("Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); + keyFile.set_string ("Dialogs", "LastPFCurvesDir", lastPFCurvesDir); + keyFile.set_string ("Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); + keyFile.set_string ("Dialogs", "LastBWCurvesDir", lastBWCurvesDir); + keyFile.set_string ("Dialogs", "LastToneCurvesDir", lastToneCurvesDir); + keyFile.set_string ("Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); + keyFile.set_string ("Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); - keyData = keyFile.to_data (); + keyData = keyFile.to_data (); } catch (Glib::KeyFileError&) {} diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 1ae650a5f..fba2ef059 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -73,9 +73,10 @@ void ParamsEdited::set (bool v) retinex.limd = v; retinex.highl = v; retinex.baselog = v; -// retinex.grbl = v; + retinex.skal = v; retinex.medianmap = v; retinex.transmissionCurve = v; + retinex.gaintransmissionCurve = v; retinex.highlights = v; retinex.htonalwidth = v; retinex.shadows = v; @@ -547,6 +548,7 @@ void ParamsEdited::initFrom (const std::vector retinex.cdHcurve = retinex.cdHcurve && p.retinex.cdHcurve == other.retinex.cdHcurve; retinex.lhcurve = retinex.lhcurve && p.retinex.lhcurve == other.retinex.lhcurve; retinex.transmissionCurve = retinex.transmissionCurve && p.retinex.transmissionCurve == other.retinex.transmissionCurve; + retinex.gaintransmissionCurve = retinex.gaintransmissionCurve && p.retinex.gaintransmissionCurve == other.retinex.gaintransmissionCurve; retinex.retinexMethod = retinex.retinexMethod && p.retinex.retinexMethod == other.retinex.retinexMethod; retinex.mapMethod = retinex.mapMethod && p.retinex.mapMethod == other.retinex.mapMethod; retinex.viewMethod = retinex.viewMethod && p.retinex.viewMethod == other.retinex.viewMethod; @@ -566,7 +568,7 @@ void ParamsEdited::initFrom (const std::vector retinex.limd = retinex.limd && p.retinex.limd == other.retinex.limd; retinex.highl = retinex.highl && p.retinex.highl == other.retinex.highl; retinex.baselog = retinex.baselog && p.retinex.baselog == other.retinex.baselog; -// retinex.grbl = retinex.grbl && p.retinex.grbl == other.retinex.grbl; + retinex.skal = retinex.skal && p.retinex.skal == other.retinex.skal; retinex.medianmap = retinex.medianmap && p.retinex.medianmap == other.retinex.medianmap; retinex.highlights = retinex.highlights && p.retinex.highlights == other.retinex.highlights; retinex.htonalwidth = retinex.htonalwidth && p.retinex.htonalwidth == other.retinex.htonalwidth; @@ -1093,6 +1095,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.retinex.transmissionCurve = mods.retinex.transmissionCurve; } + if (retinex.gaintransmissionCurve) { + toEdit.retinex.gaintransmissionCurve = mods.retinex.gaintransmissionCurve; + } + if (retinex.retinexMethod) { toEdit.retinex.retinexMethod = mods.retinex.retinexMethod; } @@ -1165,9 +1171,9 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.retinex.baselog = mods.retinex.baselog; } -// if (retinex.grbl) { -// toEdit.retinex.grbl = mods.retinex.grbl; -// } + if (retinex.skal) { + toEdit.retinex.skal = mods.retinex.skal; + } if (retinex.gain) { toEdit.retinex.gain = dontforceSet && options.baBehav[ADDSET_RETI_GAIN] ? toEdit.retinex.gain + mods.retinex.gain : mods.retinex.gain; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 8543fbfa8..f8d18ae57 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -78,9 +78,10 @@ public: bool limd; bool highl; bool baselog; -// bool grbl; + bool skal; bool method; bool transmissionCurve; + bool gaintransmissionCurve; bool cdcurve; bool mapcurve; bool cdHcurve; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 10800d527..14c9cb0eb 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -572,9 +572,9 @@ Gtk::Widget* Preferences::getPerformancePanel () clutCacheSizeSB->set_increments (1, 5); clutCacheSizeSB->set_max_length(2); // Will this be sufficient? :) #ifdef _OPENMP - clutCacheSizeSB->set_range (1, 2 * omp_get_num_procs()); + clutCacheSizeSB->set_range (1, 3 * omp_get_num_procs()); #else - clutCacheSizeSB->set_range (1, 8); + clutCacheSizeSB->set_range (1, 12); #endif clutCacheSizeHB->pack_start (*CLUTLl, Gtk::PACK_SHRINK, 0); clutCacheSizeHB->pack_end (*clutCacheSizeSB, Gtk::PACK_SHRINK, 0); diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index 820ffe1d7..fead40b88 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -54,6 +54,9 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), dhbox->pack_start(*retinexcolorspace); retinexVBox->pack_start(*dhbox); + Gtk::VBox *equalVBox = Gtk::manage (new Gtk::VBox()); + + equalFrame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_EQUAL"))); // Histogram equalizer Lab curve curveEditorGD = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LAB")); @@ -161,11 +164,11 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), grad = Gtk::manage (new Adjuster (M("TP_RETINEX_GRAD"), -2., 2., 1., 1.)); grads = Gtk::manage (new Adjuster (M("TP_RETINEX_GRADS"), -2., 2., 1., 1.)); gain = Gtk::manage (new Adjuster (M("TP_RETINEX_GAIN"), 20, 200, 1, 50)); - offs = Gtk::manage (new Adjuster (M("TP_RETINEX_OFFSET"), -10000, 10000, 1, 0)); + offs = Gtk::manage (new Adjuster (M("TP_RETINEX_OFFSET"), -1000, 5000, 1, 0)); // vart = Gtk::manage (new Adjuster (M("TP_RETINEX_VARIANCE"), 50, 500, 1, 125)); limd = Gtk::manage (new Adjuster (M("TP_RETINEX_THRESHOLD"), 2, 100, 1, 8)); - baselog = Gtk::manage (new Adjuster (M("TP_RETINEX_BASELOG"), 1.1, 100., 0.001, 2.718)); -// grbl = Gtk::manage (new Adjuster (M("TP_RETINEX_HIGHLIGHT3"), 1, 100, 1, 50)); + baselog = Gtk::manage (new Adjuster (M("TP_RETINEX_BASELOG"), 1., 10., 1., 3.)); + skal = Gtk::manage (new Adjuster (M("TP_RETINEX_SKAL"), 1, 8, 1, 3)); gain->set_tooltip_markup (M("TP_RETINEX_GAIN_TOOLTIP")); scal->set_tooltip_markup (M("TP_RETINEX_SCALES_TOOLTIP")); iter->set_tooltip_markup (M("TP_RETINEX_ITER_TOOLTIP")); @@ -175,6 +178,21 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), limd->set_tooltip_markup (M("TP_RETINEX_THRESHOLD_TOOLTIP")); baselog->set_tooltip_markup (M("TP_RETINEX_BASELOG_TOOLTIP")); + // Gain Transmission map curve + gaintransmissionCurve = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_GAINTRANSMISSION")); + gaintransmissionCurve->setCurveListener (this); + +// std::vector defaultCurve; + rtengine::RetinexParams::getDefaultgaintransmissionCurve(defaultCurve); + gaintransmissionShape = static_cast(gaintransmissionCurve->addCurve(CT_Flat, "", NULL, false)); + gaintransmissionShape->setIdentityValue(0.); + gaintransmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); + gaintransmissionShape->setBottomBarBgGradient(milestones); + gaintransmissionCurve->set_tooltip_markup (M("TP_RETINEX_GAINTRANSMISSION_TOOLTIP")); + + gaintransmissionCurve->curveListComplete(); + + Gtk::Frame *p1Frame; p1Frame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_LABEL_MASK")) ); p1Frame->set_border_width(0); @@ -251,52 +269,81 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), settingsVBox->pack_start (*transLabels2); transLabels2->show (); - settingsVBox->pack_start (*curveEditorGD, Gtk::PACK_SHRINK, 4); + equalVBox->pack_start (*curveEditorGD, Gtk::PACK_SHRINK, 4); curveEditorGD->show(); - settingsVBox->pack_start (*curveEditorGDH, Gtk::PACK_SHRINK, 4); + equalVBox->pack_start (*curveEditorGDH, Gtk::PACK_SHRINK, 4); curveEditorGDH->show(); - settingsVBox->pack_start (*curveEditorGH, Gtk::PACK_SHRINK, 4); + equalVBox->pack_start (*curveEditorGH, Gtk::PACK_SHRINK, 4); curveEditorGH->show(); gambox->pack_start(*gammaretinex); - settingsVBox->pack_start(*gambox); + equalVBox->pack_start(*gambox); gammaretinex->show(); - settingsVBox->pack_start (*gam); + equalVBox->pack_start (*gam); gam->show (); - settingsVBox->pack_start (*slope); + equalVBox->pack_start (*slope); slope->show (); + equalFrame->add(*equalVBox); + settingsVBox->pack_start (*equalFrame); - settingsVBox->pack_start (*iter); + + Gtk::VBox *iterVBox = Gtk::manage (new Gtk::VBox()); + + iterFrame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_ITERF"))); + + iterVBox->pack_start (*iter); iter->show (); - settingsVBox->pack_start (*scal); + iterVBox->pack_start (*scal); scal->show (); - settingsVBox->pack_start (*grad); + iterVBox->pack_start (*grad); grad->show (); - settingsVBox->pack_start (*grads); + iterVBox->pack_start (*grads); grads->show (); - settingsVBox->pack_start (*gain); - gain->show (); + iterFrame->add(*iterVBox); + settingsVBox->pack_start (*iterFrame); - settingsVBox->pack_start (*offs); - offs->show (); + Gtk::VBox *tranVBox = Gtk::manage (new Gtk::VBox()); -// settingsVBox->pack_start (*vart); -// vart->show (); + tranFrame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_TRANF"))); - settingsVBox->pack_start (*limd); + tranVBox->pack_start( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2); + transmissionCurveEditorG->show(); + + tranVBox->pack_start (*skal); + skal->show (); + + tranVBox->pack_start (*limd); limd->show (); - // settingsVBox->pack_start (*Gtk::manage (new Gtk::HSeparator())); + tranVBox->pack_start (*medianmap); + medianmap->show (); + + tranFrame->add(*tranVBox); + settingsVBox->pack_start (*tranFrame); + + Gtk::VBox *gainBox = Gtk::manage (new Gtk::VBox()); + + Gtk::HSeparator *separator = Gtk::manage (new Gtk::HSeparator()); + settingsVBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); + gainFrame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_GAINOFFS"))); + + gainBox->pack_start( *gaintransmissionCurve, Gtk::PACK_SHRINK, 2); + gaintransmissionCurve->show(); + + gainBox->pack_start (*offs); + offs->show (); + gainFrame->add(*gainBox); + settingsVBox->pack_start (*gainFrame); viewbox->pack_start(*viewMethod); // settingsVBox->pack_start(*viewbox); @@ -326,18 +373,12 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), // settingsVBox->pack_start (*highl); // highl->show (); -// settingsVBox->pack_start (*baselog); -// baselog->show (); +// settingsVBox->pack_start (*baselog); +// baselog->show (); -// settingsVBox->pack_start (*grbl); -// grbl->show (); // settingsVBox->pack_start (*Gtk::manage (new Gtk::HSeparator())); - settingsVBox->pack_start( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2); - transmissionCurveEditorG->show(); - settingsVBox->pack_start (*medianmap); - medianmap->show (); expsettings->add(*settingsVBox); neutrHBox = Gtk::manage (new Gtk::HBox ()); @@ -468,12 +509,12 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), s_tonalwidth->delay = 200; } - /* grbl->setAdjusterListener (this); + skal->setAdjusterListener (this); + + if (skal->delay < 200) { + skal->delay = 200; + } - if (grbl->delay < 200) { - grbl->delay = 200; - } - */ pack_start (*retinexVBox); p1Frame->add(*p1VBox); pack_start (*p1Frame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -494,6 +535,7 @@ Retinex::~Retinex() delete curveEditorGD; delete curveEditorGDH; delete transmissionCurveEditorG; + delete gaintransmissionCurve; delete curveEditorGH; delete curveEditormap; @@ -525,6 +567,7 @@ void Retinex::neutral_pressed () retinexcolorspace->set_active(0); gammaretinex->set_active(0); transmissionShape->reset(); + gaintransmissionShape->reset(); cdshape->reset(); cdshapeH->reset(); lhshape->reset(); @@ -656,7 +699,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) limd->setEditedState (pedited->retinex.limd ? Edited : UnEdited); highl->setEditedState (pedited->retinex.highl ? Edited : UnEdited); baselog->setEditedState (pedited->retinex.baselog ? Edited : UnEdited); -// grbl->setEditedState (pedited->retinex.grbl ? Edited : UnEdited); + skal->setEditedState (pedited->retinex.skal ? Edited : UnEdited); set_inconsistent (multiImage && !pedited->retinex.enabled); medianmap->set_inconsistent (!pedited->retinex.medianmap); radius->setEditedState (pedited->retinex.radius ? Edited : UnEdited); @@ -689,6 +732,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) cdshape->setUnChanged (!pedited->retinex.cdcurve); cdshapeH->setUnChanged (!pedited->retinex.cdHcurve); transmissionShape->setUnChanged (!pedited->retinex.transmissionCurve); + gaintransmissionShape->setUnChanged (!pedited->retinex.gaintransmissionCurve); lhshape->setUnChanged (!pedited->retinex.lhcurve); mapshape->setUnChanged (!pedited->retinex.mapcurve); @@ -715,7 +759,8 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) shadows->setValue (pp->retinex.shadows); s_tonalwidth->setValue (pp->retinex.stonalwidth); -// grbl->setValue (pp->retinex.grbl); + skal->setValue (pp->retinex.skal); + if(pp->retinex.iter == 1) { grad->set_sensitive(false); scal->set_sensitive(false); @@ -809,6 +854,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) mapMethodConn.block(false); viewMethodConn.block(false); transmissionShape->setCurve (pp->retinex.transmissionCurve); + gaintransmissionShape->setCurve (pp->retinex.gaintransmissionCurve); enableListener (); @@ -833,12 +879,13 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) pp->retinex.limd = (int)limd->getValue (); pp->retinex.highl = (int)highl->getValue (); pp->retinex.baselog = baselog->getValue (); -// pp->retinex.grbl = (int)grbl->getValue (); + pp->retinex.skal = (int)skal->getValue (); pp->retinex.cdcurve = cdshape->getCurve (); pp->retinex.lhcurve = lhshape->getCurve (); pp->retinex.cdHcurve = cdshapeH->getCurve (); pp->retinex.mapcurve = mapshape->getCurve (); pp->retinex.transmissionCurve = transmissionShape->getCurve (); + pp->retinex.gaintransmissionCurve = gaintransmissionShape->getCurve (); pp->retinex.enabled = getEnabled(); pp->retinex.medianmap = medianmap->get_active(); @@ -870,10 +917,11 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) pedited->retinex.limd = limd->getEditedState (); pedited->retinex.highl = highl->getEditedState (); pedited->retinex.baselog = baselog->getEditedState (); -// pedited->retinex.grbl = grbl->getEditedState (); + pedited->retinex.skal = skal->getEditedState (); pedited->retinex.cdcurve = !cdshape->isUnChanged (); pedited->retinex.cdHcurve = !cdshapeH->isUnChanged (); pedited->retinex.transmissionCurve = !transmissionShape->isUnChanged (); + pedited->retinex.gaintransmissionCurve = !gaintransmissionShape->isUnChanged (); pedited->retinex.mapcurve = !mapshape->isUnChanged (); pedited->retinex.enabled = !get_inconsistent(); pedited->retinex.medianmap = !medianmap->get_inconsistent(); @@ -1131,7 +1179,7 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi limd->setDefault (defParams->retinex.limd); highl->setDefault (defParams->retinex.highl); baselog->setDefault (defParams->retinex.baselog); -// grbl->setDefault (defParams->retinex.grbl); + skal->setDefault (defParams->retinex.skal); gam->setDefault (defParams->retinex.gam); slope->setDefault (defParams->retinex.slope); @@ -1154,7 +1202,7 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi limd->setDefaultEditedState (pedited->retinex.limd ? Edited : UnEdited); highl->setDefaultEditedState (pedited->retinex.highl ? Edited : UnEdited); baselog->setDefaultEditedState (pedited->retinex.baselog ? Edited : UnEdited); -// grbl->setDefaultEditedState (pedited->retinex.grbl ? Edited : UnEdited); + skal->setDefaultEditedState (pedited->retinex.skal ? Edited : UnEdited); gam->setDefaultEditedState (pedited->retinex.gam ? Edited : UnEdited); slope->setDefaultEditedState (pedited->retinex.slope ? Edited : UnEdited); @@ -1172,7 +1220,7 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi limd->setDefaultEditedState (Irrelevant); highl->setDefaultEditedState (Irrelevant); baselog->setDefaultEditedState (Irrelevant); -// grbl->setDefaultEditedState (Irrelevant); + skal->setDefaultEditedState (Irrelevant); str->setDefaultEditedState (Irrelevant); scal->setDefaultEditedState (Irrelevant); iter->setDefaultEditedState (Irrelevant); @@ -1245,8 +1293,8 @@ void Retinex::adjusterChanged (Adjuster* a, double newval) listener->panelChanged (EvLhighl, highl->getTextValue()); } else if (a == baselog) { listener->panelChanged (EvLbaselog, baselog->getTextValue()); -// } else if (a == grbl) { -// listener->panelChanged (EvLgrbl, grbl->getTextValue()); + } else if (a == skal) { + listener->panelChanged (EvLskal, skal->getTextValue()); } else if (a == gam) { listener->panelChanged (EvLgam, gam->getTextValue()); } else if (a == slope) { @@ -1274,6 +1322,7 @@ void Retinex::autoOpenCurve () cdshape->openIfNonlinear(); cdshapeH->openIfNonlinear(); transmissionShape->openIfNonlinear(); + gaintransmissionShape->openIfNonlinear(); lhshape->openIfNonlinear(); mapshape->openIfNonlinear(); @@ -1289,6 +1338,8 @@ void Retinex::curveChanged (CurveEditor* ce) listener->panelChanged (EvLCDHCurve, M("HISTORY_CUSTOMCURVE")); } else if (ce == transmissionShape) { listener->panelChanged (EvRetinextransmission, M("HISTORY_CUSTOMCURVE")); + } else if (ce == gaintransmissionShape) { + listener->panelChanged (EvRetinexgaintransmission, M("HISTORY_CUSTOMCURVE")); } else if (ce == lhshape) { listener->panelChanged (EvRetinexlhcurve, M("HISTORY_CUSTOMCURVE")); } else if (ce == mapshape) { @@ -1410,10 +1461,11 @@ void Retinex::setBatchMode (bool batchMode) shadows->showEditedCB (); s_tonalwidth->showEditedCB (); -// grbl->showEditedCB (); + skal->showEditedCB (); curveEditorGD->setBatchMode (batchMode); curveEditorGDH->setBatchMode (batchMode); transmissionCurveEditorG->setBatchMode (batchMode); + gaintransmissionCurve->setBatchMode (batchMode); curveEditorGH->setBatchMode (batchMode); curveEditormap->setBatchMode (batchMode); diff --git a/rtgui/retinex.h b/rtgui/retinex.h index d24254757..064756a7b 100644 --- a/rtgui/retinex.h +++ b/rtgui/retinex.h @@ -35,7 +35,7 @@ protected: Adjuster* limd; Adjuster* highl; Adjuster* baselog; - Adjuster* grbl; + Adjuster* skal; Adjuster* gam; Adjuster* slope; Adjuster* highlights; @@ -76,15 +76,21 @@ protected: Gtk::Label* mMLabels; Gtk::Label* transLabels; Gtk::Label* transLabels2; + Gtk::Frame *gainFrame; + Gtk::Frame *tranFrame; + Gtk::Frame *iterFrame; + Gtk::Frame *equalFrame; DiagonalCurveEditor* cdshape; DiagonalCurveEditor* cdshapeH; DiagonalCurveEditor* mapshape; CurveEditorGroup* transmissionCurveEditorG; + CurveEditorGroup* gaintransmissionCurve; sigc::connection retinexMethodConn, neutralconn, mapMethodConn, viewMethodConn; sigc::connection retinexColorSpaceConn; sigc::connection gammaretinexConn; FlatCurveEditor* transmissionShape; + FlatCurveEditor* gaintransmissionShape; FlatCurveEditor* lhshape; bool lastmedianmap; sigc::connection medianmapConn;